/* Header */
.site-header {
    background-color: var(--primary-color);
    height: 55.9954px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.site-header .container {
    height: 100%;
}

.main-navigation {
    display: grid;
    grid-template-columns: 20% 60% 12% 8%;
    align-items: center;
    height: 100%;
}

.main-navigation .logo {
    padding-right: 20px; /* Add gap between logo and menu */
}

.main-navigation .logo a {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    height: 100%;
}

.header-logo-img {
    max-height: 30px; /* Constrained to 30px as requested */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.main-navigation .header-menu {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-navigation .header-menu::-webkit-scrollbar {
    display: none;
}

.main-navigation ul {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation ul li {
    position: relative;
    list-style: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.main-navigation ul li a {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.main-navigation ul li a:hover {
    opacity: 0.8;
}

/* Flattened Sub-menu for Primary Menu (if not in mega menu) */
.main-navigation ul .sub-menu {
    position: static;
    display: flex;
    gap: 30px;
    margin-left: 30px;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0;
    border: none;
}

.main-navigation ul .sub-menu li {
    width: auto;
}

.main-navigation ul .sub-menu li a {
    color: #ffffff;
    font-size: 18px;
    padding: 0;
}

.main-navigation ul .sub-menu li a:hover {
    background: transparent;
    color: #ffffff;
    opacity: 0.8;
}

.header-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.header-social a {
    color: var(--primary-color);
    background-color: #ffffff;
    font-size: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-social a:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    color: var(--primary-color);
}

.header-toggle {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-end;
}

.action-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s ease;
}

.action-btn:hover {
    opacity: 0.8;
}

/* Header Search Form */
.header-search-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 99;
    border-top: 1px solid #ddd;
}
.header-search-wrapper.active {
    display: block;
}
.header-search-wrapper .search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}
.header-search-wrapper .search-field {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
    font-family: 'Kalpurush', sans-serif;
}
.header-search-wrapper .search-submit {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s ease;
    font-family: 'Kalpurush', sans-serif;
}
.header-search-wrapper .search-submit:hover {
    opacity: 0.9;
}

/* Breaking News */
.breaking-news-section {
    margin-top: 15px;
}
.breaking-news-inner {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.breaking-title {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 6px 15px;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.pulse-icon {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.breaking-ticker {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.ticker-move {
    display: flex;
    align-items: center;
    animation: seamlessTicker 80s linear infinite;
}
.ticker-move:hover {
    animation-play-state: paused;
}
.ticker-item {
    color: var(--text-color);
    font-size: 16px;
    margin-right: 35px;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
}
.ticker-item:hover {
    color: var(--primary-color);
}
.square-icon {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 2px;
    display: inline-block;
    margin-right: 10px;
    flex-shrink: 0;
}

@keyframes seamlessTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Header Gap */
.header-gap {
    height: 25px;
}

/* Trending Tags */
.trending-tags-section {
    margin-bottom: 0; /* Reduced bottom gap */
}
.trending-tags-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: transparent;
    border: none;
    padding: 5px 0; /* Added vertical padding to prevent hover cutoff */
    box-shadow: none;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.trending-tags-inner::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.trending-label {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border-right: 2px solid #eaedf1;
    padding-right: 15px;
    padding-left: 4px;
    flex-shrink: 0;
}
.trending-tags-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}
.trending-tags-list .tag-item {
    background-color: #f1f5f9;
    color: var(--text-color);
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}
.trending-tags-list .tag-item:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.trending-tags-list .no-tags {
    color: var(--light-text);
    font-size: 14px;
}

/* Header Responsive */
@media (max-width: 768px) {
    .site-header {
        height: 50px;
    }

    .main-navigation {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    
    .main-navigation .logo {
        margin-right: auto;
        padding-right: 10px;
    }
    
    .main-navigation .header-menu {
        display: none;
    }
    
    .main-navigation .header-social {
        display: flex;
        gap: 8px; /* Reduced gap */
        margin-right: 12px;
    }
    
    .main-navigation .header-social a {
        font-size: 12px;
        width: 24px;
        height: 24px;
    }
    
    /* Hide Twitter on mobile to save space */
    .main-navigation .header-social a:nth-child(2) {
        display: none;
    }
    
    .main-navigation .logo a {
        font-size: 22px;
    }
    
    .header-logo-img {
        max-width: 150px; /* Reduce width on mobile */
        max-height: 25px; /* Slightly smaller height on mobile */
    }
    
    .header-search-wrapper {
        padding: 15px 0;
    }
    
    .header-search-wrapper .search-field {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .header-search-wrapper .search-submit {
        padding: 8px 15px;
        font-size: 14px;
    }

    .breaking-news-section .container {
        padding-left: 0;
        padding-right: 0;
    }
    .breaking-news-section {
        padding: 0;
    }
    .breaking-title {
        font-size: 14px;
        padding: 4px 10px;
        border-radius: 0;
    }
    .ticker-item {
        font-size: 15px;
        margin-right: 25px;
    }

    .header-gap {
        height: 15px;
    }
    
    .trending-tags-inner {
        padding: 0;
    }
    
    .trending-label {
        font-size: 15px;
        padding-right: 10px;
    }
}
