/* All styles scoped to #header to avoid bleeding into main content */
#header {
    background-color: #ffffff;
    color: #000000;
    font-family: 'Inter', sans-serif;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#header .header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Styling */
#header .logo img {
    height: 35px;
    display: block;
}
#header .logo a {
    text-decoration: none;
}
#header .tagline {
    font-size: 10px;
    color: #888;
    font-style: italic;
    display: block;
    margin-top: -5px;
}

/* Navigation Links */
#header .nav-menu > ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

#header .nav-link {
    color: #000000;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

#header .nav-link:hover {
    color: #87b942;
}

/* Dropdown Arrow Styling */
#header .arrow::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fff;
    transition: transform 0.3s ease;
}

/* Header Right Side */
#header .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

#header .support-link, #header .login-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

#header .icon-headset {
    color: #87b942;
}

/* Search Box Styling */
#header .search-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 4px 15px;
}

#header #searchBox {
    border: none;
    outline: none;
    padding: 5px;
    font-size: 13px;
    width: 180px;
    color: #333;
}

#header .search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
}

/* =============================================
   MOBILE HAMBURGER BUTTON
   ============================================= */
#header .mobile-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1200;
    position: relative;
}

#header .mobile-hamburger span {
    width: 25px;
    height: 2.5px;
    background: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Hamburger → X animation when open */
#header .mobile-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#header .mobile-hamburger.open span:nth-child(2) {
    opacity: 0;
}
#header .mobile-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =============================================
   DESKTOP DROPDOWN (hover-based)
   ============================================= */
#header .has-dropdown {
    position: relative;
}

#header .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-radius: 0 0 8px 8px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1100;
    border: 1px solid #eee;
    border-top: 2px solid #87b942;
    display: flex;
    flex-direction: column;
}

#header .dropdown-menu li {
    margin: 0;
    padding: 0;
}

/* Show Dropdown on Hover — Desktop Only */
@media (min-width: 1025px) {
    #header .has-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
    }

    #header .has-dropdown:hover .arrow::after {
        transform: rotate(180deg);
        border-top-color: #87b942;
    }
}

/* Dropdown Links */
#header .dropdown-menu li a {
    display: block;
    padding: 6px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    margin: 0;
    white-space: nowrap;
}

#header .dropdown-menu li a:hover {
    background-color: #f0faf0;
    color: #87b942;
}

/* =============================================
   MOBILE RESPONSIVE (≤1024px)
   ============================================= */
@media (max-width: 1024px) {

    /* Show hamburger */
    #header .mobile-hamburger {
        display: flex;
    }

    /* Hide header-right on mobile */
    #header .header-right {
        display: none;
    }

    /* Mobile Nav Panel — slides in from right */
    #header .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: #111;
        flex-direction: column;
        padding: 70px 0 30px;
        z-index: 1100;
        box-shadow: -5px 0 30px rgba(0,0,0,0.4);
        overflow-y: auto;
    }

    /* When active — show mobile nav */
    #header .nav-menu.active {
        display: flex;
    }

    /* Stack nav links vertically */
    #header .nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    #header .nav-menu > ul > li {
        border-bottom: 1px solid #222;
    }

    #header .nav-link {
        padding: 14px 24px;
        font-size: 15px;
        color: #fff;
        justify-content: space-between;
    }

    #header .nav-link:hover {
        background: #1a1a1a;
    }

    /* Arrow rotates when dropdown is active */
    #header .has-dropdown.active > .nav-link .arrow::after {
        transform: rotate(180deg);
        border-top-color: #87b942;
    }

    /* Mobile Dropdown — slides down under parent */
    #header .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        display: none;
        background: #1a1a1a;
        box-shadow: none;
        transform: none;
        padding: 0;
        border: none;
        border-radius: 0;
        min-width: 100%;
    }

    #header .has-dropdown.active .dropdown-menu {
        display: flex;
    }

    #header .dropdown-menu li a {
        color: #ccc;
        padding: 12px 24px 12px 40px;
        font-size: 14px;
        margin: 0;
        border-radius: 0;
    }

    #header .dropdown-menu li a:hover {
        background: #222;
        color: #87b942;
    }
}

/* =============================================
   MOBILE OVERLAY (dims background)
   ============================================= */
#header .nav-menu.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}
