/* ==========================================================================
   Navbar — Citizen (user-facing pages only)
   ========================================================================== */

@import url('variables.css');

html, body { overflow-x: hidden; }

/* ── Header ──────────────────────────────────────────────────────────────── */
header#head {
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    max-width: 100vw;
    overflow: hidden; /* nie horizontal scrollen */
    background: var(--surface-container-lowest, #ffffff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.07);
    border-bottom: 1px solid rgba(190, 200, 206, 0.3);
    box-sizing: border-box;
}

/* ── Inner wrapper (max-width + flex) ────────────────────────────────────── */
#navInner {
    width: 100%;
    padding: 0 clamp(16px, 2.5vw, 28px);
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    box-sizing: border-box;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
#navLogo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    opacity: 1;
    transition: opacity 0.15s ease;
}

#navLogo:hover { opacity: 0.82; }

#navLogo svg {
    height: clamp(32px, 4vw, 44px);
    width: auto;
    display: block;
}

/* ── Nav links ───────────────────────────────────────────────────────────── */
#nav {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.5vw, 28px);
    flex-shrink: 1;
    min-width: 0;
    /* reset old pill styles */
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

#nav > a {
    color: var(--on-surface-variant, #3e484e);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.78rem, 1.1vw, 0.95rem);
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

#nav > a:hover {
    color: var(--primary, #006684);
    background: rgba(0, 102, 132, 0.07);
}

#nav > a.nav-active {
    color: var(--primary, #006684);
    font-weight: 700;
    background: none;
    text-decoration: underline;
    text-decoration-color: var(--primary, #006684);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* ── Hamburger toggle ────────────────────────────────────────────────────── */
.nav-toggle { display: none !important; }

.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--on-surface-variant, #3e484e);
    padding: 6px 8px;
    border-radius: 8px;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
    margin-left: auto;
}

.burger-btn:hover { background: rgba(0, 102, 132, 0.07); }

/* ── Mobile (≤ 540px) ────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    #navInner {
        height: auto;
        min-height: 54px;
        flex-wrap: wrap;
        align-content: flex-start;
        padding-bottom: 0;
    }

    .burger-btn { display: flex; align-items: center; }

    #nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 4px 0 10px;
    }

    .nav-toggle:checked ~ .burger-btn ~ #nav { display: flex; }

    #nav > a {
        padding: 10px 12px;
        font-size: 0.9rem;
        white-space: normal;
    }

    .nav-employee-login { display: none; }
}
