/* ── Unified Navbar — Poppins, works for both staff & child portals ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* Apply Poppins globally when this sheet is loaded */
body { font-family: 'Poppins', sans-serif; }

/* ── Base navbar ── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* ── Public theme (home/about/contact) ── */
.navbar--public {
    background: #fff;
    border-bottom: 1px solid #e8eaf0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.navbar--public .nav-brand-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.navbar--public .nav-title { color: #1a202c; font-size: 1.3rem; font-weight: 800; }
.navbar--public .nav-logo { font-size: 1.4rem; }

.navbar--public .nav-link {
    color: #4a5568;
    background: transparent;
    font-size: 0.9rem;
}
.navbar--public .nav-link:hover {
    background: rgba(102,126,234,0.08);
    color: #667eea;
}
.navbar--public .nav-link--active {
    color: #667eea;
    background: rgba(102,126,234,0.1);
}

.navbar--public .hamburger span { background: #4a5568; }

/* On mobile, public hamburger stays dark */
@media (max-width: 768px) {
    .navbar--public .hamburger span { background: #1a202c; }
}

/* ── Staff theme ── */
.navbar--staff {
    background: #1e293b;
}

.navbar--staff .nav-title { color: #f1f5f9; }
.navbar--staff .nav-title-accent { color: #60a5fa; }
.navbar--staff .nav-logo { font-size: 1.4rem; }

.navbar--staff .nav-link {
    color: #cbd5e1;
    background: transparent;
}
.navbar--staff .nav-link:hover {
    background: #334155;
    color: #f1f5f9;
}
.navbar--staff .nav-link--logout {
    color: #fca5a5;
}
.navbar--staff .nav-link--logout:hover {
    background: rgba(220,38,38,0.15);
    color: #fca5a5;
}

/* ── Child theme ── */
.navbar--child {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

.navbar--child .nav-title { color: #fff; font-weight: 700; font-size: 1.15rem; }
.navbar--child .nav-logo { font-size: 1.5rem; }

.navbar--child .nav-link {
    color: rgba(255,255,255,0.92);
    background: rgba(255,255,255,0.1);
}
.navbar--child .nav-link:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    transform: translateY(-1px);
}
.navbar--child .nav-link--logout {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
}
.navbar--child .nav-link--logout:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

/* ── Brand ── */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* ── Links ── */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* ── Alert badge ── */
.alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 3px;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ── Hamburger ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5.5px, 5.5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5.5px, -5.5px); }

/* ── Mobile ── */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 68px;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.32s ease;
        z-index: 199;
    }

    .nav-menu.active { max-height: 600px; }

    /* Mobile menu backgrounds */
    .navbar--public  .nav-menu { background: #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
    .staff-portal    .nav-menu { background: #1e293b; }
    .child-portal    .nav-menu { background: linear-gradient(180deg, #7c3aed 0%, #4f46e5 100%); }

    /* Public nav links — dark text on white */
    .navbar--public .nav-link {
        color: #1a202c;
        border-bottom: 1px solid #f0f0f0;
    }
    .navbar--public .nav-link:hover {
        background: rgba(102,126,234,0.08);
        color: #4f46e5;
    }
    .navbar--public .nav-link--active {
        color: #4f46e5;
        background: rgba(102,126,234,0.08);
    }

    .nav-link {
        padding: 0.9rem 1.5rem;
        border-radius: 0;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        width: 100%;
    }

    .nav-link:last-child { border-bottom: none; }
}

@media print {
    .navbar { display: none !important; }
}
