/* ======================================================================
   MOBILE NAV — hamburger menu + responsywny header
   Ładuje się po main.css i public_design.css, więc je nadpisuje.
   Breakpoint mobile: ≤ 760px  |  Desktop: > 760px
====================================================================== */

/* ── Hamburger button ─────────────────────────────────────────────── */
.nav-hamburger {
    display: none;
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    z-index: 200;
    transition: background 0.18s, border-color 0.18s, transform 0.15s;
}

.nav-hamburger:hover {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 118, 110, 0.22);
}

.nav-hamburger:active {
    transform: scale(0.94);
}

.nav-hamburger:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

/* Trzy kreski */
.nav-hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 20px;
    height: 20px;
    margin: auto;
}

.nav-hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #152334;
    transform-origin: center;
    transition:
        transform 0.28s cubic-bezier(.4, 0, .2, 1),
        opacity   0.18s ease,
        width     0.22s ease;
}

/* Krzyżyk gdy otwarty */
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile backdrop ─────────────────────────────────────────────── */
.nav-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 98;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.nav-mobile-backdrop.is-visible {
    display: block;
    opacity: 1;
}

/* ── Prevent scroll when menu open ──────────────────────────────── */
body.nav-is-open {
    overflow: hidden;
}

/* ================================================================
   MOBILE — ≤ 760px
================================================================ */
@media (max-width: 760px) {

    /* Header row: flex zamiast grid */
    .site-header {
        padding: 8px 0 !important;
    }

    .header-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        padding: 10px 14px !important;
        border-radius: 20px !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }

    /* Zegar ukryty na mobile */
    .header-clock {
        display: none !important;
    }

    /* Hamburger widoczny */
    .nav-hamburger {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* ── Szuflada nav ── */
    .header-actions {
        /* domyślnie ukryta */
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 76px 16px 24px !important;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,249,252,0.97) 100%) !important;
        border-bottom: 1px solid rgba(15,23,42,0.09) !important;
        box-shadow: 0 16px 48px rgba(15,23,42,0.18) !important;
        border-radius: 0 0 28px 28px !important;
        backdrop-filter: blur(18px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
        /* Gradient pasek na górze szuflady */
        border-top: 3px solid transparent !important;
        background-clip: padding-box !important;
    }

    .header-actions.is-open {
        display: flex !important;
        animation: navSlideIn 0.3s cubic-bezier(.4, 0, .2, 1) forwards;
    }

    @keyframes navSlideIn {
        from {
            opacity: 0;
            transform: translateY(-12px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Przyciski w szufladzie */
    .header-actions .button,
    .header-actions .inline-form {
        width: 100% !important;
        min-height: 52px !important;
        border-radius: 14px !important;
        font-size: 1rem !important;
        justify-content: center !important;
        text-align: center !important;
        padding-inline: 16px !important;
    }

    .header-actions .inline-form button {
        width: 100% !important;
        min-height: 52px !important;
        border-radius: 14px !important;
        font-size: 1rem !important;
    }

    /* Przełącznik języka w szufladzie */
    .header-actions .lang-switcher {
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
        border-left: none !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        margin-top: 6px !important;
        padding-top: 14px !important;
        border-top: 1px solid rgba(15,23,42,0.07) !important;
        border-bottom: none !important;
    }

    .header-actions .lang-btn {
        flex: 1 !important;
        min-height: 48px !important;
        border-radius: 12px !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        justify-content: center !important;
        max-width: 120px !important;
    }
}

/* ── Bardzo małe ekrany ───────────────────────────────────────────── */
@media (max-width: 380px) {
    .header-row {
        padding: 8px 10px !important;
        border-radius: 16px !important;
    }

    .header-actions {
        padding: 70px 12px 20px !important;
    }

    .header-actions .button,
    .header-actions .inline-form {
        font-size: 0.9rem !important;
        min-height: 46px !important;
    }
}

/* ================================================================
   DESKTOP — > 760px  (reset wszystkiego z mobile)
================================================================ */
@media (min-width: 761px) {
    .nav-hamburger {
        display: none !important;
    }

    .nav-mobile-backdrop {
        display: none !important;
    }

    .header-actions {
        /* Pełny reset do flex row */
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        border: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        width: auto !important;
        min-height: 0 !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .header-actions .button,
    .header-actions .inline-form {
        width: auto !important;
        min-height: 42px !important;
        border-radius: 999px !important;
        font-size: inherit !important;
        padding-inline: 15px !important;
    }

    .header-actions .inline-form button {
        width: auto !important;
        min-height: 42px !important;
        border-radius: 999px !important;
    }

    .header-clock {
        display: flex !important;
    }
}
