/* ── AURA SAHA — NAVBAR CSS (add to or replace nav section in app.css) ── */

/* ── TOPBAR ── */
.topbar {
    background: var(--ink);
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 200;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
    max-width: 1400px; margin: 0 auto;
    padding: 0 4vw;
    height: 38px;
    display: flex; align-items: center; justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 0.5rem; }
.topbar-flag { font-size: 0.9rem; cursor: default; transition: transform 0.15s; }
.topbar-flag:hover { transform: scale(1.2); }
.topbar-sep { color: rgba(255,255,255,0.2); font-size: 0.75rem; margin: 0 0.3rem; }
.topbar-text { font-size: 0.72rem; color: rgba(255,255,255,0.45); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 0.6rem; }
.topbar-link { font-size: 0.72rem; color: rgba(255,255,255,0.55); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.topbar-link:hover, .topbar-link.active { color: rgba(255,255,255,0.9); }

.topbar-portal {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.72rem; font-weight: 600;
    text-decoration: none; padding: 4px 10px; border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.topbar-portal--student { background: rgba(13,110,110,0.25); color: #6ECECE; }
.topbar-portal--student:hover { background: rgba(13,110,110,0.45); color: #9FDFDF; }
.topbar-portal--teacher { background: rgba(245,166,35,0.2); color: #F5C96A; }
.topbar-portal--teacher:hover { background: rgba(245,166,35,0.35); color: #F5D68A; }

.topbar-register {
    font-size: 0.72rem; font-weight: 700;
    color: var(--ink); background: var(--sun);
    text-decoration: none; padding: 4px 12px; border-radius: 4px;
    transition: background 0.2s;
}
.topbar-register:hover { background: var(--sun-deep); }

/* ── MAIN NAV ── */
.mainnav {
    position: fixed; top: 38px; left: 0; right: 0;
    z-index: 199;
    background: rgba(255,253,247,0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(245,166,35,0.12);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: top 0.3s;
}
.mainnav.topbar-hidden { top: 0; }

.mainnav-inner {
    max-width: 1400px; margin: 0 auto;
    padding: 0 4vw;
    height: 62px;
    display: flex; align-items: center; gap: 2rem;
}

.logo { font-family: 'Fraunces', serif; font-size: 1.55rem; font-weight: 900; color: var(--teal); letter-spacing: -0.5px; text-decoration: none; flex-shrink: 0; }
.logo span { color: var(--sun); }

.mainnav-links {
    display: flex; align-items: center; gap: 0.25rem;
    list-style: none; flex: 1;
}

.nav-item { position: relative; }

.nav-link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 14px; border-radius: 8px;
    font-size: 0.875rem; font-weight: 600;
    color: var(--ink); opacity: 0.72;
    text-decoration: none;
    background: transparent; border: none; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: opacity 0.2s, background 0.2s;
    white-space: nowrap;
}
.nav-link:hover { opacity: 1; background: rgba(13,110,110,0.06); }
.nav-link--active { opacity: 1; color: var(--teal); background: var(--teal-light); }
.nav-link--dropdown { padding-right: 10px; }
.nav-chevron { transition: transform 0.25s; flex-shrink: 0; opacity: 0.6; }
.nav-item--dropdown.open .nav-chevron { transform: rotate(180deg); }
.nav-item--dropdown.open > .nav-link { opacity: 1; background: rgba(13,110,110,0.06); }

/* ── DROPDOWN PANEL ── */
.dropdown-panel {
    display: none;
    position: absolute; top: calc(100% + 10px); left: 0;
    min-width: 300px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    padding: 10px;
    z-index: 300;
    animation: dropIn 0.2s ease;
}
.nav-item--dropdown.open .dropdown-panel { display: block; }

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-section { padding: 4px 0; }
.dropdown-section-label {
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--ink); opacity: 0.35;
    padding: 6px 12px 4px;
}
.dropdown-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 6px 0; }

.dropdown-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}
.dropdown-item:hover { background: var(--soft); }
.dropdown-item--highlight { background: rgba(245,166,35,0.06); }
.dropdown-item--highlight:hover { background: rgba(245,166,35,0.12); }

.di-icon { font-size: 1.1rem; flex-shrink: 0; width: 28px; text-align: center; }
.di-text { display: flex; flex-direction: column; gap: 1px; }
.di-title { font-size: 0.82rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.di-sub { font-size: 0.72rem; color: var(--ink); opacity: 0.5; line-height: 1.3; }

/* ── NAV CTA ── */
.nav-cta {
    margin-left: auto; flex-shrink: 0;
    background: var(--teal); color: white;
    padding: 10px 22px; border-radius: 50px;
    font-weight: 700; font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 3px 14px rgba(13,110,110,0.25);
    white-space: nowrap;
}
.nav-cta:hover { background: var(--teal-deep); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(13,110,110,0.3); }

/* ── HAMBURGER ── */
.nav-hamburger {
    display: none;
    flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 6px; border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.nav-hamburger:hover { background: rgba(0,0,0,0.05); }
.nav-hamburger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: all 0.3s; display: block; }
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── MOBILE OVERLAY ── */
.mobile-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 197;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    animation: fadeOverlay 0.2s ease;
}
.mobile-overlay.open { display: block; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

/* ── MOBILE DRAWER ── */
.mobile-drawer {
    position: fixed; top: 0; right: -100%; bottom: 0;
    width: min(360px, 90vw);
    background: white;
    z-index: 198;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}
.mobile-drawer.open { right: 0; }

.mobile-drawer-inner { padding: 80px 20px 40px; }

.mobile-section {
    display: flex; flex-direction: column; gap: 2px;
    margin-bottom: 8px;
}
.mobile-section-label {
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--ink); opacity: 0.35;
    padding: 14px 12px 4px;
}
.mobile-link {
    display: block; padding: 10px 12px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600; color: var(--ink);
    text-decoration: none; transition: background 0.15s;
}
.mobile-link:hover { background: var(--soft); }
.mobile-link--sub { font-size: 0.85rem; font-weight: 500; opacity: 0.8; padding-left: 20px; }
.mobile-link--highlight { color: var(--sun-deep); opacity: 1; font-weight: 700; }
.mobile-link--portal-s { color: var(--teal); font-weight: 700; }
.mobile-link--portal-t { color: var(--sun-deep); font-weight: 700; }

.mobile-cta-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.06); }
.mobile-cta {
    display: block; text-align: center; padding: 14px;
    border-radius: 50px; font-weight: 700; font-size: 0.9rem;
    text-decoration: none; border: 2px solid rgba(26,26,46,0.15);
    color: var(--ink); transition: border-color 0.2s;
}
.mobile-cta:hover { border-color: var(--teal); color: var(--teal); }
.mobile-cta--primary { background: var(--teal); color: white; border-color: var(--teal); }
.mobile-cta--primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: white; }

/* ── PAGE OFFSET — push content below navbar height ── */
.nav-offset { padding-top: calc(38px + 62px); }

/* ── RESPONSIVE ── */
@media(max-width: 1024px) {
    .nav-cta { padding: 9px 16px; font-size: 0.8rem; }
    .nav-link { padding: 8px 10px; font-size: 0.82rem; }
}

@media(max-width: 900px) {
    .mainnav-links { display: none; }
    .nav-cta { display: none; }
    .nav-hamburger { display: flex; margin-left: auto; }
    .topbar-left .topbar-text { display: none; }
    .topbar-portal span:not(svg) { display: none; } /* show icons only on mobile topbar */
}

@media(max-width: 600px) {
    .topbar-inner { padding: 0 4vw; }
    .topbar-right { gap: 0.4rem; }
    .topbar-register { display: none; }
}