@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* ═══════════════════════════════════════════════════════
   HEADER — BFA Ground Class
   Theme: Frosted Glass Light (Option B)
   Transparent → frosted white on scroll
   Responsive: Mobile / Tablet / Desktop
═══════════════════════════════════════════════════════ */

/* ── BASE ── */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 88px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    transition: background 0.35s ease,
                box-shadow 0.35s ease,
                backdrop-filter 0.35s ease,
                border-color 0.35s ease;

    /* Default: frosted white */
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(124,58,237,0.15);
    box-shadow: 0 2px 20px rgba(124,58,237,0.08);
}

/* Scrolled state — Option C: Soft Sky Blue */
#header.scrolled {
    background: rgba(240,249,255,0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid #bae6fd;
    box-shadow: 0 4px 24px rgba(2,132,199,0.12);
}
#header.scrolled nav ul li a       { color: #0369a1; }
#header.scrolled nav ul li a:hover { background: rgba(2,132,199,0.1); color: #0c4a6e; }
#header.scrolled nav ul li a.active-link { background: rgba(2,132,199,0.12); color: #0284c7; }
#header.scrolled .logo span    { color: #0c4a6e; }
#header.scrolled .logo span em { color: #0284c7; }
#header.scrolled .logo img     { filter: drop-shadow(0 0 6px rgba(2,132,199,0.2)); }
#header.scrolled .signin       { color: #0369a1; border-color: #7dd3fc; }
#header.scrolled .signin:hover { background: rgba(125,211,252,0.2); border-color: #38bdf8; color: #0c4a6e; }
#header.scrolled .signup       { background: linear-gradient(135deg,#0284c7,#0ea5e9); box-shadow: 0 3px 12px rgba(2,132,199,0.32); }
#header.scrolled .menu-toggle span { background: #0c4a6e; }

/* ── LOGO ── */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 76px;
    width: auto;
    filter: none;
    transition: opacity 0.2s;
}

.logo:hover img {
    opacity: 0.85;
}

.logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
}

.logo span em {
    font-style: normal;
    color: #7c3aed;
}

/* ── NAV ── */
nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav ul li.mobile-auth {
    display: none;
}

nav ul li a {
    display: block;
    padding: 7px 14px;
    color: #4b5563;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
}

nav ul li a:hover {
    color: #7c3aed;
    background: rgba(124,58,237,0.08);
}

nav ul li a.active-link {
    color: #7c3aed;
    background: rgba(124,58,237,0.1);
}

/* ── HEADER BUTTONS ── */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-buttons button,
nav ul li.mobile-auth button {
    padding: 8px 20px;
    border-radius: 9px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    -webkit-appearance: none;
    letter-spacing: 0.01em;
}

/* Sign In */
.signin {
    background: transparent;
    color: #4b5563;
    border: 1.5px solid #ddd6fe;
}

.signin:hover {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #7c3aed;
}

/* Sign Up */
.signup {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 2px 12px rgba(2,132,199,0.32);
}

.signup:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    box-shadow: 0 4px 18px rgba(124,58,237,0.45);
    transform: translateY(-1px);
}

.signup:active {
    transform: translateY(0);
}

/* ── HAMBURGER ── */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.menu-toggle:hover { background: rgba(124,58,237,0.08); }

.menu-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: #374151;
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1),
                opacity 0.2s,
                width 0.2s;
    transform-origin: center;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ════════════════════════════════════════
   TABLET  640px – 1023px
════════════════════════════════════════ */
@media (max-width: 1023px) {
    #header { padding: 0 24px; }
    nav ul { gap: 2px; }
    nav ul li a { font-size: 13px; padding: 6px 10px; }
    .header-buttons button { padding: 7px 14px; font-size: 13px; }
}

/* ════════════════════════════════════════
   MOBILE  < 768px
════════════════════════════════════════ */
@media (max-width: 767px) {
    #header {
        padding: 0 18px;
        height: 78px;
    }
    .logo img { height: 62px !important; }
    .logo span { font-size: 17px !important; }

    .menu-toggle                   { display: flex !important; }
    /* Hide nav — two selectors for max compatibility */
    #mainNav:not(.mobile-open):not(:has(#nav-links.active)) { display: none !important; }
    .header-buttons                { display: none !important; }

    #mainNav.mobile-open,
    #mainNav:has(#nav-links.active) {
        display: block !important;
        position: fixed !important;
        top: 78px !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(255,255,255,0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid #bae6fd !important;
        box-shadow: 0 8px 24px rgba(2,132,199,0.1) !important;
        padding: 16px 18px 20px !important;
        animation: mobileNavIn 0.25s cubic-bezier(.22,.68,0,1.1) both !important;
        z-index: 1001 !important;
    }

    @keyframes mobileNavIn {
        from { opacity: 0; transform: translateY(-10px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    #mainNav:has(#nav-links.active) ul {
        flex-direction: column !important;
        gap: 4px !important;
        display: flex !important;
    }

    #mainNav:has(#nav-links.active) ul li a {
        display: block !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        border-radius: 10px !important;
        background: #f8faff !important;
        margin-bottom: 2px !important;
        text-align: left !important;
        color: #374151 !important;
    }

    #mainNav:has(#nav-links.active) ul li a:hover,
    #mainNav:has(#nav-links.active) ul li a.active-link {
        background: rgba(124,58,237,0.08) !important;
        color: #7c3aed !important;
    }

    #mainNav:has(#nav-links.active) ul li.mobile-auth {
        display: flex !important;
        gap: 8px !important;
        margin-top: 8px !important;
        padding-top: 12px !important;
        border-top: 1px solid #bae6fd !important;
    }

    #mainNav:has(#nav-links.active) ul li.mobile-auth a {
        flex: 1 !important;
        display: flex !important;
        padding: 0 !important;
        background: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    #mainNav:has(#nav-links.active) ul li.mobile-auth button {
        width: 100% !important;
        padding: 11px 14px !important;
        font-size: 14px !important;
    }
}