/* Globalny nagłówek serwisu.
   Plik jest ładowany jako ostatni, aby każda publiczna podstrona otrzymała
   identyczny układ niezależnie od własnych arkuszy CSS. */

:root {
    --global-header-ink: #142638;
    --global-header-muted: #65778a;
    --global-header-line: rgba(104, 132, 151, 0.18);
    --global-header-accent: #0e7c7b;
    --global-header-accent-2: #176f91;
    --global-header-surface: rgba(255, 255, 255, 0.91);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 2200;
    width: 100%;
    padding: 12px 0 9px;
    background: linear-gradient(180deg, rgba(226, 243, 250, 0.58), rgba(238, 247, 249, 0));
    box-shadow: none;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
    background: rgba(232, 244, 248, 0.78);
    box-shadow: 0 1px 0 rgba(40, 72, 91, 0.08);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.site-header .header-row {
    position: relative;
    isolation: isolate;
    display: grid !important;
    grid-template-columns: minmax(250px, 0.82fr) minmax(184px, 0.52fr) auto !important;
    width: min(1460px, calc(100% - 28px)) !important;
    max-width: 1460px !important;
    min-height: 78px;
    margin: 0 auto;
    padding: 12px 14px !important;
    align-items: center !important;
    gap: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.84) !important;
    border-radius: 27px !important;
    background:
        radial-gradient(circle at 88% 0%, rgba(79, 167, 194, 0.09), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 251, 0.88)) !important;
    box-shadow:
        0 18px 48px rgba(28, 62, 82, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(22px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
}

.site-header .header-row::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -1px;
    left: 34px;
    width: 112px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(14, 124, 123, 0.72), rgba(23, 111, 145, 0.62), transparent);
}

.site-header .brand {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    padding: 0 0 0 56px;
    color: var(--global-header-ink);
    text-decoration: none;
}

.site-header .brand::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 43px;
    height: 43px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
        linear-gradient(145deg, #0f8180, #176fa0 72%);
    box-shadow:
        0 11px 24px rgba(20, 104, 128, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transform: translateY(-50%);
}

.site-header .brand::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 10px;
    border-right: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    border-radius: 1px;
    transform: translateY(-72%) rotate(45deg);
}

.site-header .brand-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.site-header .brand-kicker {
    display: block;
    color: #1c7b7a;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-header .brand-title {
    display: block;
    color: var(--global-header-ink);
    font-size: clamp(1rem, 1.12vw, 1.14rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.018em;
    white-space: nowrap;
}

.site-header .brand:hover .brand-title {
    color: #0e666d;
}

.site-header .header-clock {
    position: relative;
    display: grid !important;
    grid-column: auto !important;
    grid-row: auto !important;
    grid-template-columns: 1fr;
    min-width: 184px;
    min-height: 54px;
    justify-self: stretch;
    align-content: center;
    gap: 5px;
    padding: 8px 13px 8px 38px;
    border: 1px solid rgba(71, 139, 164, 0.17);
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(244, 251, 253, 0.94), rgba(255, 255, 255, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.site-header .header-clock::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2a9b8d;
    box-shadow: 0 0 0 5px rgba(42, 155, 141, 0.12);
    transform: translateY(-50%);
}

.site-header .clock-label {
    display: block;
    color: #64788a;
    font-size: 0.61rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-header .clock-reading {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 9px;
}

.site-header .clock-value {
    color: #0e7776;
    font-size: 1.04rem;
    font-weight: 820;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-header .clock-meta {
    min-width: 0;
    overflow: hidden;
    color: #586d7e;
    font-size: 0.63rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-header .header-actions {
    display: flex !important;
    position: static !important;
    width: auto !important;
    min-width: 0;
    min-height: 0 !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 9px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    opacity: 1 !important;
}

.site-header .header-nav-primary,
.site-header .header-nav-utility {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.site-header .header-nav-utility {
    padding-left: 9px;
    border-left: 1px solid rgba(74, 100, 119, 0.13);
}

.site-header .header-actions .button,
.site-header .header-actions .inline-form,
.site-header .header-actions .inline-form button {
    width: auto !important;
}

.site-header .header-actions .button {
    position: relative;
    display: inline-flex;
    min-height: 42px !important;
    align-items: center;
    justify-content: center;
    padding: 0 13px !important;
    border: 1px solid rgba(80, 105, 123, 0.14) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.66) !important;
    color: #213548 !important;
    box-shadow: none !important;
    font-size: 0.83rem !important;
    font-weight: 720;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.site-header .header-actions .button:hover,
.site-header .header-actions .button:focus-visible {
    border-color: rgba(28, 129, 135, 0.3) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #0d616a !important;
    box-shadow: 0 7px 18px rgba(35, 76, 98, 0.1) !important;
    transform: translateY(-1px);
}

.site-header .header-actions .button.is-active {
    border-color: rgba(12, 107, 111, 0.34) !important;
    background: linear-gradient(145deg, #0f7d7a, #176f8d) !important;
    color: #fff !important;
    box-shadow:
        0 10px 22px rgba(16, 107, 120, 0.23),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.site-header .header-actions .button.is-active:hover,
.site-header .header-actions .button.is-active:focus-visible {
    color: #fff !important;
    transform: translateY(-1px);
}

.site-header .header-actions .button-primary {
    border-color: rgba(12, 107, 111, 0.28) !important;
    background: #0f7675 !important;
    color: #fff !important;
    box-shadow: 0 9px 20px rgba(15, 118, 117, 0.18) !important;
}

.site-header .header-actions .button-ghost {
    background: rgba(243, 247, 249, 0.8) !important;
    color: #52677a !important;
}

.site-header .inline-form {
    display: inline-flex;
    margin: 0;
}

.site-header .lang-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 0 0 auto;
    gap: 3px;
    margin: 0 0 0 2px;
    padding: 3px;
    border: 1px solid rgba(82, 110, 128, 0.14);
    border-radius: 12px;
    background: rgba(237, 244, 247, 0.82);
}

.site-header .lang-btn {
    display: inline-flex;
    min-width: 32px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #66788a;
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.site-header .lang-btn:hover,
.site-header .lang-btn:focus-visible {
    background: rgba(255, 255, 255, 0.88);
    color: #24465a;
}

.site-header .lang-btn-active,
.site-header .lang-btn-active:hover {
    border-color: rgba(16, 122, 125, 0.2);
    background: #fff;
    color: #0f7777;
    box-shadow: 0 3px 9px rgba(42, 78, 97, 0.09);
}

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: 3px solid rgba(25, 130, 148, 0.24);
    outline-offset: 2px;
}

/* Układ dwurzędowy dla zwykłych laptopów. */
@media (max-width: 1240px) and (min-width: 761px) {
    .site-header .header-row {
        grid-template-columns: minmax(245px, 1fr) minmax(196px, 0.54fr) !important;
        row-gap: 10px !important;
        padding: 11px 14px !important;
    }

    .site-header .header-clock {
        width: min(100%, 220px);
        justify-self: end;
    }

    .site-header .header-actions {
        grid-column: 1 / -1;
        width: 100% !important;
        justify-content: space-between !important;
        padding-top: 10px !important;
        border-top: 1px solid rgba(78, 106, 125, 0.11) !important;
    }
}

@media (max-width: 860px) and (min-width: 761px) {
    .site-header .header-actions .button {
        font-size: 0.76rem !important;
        padding-inline: 9px !important;
    }

    .site-header .header-nav-primary,
    .site-header .header-nav-utility {
        gap: 4px;
    }

    .site-header .header-nav-utility {
        padding-left: 6px;
    }

    .site-header .brand-title {
        font-size: 1rem;
    }
}

/* Menu mobilne zachowuje dotychczasową funkcjonalność JS. */
@media (max-width: 760px) {
    .site-header {
        padding: 7px 0 !important;
        background: linear-gradient(180deg, rgba(224, 241, 248, 0.82), rgba(238, 247, 249, 0.12));
    }

    .site-header .header-row {
        display: flex !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        min-height: 64px;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        padding: 8px 10px !important;
        border-radius: 20px !important;
    }

    .site-header .brand {
        z-index: 2401;
        min-height: 42px;
        flex: 1 1 auto;
        padding-left: 49px;
        overflow: hidden;
    }

    .site-header .brand::before {
        width: 39px;
        height: 39px;
        border-radius: 13px;
    }

    .site-header .brand::after {
        left: 11px;
        width: 14px;
        height: 9px;
    }

    .site-header .brand-copy {
        max-width: calc(100vw - 126px);
    }

    .site-header .brand-kicker {
        font-size: 0.57rem;
        letter-spacing: 0.055em;
    }

    .site-header .brand-title {
        max-width: 100%;
        overflow: hidden;
        font-size: 0.92rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-header .header-clock {
        display: none !important;
    }

    .site-header .nav-hamburger {
        z-index: 2401;
        display: flex !important;
        width: 43px;
        height: 43px;
        flex: 0 0 43px;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid rgba(68, 99, 119, 0.15);
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.88);
        box-shadow: 0 7px 18px rgba(35, 70, 91, 0.1);
    }

    .site-header .nav-hamburger:hover,
    .site-header .nav-hamburger:focus-visible {
        border-color: rgba(18, 125, 132, 0.28);
        background: #fff;
    }

    .site-header .header-actions {
        display: none !important;
        position: fixed !important;
        z-index: 2300 !important;
        inset: 8px 8px auto !important;
        width: auto !important;
        max-height: calc(100svh - 16px);
        overflow-y: auto;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 78px 14px 16px !important;
        border: 1px solid rgba(255, 255, 255, 0.86) !important;
        border-radius: 24px !important;
        background:
            radial-gradient(circle at 84% 0%, rgba(58, 155, 184, 0.12), transparent 30%),
            linear-gradient(160deg, rgba(255, 255, 255, 0.985), rgba(240, 247, 250, 0.975)) !important;
        box-shadow: 0 24px 70px rgba(18, 42, 58, 0.28) !important;
        backdrop-filter: blur(24px) saturate(155%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(155%) !important;
    }

    .site-header .header-actions.is-open {
        display: flex !important;
    }

    .site-header .header-nav-primary,
    .site-header .header-nav-utility {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 7px;
    }

    .site-header .header-nav-primary {
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(71, 102, 121, 0.11);
    }

    .site-header .header-nav-utility {
        padding: 0;
        border: 0;
    }

    .site-header .header-actions .button,
    .site-header .header-actions .inline-form,
    .site-header .header-actions .inline-form button {
        width: 100% !important;
    }

    .site-header .header-actions .button {
        min-height: 48px !important;
        justify-content: flex-start !important;
        padding: 0 15px !important;
        border-radius: 13px !important;
        font-size: 0.9rem !important;
        text-align: left !important;
    }

    .site-header .header-actions .button.is-active::after {
        content: "";
        width: 7px;
        height: 7px;
        margin-left: auto;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
    }

    .site-header .lang-switcher {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        max-width: none !important;
        margin: 5px 0 0 !important;
        padding: 4px !important;
        border: 1px solid rgba(71, 102, 121, 0.13) !important;
        border-radius: 13px;
        background: rgba(230, 239, 243, 0.78);
    }

    .site-header .lang-btn {
        max-width: none !important;
        min-height: 42px !important;
        justify-content: center !important;
        border-radius: 10px !important;
        font-size: 0.76rem !important;
    }
}

@media (max-width: 390px) {
    .site-header .header-row {
        width: calc(100% - 12px) !important;
        max-width: calc(100% - 12px) !important;
        padding: 7px 8px !important;
        border-radius: 18px !important;
    }

    .site-header .brand {
        padding-left: 46px;
    }

    .site-header .brand-title {
        font-size: 0.86rem;
    }

    .site-header .header-actions {
        inset-inline: 6px !important;
        padding: 76px 11px 13px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
