/* =====================================================
   BANNER CAROUSEL
===================================================== */
.banner-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
    /* Space below banner */
}

.banner-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.banner-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-slide a {
    display: block;
    width: 100%;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.banner-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
}

.banner-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

.banner-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}


/* Overlay for Mobile Menu */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* --- HEADER / MENU STRUCTURE --- */
.site-header {
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    font-family: 'Segoe UI', sans-serif;
    border-bottom: 1px solid var(--border);
}

/* 1. TOP BAR - Mobile First */
.top-bar {
    background-color: var(--primary);
    color: #FFFFFF;
    font-size: 0.8rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--primary-hover);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    /* Date left, social right even on mobile */
    align-items: center;
    min-height: 32px;
    gap: 10px;
}

.date-display {
    display: block;
    /* Show on mobile with small font */
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.top-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.top-links a {
    color: #FFFFFF;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-links a:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.social-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.social-icons a {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a svg {
    width: 14px;
    height: 14px;
}

.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
}

/* 2. MAIN HEADER (Branding) */
.main-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
}

/* Placeholder Ad */
.header-ad-placeholder {
    width: 728px;
    height: 90px;
    background-color: var(--bg-card);
    display: none;
    /* Hidden on mobile */
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    border: 1px dashed var(--border);
}

/* =====================================================
   3. NAVIGATION BAR - MOBILE FIRST
===================================================== */
.main-navigation {
    background-color: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

/* ======================
   HAMBURGER BUTTON (Mobile Only)
====================== */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 999;
}

.menu-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ======================
   MOBILE DRAWER
====================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: var(--bg-secondary);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.site-nav.active {
    transform: translateX(0);
}

/* Mobile Nav Header */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mobile-nav-header .logo img {
    height: 36px;
    width: auto;
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-nav-close:hover {
    background: var(--primary);
    color: white;
}

/* Mobile Search */
.mobile-search {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mobile-search form {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    border: 1px solid var(--border);
}

.mobile-search input {
    flex: 1;
    border: none;
    background: none;
    padding: 8px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.mobile-search button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-search button:hover {
    background: var(--primary-hover);
}

/* Mobile Menu Items */
.site-nav>ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
}

.site-nav>ul>li {
    margin: 0;
}

.site-nav>ul>li>a {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.site-nav>ul>li>a:hover,
.site-nav>ul>li>a:active {
    background: var(--bg-main);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* ======================
   HEADER SEARCH (Hidden on Mobile)
====================== */
.header-search {
    display: none;
}

.header-search form {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: 24px;
    padding: 6px 12px;
    border: 1px solid var(--border);
}

.header-search input {
    border: none;
    background: none;
    padding: 6px 8px;
    font-size: 14px;
    outline: none;
    width: 140px;
}

.header-search button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.header-search button:hover {
    color: var(--primary);
}

/* =====================================================
   HEADER RESPONSIVE (TABLET)
===================================================== */
@media (min-width: 600px) {

    /* Top Bar - Tablet: Increase sizes */
    .date-display {
        font-size: 0.75rem;
    }

    .social-icons {
        gap: 10px;
        margin-left: 12px;
        padding-left: 12px;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
    }

    .social-icons a {
        width: 30px;
        height: 30px;
    }

    .social-icons a svg {
        width: 16px;
        height: 16px;
    }
}

/* =====================================================
   HEADER RESPONSIVE (DESKTOP)
===================================================== */
@media (min-width: 768px) {

    /* Top Bar - Desktop Layout */
    .top-bar {
        padding: 6px 0;
    }

    .date-display {
        font-size: 0.85rem;
    }

    .social-icons {
        gap: 12px;
        margin-left: 15px;
        padding-left: 15px;
        border-left: 1px solid rgba(255, 255, 255, 0.3);
    }

    .social-icons a {
        width: 32px;
        height: 32px;
    }

    .social-icons a svg {
        width: 18px;
        height: 18px;
    }

    /* Header Ad */
    .header-ad-placeholder {
        display: flex;
    }

    /* ======================
       NAVIGATION DESKTOP
    ====================== */

    /* Hide hamburger */
    .menu-toggle {
        display: none;
    }

    /* Show desktop search */
    .header-search {
        display: flex;
    }

    /* Hide mobile elements */
    .mobile-nav-header,
    .mobile-search {
        display: none !important;
    }

    /* Nav becomes inline */
    .site-nav {
        position: static;
        width: auto;
        height: auto;
        max-width: none;
        background: transparent;
        box-shadow: none;
        transform: none;
        overflow: visible;
        flex: 1;
    }

    .site-nav>ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0;
        margin: 0;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .site-nav>ul>li {
        margin: 0;
    }

    .site-nav>ul>li>a {
        display: block;
        padding: 0 16px;
        line-height: 56px;
        font-size: 14px;
        font-weight: 600;
        border-left: none;
        border-bottom: 3px solid transparent;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.2s ease;
        position: relative;
    }

    .site-nav>ul>li>a::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: var(--primary);
        transform: translateX(-50%);
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .site-nav>ul>li>a:hover {
        background: transparent;
        color: var(--primary);
        border-left-color: transparent;
        padding-left: 16px;
    }

    .site-nav>ul>li>a:hover::before {
        width: calc(100% - 32px);
    }
}

/* Search Results Styling */
.header-search {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-results li {
    border-bottom: 1px solid var(--bg-main);
}

.search-results li:last-child {
    border-bottom: none;
}

.search-results li a {
    display: flex;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: background-color 0.2s;
    gap: 10px;
}

.search-results li a:hover {
    background-color: var(--bg-secondary);
}

.search-item-img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.search-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-info {
    display: flex;
    flex-direction: column;
}

.search-item-cat {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2px;
}

.search-item-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Mobile responsive for search results if needed */
@media (max-width: 767px) {
    .search-results {
        width: 100%;
        left: 0;
        right: 0;
    }
}