/* ============================================================
   HEADER CSS (header.css)
   ============================================================ */

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0b1120;
    --secondary: #141c33;
    --surface: #1a2444;
    --accent: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --accent2: #f5d77b;
    --text-primary: #ffffff;
    --text-secondary: #b0bcdb;
    --text-muted: #7a87a8;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    --radius: 14px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font: 'Inter', 'Hind Siliguri', sans-serif;
    --orange: #f57c00;
    --orange-light: #ffa726;
    --body-bg: #f5f6fa;
    --body-text: #2c3e50;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--body-bg);
    color: var(--body-text);
    min-height: 100vh;
    padding-top: 0;
    -webkit-tap-highlight-color: transparent;
}

/* ===== HEADER WRAPPER (STICKY) ===== */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #0f172a;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
    color: var(--text-primary);
}

.site-header.is-scrolled {
    background: rgba(11, 17, 32, 0.94);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ===== TOP HEADER ===== */
.header-top {
    width: 100%;
    background: #141c33;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 6px 0;
    min-height: 42px;
}

.header-top .header-top__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.header-top .social-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.header-top .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 15px;
    transition: var(--transition);
    background: var(--glass-bg);
    border: 1px solid transparent;
    text-decoration: none;
    flex-shrink: 0;
}

.header-top .social-links a:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.header-top .social-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 50%;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.auth-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.auth-action--login {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.auth-action--login:hover {
    background: var(--glass-bg);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.auth-action--register {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--primary);
    border: 1px solid transparent;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.auth-action--register:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.auth-action:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.auth-action i {
    font-size: 14px;
}

/* ===== CONTAINER (MAIN NAV) ===== */
.header-nav-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* ===== MAIN NAV ===== */
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 20px;
    min-height: 60px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    flex-shrink: 0;
    border-radius: 8px;
    padding: 2px 4px;
    transition: var(--transition);
}

.header-logo:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 10px;
}

.header-logo__icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.header-logo__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
    filter: drop-shadow(0 4px 16px rgba(0, 153, 0, 0.25));
}

.header-logo:hover .header-logo__icon {
    transform: rotate(-4deg) scale(1.04);
}

.header-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.header-logo__brand {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.header-logo__brand--accent {
    color: var(--orange);
}

.header-logo__brand--light {
    color: #e2e0f5;
}

.header-logo__tagline {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.4px;
    margin-top: 1px;
}

/* ===== DESKTOP NAV LINKS ===== */
.header-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.header-nav__list>li {
    position: relative;
    flex-shrink: 0;
}

.header-nav__list>li.has-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 18px;
    background: transparent;
    z-index: 99;
}

.header-nav__list>li>a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.2px;
    position: relative;
    white-space: nowrap;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.header-nav__list>li>a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 4px;
    transition: var(--transition);
    transform: translateX(-50%);
}

.header-nav__list>li>a:hover::after,
.header-nav__list>li>a.active::after {
    width: 60%;
}

.header-nav__list>li>a:hover,
.header-nav__list>li>a.active {
    color: #fff;
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.06);
}

.header-nav__list>li>a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.header-nav__list>li>a i {
    font-size: 13px;
    opacity: 0.7;
}

.header-nav__list>li>a .fa-chevron-down {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.header-nav__list>li:hover>a .fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown */
.header-dropdown {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;
    min-width: 220px;
    background: rgba(20, 28, 51, 0.96);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-radius: var(--radius);
    padding: 8px 0;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    list-style: none;
    z-index: 100;
    pointer-events: none;
}

.header-nav__list>li.has-dropdown:hover .header-dropdown,
.header-nav__list>li.has-dropdown:focus-within .header-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.header-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.header-dropdown li a:hover {
    background: var(--glass-bg);
    color: #fff;
    border-left-color: var(--accent);
    padding-left: 26px;
}

.header-dropdown li a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: 4px;
}

.header-dropdown li a i {
    font-size: 14px;
    color: var(--accent);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== MOBILE ELEMENTS ===== */
.header-mobile-toggles {
    display: none;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-mobile-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    flex-shrink: 0;
}

.header-mobile-home:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
}

.header-mobile-home:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 50%;
}

/* Hamburger */
.header-hamburger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 6px;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: var(--transition);
    border-radius: 8px;
    position: relative;
    z-index: 10001;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.header-hamburger span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 4px;
    transition: var(--transition);
    transform-origin: center;
    pointer-events: none;
}

.header-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--accent);
}

.header-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    background: var(--accent);
}

.header-hamburger:hover {
    background: var(--glass-bg);
}

.header-hamburger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

/* ===== MOBILE OVERLAY MENU ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(11, 17, 32, 0.9);
    backdrop-filter: blur(32px) saturate(1.8);
    -webkit-backdrop-filter: blur(32px) saturate(1.8);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    clip-path: circle(0% at calc(100% - 40px) 40px);
    transition: clip-path 0.55s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.4s ease,
        visibility 0.4s ease;
    padding: 0;
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
    clip-path: circle(150% at calc(100% - 40px) 40px);
}

.mobile-nav__inner {
    width: 100%;
    max-width: 540px;
    padding: 28px 28px 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.12s,
        opacity 0.5s ease 0.12s;
    height: 100%;
    overflow-y: auto;
    align-items: flex-start;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.open .mobile-nav__inner {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.mobile-nav__close {
    align-self: flex-end;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 4px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: rotate(90deg);
    border-color: var(--accent);
}

.mobile-nav__close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 50%;
}

.mobile-nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-nav__list li {
    width: 100%;
}

.mobile-nav__list li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    background: transparent;
    border: 1px solid transparent;
    letter-spacing: 0.2px;
    width: 100%;
    justify-content: flex-start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav__list li a:hover,
.mobile-nav__list li a.active {
    color: #fff;
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--glass-border);
    transform: translateX(4px);
}

.mobile-nav__list li a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius);
}

.mobile-nav__list li a i {
    font-size: 18px;
    color: var(--accent);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-nav__dropdown-toggle {
    cursor: pointer;
    user-select: none;
    justify-content: flex-start !important;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav__dropdown-toggle .fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 12px;
    margin-left: auto;
    color: var(--text-muted);
}

.mobile-nav__dropdown-toggle.open .fa-chevron-down {
    transform: rotate(180deg);
}

.mobile-nav__submenu {
    list-style: none;
    padding: 0;
    margin: 0 0 0 32px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.35s ease,
        margin 0.35s ease;
    opacity: 0;
    width: calc(100% - 32px);
}

.mobile-nav__submenu.open {
    max-height: 300px;
    opacity: 1;
    margin-top: 4px;
    margin-bottom: 4px;
}

.mobile-nav__submenu li a {
    padding: 10px 18px 10px 46px;
    font-size: 14.5px;
    font-weight: 500;
    justify-content: flex-start;
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: var(--radius);
}

.mobile-nav__submenu li a:hover {
    background: var(--glass-bg);
    color: #fff;
    transform: translateX(4px);
}

.mobile-nav__submenu li a i {
    font-size: 14px;
    width: 22px;
    color: var(--accent);
}

.mobile-nav__footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    width: 100%;
    align-items: flex-start;
}

.mobile-nav__social {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.mobile-nav__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 20px;
    transition: var(--transition);
    text-decoration: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav__social a:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.mobile-nav__social a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 50%;
}

.mobile-nav__auth {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mobile-nav__auth .auth-action {
    padding: 10px 28px;
    font-size: 14px;
    border-radius: 50px;
    justify-content: center;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-progress-bar {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 2.5px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
    z-index: 10;
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
    .header-nav__list {
        display: none;
    }

    .header-mobile-toggles {
        display: flex;
    }

    .header-top .auth-actions {
        display: none;
    }

    .header-top .social-links {
        justify-content: center;
        flex: 1;
    }

    .header-top .social-links a {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .header-top .header-top__inner {
        padding: 0 16px;
    }

    .header-nav-wrapper {
        padding: 0 16px;
    }

    .header-nav {
        padding: 6px 0;
        min-height: 50px;
    }

    .header-logo__icon {
        width: 52px;
        height: 52px;
    }

    .header-logo__brand {
        font-size: 22px;
    }

    .header-logo__tagline {
        font-size: 10px;
    }

    .header-top {
        min-height: 36px;
        padding: 4px 0;
    }
}

@media (max-width: 575px) {
    .header-top .social-links a {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .header-top {
        padding: 4px 0;
        min-height: 32px;
    }

    .header-top .header-top__inner {
        padding: 0 12px;
    }

    .header-logo__icon {
        width: 44px;
        height: 44px;
    }

    .header-logo__brand {
        font-size: 18px;
    }

    .header-logo__tagline {
        font-size: 9px;
    }

    .header-logo {
        gap: 12px;
    }

    .header-mobile-home {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .header-hamburger span {
        width: 24px;
        height: 2px;
    }

    .mobile-nav__inner {
        padding: 20px 18px 32px 18px;
    }

    .mobile-nav__list li a {
        font-size: 15px;
        padding: 10px 14px;
    }

    .mobile-nav__auth .auth-action {
        padding: 8px 20px;
        font-size: 13px;
    }

    .mobile-nav__close {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .mobile-nav {
        clip-path: circle(0% at calc(100% - 30px) 30px);
    }

    .mobile-nav.open {
        clip-path: circle(150% at calc(100% - 30px) 30px);
    }

    .header-nav-wrapper {
        padding: 0 12px;
    }
}

@media (max-width: 400px) {
    .header-top .social-links a {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .header-top .social-links {
        gap: 3px;
    }

    .header-logo__icon {
        width: 38px;
        height: 38px;
    }

    .header-logo__brand {
        font-size: 15px;
    }

    .header-logo__tagline {
        font-size: 8px;
    }

    .header-logo {
        gap: 10px;
    }

    .header-mobile-toggles {
        gap: 8px;
    }

    .header-mobile-home {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .header-hamburger span {
        width: 22px;
        height: 2px;
    }

    .header-hamburger {
        gap: 4px;
        padding: 6px 4px;
    }

    .mobile-nav__inner {
        padding: 16px 14px 24px 14px;
    }

    .header-top .header-top__inner {
        padding: 0 10px;
    }

    .header-nav-wrapper {
        padding: 0 10px;
    }
}

/* ============================================================
   PROTECT HEADER VARIABLES FROM PAGE-SPECIFIC OVERRIDES
   ============================================================ */
.site-header {
    /* Header's original variable values */
    --primary: #0b1120;
    --secondary: #141c33;
    --surface: #1a2444;
    --accent: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --accent2: #f5d77b;
    --text-primary: #ffffff;
    --text-secondary: #b0bcdb;
    --text-muted: #7a87a8;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    --radius: 14px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font: 'Inter', 'Hind Siliguri', sans-serif;
    --orange: #f57c00;
    --orange-light: #ffa726;
}

/* ============================================================
   PROTECT MOBILE NAV VARIABLES FROM PAGE-SPECIFIC OVERRIDES
   ============================================================ */
.mobile-nav {
    --primary: #0b1120;
    --secondary: #141c33;
    --surface: #1a2444;
    --accent: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --accent2: #f5d77b;
    --text-primary: #ffffff;
    --text-secondary: #b0bcdb;
    --text-muted: #7a87a8;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    --radius: 14px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font: 'Inter', 'Hind Siliguri', sans-serif;
    --orange: #f57c00;
    --orange-light: #ffa726;
}