/* ===== NAVIGATION — National Academy of STEAM Education ===== */

/* ── Base bar ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── Single-row container — everything centred ── */
nav .container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 24px !important;
    height: 76px;
    box-sizing: border-box;
}

/* ════════════════════════════════════════
   LOGO  —  flex-flow left, slides in from right
   ════════════════════════════════════════ */
@keyframes logoSlideFromRight {
    0%   { opacity: 0; transform: translateX(90vw); }
    60%  { opacity: 1; transform: translateX(-10px); }
    80%  { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 90px;
    animation: logoSlideFromRight 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.logo:hover {
    opacity: 0.85;
}

.logo-image {
    height: 52px;
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Company name — professional two-line lockup */
@keyframes nameBounceIn {
    0%   { opacity: 0; transform: translateY(-18px); }
    50%  { opacity: 1; transform: translateY(5px); }
    70%  { transform: translateY(-4px); }
    85%  { transform: translateY(2px); }
    100% { transform: translateY(0); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding-left: 14px;
    border-left: 2px solid #C8962A;
    animation: nameBounceIn 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.3s both;
}

.logo-name-top,
.logo-name-top,
.logo-name-bottom {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    color: #1E3A6E;
}

.logo-name-top {
    color: #475569;
    font-weight: 800;
}

.logo-name-bottom {
    background: linear-gradient(135deg, #1E3A6E 0%, #1E5AA8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ════════════════════════════════════════
   NAV LINKS  —  pushed to right side
   ════════════════════════════════════════ */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: inline-flex;
}

.nav-link {
    display: block;
    color: #1E3A6E;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 35px 5px;
    border-radius: 4px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
    line-height: 1;
}

.nav-link:hover {
    color: #1E5AA8;
    background: rgba(30, 58, 110, 0.06);
}

/* Gold underline for active page */
.nav-link.active {
    color: #1E5AA8;
    border-bottom-color: #C8962A;
    background: transparent;
    font-weight: 700;
}

/* ════════════════════════════════════════
   RIGHT-SIDE ACTIONS
   ════════════════════════════════════════ */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 32px;
    padding-left: 20px;
    padding-right: 20px;
    border-left: 1.5px solid #e2e8f0;
}

/* Cart — icon-only, borderless */
.nav-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #1E3A6E;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.nav-cart-link i {
    font-size: 25px;
    color: #1E3A6E;
    transition: color 0.2s;
}

.nav-cart-link:hover {
    background: rgba(200, 150, 42, 0.1);
}

.nav-cart-link:hover i {
    color: #C8962A;
}

/* Active state — cart icon on shop page */
.nav-cart-active {
    background: rgba(200, 150, 42, 0.1);
}

.nav-cart-active i {
    color: #C8962A !important;
}

/* STEAM AI — refined ghost button */
.nav-action-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1E3A6E;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid #d0daea;
    background: #f8faff;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-action-link i {
    font-size: 13px;
    color: #1E5AA8;
}

.nav-action-link:hover {
    color: #1E5AA8;
    border-color: #1E5AA8;
    background: #eef3ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 90, 168, 0.12);
}

/* Enroll Now — solid gold CTA */
.nav-enroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #C8962A 0%, #F5B72B 100%);
    color: #0F172A;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 9px 22px;
    border-radius: 8px;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(200, 150, 42, 0.35);
}

.nav-enroll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 150, 42, 0.48);
}

/* ════════════════════════════════════════
   MOBILE HAMBURGER
   ════════════════════════════════════════ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 16px;
    flex-shrink: 0;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 2.5px;
    background: #1E3A6E;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 1150px) {
    nav .container {
        padding: 0 24px;
    }

    .nav-link {
        padding: 8px 11px 5px;
        font-size: 11.5px;
    }

    .logo {
        margin-right: 20px;
    }

    .logo-name-bottom {
        font-size: 12.5px;
    }
}

@media (max-width: 900px) {
    /* Hide text name on narrow screens — logo icon is enough */
    .logo-text {
        display: none;
    }
}

@media (max-width: 980px) {
    /* Hide STEAM AI text button; keep Enroll */
    .nav-action-link {
        display: none;
    }
}

@media (max-width: 768px) {
    nav .container {
        height: 70px;
        justify-content: space-between;
        padding: 0 16px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Slide-in drawer */
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        left: auto;
        transform: none;
        width: 270px;
        height: calc(100vh - 70px);
        background: #ffffff;
        border-left: 1px solid #e2e8f0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 20px 14px;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        margin: 0;
        justify-content: flex-start;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        display: flex;
    }

    .nav-link {
        padding: 13px 14px;
        font-size: 13.5px;
        letter-spacing: 0.04em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        border-left: 3px solid transparent;
        border-radius: 6px;
        width: 100%;
    }

    .nav-link:hover {
        background: rgba(96, 165, 250, 0.07);
    }

    .nav-link.active {
        border-left-color: #F5B72B;
        border-bottom-color: rgba(255, 255, 255, 0.06);
        background: rgba(245, 183, 43, 0.07);
        color: #F5B72B;
    }

    .nav-actions {
        display: none;
    }

    .logo {
        margin-right: 0;
    }

    .logo-image {
        height: 48px;
    }
}

@media (max-width: 480px) {
    nav .container {
        padding: 0 14px;
        height: 64px;
    }

    .logo-image {
        height: 42px;
    }

    .nav-menu {
        top: 64px;
        height: calc(100vh - 64px);
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    nav, .logo, .nav-link, .nav-enroll-btn, .mobile-menu-toggle .bar {
        transition: none !important;
        animation: none !important;
    }
}
