/* ============================================================
   HEADER / NAVBAR — mobile first
   ============================================================ */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    /* Cap logo container width on tiny screens so the burger never disappears */
    max-width: calc(100% - 60px);
    overflow: hidden;
}

/* --------- Mobile menu (default) --------- */

.links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(30, 42, 110, 0.12);
    flex-direction: column;
    padding: 8px 16px 16px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

.links.open { display: flex; }

.links a {
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 14px 16px;
    color: var(--slate);
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0;
    display: block;
    /* Touch target ≥ 44px */
    min-height: 44px;
    line-height: 1.4;
}

.links a:hover {
    color: var(--indigo);
    background: var(--mist);
}

.links a.active {
    color: #fff;
    background: var(--indigo);
}

/* --------- Burger --------- */

.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 0;
    background: var(--mist);
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    flex-shrink: 0;
}

.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--indigo);
    margin: 2.5px auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --------- Tablet / desktop --------- */

@media (min-width: 900px) {
    .nav-inner { height: 72px; }

    .brand { max-width: none; overflow: visible; }

    .links {
        display: flex;
        position: static;
        flex-direction: row;
        background: none;
        border: 0;
        box-shadow: none;
        padding: 0;
        gap: 4px;
        max-height: none;
        overflow: visible;
    }

    .links a {
        font-size: 13px;
        padding: 8px 14px;
        margin: 0;
        min-height: 0;
        border-radius: 6px;
    }

    .burger { display: none; }
}
