/* =====================================================================
   SmartWaste MCD - BWG Operations Portal
   Header / Navbar - matches reference UI (dark pill navbar, lime accent)
   ===================================================================== */

:root {
    --header-bg: #161616;
    --header-bg-pill: rgba(255, 255, 255, 0.08);
    --accent-lime: #C7E600;
    --accent-lime-dark: #1A2400;
    --text-light: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.75);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Header shell ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: transparent;
    /* sits over the hero image, like the reference */
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 40px;
    font-family: var(--font-body);
}

/* Solid dark pill wrapping logo + nav (matches the rounded dark bar in the image) */
.header-nav-bar {
    display: flex;
    align-items: center;
    gap: 32px;
    background: rgba(22, 22, 22, 0.85);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: 10px 16px;
    flex: 1;
}

/* ---------- Logo ---------- */
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    white-space: nowrap;
}

.site-logo .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1F4A3D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--accent-lime-dark);
    font-weight: 800;
}

/* ---------- Primary nav ---------- */
.main-nav {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
    padding: 0;
    flex: 1;
}

.main-nav>li {
    position: relative;
}

.main-nav>li>a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.main-nav>li>a:hover,
.main-nav>li.active>a {
    background: var(--header-bg-pill);
    color: var(--text-light);
}

.main-nav .dropdown-icon {
    font-size: 12px;
    opacity: 0.7;
}

/* ---------- Dropdown (Secondary / Tertiary) ---------- */
.dropdown-menu {
    list-style: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: #1E1E1E;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.main-nav>li.has-dropdown:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 9px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
}

.dropdown-menu li a:hover {
    background: var(--header-bg-pill);
    color: var(--text-light);
}

/* Nested tertiary dropdown opens to the right of its secondary parent */
.dropdown-menu .dropdown-menu {
    top: 0;
    left: calc(100% + 8px);
}

/* ---------- CTA button (e.g. "Book Now" / "Register Now") ---------- */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-lime);
    color: var(--accent-lime-dark);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    padding: 10px 10px 10px 20px;
    border-radius: 12px;
    white-space: nowrap;
}

.btn-cta .arrow-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-lime-dark);
    color: var(--accent-lime);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* ---------- Mobile toggle ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .header-inner {
        padding: 16px 20px;
    }

    .nav-toggle {
        display: block;
    }

    .header-nav-bar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 78%;
        max-width: 320px;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 0;
        padding: 24px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }

    .header-nav-bar.is-open {
        transform: translateX(0);
    }

    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 2px;
    }

    .main-nav>li {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: transparent;
        border: none;
        padding-left: 12px;
    }

    .main-nav>li.has-dropdown.is-open .dropdown-menu {
        display: block;
    }

    .dropdown-menu .dropdown-menu {
        left: 0;
    }
}