/* ============================================================
   WBP Olsztyn — WARSTWA NADPISUJĄCA BOOTSTRAPA (wbp-bootstrap.css)
   Ładowany PO bootstrap.min.css. Zawiera:
   1) tokeny marki i pełny wygląd komponentów WBP (jedyny arkusz projektu —
      style nie wymagają żadnej klasy na <body>)
   2) sekcję "BOOTSTRAP BRIDGE" na końcu pliku — mostki i nadpisania
      klas Bootstrapa (.container, .row/.col, .navbar, .offcanvas, .btn,
      .form-control, reboot) tak, aby wygląd pozostał identyczny.
   Konwencje dla podstron:
   · siatka: .container > .row > .col-* (Bootstrap)
   · własne kolumny sekcji: .row-hero / .row-trio / .row-news / .row-split
   · komponenty WBP: .panel, .news-row, .desto, .chip, .cta-link, .qa
   ============================================================ */


/* ==================== PODSTAWY ==================== */
/* ============================================================
   WBP Olsztyn — typografia, nagłówek, hero, sekcje
   Brand: #002A4C  ·  Type: Source Sans 3
   ============================================================ */

/* ============================================================
   VIEW TRANSITIONS — nawigacja między stronami (cross-document)
   i podmiany treści w JS (same-document).

   Cross-document: JEDNA deklaracja włącza płynne przejście przy KAŻDEJ
   pełnej nawigacji (klik z listy Wydarzeń w szczegóły, paginacja,
   strona główna → podstrona). Zero JS, zero ryzyka — przeglądarki bez
   wsparcia po prostu nawigują normalnie (czysta progresywna wzmacniacz).

   UWAGA (stan na moment pisania): Chrome/Edge/Safari wspierają
   cross-document View Transitions; Firefox na razie tylko wersję
   same-document (patrz assets/js/events-filters.js). Efekt widoczny
   tylko u części odwiedzających — to nie jest błąd, to jest properny
   fallback (brak wsparcia = normalna nawigacja, nic się nie psuje).

   Named transitions (view-transition-name) na miniaturach Wydarzeń
   (Zapowiedzi/Relacje, jeden CPT) są ustawiane INLINE, w PHP, per-ID
   (wbp_event_card_html()/wbp_news_row_html() w wbp-core, i single-wbp_event.php)
   — nie da się tego sparametryzować per-instancja
   samym CSS. Nazwa musi być unikalna wśród WSZYSTKICH elementów
   renderowanych na stronie w danym momencie; jeśli kiedyś ta sama
   miniatura wyląduje dwa razy na jednej stronie (np. widget kalendarza +
   widget "Zapowiedzi" pokazujące to samo wydarzenie na stronie głównej),
   przeglądarka po prostu pomija animację dla tej nazwy i nawiguje
   normalnie — nie psuje strony, tylko cicho nie animuje tego elementu.
   ============================================================ */
@view-transition {
    navigation: auto;
}

::view-transition-group(.card-transition) {
    animation-duration: 0.4s;
}

/* Delikatny, spokojny cross-fade — bez tego domyślna animacja Chrome'a
   (przenikanie + odrobina "slide") bywa zbyt gwałtowna dla treści
   instytucjonalnej. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .32s;
    animation-timing-function: ease-out;
}

::view-transition-old(main-header),
::view-transition-new(main-header) {
    animation: none !important;
}

/* Elementy z nazwanym view-transition-name (miniatury) — nieco dłużej,
   żeby "przelot" zdjęcia między listą i szczegółami był czytelny, nie
   błyskawiczny. */
::view-transition-group(*) {
    animation-duration: .38s;
}

/* ============================================================
   CONTENT-VISIBILITY — wydajność renderowania długich list.
   Mówi przeglądarce "nie licz layoutu/malowania dla tego, co jest poza
   ekranem, dopóki się nie przybliży" — realny zysk na długich stronach
   (archiwum Wydarzeń pogrupowane po dniach, połączony feed Aktualności).

   contain-intrinsic-size to SZACOWANA wysokość elementu, zanim się
   wyrenderuje (żeby scrollbar/wysokość strony nie "skakały" przy pierwszym
   renderze) — wartości poniżej są rozsądnym oszacowaniem na podstawie
   struktury komponentu, NIE zmierzone w żywej przeglądarce. Warto
   zweryfikować/doprecyzować w DevTools po wdrożeniu na prawdziwej stronie.
   ============================================================ */
.events-day {
    content-visibility: auto;
    contain-intrinsic-size: 0 460px;
}

.news-list--featured > .news-row,
.news-list--archive > .news-row {
    content-visibility: auto;
    contain-intrinsic-size: 0 130px;
}

.news-list--featured > .news-row.news-row--feature {
    contain-intrinsic-size: 0 220px;
}

/* ============================================================
   CONTAINER QUERIES — komponenty reagują na WŁASNĄ szerokość, nie na
   viewport. .wbp-card i .side-box żyją w różnych kontekstach (pełna
   kolumna na archive.php, wąski sidebar na search.php/page-aktualnosci.php,
   grid 3 vs 4 kolumny) — ten sam komponent w węższym kontekście powinien
   wyglądać inaczej NIEZALEŻNIE od szerokości ekranu odwiedzającego.
   ============================================================ */
.wbp-card {
    container-type: inline-size;
    container-name: wbp-card;
}

@container wbp-card (max-width: 260px) {
    .wbp-card__img {
        height: 140px;
    }

    .wbp-card__meta {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .wbp-card h3 {
        font-size: calc(16px * var(--fs));
    }
}

.side-box {
    container-type: inline-size;
    container-name: side-box;
}

@container side-box (max-width: 260px) {
    .side-box {
        padding: 16px;
    }

    .side-box h2 {
        font-size: calc(15.5px * var(--fs));
        margin-bottom: 10px;
    }
}

:root {
    --vt-id: 0;
    /* paleta marki — 5 kolorów z księgi znaków
     WBP_BLUE #002A4C · WBP_ROLLUP_BLUE #003A65 · WBP_LIGHT_BLUE #8DA0B1
     WBP_GOLD #fcbb00 · WBP_LIGHT_GOLD #ffdf42 */
    --navy: #002A4C;
    --navy-700: #003A65;
    --accent: #fcbb00;
    --accent-700: #ffdf42;
    --lightblue: #8DA0B1;
    --green: #4E9C00; /* element nietekstowy: ramka bieżącego dnia (3:1) */

    /* jasna powierzchnia (pasek UE, chipy, daty, „+" w FAQ) */
    --navy-tint: #F4F7F9;
    --on-dark: #FFFFFF;
    --on-dark-2: #D6E1EA;

    /* Neutrals */
    --ink: #16222E;
    --muted: #5A6B79;
    --line: #DDE4EA;
    --line-soft: #EBF0F4;
    --bg: #FFFFFF;
    --bg-soft: #66798a;
    --bg-tint: #EEF3F7;

    --radius: 10px;
    --radius-sm: 6px;
    --maxw: 1240px;
    --gut: clamp(18px, 4vw, 40px);

    --shadow-sm: 0 1px 2px rgba(16, 40, 64, .06), 0 2px 6px rgba(16, 40, 64, .05);
    --shadow-md: 0 6px 22px rgba(16, 40, 64, .10);

    --ff: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;

    /* Accessibility runtime hooks (set by JS) */
    --fs: 1;

    --arrow-color: currentColor;   /* kolor strzałki — podąża za kolorem tekstu przycisku */
    --arrow-size: 20px;            /* rozmiar wizualny ikony */
    --arrow-gap: 10px;             /* odstęp tekst ↔ ikona */
    --btn-padding-r: 20px;         /* realny prawy padding buttona z widgetu — PODMIEŃ na swój, sprawdź w DevTools */


    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--ff);
    color: var(--ink);
    background: var(--bg);
    font-size: calc(17px * var(--fs));
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.18;
    color: var(--navy);
    font-weight: 700;
    letter-spacing: -.01em;
}

p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gut);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Skip link */
.skip {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 200;
    background: var(--navy);
    color: #fff;
    padding: 12px 18px;
    border-radius: 0 0 8px 0;
}

.skip:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Alert / komunikat (najwyższy pasek, zamykany)
   ============================================================ */
.alertbar {
    background: #C0392B;
    color: #fff;
}

.alertbar[hidden] {
    display: none;
}

.alertbar .container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 8px;
}

.alertbar__ico {
    flex: none;
    width: 19px;
    height: 19px;
}

.alertbar__txt {
    flex: 1;
    font-size: calc(13.5px * var(--fs));
    font-weight: 600;
    line-height: 1.35;
}

.alertbar__txt b {
    font-weight: 800;
}

.alertbar__txt a {
    color: #fff;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, .55);
    padding-top: 2px;
    padding-bottom: 3px;
    white-space: nowrap;
}

.alertbar__txt a:hover {
    border-color: #fff;
}

.alertbar__close {
    flex: none;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: grid;
    place-items: center;
    transition: .15s;
}

.alertbar__close:hover {
    background: rgba(255, 255, 255, .28);
}

.alertbar__close svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 620px) {
    .alertbar__txt {
        font-size: 12.5px;
    }
}

/* ============================================================
   EU funding bar (top)
   ============================================================ */
.eubar {
    background: var(--navy);
    border-bottom: 1px solid var(--line);
}

.eubar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px 24px;
    padding-block: 7px;
    flex-wrap: wrap;
}

.eubar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eubar__hours {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    font-size: calc(12.5px * var(--fs));
    flex-wrap: nowrap;
    white-space: nowrap;
}

.eubar__hours > svg {
    width: 16px;
    height: 16px;
    color: var(--navy);
    flex: none;
}

.eubar__hours .txt b, .eubar__hours b {
    font-weight: 800;
}

.eubar__hours a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--navy);
    border-bottom: 1px solid rgba(0, 42, 76, .28);
    padding-bottom: 2px;
    padding-top: 1px;
    margin-left: 16px;
}

.eubar__hours a:hover {
    border-color: var(--navy);
}

.eubar__hours a svg {
    width: 12px;
    height: 12px;
    color: var(--navy);
}

.eubar__flag {
    width: 36px;
    height: 24px;
    border-radius: 3px;
    flex: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.eubar p {
    font-size: calc(12.5px * var(--fs));
    color: var(--navy);
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .eubar p {
        font-size: 11px;
        white-space: normal;
    }

    .eubar__hours {
        font-size: 11.5px;
    }
}

/* ============================================================
   1+2  TOP HEADER  (logo left · WCAG + search right)
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.topbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 14px;
}

/* logo */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand__logo {
    height: 56px;
    width: auto;
    display: block;
}

@media (max-width: 620px) {
    .brand__logo {
        height: 44px;
    }
}

.brand__mark {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 9px;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.brand__txt {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand__txt strong {
    display: block;
    font-size: calc(16.5px * var(--fs));
    color: var(--navy);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -.015em;
    max-width: 250px;
}

.brand__txt span {
    display: block;
    font-size: calc(12px * var(--fs));
    color: var(--muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* right cluster */
.topbar__tools {
    display: flex;
    align-items: center;
    gap: 22px;
}

.wcag {
    position: relative;
    display: flex;
    align-items: center;
}

.wcag__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--navy);
    border-radius: 8px;
    font-weight: 700;
    font-size: calc(13.5px * var(--fs));
    transition: .15s;
}

.wcag__toggle:hover, .wcag__toggle[aria-expanded="true"] {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.wcag__toggle > svg:first-child {
    width: 19px;
    height: 19px;
    flex: none;
}

.wcag__caret {
    width: 12px;
    height: 12px;
    opacity: .7;
    transition: transform .18s;
}

.wcag__toggle[aria-expanded="true"] .wcag__caret {
    transform: rotate(180deg);
}

.wcag__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 120;
    width: 244px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wcag__panel[hidden] {
    display: none;
}

.wcag__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px 9px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 4px;
}

.wcag__row-lbl {
    font-size: calc(13.5px * var(--fs));
    font-weight: 700;
    color: var(--ink);
}

.wcag__size {
    display: flex;
    gap: 5px;
}

.wcag__size button {
    width: 36px;
    height: 32px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--navy);
    border-radius: 7px;
    font-weight: 800;
    transition: .15s;
    display: grid;
    place-items: center;
}

.wcag__size button:first-child {
    font-size: 12px;
}

.wcag__size button:last-child {
    font-size: 16px;
}

.wcag__size button:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.wcag__opt {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    text-align: left;
    padding: 10px 10px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: calc(14.5px * var(--fs));
    font-weight: 600;
    border-radius: 8px;
    transition: .12s;
}

.wcag__opt svg {
    width: 19px;
    height: 19px;
    flex: none;
    color: var(--navy);
}

.wcag__opt:hover {
    background: var(--navy);
    color: var(--navy);
}

.wcag__opt--reset {
    margin-top: 4px;
    border-top: 1px solid var(--line-soft);
    border-radius: 0 0 8px 8px;
    color: var(--muted);
}

.wcag__opt--reset svg {
    color: var(--muted);
}

.utility-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: calc(13px * var(--fs));
    color: var(--muted);
}

.utility-links a:hover {
    color: var(--navy);
}

.utility-links .divider {
    width: 1px;
    height: 16px;
    background: var(--line);
}

/* search trigger (icon) */
.search-icon {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: var(--navy);
    display: grid;
    place-items: center;
    transition: .15s;
}

.search-icon:hover {
    background: var(--navy);
    color: #fff;
}

.search-icon svg {
    width: 19px;
    height: 19px;
}

/* inline header search field */
.head-search {
    display: flex;
    align-items: center;
}

.head-search form {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    height: 38px;
    transition: outline-color 0.15s ease;
}

.head-search form:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px var(--accent);
}

.head-search input {
    border: 0;
    background: transparent;
    padding: 2px 12px;
    font-family: inherit;
    font-size: calc(14px * var(--fs));
    color: var(--ink);
    width: clamp(150px, 16vw, 220px);
    min-width: 0;
}
.head-search input:focus-visible {
    outline: none;
    box-shadow: none;
}
.head-search button:focus-visible {
    background: var(--accent);
    outline: none;
    color: var(--navy);
    box-shadow: none;
}

.head-search input::placeholder {
    color: #97A6B2;
}

.head-search button {
    flex: none;
    width: 40px;
    height: 100%;
    border: 0;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    transition: .15s;
}

.head-search button:hover {
    background: var(--navy-700);
}

.head-search button svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 980px) {
    .head-search input {
        width: clamp(120px, 14vw, 180px);
    }
}

@media (max-width: 760px) {
    .head-search {
        display: none;
    }
}

/* ============================================================
   3+4  HOURS (left) · MENU (right)
   ============================================================ */
.navbar {
    background: var(--navy);
    color: #fff;
}

.navbar__row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 30px;
    position: relative;
}

.navbar__row > nav {
    flex: 1;
}

.navbar__row > nav .menu {
    justify-content: space-between;
}

.hours {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 12px;
    flex: none;
    font-size: calc(13.5px * var(--fs));
}

.hours svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex: none;
}

.hours b {
    font-weight: 700;
}

.hours .muted {
    color: #A9C2D6;
}

/* main menu */
.menu {
    display: flex;
    align-items: stretch;
}

.menu > li {
    position: relative;
}

.menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
    padding: 14px 11px;
    font-size: calc(12.5px * var(--fs));
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #E7EEF4;
    border-bottom: 3px solid transparent;
    transition: .15s;
    white-space: nowrap;
}

.menu > li > a .caret {
    width: 9px;
    height: 9px;
    opacity: .7;
}

.menu > li:hover > a,
.menu > li:focus-within > a {
    color: #fff;
    border-bottom-color: var(--accent);
    background: rgba(255, 255, 255, .05);
}

/* dropdown */
.menu .sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 256px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: .16s;
}

.menu > li:hover .sub,
.menu > li:focus-within .sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu .sub a {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: calc(14.5px * var(--fs));
    color: var(--ink);
    font-weight: 600;
}

.menu .sub a:hover {
    background: var(--navy);
    color: var(--navy);
}

/* ---------- trzeci poziom menu (dropdown w dropdownie) ---------- */
.menu .sub{overflow:visible}
.menu .sub li{position:relative}
.menu .sub li.has-sub > a{justify-content:space-between}
.menu .sub li.has-sub > a::after{display:none}
.menu .sub li.has-sub > a .caret{flex:none;width:15px;height:15px;transform:rotate(-90deg);transition:.15s}
.menu .sub .sub2{top:-7px;left:100%;border-radius:10px;border:1px solid var(--line);margin-left:2px}
.menu > li:hover .sub .sub2,.menu > li:focus-within .sub .sub2{opacity:0;visibility:hidden;transform:translateY(6px)}
.menu > li:hover .sub li.has-sub:hover > .sub2,.menu > li:hover .sub li.has-sub:focus-within > .sub2,.menu > li:focus-within .sub li.has-sub:hover > .sub2,.menu > li:focus-within .sub li.has-sub:focus-within > .sub2{opacity:1;visibility:visible;transform:translateY(0)}
.menu .sub li.has-sub:hover > a,.menu .sub li.has-sub:focus-within > a{color:var(--navy)}
.menu .sub li.has-sub:hover > a .caret,.menu .sub li.has-sub:focus-within > a .caret{transform:rotate(-90deg) translateY(-2px)}
.menu .sub li.has-sub:hover > .sub2,.menu .sub li.has-sub:focus-within > .sub2{opacity:1;visibility:visible;transform:translateY(0)}
/* ostatnia pozycja menu: trzeci poziom otwiera się w lewo */
.menu > li.aud--librarians .sub .sub2{left:auto;right:100%;margin:0 2px 0 0}
@media (max-width:991.98px){
    .menu > li.open-sub .sub .sub2,.menu .sub .sub2{display:none}
    .menu > li.open-sub .sub li.open-sub > .sub2,.menu .sub li.open-sub > .sub2{display:block}
    .menu .sub .sub2{margin:2px 0 6px;padding-left:10px;background:rgba(255,255,255,.06);border:0;border-left:2px solid rgba(255,255,255,.18);border-radius:0}
    .menu .sub li.open-sub > .sub2{display:block}
    .menu .sub li.has-sub > a,.menu .sub li.has-sub:hover > a,.menu .sub li.has-sub:focus-within > a,.menu .sub li.open-sub > a{color:#fff}
    .menu .sub li.has-sub > a .caret,.menu .sub li.has-sub:hover > a .caret,.menu .sub li.has-sub:focus-within > a .caret{transform:none}
    .menu .sub li.open-sub > a .caret,.menu .sub li.open-sub:hover > a .caret{transform:rotate(180deg)}
    .menu .menu-item.ms-auto { margin-left: unset !important; }
}

/* ---------- zamykanie menu klawiszem Esc (WCAG — patrz theme.js, closeMenuOnEscape) ----------
   ":focus-within" samo w sobie nie da się "anulować" klawiszem — jest
   prawdziwe, dopóki fokus jest gdziekolwiek wewnątrz <li>, łącznie z samym
   triggerem. Ta klasa nadpisuje widoczność niezależnie od :hover/:focus-within,
   dla dowolnej głębokości naraz (.sub obejmuje .sub2, bo .sub2 zawsze
   występuje razem z klasą .sub — patrz nav-walker.php). JS dokłada tę
   klasę na Esc i zdejmuje ją przy najbliższym mouseleave/focusout. */
.menu > li.menu-force-closed .sub,
.menu > li.menu-force-closed .mega {
    display: none !important; /* na mobile .sub/.mega chowa się WŁAŚNIE przez display (patrz .menu > li.open-sub .sub), samo opacity/visibility by tu nie wystarczyło */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(6px) !important;
}

/* ---------- mega menu (pełna szerokość) ---------- */
.menu > li.has-mega {
    position: static;
}

.mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: 0 0 14px 14px;
    box-shadow: var(--shadow-md);
    padding: 30px 30px 26px;
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .18s;
}

.menu > li.has-mega:hover .mega,
.menu > li.has-mega:focus-within .mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega__col .h4 {
    display: block;
    font-size: calc(13px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--navy);
    font-weight: 800;
    padding-bottom: 11px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.mega__col a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: calc(15px * var(--fs));
    color: var(--ink);
    font-weight: 600;
    border: 0;
    text-transform: none;
    letter-spacing: 0;
}

.mega__col a svg {
    width: 13px;
    height: 13px;
    color: var(--navy);
    opacity: 0;
    transform: translateX(-4px);
    transition: .15s;
}

.mega__col a:hover {
    color: var(--navy-700);
}

.mega__col a:hover svg {
    opacity: 1;
    transform: translateX(0);
}

.mega__promo {
    grid-column: span 1;
    background: var(--navy);
    color: #fff;
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega__promo .h4 {
    color: #fff;
    border: 0;
    padding: 0;
    margin: 0;
    font-size: calc(17px * var(--fs));
    text-transform: none;
    letter-spacing: -.01em;
}

.mega__promo p {
    color: #A9C2D6;
    font-size: calc(14px * var(--fs));
    flex: 1;
}

.mega__promo a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: var(--accent);
    color: var(--navy);
    font-weight: 800;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: calc(14px * var(--fs));
}

.mega__promo a svg {
    width: 15px;
    height: 15px;
}

.menu-toggle {
    display: none;
}

/* ============================================================
   5  HERO SEARCH (Primo / WP / WMBC)
   ============================================================ */
.hero {
    position: relative;
    background: radial-gradient(900px 500px at 88% -10%, rgba(30, 98, 150, .55), transparent 60%),
    linear-gradient(180deg, #002a4c 0%, #06325a 100%);
    color: #fff;
    padding-block: clamp(40px, 6vw, 72px);
}

.hero::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(66%, 880px);
    background: url("uploads/hero-books.svg") left center / auto 112% no-repeat;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 98%);
    mask-image: linear-gradient(90deg, #000 42%, transparent 98%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero__head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto clamp(22px, 3vw, 34px);
}

.hero__head h2 {
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.hero__head p {
    color: #BCD2E4;
    margin-top: 12px;
    font-size: calc(18px * var(--fs));
}

.searchbox {
    max-width: 880px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tab {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .06);
    color: #DCE8F1;
    padding: 9px 20px;
    border-radius: 999px;
    font-size: calc(14px * var(--fs));
    font-weight: 700;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: .15s;
}

.tab small {
    font-weight: 600;
    opacity: .7;
    font-size: 12px;
    letter-spacing: 0;
}

.tab:hover {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}

.tab[aria-selected="true"] {
    background: #fff;
    color: var(--navy);
    border-color: #fff;
}

.tab[aria-selected="true"] small {
    opacity: .65;
}

.search-form {
    display: flex;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
    gap: 8px;
}

.search-form:focus-within {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(252, 187, 0, .55);
}


.search-form input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0 16px;
    font-size: calc(18px * var(--fs));
    color: var(--ink);
    font-family: inherit;
    min-width: 0;
}

.search-form input:focus {
    outline: none;
    box-shadow: none;
}


.search-form input::placeholder {
    color: #97A6B2;
}

.search-form button {
    border: 0;
    background: var(--navy);
    color: #fff;
    font-weight: 800;
    letter-spacing: .03em;
    padding: 0 30px;
    border-radius: 9px;
    font-size: calc(16px * var(--fs));
    display: flex;
    align-items: center;
    gap: 9px;
    transition: .15s;
}

.search-form button:hover {
    background: var(--navy-700);
}

.search-form button svg {
    width: 18px;
    height: 18px;
}

.hero__hint {
    text-align: center;
    margin-top: 16px;
    color: #9FBAD0;
    font-size: calc(14px * var(--fs));
}

.hero__hint a {
    color: #fff;
    font-weight: 700;
    padding-bottom: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, .4);
}

.hero__hint a:hover {
    border-color: #fff;
}

/* ============================================================
   5b  HERO SPLIT (układ z makiety: tekst + półka książek)
   ============================================================ */
.hero--split {
    padding-block: clamp(28px, 4vw, 56px);
    overflow: hidden;
}

.hero--split::before {
    display: none;
}

/* bez tła-wzoru: książki są elementem */
.hero--split .container {
    display: grid;
    grid-template-columns: minmax(0, 560px) 1fr;
    gap: clamp(30px, 5vw, 72px);
    align-items: center;
}

.hero__left {
    max-width: 560px;
}

.hero__eyebrow {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: calc(13px * var(--fs));
    margin-bottom: 16px;
}

.hero__title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    color: #fff;
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1.05;
    letter-spacing: -.01em;
    margin: 0;
}

.hero__title em {
    font-style: italic;
    font-weight: 600;
    color: var(--accent);
}

.hero__desc {
    color: #BCD2E4;
    font-size: calc(16.5px * var(--fs));
    line-height: 1.55;
    margin: clamp(16px, 2.2vw, 22px) 0 clamp(18px, 2.4vw, 26px);
    max-width: 46ch;
    text-wrap: pretty;
}

/* jasna karta wyszukiwarki */
.searchcard {
    background: var(--accent-700);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .30);
    max-width: 600px;
}

.searchcard .tabs {
    display: flex;
    gap: 0;
    justify-content: stretch;
    flex-wrap: nowrap;
    margin-bottom: 12px;
    background: rgba(0, 42, 76, .06);
    border-radius: 10px;
    padding: 5px;
}

.searchcard .tab {
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 0;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--navy);
    border-radius: 7px;
    padding: 9px 6px;
    min-width: 0;
}

.searchcard .tab b {
    font-weight: 800;
    font-size: calc(15px * var(--fs));
    letter-spacing: -.005em;
}

.searchcard .tab small {
    font-weight: 700;
    font-size: calc(11px * var(--fs));
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .65;
    margin-top: 1px;
}

.searchcard .tab:hover {
    color: var(--navy-700);
}

.searchcard .tab[aria-selected="true"] {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 42, 76, .25);
}

.searchcard .tab[aria-selected="true"] small {
    opacity: .7;
}

.searchcard .search-form {
    background: #fff;
    border: 1px solid rgba(0, 42, 76, .10);
    border-radius: 11px;
    padding: 6px;
    box-shadow: none;
    gap: 6px;
}

.searchcard .search-form input {
    font-size: calc(16.5px * var(--fs));
    padding: 0 14px;
}

.searchcard .search-form button {
    background: var(--accent);
    color: var(--navy);
    border-radius: 9px;
    padding: 13px 24px;
}

.searchcard .search-form button:hover {
    background: var(--accent-700);
}

.searchcard .hero__hint {
    display: flex;
    align-items: center;
    gap: 16px 18px;
    flex-wrap: wrap;
    text-align: left;
    margin: 14px 4px 4px;
    color: var(--navy);
}

.searchcard .hero__hint .lbl {
    font-size: calc(11.5px * var(--fs));
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--navy);
}

.searchcard .hero__hint a {
    color: var(--navy);
    font-weight: 700;
    border-bottom: 1px solid rgba(140, 100, 66, .4);
}

.searchcard .hero__hint a:hover {
    border-color: var(--navy);
}

/* półka książek (po prawej) */
.hero__shelf {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(6px, 1vw, 13px);
    height: clamp(220px, 25vw, 330px);
}

.hero__shelf .bk {
    position: relative;
    width: clamp(28px, 3.4vw, 48px);
    height: var(--h);
    background: var(--c);
    border-radius: 4px 4px 2px 2px;
    box-shadow: inset -6px 0 12px rgba(0, 0, 0, .14), inset 4px 0 6px rgba(255, 255, 255, .10);
}

.hero__shelf .bk::before { /* górna opaska na grzbiecie */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 17%;
    height: 3px;
    background: var(--b);
    opacity: .85;
}

.hero__shelf .bk::after { /* dolna opaska */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14%;
    height: 2px;
    background: var(--b);
    opacity: .6;
}

@media (max-width: 980px) {
    .hero--split .container {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero__left {
        max-width: 620px;
    }

    .hero__shelf {
        height: clamp(220px, 40vw, 320px);
    }
}

@media (max-width: 600px) {
    .searchcard .tab b {
        font-size: 13.5px;
    }

    .hero__shelf {
        display: none;
    }
}

/* ============================================================
   Section scaffolding
   ============================================================ */
section.block {
    padding-block: clamp(44px, 6vw, 76px);
}

section.block.tint {
    background: var(--bg-soft);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(22px, 3vw, 34px);
}

.section-head .eyebrow {
    font-size: calc(13px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--navy);
    font-weight: 800;
}

.section-head h2 {
    font-size: clamp(24px, 3vw, 34px);
    margin-top: 8px;
}

.section-head .lead {
    color: var(--muted);
    margin-top: 8px;
    max-width: 60ch;
}

.seeall {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--navy);
    font-size: calc(15px * var(--fs));
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: .15s;
}

.seeall:hover {
    border-color: var(--accent);
}

.seeall svg {
    width: 16px;
    height: 16px;
}

/* link with arrow (CTA) */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--navy);
    font-size: calc(15px * var(--fs));
}

.cta-link svg {
    width: 15px;
    height: 15px;
    transition: transform .15s;
}

.cta-link:hover svg {
    transform: translateX(4px);
}

/* category chip */
.chip {
    display: inline-block;
    font-size: calc(11.5px * var(--fs));
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--navy);
    padding: 5px 11px;
    border-radius: 5px;
}

.chip.gold {
    color: var(--navy);
    background: var(--accent);
}

.chip.solid {
    color: #fff;
    background: var(--navy);
}

/* image placeholder */
.ph {
    position: relative;
    overflow: hidden;
    background: var(--navy);
}

.ph::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--ph-img, none);
    background-size: cover;
    background-position: center;
}

.ph .ph-ico {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #B9CDDD;
}

.ph .ph-ico svg {
    width: 40px;
    height: 40px;
}

/* ============================================================
   6  THREE-COLUMN ROW: banner | opis | kalendarz
   ============================================================ */
.trio {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr;
    gap: 24px;
}

.panel {
    background: #fff;
    height: 100%;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.panel__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* banner card */
.banner {
    color: #fff;
    min-height: 340px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(180deg, rgba(0, 30, 52, .05) 35%, rgba(0, 30, 52, .92) 100%), linear-gradient(135deg, #114E7E, #002A4C);
}

.banner .banner__tag {
    position: absolute;
    top: 18px;
    left: 18px;
}

.banner .banner__inner {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.banner h3 {
    color: #fff;
    font-size: calc(23px * var(--fs));
}

.banner p {
    color: #CFDEEA;
    margin-top: 8px;
    font-size: calc(15px * var(--fs));
}

.banner .banner__cta {
    margin-top: 16px;
    transition: .15s;
}

/* opis */
.opis h3 {
    font-size: calc(22px * var(--fs));
}

.opis p {
    color: var(--muted);
    font-size: calc(16px * var(--fs));
}

.facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}

.fact {
    background: var(--bg-soft);
    border-radius: 8px;
    padding: 12px 14px;
}

.fact b {
    display: block;
    font-size: calc(22px * var(--fs));
    color: var(--navy);
    font-weight: 800;
    line-height: 1;
}

.fact span {
    font-size: calc(12.5px * var(--fs));
    color: var(--muted);
}

/* kalendarz */
.cal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cal__top strong {
    font-size: calc(16px * var(--fs));
    color: var(--navy);
}

.cal__nav {
    display: flex;
    gap: 6px;
}

.cal__nav button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: var(--navy);
}

.cal__nav button:hover {
    background: var(--navy);
}

.cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-top: 6px;
}

.cal__grid .dow {
    text-align: center;
    font-size: calc(11px * var(--fs));
    color: var(--muted);
    font-weight: 700;
    padding-bottom: 4px;
    text-transform: uppercase;
}

.cal__grid .day {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    font-size: calc(13.5px * var(--fs));
    border-radius: 6px;
    color: var(--ink);
}

.cal__grid .day.empty {
    visibility: hidden;
}

.cal__grid .day.event {
    background: var(--navy);
    color: #fff;
    font-weight: 800;
    position: relative;
    cursor: pointer;
}

.cal__grid .day.event::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.cal__grid .day.today {
    box-shadow: inset 0 0 0 2px var(--accent);
    font-weight: 800;
}

.cal__list {
    margin-top: 14px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cal__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cal__date {
    flex: none;
    width: 46px;
    text-align: center;
    background: var(--navy);
    border-radius: 7px;
    padding: 5px 0;
}

.cal__date b {
    display: block;
    font-size: calc(17px * var(--fs));
    color: var(--navy);
    font-weight: 800;
    line-height: 1;
}

.cal__date span {
    font-size: calc(10.5px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.cal__txt strong {
    font-size: calc(14.5px * var(--fs));
    color: var(--ink);
    font-weight: 700;
}

.cal__txt strong a {
    display: block;
    line-height: calc(19.5px * var(--fs));

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.cal__txt span {
    display: block;
    font-size: calc(12.5px * var(--fs));
    color: var(--muted);

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
}

/* ============================================================
   7+8  NEWS / FEATURED CARDS
   ============================================================ */
.wbp-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.wbp-cards.three {
    grid-template-columns: repeat(3, 1fr);
}

.wbp-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: .18s;
}

.wbp-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: #C9D6E0;
}

.wbp-card__img {
    height: 172px;
}

.wbp-card__body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.wbp-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wbp-card__date {
    font-size: calc(12.5px * var(--fs));
    color: var(--muted);
    font-weight: 600;
}

.wbp-card h3 {
    font-size: calc(18px * var(--fs));
    line-height: 1.25;
}

.wbp-card h3 a:hover {
    color: var(--navy-700);
}

.wbp-card p {
    color: var(--muted);
    font-size: calc(14.5px * var(--fs));
}

.wbp-card .cta-link {
    margin-top: auto;
}

/* featured variant */
.wbp-card.featured {
    border-color: #C9D6E0;
}

.wbp-card.featured .wbp-card__img {
    height: 232px;
}

.wbp-card.featured::before {
    content: "";
    height: 4px;
    background: var(--accent);
    display: block;
}

/* ============================================================
   9  PERMANENT LINKS (nowości / recenzje / galeria…)
   ============================================================ */
.tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px 24px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: .18s;
}

.tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tile .ico {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
}

.tile .ico svg {
    width: 26px;
    height: 26px;
}

.tile h3 {
    font-size: calc(19px * var(--fs));
}

.tile p {
    color: var(--muted);
    font-size: calc(14.5px * var(--fs));
    flex: 1;
}

.tile .cta-link {
    color: var(--navy);
}

/* ============================================================
   10  NA SKRÓTY + FAQ
   ============================================================ */
.split {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 40px;
    align-items: start;
}

.shortcuts {
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: 28px;
}

.shortcuts h2 {
    color: #fff;
    font-size: calc(22px * var(--fs));
    margin-bottom: 4px;
}

.shortcuts p {
    color: #A9C2D6;
    font-size: calc(14px * var(--fs));
    margin-bottom: 16px;
}

.shortcuts a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    font-weight: 700;
    font-size: calc(15.5px * var(--fs));
    color: #EAF2F8;
    transition: .15s;
}

.shortcuts a:last-child {
    border-bottom: 0;
}

.shortcuts a svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
    transition: transform .15s;
}

.shortcuts a:hover {
    color: #fff;
    padding-left: 6px;
}

.shortcuts a:hover svg {
    transform: translateX(3px);
}

.faq h2 {
    font-size: clamp(22px, 2.6vw, 30px);
    margin-bottom: 4px;
}

.faq > p.lead {
    color: var(--muted);
    margin-bottom: 18px;
}

details.qa {
    border-bottom: 1px solid var(--line);
}

details.qa summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 40px 18px 0;
    position: relative;
    font-weight: 700;
    font-size: calc(17px * var(--fs));
    color: var(--navy);
}

details.qa summary::-webkit-details-marker {
    display: none;
}

details.qa summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--navy);
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 600;
    transition: .18s;
}

details.qa[open] summary::after {
    content: "–";
    background: var(--navy);
    color: #fff;
}

details.qa .qa__a {
    padding: 0 40px 20px 0;
    color: var(--muted);
    font-size: calc(15.5px * var(--fs));
}

details.qa .qa__a a {
    color: var(--navy-700);
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}

/* ============================================================
   11  SOCIAL MEDIA
   ============================================================ */
.social {
    background: var(--navy);
    color: #fff;
}

.social .container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 36px;
    flex-wrap: wrap;
    padding-block: clamp(34px, 4vw, 48px);
}

.social__intro {
    flex: 0 0 240px;
    max-width: 240px;
}

.social__col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social__links {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.social__intro h2 {
    color: #fff;
    font-size: clamp(22px, 2.6vw, 30px);
}

.social__intro p {
    color: #A9C2D6;
    margin-top: 8px;
}

.social__links a {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: calc(15.5px * var(--fs));
    transition: .15s;
    min-width: 0;
}

.social__links a:hover {
    background: #fff;
    color: var(--navy);
    border-color: #fff;
}

.social__links a .si {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    display: grid;
    place-items: center;
    flex: none;
    transition: .15s;
}

.social__links a:hover .si {
    background: var(--navy);
    color: #fff;
}

.social__links a svg {
    width: 22px;
    height: 22px;
}

.social__links a span {
    min-width: 0;
}

.social__links a small {
    display: block;
    font-weight: 600;
    font-size: 12px;
    opacity: .7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   12  FOOTER
   ============================================================ */
.footer {
    background: #03233D;
    color: #C6D6E2;
}

.footer__main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    padding-block: clamp(40px, 5vw, 60px);
}

.footer h4 {
    color: #fff;
    font-size: calc(14px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 16px;
}

.footer__brand .brand__txt strong {
    color: #fff;
}

.footer__brand .brand__txt span {
    color: #8FAAC0;
}

.footer__brand .brand__mark {
    background: #fff;
    color: var(--navy);
}

.footer__logo {
    height: 52px;
    width: auto;
    display: block;
}

/* logo instytucjonalne w kolumnach */
.footer__org {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 0 !important;
}

.footer__org:hover {
    padding-left: 0;
}

.footer__org img {
    height: 44px;
    width: auto;
    background: #fff;
    border-radius: 8px;
    padding: 6px 8px;
    flex: none;
}

.footer__org span {
    font-size: calc(12.5px * var(--fs));
    color: #B6C8D6;
    font-weight: 600;
    line-height: 1.3;
}

.footer__org--bip img {
    height: 50px;
    padding: 6px 10px;
}

.footer address {
    font-style: normal;
    line-height: 1.7;
    margin-top: 16px;
    font-size: calc(14.5px * var(--fs));
}

.footer address a {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.footer__links a {
    display: block;
    padding: 7px 0;
    font-size: calc(14.5px * var(--fs));
    transition: .12s;
}

.footer__links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-block: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    font-size: calc(13.5px * var(--fs));
    color: #93AABF;
}

.footer__bottom .legal {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer__bottom .legal a:hover {
    color: #fff;
}

.footer__copy {
    color: #93AABF;
}

/* footer — instytucja + BIP */
.footer__orgs {
    display: flex;
    align-items: stretch;
    gap: 16px;
    flex-wrap: wrap;
    padding-block: 22px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer__orgs .org {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 14px 20px;
    transition: .15s;
    flex: 1 1 280px;
}

.footer__orgs .org:hover {
    background: rgba(255, 255, 255, .09);
}

.footer__orgs .org__herb {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 9px;
    background: #fff;
    color: var(--navy);
    display: grid;
    place-items: center;
}

.footer__orgs .org__herb svg {
    width: 28px;
    height: 28px;
}

.footer__orgs .org__bip {
    width: 56px;
    height: 46px;
    flex: none;
    border-radius: 9px;
    background: #fff;
    color: #C0392B;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 19px;
    letter-spacing: .02em;
}

.footer__orgs .org__txt {
    color: #DCE8F1;
    font-weight: 700;
    font-size: calc(14.5px * var(--fs));
    line-height: 1.35;
}

.footer__orgs .org--bip {
    flex: 0 1 320px;
}

/* ============================================================
   6b  Banner slider (dots)
   ============================================================ */
.banner-slider {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    padding: 0;
}

.banner-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
}

.banner-slider .slide.active {
    opacity: 1;
    visibility: visible;
}

.banner-slider .dots {
    position: absolute;
    bottom: 16px;
    right: 18px;
    display: flex;
    gap: 7px;
    z-index: 6;
}

.banner-slider .dots button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    border: 0;
    padding: 0;
    transition: .18s;
    cursor: pointer;
}

.banner-slider .dots button.active {
    background: #fff;
    width: 24px;
    border-radius: 5px;
}

/* calendar overflow guard */
.cal__more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    font-weight: 700;
    color: var(--navy);
    font-size: calc(14px * var(--fs));
}

.cal__more svg {
    width: 15px;
    height: 15px;
}

.cal__count {
    margin-left: auto;
    flex: none;
    font-size: calc(11px * var(--fs));
    font-weight: 800;
    color: var(--navy);
    background: var(--accent-700);
    padding: 2px 8px;
    border-radius: 20px;
}

/* wspólny wiersz: cal__toggle (jeden na cały widget) + cal__more, poza pętlą miesięcy — patrz calendar.js */
.cal__bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.cal__bottom .cal__more {
    margin-top: 0;
}

/* FAQ — link do wszystkich pyta\u0144 */
.faq__all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    font-weight: 800;
    color: var(--navy);
    border: 1.5px solid var(--line);
    padding: 12px 20px;
    border-radius: 9px;
    font-size: calc(15px * var(--fs));
    transition: .15s;
}

.faq__all:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.faq__all svg {
    width: 16px;
    height: 16px;
}

/* social — newsletter + secondary */
.social__col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.newsletter {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 16px 22px;
    transition: .15s;
}

.newsletter:hover {
    background: rgba(255, 255, 255, .1);
}

.newsletter .si {
    background: var(--accent);
    color: var(--navy);
}

.newsletter .nl-txt {
    flex: 1;
}

.newsletter .nl-txt strong {
    display: block;
    font-size: calc(16px * var(--fs));
    color: #fff;
    font-weight: 800;
}

.newsletter .nl-txt span {
    font-size: calc(13.5px * var(--fs));
    color: #A9C2D6;
}

.newsletter .nl-arrow {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex: none;
}

/* hours — dwie lokalizacje (kompaktowo) */
.hours {
    gap: 11px;
    align-items: center;
    padding-block: 9px;
}

.hours__locs {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.25;
}

.hours__loc {
    font-size: calc(12.5px * var(--fs));
    white-space: nowrap;
}

.hours__loc b {
    font-weight: 800;
}

.hours__all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-weight: 700;
    font-size: calc(11.5px * var(--fs));
    margin-top: 3px;
    align-self: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, .4);
    padding-bottom: 1px;
}

.hours__all:hover {
    border-color: #fff;
}

.hours__all svg {
    width: 12px;
    height: 12px;
}

/* footer — dane do faktury */
.footer__invoice {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer__invoice .special-h5 {
    margin: 0 0 6px;
    font-size: calc(12px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #8FAAC0;
    font-weight: 800;
}

.footer__invoice address {
    margin-top: 0;
    font-size: calc(13.5px * var(--fs));
    line-height: 1.6;
    color: #B6C8D6;
}

/* ============================================================
   Accessibility runtime themes
   ============================================================ */
/* ============================================================
   WYSOKI KONTRAST — pełne nadpisanie tokenów marki na :root, nie
   filter:invert()/grayscale(). Dlaczego to ma znaczenie: filter na całej
   stronie odwraca/desaturuje TEŻ zdjęcia i wideo (negatyw zdjęcia wygląda
   źle i nie ma nic wspólnego z "wysokim kontrastem"). Tu obrazy w ogóle
   nie są dotykane — nie bazują na tych zmiennych, więc nic ich nie zmienia.

   Dlaczego to jest stabilne (w odróżnieniu od wcześniejszej wersji z kilkoma
   !important dolepionymi do pojedynczych klas): --navy/--ink/--muted/--line
   są używane w PRAKTYCZNIE każdym komponencie serwisu (setki reguł w tym
   pliku) — nadpisując same zmienne, jednym miejscem pokrywamy wszystko na
   raz, bez wyszukiwania i łatania każdej klasy z osobna.

   Jedna pułapka, którą trzeba było obejść: w wielu miejscach jest
   "background: var(--accent); color: var(--navy)" (złote tło + granatowy
   tekst). Gdyby --accent TEŻ zmienić na czarny, tekst zniknąłby na własnym
   tle (czarny na czarnym). Dlatego --accent celowo zostaje bez zmian —
   po zamianie --navy na czarny taka para staje się "złote tło + CZARNY
   tekst", czyli klasyczny, bardzo wysoki kontrast (lepszy niż oryginał),
   bez dotykania accent wcale. Sprawdzone też, że --navy nigdzie nie jest
   tłem sparowanym z --ink/--muted (jedyne kolizyjne pary to "var(--navy)"
   po obu stronach na hover — to jest ISTNIEJĄCY bug w bazowym CSS,
   niezależny od trybu kontrastu, nie coś, co ten override pogłębia). */
body.contrast {
    --navy: #000000;
    --navy-700: #000000;
    --ink: #000000;
    --muted: #000000;
    --lightblue: #000000;
    --green: #000000;
    --line: #000000;
    --line-soft: #000000;
    --navy-tint: #FFFFFF;
    --bg-soft: #FFFFFF;
    --bg-tint: #FFFFFF;
    --on-dark-2: #FFFFFF;
    --shadow-sm: none;
    --shadow-md: none;
    /* --accent/--accent-700/--bg/--on-dark celowo bez zmian — patrz wyjaśnienie wyżej */
}

/* Link musi się wyróżniać czymś więcej niż samym kolorem (WCAG 1.4.1) —
   kolor sam z siebie już nie wystarczy, gdy większość tekstu jest teraz czarna. */
body.contrast a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* Poziomy (info/sukces/ostrzeżenie/alert) używają twardo wpisanych kolorów
   (nie zmiennych) w kilku widgetach — scalamy je do jednego, konsekwentnego
   traktowania czarno-białego, żeby nie zostały "wyspą kolorów" na
   odbarwionej stronie. */
body.contrast .note,
body.contrast .wbp-quote {
    background: #fff;
    border-color: #000;
}

body.contrast .note svg,
body.contrast .note h3,
body.contrast .wbp-quote {
    color: #000;
}

body.contrast .alertbar {
    background: #000;
    color: #fff;
}

body.contrast .alertbar a {
    color: #fff;
    text-decoration: underline;
}

html:has(>body.grayscale) {
    filter: grayscale(1);
}

body.links-underline a {
    text-decoration: underline !important;
}


body.error404 .page-head {
    min-height: 50svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;

    .container {
        height: 100%;
    }

    &::after {
        content: '404';
        position: absolute;
        top: 4svh;
        right: 1svw;
        line-height: 10vw;

        font-size: 20vw;
        font-weight: 800;
        color: var(--lightblue);
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
    .trio {
        grid-template-columns: 1fr;
    }

    .wbp-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .split {
        grid-template-columns: 1fr;
    }

    .social__links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 880px) {
    .navbar__row {
        flex-direction: column;
        align-items: stretch;
    }

    .social .container {
        flex-direction: column;
    }

    .social__intro {
        flex-basis: auto;
        max-width: none;
    }

    .hours {
        justify-content: center;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }
}

@media (max-width: 991.98px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        justify-content: center;
        background: transparent;
        border: 0;
        color: #fff;
        padding: 14px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .05em;
        font-size: 14px;
    }

    .menu {
        display: none;
        flex-direction: column;
        padding-bottom: 10px;
    }

    .offcanvas .menu {
        display: flex;
    }

    .menu > li > a {
        border-bottom: 1px solid rgba(255, 255, 255, .1);
        padding: 14px 4px;
    }

    .menu .sub {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: rgba(255, 255, 255, .06);
        margin: 4px 0 8px;
        border-radius: 8px;
        display: none;
    }

    .menu > li.open-sub .sub {
        display: block;
    }

    .mega {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-top: 0;
        background: rgba(255, 255, 255, .06);
        margin: 4px 0 8px;
        border-radius: 8px;
        padding: 14px;
        display: none;
    }

    .menu > li.open-sub .mega {
        display: block;
    }

    .mega__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mega__col .h4 {
        color: #fff;
        border-bottom-color: rgba(255, 255, 255, .14);
    }

    .mega__col a {
        color: #DCE8F1;
    }

    .mega__col a:hover {
        color: #fff;
    }

    .mega__promo {
        display: none;
    }

    .menu .sub a {
        color: #DCE8F1;
    }

    .menu .sub a:hover {
        background: rgba(255, 255, 255, .08);
        color: #fff;
    }

    .utility-links {
        display: none;
    }
}

@media (max-width: 620px) {
    .wbp-cards, .tiles {
        grid-template-columns: 1fr;
    }

    .social__links {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar__row {
        flex-wrap: wrap;
    }

    .wcag__lbl {
        display: none;
    }

    .footer__main {
        grid-template-columns: 1fr 1fr;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input {
        padding: 12px 16px;
    }

    .search-form button {
        padding: 14px;
        justify-content: center;
    }
}


/* ==================== styles-rows.css ==================== */
/* ============================================================
   WBP Olsztyn — wariant: "Na skróty" i FAQ w osobnych wierszach
   Ładowany PO styles.css.
   ============================================================ */

/* ---------- NA SKRÓTY — pozioma siatka kafelków ---------- */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.sc-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: .16s;
    position: relative;
    overflow: hidden;
}

.sc-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.sc-tile__ico {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 11px;
    background: rgba(255, 255, 255, .10);
    color: var(--accent);
    display: grid;
    place-items: center;
    transition: .16s;
}

.sc-tile:hover .sc-tile__ico {
    background: var(--accent);
    color: var(--navy);
}

.sc-tile__ico svg {
    width: 23px;
    height: 23px;
}

.sc-tile__txt {
    flex: 1;
    min-width: 0;
}

.sc-tile__txt strong {
    display: block;
    font-size: calc(15.5px * var(--fs));
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.sc-tile__txt span {
    display: block;
    font-size: calc(12.5px * var(--fs));
    color: #A9C2D6;
    margin-top: 2px;
}

.sc-tile__arr {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--accent);
    transition: transform .16s;
}

.sc-tile:hover .sc-tile__arr {
    transform: translateX(3px);
}

/* ---------- FAQ — osobna sekcja, układ 2 kolumny ---------- */
.faq-split {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}

.faq-intro .eyebrow {
    display: block;
    font-size: calc(13px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--navy);
    font-weight: 800;
    margin-bottom: 10px;
}

.faq-intro h2 {
    font-size: clamp(24px, 3vw, 34px);
    margin-bottom: 12px;
}

.faq-intro p {
    color: var(--muted);
    font-size: calc(16px * var(--fs));
    margin-bottom: 22px;
    max-width: 36ch;
}

.faq-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.faq-contact .lbl {
    font-size: calc(12.5px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    font-weight: 800;
}

.faq-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--navy);
    font-size: calc(15.5px * var(--fs));
}

.faq-contact a svg {
    width: 18px;
    height: 18px;
    color: var(--navy);
    flex: none;
}

.faq-contact a:hover {
    color: var(--navy-700);
}

.faq-list {
    min-width: 0;
}

@media (max-width: 1080px) {
    .shortcuts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-split {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 560px) {
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
}


/* ==================== UKŁAD STRONY GŁÓWNEJ ==================== */
/* ============================================================
   WBP Olsztyn — UKŁAD STRONY GŁÓWNEJ
   · mega menu (z wersji Megamenu)
   · hero: układ 2-kolumnowy (slogan + wyszukiwarka) na granacie,
     bez „znaków wodnych” z książkami — samo tło
   · jednolity bezszeryfowy krój (bez Playfair)
   · "Moje konto" pogrubione
   · czerwony pasek alertu pod sekcją z logo
   ============================================================ */

/* ---------- 6. jednolity bezszeryfowy krój ---------- */
body,
h1, h2, h3, h4, h5,
.hero__title, .wbp-card h3, .tile h3,
details.qa summary, .faq-intro h2 {
    font-family: var(--ff) !important;
    font-style: normal;
}

/* ---------- 4. "Moje konto" pogrubione ---------- */
.utility-links a {
    padding-top: 2px;
    padding-bottom: 2px;
    color: var(--ink);
}
.utility-links a:first-child {
    font-weight: 800;
    color: var(--navy);
}


/* ---------- 7. alert pod sekcją z logo ---------- */
/* pasek przeniesiony w markupie pod .topbar; zachowuje czerwony wygląd.
   delikatne wyróżnienie krawędzią u góry, bo nie jest już na samym szczycie */
.alertbar {
    border-top: 1px solid rgba(255, 255, 255, .18);
}

/* ---------- widget Elementora "WBP – Cytat" (samodzielny, bez wymogu .prose) ---------- */
.wbp-quote {
    margin: 0;
    padding: 18px 22px;
    border-radius: 0 10px 10px 0;

    p {
        font-size: calc(18px * var(--fs));
        font-style: italic;
        margin: 0;
    }

    cite {
        display: block;
        margin-top: 8px;
        font-style: normal;
        font-size: calc(14px * var(--fs));
        color: #4C5D6E;
        font-weight: 700;
    }

    &.wbp-quote--accent {
        background: var(--navy-tint);
        border-left: 4px solid var(--accent);
    }

    &.wbp-quote--info {
        background: var(--navy-tint);
        border-left: 4px solid var(--navy);
    }

    &.wbp-quote--success {
        background: #E8F5E9;
        border-left: 4px solid #2E7D32;
    }

    &.wbp-quote--warning {
        background: #FFF4E5;
        border-left: 4px solid #B7791F;
    }

    &.wbp-quote--danger {
        background: #FDEBEA;
        border-left: 4px solid #C0392B;
    }
}

/* ---------- widget Elementora "WBP – Tabela programu" (samodzielna, bez wymogu .prose) ---------- */
.wbp-table-widget {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.wbp-table-widget:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(252, 187, 0, .55);
}

.wbp-table-widget table {
    width: 100%;
    border-collapse: collapse;
    font-size: calc(15.5px * var(--fs));
    min-width: 420px;
}

.wbp-table-widget caption {
    caption-side: top;
    text-align: left;
    padding: 14px 16px;
    font-weight: 800;
    color: var(--navy);
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.wbp-table-widget th, .wbp-table-widget td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.wbp-table-widget thead th {
    background: var(--navy);
    color: #fff;
    font-size: calc(13.5px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 0;
}

.wbp-table-widget tbody th {
    color: var(--navy);
    font-weight: 800;
    white-space: nowrap;
}

.wbp-table-widget tbody tr:nth-child(even) {
    background: var(--navy-tint);
}

/* Wariant 2 na mobile: "karty" (widgety "WBP – Tabela programu" i
   "WBP – Tabela (dowolna)" mają przełącznik między tym a wariantem 1,
   domyślnym — przewijanie w poziomie, patrz reguły .wbp-table-widget wyżej,
   które same z siebie już są scrollowalne na mobile, więc wariant 1
   nie wymaga żadnego dodatkowego kodu). Każda komórka <td> dostaje
   data-label="Nazwa kolumny" z PHP — to jest źródło etykiety w ::before. */
@media (max-width: 680px) {
    .prose .wbp-table-widget--cards table {
        min-width: unset;
    }

    .wbp-table-widget.wbp-table-widget--cards {
        overflow-x: visible;
        border: 0;
    }

    .wbp-table-widget--cards table,
    .wbp-table-widget--cards caption,
    .wbp-table-widget--cards thead,
    .wbp-table-widget--cards tbody,
    .wbp-table-widget--cards tr,
    .wbp-table-widget--cards th,
    .wbp-table-widget--cards td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .wbp-table-widget--cards caption {
        border-radius: 10px 10px 0 0;
    }

    .wbp-table-widget--cards thead {
        display: none;
    }

    .wbp-table-widget--cards tbody tr {
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: 10px;
        overflow: hidden;
        background: #fff !important; /* nadpisuje zebra-stripe z .wbp-table-widget tbody tr:nth-child(even) — w kartach każda ma być jednolita */
    }

    .wbp-table-widget--cards tbody tr:last-child {
        margin-bottom: 0;
    }

    .wbp-table-widget--cards tbody th[scope="row"] {
        background: var(--navy);
        color: #fff;
        white-space: normal;
        border-bottom: 0;
    }

    .wbp-table-widget--cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 14px;
        border-bottom: 1px solid var(--line);
        font-size: calc(14px * var(--fs));
    }

    .wbp-table-widget--cards tbody td:last-child {
        border-bottom: 0;
    }

    .wbp-table-widget--cards tbody td::before {
        content: attr(data-label);
        flex: none;
        font-weight: 700;
        color: var(--muted);
    }
}

/* ---------- moduł "Komunikaty" (wbp-banners) — 4 poziomy + stos ---------- */
.alertbar--info {
    background: var(--navy-700, #114E7E);
}

.alertbar--success {
    background: #2E7D32;
}

.alertbar--warning {
    background: #B7791F;
}

.alertbar--danger {
    background: #C0392B;
}

/* separator między kilkoma bannerami wyświetlonymi jednocześnie (stos) */
.alertbar + .alertbar {
    border-top: 1px solid rgba(255, 255, 255, .25);
}

/* ---------- 1 + 2. HERO: dwie kolumny, granat, bez książek ---------- */
.hero::before {
    display: none !important;
}

/* ukryj znaki wodne */
.hero {
    padding-block: clamp(34px, 4.5vw, 60px);
}

.hero .container {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.12fr);
    gap: clamp(28px, 5vw, 60px);
    align-items: center;
}

.hero__head {
    text-align: left;
    max-width: none;
    margin: 0;
}

.hero__head h2 {
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.1;
}

.hero__head p {
    font-size: calc(17.5px * var(--fs));
    max-width: 44ch;
}

.searchbox {
    max-width: none;
    margin: 0;
    width: 100%;
}

.tabs {
    justify-content: flex-start;
}

.hero__hint {
    text-align: left;
}

@media (max-width: 860px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero__head p {
        max-width: none;
    }

    .hero::after {
        width: min(420px, 80%);
        opacity: .07;
    }
}

/* ---------- znak (arkady) wkomponowany w tło hero ---------- */
.hero {
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    right: -28px;
    bottom: -10%;
    width: min(620px, 56%);
    aspect-ratio: 1890 / 710;
    background: url("uploads/wbp_znak_white.png") right bottom / contain no-repeat;
    opacity: .10;
}

/* ============================================================
   9b  "Warto zajrzeć" — kafelki-zdjęcia (destynacje) z tekstem na obrazie
   inny styl niż karty aktualności: pełnoobrazowe, tekst w nakładce
   ============================================================ */
.destos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.desto {
    position: relative;
    display: block;
    height: clamp(300px, 30vw, 360px);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    isolation: isolate;
}

.desto:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* warstwa „zdjęcia” (placeholder gradientowy — podmień na background-image z URL zdjęcia) */
.desto__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--img);
    background-size: cover;
    background-position: center;
    transition: transform .45s ease;
}

.desto:hover .desto__media {
    transform: scale(1.06);
}

/* znak wodny ikony (do usunięcia po wstawieniu zdjęć) */
.desto__icon {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .16);
}

.desto__icon svg {
    width: 64px;
    height: 64px;
}

/* przyciemnienie dołu dla czytelności tekstu */
.desto::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 30, 52, .06) 28%, rgba(0, 26, 46, .86) 100%);
}

.desto__chip {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    font-size: calc(11.5px * var(--fs));
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--navy);
    background: rgba(255, 255, 255, .92);
    padding: 5px 11px;
    border-radius: 5px;
}

.desto__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 18px 20px;
}

.desto__body h3 {
    color: #fff;
    font-size: clamp(18px, 1.5vw, 21px);
    line-height: 1.2;
}

.desto__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    color: var(--accent);
    font-weight: 800;
    font-size: calc(14.5px * var(--fs));
}

.desto__cta svg {
    width: 15px;
    height: 15px;
    transition: transform .15s;
}

.desto:hover .desto__cta svg {
    transform: translateX(4px);
}

@media (max-width: 1080px) {
    .destos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .destos {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Akcent przy nagłówkach sekcji — łuk (ikona na bazie logo)
   ============================================================ */
.section-head h2,
.faq-intro h2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-head h2::before,
.faq-intro h2::before {
    content: "";
    flex: none;
    align-self: center;
    width: clamp(18px, 2vw, 24px);
    height: clamp(22px, 2.4vw, 29px);
    background: url("uploads/wbp_icon.png") center / contain no-repeat;
}


/* ==================== styles-mozaika.css ==================== */
/* ============================================================
   WBP Olsztyn — "Warto zajrzeć" MOZAIKA (bento)
   Zdjęcia w układzie mozaiki
   (kwadraty/prostokąty różnych rozmiarów), 7 wpisów.
   ============================================================ */

.destos--mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(150px, 15vw, 200px);
    gap: 14px;
}

.destos--mosaic .desto {
    height: 100%;
}

.destos--mosaic .m-feature {
    grid-column: span 2;
    grid-row: span 2;
}

.destos--mosaic .m-wide {
    grid-column: span 2;
}

/* większy tytuł na kafelku-bohaterze */
.destos--mosaic .m-feature .desto__body h3 {
    font-size: clamp(22px, 2vw, 30px);
}

.destos--mosaic .m-feature .desto__icon svg {
    width: 84px;
    height: 84px;
}

@media (max-width: 1080px) {
    .destos--mosaic {
        grid-template-columns: repeat(2, 1fr);
    }

    .destos--mosaic .m-feature {
        grid-column: span 2;
        grid-row: span 1;
    }

    .destos--mosaic .m-wide {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .destos--mosaic {
        grid-template-columns: 1fr;
    }

    .destos--mosaic .m-feature,
    .destos--mosaic .m-wide {
        grid-column: span 1;
    }
}


/* ==================== PALETA I KOMPONENTY MARKI ==================== */
/* ============================================================
   WBP Olsztyn — PALETA MARKI, NAGŁÓWEK, STOPKA, AKTUALNOŚCI
   ============================================================ */


/* stopka: bazowy #03233D (spoza księgi) → WBP_BLUE */
.footer {
    background: #002A4C;
}

/* belka UE/FERS — biały panel wyrównany do krawędzi treści (wewnątrz gutteru .container) */
.footer__eu {
    margin-top: 8px;
}

.footer__eu-panel {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    justify-content: flex-start;
}

.footer__eu-panel img {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* belka wprowadza własny podział — bez podwójnej linii nad copyrightem */
.footer__bottom {
    border-top: 0;
}

@media (max-width: 620px) {
    .footer__eu-panel {
        padding: 14px;
    }
}

/* rozdzielenie sekcji social od stopki — social o ton jaśniejszy (ROLLUP_BLUE) */
.social {
    background: #003A65;
}

/* ---------- 1. Biały pasek z logo — większy, czytelniejszy ---------- */
/* wyrównanie w pionie: bazowy link ma tylko dolny border 3px (spycha tekst w górę) —
   dokładamy symetryczny górny border, tekst ląduje w osi paska */
.menu > li > a {
    border-top: 3px solid transparent;
}

.topbar__row {
    padding-block: 15px;
    gap: 28px;
}

.brand__logo {
    height: 72px;
}

@media (max-width: 620px) {
    .brand__logo {
        height: 52px;
    }
}

/* ---------- 3. „Dostępność” — krój regular, bez pogrubienia ---------- */
.wcag__toggle {
    font-weight: 400;
}

.wcag__toggle-lbl {
    font-weight: 400;
}

/* ---------- 2. Dwie strefy odbiorców — dosunięte w prawo, pełnowysokościowe wyróżnienia ---------- */
/* pierwsza strefa spycha grupę w prawo, zostawiając pustą przestrzeń od reszty menu */
.menu > li.aud--readers {
    margin-left: auto;
}

.menu > li.aud {
    display: flex;
    align-items: stretch;
}

.menu > li.aud > a {
    height: 100%;
    margin: 0;
    padding: 0 22px;
    border-radius: 0;
    border: 0;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    gap: 9px;
    letter-spacing: .03em;
}

.menu > li.aud > a .aud-ico {
    width: 18px;
    height: 18px;
    flex: none;
    opacity: .95;
}

.menu > li.aud > a .caret {
    opacity: .8;
}

/* subtelny odstęp między strefami — dwa różne kolory marki rozdzielają je wizualnie */

/* czytelnicy — beż (równa waga wizualna) */
.menu > li.aud--readers > a {
    background: var(--accent);
    color: var(--navy);
}

.menu > li.aud--readers:hover > a,
.menu > li.aud--readers:focus-within > a {
    background: var(--accent-700);
    color: var(--navy);
}

/* bibliotekarze — błękit z księgi (WBP_LIGHT_BLUE), równa waga wizualna */
.menu > li.aud--librarians > a {
    background: var(--lightblue);
    color: var(--navy);
}

/* dropdown otwiera się w lewo (ostatnia pozycja menu — bez wychodzenia poza ekran) */
.menu > li.aud--librarians .sub {
    left: auto;
    right: 0;
}

.menu > li.aud--librarians:hover > a,
.menu > li.aud--librarians:focus-within > a {
    background: var(--navy);
    color: #fff;
}

/* ta sama zasada w menu mobilnym: odstęp, separator, pełne wyróżnienie tłem (bez formy przycisków) */
@media (max-width: 991.98px) {
    .menu > li.aud--readers {
        margin-left: 0;
        margin-top: 10px;
    }

    .menu > li.aud {
        display: block;
    }

    .offcanvas .menu > li.aud > a {
        margin: 0;
        padding: 15px 16px;
        justify-content: flex-start;
        border-radius: 8px;
    }

    .offcanvas .menu > li.aud--readers > a {
        background: var(--accent);
        color: var(--navy);
    }

    .offcanvas .menu > li.aud--librarians > a {
        background: var(--lightblue);
        color: var(--navy);
    }
}

/* ---------- 6. Panel „Projekt” — pojedyncze zdjęcie (bez slidera), na pełną wysokość ---------- */
.banner-static {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    padding: 0;
    display: flex;
}

.banner-static .slide.banner {
    flex: 1;
    width: 100%;
    opacity: 1;
    visibility: visible;
}

/* ---------- 1. Godziny otwarcia — bieżący dzień ---------- */
.eubar__today {
    color: var(--navy);
    font-weight: 800;
    margin-right: 8px;
}

.eubar__locs {
}

/* ---------- 3. Hero: lupa wtopiona w pole, źródła jako radio pod polem ---------- */
/* WERSJA v4 (XL): wyszukiwarka nieco wyższa + wyraźniejsze CTA (nagłówek bez zmian) */
.searchbox .search-form {
    align-items: center;
    padding: 8px 8px 8px 20px;
    gap: 10px;
    border-radius: 15px;
}

.searchbox .search-form input {
    font-size: calc(18px * var(--fs));
    padding: 7px 2px;
}

.searchbox .search-form button {
    padding: 8px 26px;
    font-size: calc(16.5px * var(--fs));
    border-radius: 11px;
}

.search-form__ico {
    flex: none;
    width: 24px;
    height: 24px;
    color: var(--navy);
    display: grid;
    place-items: center;
}

.search-form__ico svg {
    width: 24px;
    height: 24px;
}

.searchbox .search-form input {
    padding-left: 2px;
}

.search-scopes {
    border: 0;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.scope {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    color: #CFE0EE;
    font-size: calc(14.5px * var(--fs));
    font-weight: 700;
}

.scope input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 24px;
    height: 24px;
}

.scope__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .55);
    display: inline-grid;
    place-items: center;
    transition: .15s;
    flex: none;
}

.scope__dot::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: .15s;
}

.scope:hover .scope__dot {
    border-color: #fff;
}

.scope input:checked + .scope__dot {
    border-color: var(--accent);
}

.scope input:checked + .scope__dot::after {
    transform: scale(1);
}

.scope input:checked ~ .scope__lbl {
    color: #fff;
}

.scope input:focus-visible + .scope__dot {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.searchbox .hero__hint {
    text-align: center;
    margin-top: 18px;

    span.hidden,
    a.hidden {
        display: none;
    }

    a::after {
        content: '\00a0·';
    }
}
.searchbox .hero__hint .links a.last::after {
    content: '';
}

.hero__hint-note {
    color: #9FBAD0;
}

.hero__hint-note a {
    color: #fff;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, .45);
}

.hero__hint-note a:hover {
    border-color: #fff;
}

/* mobile: tylko 2 źródła (katalog + WMBC) */
@media (max-width: 620px) {
    .scope--www {
        display: none;
    }
}

/* ---------- 5. Beżowy napis kategorii linkuje do całości ---------- */
.eyebrow--link {
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: .15s;
}

.eyebrow--link:hover {
    border-color: var(--accent);
}

/* ---------- Ujednolicony standard CTA „ze strzałką” — kolor akcentu (złoto) ---------- */
.cta-link,
.seeall,
.cal__more,
.faq__all {
    color: var(--accent);
    font-size: calc(15px * var(--fs));
    font-weight: 800;
}

.cta-link svg,
.seeall svg,
.cal__more svg,
.faq__all svg {
    width: 16px;
    height: 16px;
}

/* mozaika (desto__cta) — ten sam standard co reszta CTA */
.desto__cta {
    font-size: calc(15px * var(--fs));
    font-weight: 800;
}

.desto__cta svg {
    width: 16px;
    height: 16px;
}

/* tagi mozaiki — ten sam kolor tła co chipy w Aktualnościach */
.desto__chip {
    background: var(--navy);
}

.tile .cta-link {
    color: var(--accent);
}

/* strzałka przesuwa się w prawo na hover (jak w .cta-link) */
.seeall svg,
.cal__more svg,
.faq__all svg {
    transition: transform .15s;
}

.seeall:hover svg,
.cal__more:hover svg,
.faq__all:hover svg {
    transform: translateX(4px);
}

/* FAQ „Zobacz wszystkie…” — ten sam typ CTA (bez formy przycisku) */
.faq__all {
    border: 0;
    padding: 0;
    margin-top: 22px;
}

.faq__all:hover {
    background: transparent;
    color: var(--accent);
}

.cal__count {
    color: var(--navy);
    background: var(--accent-700);
}

/* hasło z lewej — wyróżniona „75” */
.hero__head h2 {
    text-wrap: balance;
    text-transform: none;
}

.hero__head .hl {
    color: var(--accent);
    font-weight: 800;
}

/* ---------- 12. Usunięcie punktorów-arkady przy nagłówkach ---------- */
.section-head h2::before,
.faq-intro h2::before {
    display: none !important;
}

.section-head h2,
.faq-intro h2 {
    gap: 0;
}

/* ---------- 13. Znak w tle hero — z lewej, biały ---------- */
.hero::after {
    right: auto;
    left: 0;
    top: 4px;
    bottom: auto;
    width: min(820px, 56%);
    aspect-ratio: 1890 / 710;
    background: url("../img/hero_bg1.png") left top / contain no-repeat; /* fallback */
    background: -webkit-image-set(
            url("../img/hero_bg1.webp") type("image/webp") 1x,
            url("../img/hero_bg1.png")  type("image/png")  1x
    ) left top / contain no-repeat;
    background: image-set(
            url("../img/hero_bg1.webp") type("image/webp") 1x,
            url("../img/hero_bg1.png")  type("image/png")  1x
    ) left top / contain no-repeat;
    opacity: .10;
}

@media (max-width: 860px) {
    .hero::after {
        width: min(520px, 82%);
        opacity: .07;
    }
}

/* ---------- 11. Stopka: logo bez białego tła ---------- */
.footer__org img {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.footer__org--bip img {
    padding: 0;
    height: 46px;
}

/* logotypy instytucjonalne przeniesione do lewej kolumny (pod danymi do faktury) */
.footer__orglogos {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer__orglogos .footer__org {
    margin-top: 0 !important;
}

.footer__orglogos .footer__org img {
    height: 52px;
}

.footer__orglogos .footer__org--bip img {
    height: 46px;
}

.footer__orglogos .footer__org span {
    max-width: 190px;
}

/* stopka gotowa na więcej treści — szersza kolumna marki, luźniejsze kolumny linków */
.footer__main {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px 44px;
}

@media (max-width: 620px) {
    .footer__orglogos {
        gap: 16px;
    }
}

/* ---------- 11. Social media: duże ikony bez ramek ---------- */
.social__links {
    display: flex;
    gap: 30px 34px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.social__links a {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    background: none;
    border: 0;
    padding: 0;
    min-width: 64px;
    font-weight: 700;
    font-size: calc(13px * var(--fs));
    text-align: center;
    color: #EAF2F8;
}

.social__links a:hover {
    background: none;
    color: var(--accent);
}

.social__links a .si {
    width: 52px;
    height: 52px;
    background: none;
    border-radius: 0;
    color: inherit;
}

.social__links a:hover .si {
    background: none;
    color: var(--accent);
}

.social__links a .si svg {
    width: 46px;
    height: 46px;
}

.social__links a small {
    opacity: .72;
    font-weight: 600;
}

/* 7. Newsletter jako wyraźny przycisk CTA obok mediów społecznościowych */
.social__col {
    display: block;
    width: 100%;
}

.social__links .nl-cta {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    align-self: center;
    background: var(--accent);
    color: var(--navy);
    padding: 14px 22px;
    border-radius: 10px;
    font-size: calc(15px * var(--fs));
    font-weight: 800;
    letter-spacing: .02em;
    min-width: 0;
    text-align: left;
}

.social__links .nl-cta svg {
    width: 22px;
    height: 22px;
    flex: none;
}

.social__links .nl-cta:hover {
    background: var(--accent-700);
    color: var(--navy);
}

@media (max-width: 880px) {
    .social__links .nl-cta {
        margin-left: 0;
        align-self: flex-start;
    }

    .social__links:not(:has(>.nl-cta)) {
        justify-content: center;
    }

    .block--page .page-head {
        padding: 1em;
    }

    .block--page .prose .filters {
        margin: 1em;
    }

    .block--page .prose .container:has(>.section-head) {
        padding-inline: 1em !important;
    }
}

/* 8. Stopka: e-Doręczenia / ESP + „Poznaj lepiej nasz region” */
.footer__edelivery {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer__edelivery p {
    font-size: calc(13px * var(--fs));
    color: #C6D4E0;
    line-height: 1.45;
}

.footer__edelivery b {
    color: #fff;
    font-weight: 700;
}

.footer__region {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer__region h5 {
    font-size: calc(13px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    margin: 0 0 10px;
    font-weight: 800;
}

.footer__region-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer__region-links a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #C6D4E0;
    padding-top: 2px;
    padding-bottom: 2px;
    font-weight: 600;
    font-size: calc(13.5px * var(--fs));
}

.footer__region-links a svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--accent);
}

.footer__region-links a:hover {
    color: #fff;
}

/* ---------- 6. Stopka: drugi zestaw grup linków pod pierwszym (w tych samych kolumnach) ---------- */
.footer__col {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3vw, 36px);
    min-width: 0;
}

@media (max-width: 620px) {
    .footer__col {
        gap: 22px;
    }
}

/* ---------- 5. Aktualności: „Zapowiedzi” + „Relacje” — dwa wiersze w jednej sekcji ---------- */
.news-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(34px, 4.5vw, 56px);
}

.news-module {
    min-width: 0;
}

.news-module__head {
    margin-bottom: 16px;
}

.news-module__head h3 {
    font-size: clamp(20px, 2vw, 25px);
    color: var(--navy);
}

.news-module__head h3 a {
    color: inherit;
}

.news-module__head h3 a:hover {
    color: var(--navy-700);
}

.news-module__desc {
    color: var(--muted);
    margin-top: 7px;
    font-size: calc(15px * var(--fs));
    line-height: 1.5;
    max-width: 46ch;
}

/* 5b. Wariant „podział lewo/prawo” (osobny plik) — kompaktowe listy w dwóch kolumnach */
.news-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-row {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    transition: .15s;
}

.news-item {
    view-transition-name: var(--vt-id);
}

.news-row:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.news-row__thumb {
    view-transition-class: card-transition;
    /*view-transition-name: var(--vt-id);*/
    flex: none;
    width: 104px;
    height: 74px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .6);
}

.news-row__thumb svg {
    width: 26px;
    height: 26px;
}

.news-row__txt {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.news-row__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-row__date {
    font-size: calc(12.5px * var(--fs));
    color: var(--muted);
    font-weight: 600;
}

.news-row strong {
    font-size: calc(16px * var(--fs));
    color: var(--ink);
    line-height: 1.3;
    font-weight: 700;
    text-wrap: pretty;
}

.news-row:hover strong {
    color: var(--navy-700);
}

/* 5c. Pierwszy news wyróżniony — duże zdjęcie po lewej, opis po prawej (bez białego tła) */
.news-row--feature {
    align-items: stretch;
    gap: 18px;
    padding: 10px;
    margin-bottom: 4px;
}

.news-row--feature .news-row__thumb {
    flex: 0 0 46%;
    width: 46%;
    height: auto;
    min-height: 168px;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
}

.news-row--feature .news-row__thumb svg {
    width: 40px;
    height: 40px;
}

.news-row--feature .news-row__txt {
    justify-content: center;
    gap: 9px;
    padding: 4px 6px 4px 0;
}

.news-row--feature strong {
    font-size: calc(19px * var(--fs));
    line-height: 1.25;
}

.news-row__lead {
    font-size: calc(14.5px * var(--fs));
    color: var(--muted);
    line-height: 1.5;
    text-wrap: pretty;
}

@media (max-width: 520px) {
    .news-row__meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .news-row--feature .news-row__thumb {
        flex-basis: 40%;
        width: 40%;
        min-height: 120px;
    }

    .news-row--feature strong {
        font-size: calc(16px * var(--fs));
    }
}

@media (max-width: 900px) {
    .news-modules {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

/* ============================================================
   WERSJA MOBILNA (uwagi 1–5)
   ============================================================ */

/* 1. Nagłówek mobilny — hamburger przy logo, narzędzia w osobnej linii */
/* mobilny element menu (Kontakt) — ukryty na desktopie */
.menu__m-only {
    display: none;
}

@media (max-width: 991.98px) {
    .menu__m-only {
        display: block;
    }

    .topbar__row {
        flex-wrap: wrap;
        row-gap: 12px;
        align-items: center;
    }

    .brand {
        order: 1;
    }

    /* hamburger w białym pasku, po prawej od logo */
    .topbar .menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: auto;
        order: 2;
        margin-left: auto;
        padding: 9px 14px;
        border: 1px solid var(--line);
        border-radius: 8px;
        color: var(--navy);
        background: #fff;
        font-size: 13.5px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .topbar .menu-toggle:hover,
    .topbar .menu-toggle[aria-expanded="true"] {
        background: var(--navy);
        color: #fff;
        border-color: var(--navy);
    }

    /* Moje konto + Kontakt trafiają do rozwijanego menu — chowamy linki pomocnicze */
    .utility-links {
        display: none;
    }

    /* narzędzia: Dostępność 50% + wyszukiwarka 50% */
    .topbar__tools {
        order: 3;
        flex-basis: 100%;
        width: 100%;
        gap: 12px;
    }

    .wcag {
        flex: 1 1 0;
        min-width: 0;
    }

    .wcag__toggle {
        width: 100%;
        justify-content: center;
    }

    .head-search {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
    }

    .head-search form {
        width: 100%;
    }

    .head-search input {
        width: 100%;
    }
}

/* 5. Stopka — grupy linków w 2 równych kolumnach na mobile */
@media (max-width: 760px) {
    .footer__main {
        grid-template-columns: 1fr 1fr;
        gap: 30px 28px;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .footer__col {
        display: contents;
    }
}

/* 6. Menu mobilne po otwarciu — pełnoekranowy overlay z białym logo na górze */
.menu__m-head {
    display: none;
}

@media (max-width: 991.98px) {
    .offcanvas .menu {
        position: fixed;
        inset: 0;
        z-index: 300;
        background: var(--navy);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0 22px 40px;
        overflow-y: auto;
        gap: 0;
    }

    /* normalne wysokości wierszy — bez rozciągania na siłę */
    .offcanvas .menu > li {
        flex: 0 0 auto;
    }

    .offcanvas .menu > li > a {
        height: auto;
        padding: 13px 2px;
    }

    /* nagłówek overlay: logo z lewej, „Zamknij” z prawej */
    .menu__m-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 0;
        margin-bottom: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, .14);
    }

    .menu__m-logo {
        height: 40px;
        width: auto;
    }

    .menu__m-close {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: auto;
        height: auto;
        padding: 9px 13px;
        background: rgba(255, 255, 255, .10);
        border: 0;
        border-radius: 8px;
        color: #fff;
        font-weight: 700;
        font-size: 14px;
        letter-spacing: .02em;
    }

    .menu__m-close:hover {
        background: rgba(255, 255, 255, .22);
    }

    .menu__m-close svg {
        width: 18px;
        height: 18px;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* 2. Hero — wszystko wyśrodkowane na mobile */
@media (max-width: 860px) {
    .hero__head {
        text-align: center;
    }

    .hero__head p {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .searchbox .tabs {
        justify-content: center;
    }

    .searchbox .hero__hint {
        text-align: center;
    }
}

/* 3. Wydarzenia wyróżnione — jedno pod drugim na mobile */
@media (max-width: 1080px) {
    .wbp-cards.three {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .wbp-cards.three {
        grid-template-columns: 1fr;
    }
}

/* 4. Nagłówki sekcji — link „wszystkie” pod spodem, treść na pełną szerokość */
@media (max-width: 760px) {
    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-head .seeall {
        align-self: flex-start;
    }

    .news-module__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 5. Stopka — grupy linków jako osobne wiersze (jedna kolumna) [zastąpione niżej: 2 kolumny] */

/* ============================================================
   MOBILE — poprawki 1–5 (nowa runda uwag)
   ============================================================ */

/* 1. Górny pasek w JEDNEJ linii */
@media (max-width: 880px) {
    .eubar .container {
        flex-wrap: nowrap;
        gap: 10px;
        padding-left: 3px;
        padding-right: 3px;
    }

    /* godziny do minimum: ukryta ikona zegara, ukryty badge „Dziś (śr)”, ukryty link „Wszystkie godziny” */
    .eubar__hours > svg {
        display: none;
    }

    .eubar__today {
        display: none;
    }

    .eubar__hours a {
        display: none;
    }

    .eubar__hours {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 11px;
        overflow: hidden;
    }

    .eubar__locs {
        white-space: wrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* logo UE i podpis obok siebie, podpis max 2 linie — niższy pasek */
    .eubar__right {
        flex: none;
        flex-direction: row;
        align-items: center;
        gap: 7px;
    }

    .eubar__flag {
        width: 28px;
        height: 19px;
    }

    .eubar p {
        font-size: 9px;
        line-height: 1.15;
        white-space: normal;
        text-align: left;
        max-width: 105px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* 2. Strefy „Dla czytelników / bibliotekarzy” w menu mobilnym:
      te same marginesy boczne co pozostałe pozycje, równe odstępy od góry */
@media (max-width: 991.98px) {
    .offcanvas .menu > li.aud > a {
        border-radius: 0;
        margin: 0;
        padding: 13px 15px;
        border-top: 0;
        border-bottom: 0;
        justify-content: flex-start;
    }

    .offcanvas .menu > li.aud--readers,
    .offcanvas .menu > li.aud--librarians {
        margin-top: 15px;
    }
}

/* 3. Wyszukiwarka — lupa+pole w jednym rzędzie, CTA na całej szerokości, większe */
@media (max-width: 620px) {
    .searchbox .search-form {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 10px;
        gap: 8px;
    }

    .search-form__ico {
        order: 1;
    }

    .searchbox .search-form input {
        order: 2;
        flex: 1 1 0;
        width: auto;
        padding: 6px 4px;
    }

    .searchbox .search-form button {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        padding: 15px;
        justify-content: center;
        font-size: calc(17px * var(--fs));
    }
}

/* 4. „Co słychać” — wyróżniony news: obrazek nad opisem (nie ściśnięty) */
@media (max-width: 620px) {
    .news-row--feature {
        flex-direction: column;
        gap: 14px;
    }

    .news-row--feature .news-row__thumb {
        flex-basis: auto;
        width: 100%;
        min-height: 190px;
        aspect-ratio: 16 / 9;
    }

    .news-row--feature .news-row__txt {
        padding: 0 2px;
    }

    .news-row--feature strong {
        font-size: calc(18px * var(--fs));
    }
}

/* 5. Social — tylko wyśrodkowanie ikon SM i przycisku newslettera (reszta bez zmian) */
@media (max-width: 620px) {
    .social__links {
        justify-content: center;
    }

    .social__links .nl-cta {
        margin-left: 0;
        justify-content: center;
    }
}

/* ============================================================
   v4.1 — NOWA PALETA, UJEDNOLICONE ODSTĘPY I SYSTEM LINKÓW
   ============================================================ */

/* ---------- A. Powierzchnie: wszędzie gdzie było --navy (jasny tint) ---------- */
.eubar,
.search-icon,
.cal__date,
.ph,
.news-row__thumb,
details.qa summary::after {
    background: var(--navy-tint);
}

details.qa[open] summary::after {
    background: var(--navy);
    color: #fff;
}

.wcag__opt:hover,
.menu .sub a:hover,
.cal__nav button:hover {
    background: var(--navy-tint);
    color: var(--navy);
}

.faq-contact {
    background: var(--bg-soft);
    border-color: transparent;
}

.fact {
    background: var(--navy-tint);
    border-color: transparent;
}

.fact b, .fact span {
    color: var(--navy);
}

.faq-contact .lbl {
    color: #fff;
}

.faq-contact a {
    color: #fff;
}

.faq-contact a:hover {
    color: #fff;
    text-decoration: underline;
}

.faq-contact a svg {
    color: var(--accent);
}

/* ---------- B. Złoto nigdy jako tekst na bieli (WCAG) — granat + złoty akcent ---------- */
.eubar__hours > svg,
.eubar__hours a svg,
.mega__col a svg,
.faq-contact a svg,
.eubar__today {
    color: var(--navy);
}

.section-head .eyebrow,
.faq-intro .eyebrow {
    color: var(--navy);
}

/* ---------- C. Trzy rozdzielne rodziny: TAG · LINK ZE STRZAŁKĄ · PRZYCISK ---------- */
/* 1) TAG — mały, prostokątny (r4), UPPERCASE, płaskie tło, bez ikony */
.chip,
.desto__chip {
    border-radius: 4px;
    padding: 5px 9px;
    font-size: calc(11.5px * var(--fs));
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    line-height: 1.25;
    border: 0;
}

.chip {
    background: #E1E8EF;
    color: var(--navy);
    display: inline-flex;
    align-self: flex-start;
    width: fit-content;
}

.chip.gold {
    background: var(--accent);
    color: var(--navy);
}

.desto__chip {
    background: rgba(255, 255, 255, .94);
    color: var(--navy);
}

/* 2) LINK ZE STRZAŁKĄ — bez tła, granat + złote podkreślenie (na jasnym tle) */
.cta-link,
.seeall,
.cal__more,
.faq__all,
.tile .cta-link {
    color: var(--navy);
    font-size: calc(15px * var(--fs));
    font-weight: 800;
    border-bottom: 0;
    padding-bottom: 0;
    border-radius: 0;
    display: inline-flex;
    align-self: flex-start;
    width: fit-content;
    transition: color .15s;
}

.cta-link svg,
.seeall svg,
.cal__more svg,
.faq__all svg,
.tile .cta-link svg {
    color: var(--navy);
}

.cta-link:hover,
.seeall:hover,
.cal__more:hover,
.faq__all:hover,
.tile .cta-link:hover {
    color: var(--navy-700);
    background: transparent;
}

/* ten sam link na ciemnym tle — złoto na granacie ma pełny kontrast */
.desto__cta {
    color: var(--accent);
}

/* Na skróty — linki białe, złota tylko strzałka */
.shortcuts a {
    color: #fff;
}

.shortcuts a svg {
    color: var(--accent);
}

.desto__cta {
    border-bottom: 0;
    padding-bottom: 0;
    font-size: calc(15px * var(--fs));
    font-weight: 800;
    width: fit-content;
}

/* banner CTA to PRZYCISK (wypełnienie), nie link tekstowy */
.banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    background: var(--accent);
    color: var(--navy);
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: calc(15px * var(--fs));
    font-weight: 800;
}

.banner__cta svg {
    width: 16px;
    height: 16px;
    flex: none;
    transition: transform .15s;
}

.banner__cta:hover {
    background: var(--accent-700);
    color: var(--navy);
}

.banner__cta:hover svg {
    transform: translateX(4px);
}

.block.tint .cta-link,
.block.tint .seeall {
    color: var(--navy);
}

.block.tint .cta-link svg,
.block.tint .seeall svg {
    color: var(--navy);
}

.block.tint .cta-link:hover,
.block.tint .seeall:hover {
    color: var(--navy-700);
}

/* 3) PRZYCISK — wypełnienie, r10, bez UPPERCASE */
.searchbox .search-form button {
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: .01em;
}

.searchbox .search-form button:hover {
    background: var(--navy-700);
    color: #fff;
}

.social__links .nl-cta {
    background: var(--accent);
    color: var(--navy);
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: .01em;
}

.social__links .nl-cta:hover {
    background: var(--accent-700);
    color: var(--navy);
}

.cal__count {
    background: var(--accent-700);
    color: var(--navy);
    border-radius: 20px;
}

/* ---------- D. Menu: strefy odbiorców bez ikon, złota para ---------- */
.menu > li.aud > a .aud-ico {
    display: none;
}

.menu > li.aud--readers > a {
    background: var(--accent);
    color: var(--navy);
}

.menu > li.aud--librarians > a {
    background: var(--accent-700);
    color: var(--navy);
}

.menu > li.aud--readers:hover > a,
.menu > li.aud--readers:focus-within > a,
.menu > li.aud--librarians:hover > a,
.menu > li.aud--librarians:focus-within > a {
    background: var(--navy);
    color: #fff;
}

@media (max-width: 991.98px) {
    .offcanvas .menu > li.aud--readers > a {
        background: var(--accent);
        color: var(--navy);
    }

    .offcanvas .menu > li.aud--librarians > a {
        background: var(--accent-700);
        color: var(--navy);
    }
}

/* ---------- E. Jednolite wcięcia w kartach: 24px od każdej krawędzi ---------- */
.panel__body {
    padding: 24px;
}

.banner .banner__tag {
    top: 24px;
    left: 24px;
}

.banner .banner__inner {
    padding: 24px;
}

.desto__chip {
    top: 24px;
    left: 24px;
}

.desto__body {
    padding: 24px;
}

.shortcuts {
    padding: 24px;
}

@media (max-width: 620px) {
    .panel__body,
    .banner .banner__inner,
    .desto__body,
    .shortcuts {
        padding: 20px;
    }

    .banner .banner__tag,
    .desto__chip {
        top: 20px;
        left: 20px;
    }
}

/* ---------- F. Pas sekcji „tint" = --bg-soft (jasny) ---------- */
section.block.tint {
    background: #F4F7F9;
}

section.block.tint .section-head .eyebrow,
section.block.tint .news-module__head h3,
section.block.tint .news-module__head h3 a,
section.block.tint .news-row strong {
    color: var(--navy);
}

section.block.tint .section-head h2 {
    color: var(--ink);
}

section.block.tint .section-head .lead,
section.block.tint .news-module__desc,
section.block.tint .news-row__lead,
section.block.tint .news-row__date {
    color: var(--muted);
}

section.block.tint .eyebrow--link:hover {
    border-color: var(--accent);
}

section.block.tint .news-row:hover strong {
    color: var(--navy-700);
}

section.block.tint .chip {
    background: #E1E8EF;
    color: var(--navy);
}

section.block.tint .news-row__thumb {
    background-color: #E4EAF0;
}

/* 4b. Narzędzia (Dostępność + wyszukiwarka) przeniesione na dół rozwijanego menu */
.menu__tools {
    display: none;
}

@media (max-width: 991.98px) {
    .offcanvas .menu > li.menu__tools {
        display: block;
        margin-top: auto;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, .14);
    }

    .offcanvas .menu > li.menu__tools .topbar__tools {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .offcanvas .menu > li.menu__tools .utility-links {
        display: none;
    }

    .offcanvas .menu > li.menu__tools .wcag,
    .offcanvas .menu > li.menu__tools .head-search {
        width: 100%;
    }

    .offcanvas .menu > li.menu__tools .wcag__toggle {
        width: 100%;
        justify-content: center;
    }

    .offcanvas .menu > li.menu__tools .head-search {
        display: flex;
    }

    .offcanvas .menu > li.menu__tools .head-search form,
    .offcanvas .menu > li.menu__tools .head-search input {
        width: 100%;
    }

    /* rozwinięcie Dostępności: w flow (rozpycha w dół, przesuwa wyszukiwarkę), pełna szerokość */
    .offcanvas .menu > li.menu__tools .wcag {
        display: block;
    }

    .offcanvas .menu > li.menu__tools .wcag__panel {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
    }
}

/* ---------- G. Linki tekstowe w panelach „O bibliotece" i kalendarzu ---------- */
.panel .cta-link,
.cal__more {
    color: var(--bg-soft);
}

.panel .cta-link svg,
.cal__more svg {
    color: var(--bg-soft);
}

.panel .cta-link:hover,
.cal__more:hover {
    color: var(--navy);
}

.panel .cta-link:hover svg,
.cal__more:hover svg {
    color: var(--navy);
}

/* ---------- H. Ramka bieżącego dnia w kalendarzu — zielony 3:1 ---------- */
.cal__grid .day.today {
    box-shadow: inset 0 0 0 2px var(--green);
}

.cal__grid .day.today.event {
    box-shadow: inset 0 0 0 2px var(--green);
}

/* ---------- I. WCAG: złoto nigdy jako tekst na bieli — wyróżnienie liczby ---------- */
.hl {
    color: var(--navy);
    background: linear-gradient(to top, var(--accent) 38%, transparent 38%);
    padding: 0 2px;
}

/* ---------- J. Prawdziwe zdjęcia w kaflach, bannerze i miniaturach ---------- */
.banner-static .banner {
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat;
}

.desto__media--photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.desto__media--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 30, 52, .15) 25%, rgba(0, 30, 52, .90) 100%);
}

.desto__media--photo {
    position: absolute;
    inset: 0;
}

.news-row__thumb--photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}

.ph--photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hl {
    color: var(--accent);
    background: none;
    padding: 0;
}

/* ---------- K. FAQ: kółko rozwijania widoczne na każdym tle (WCAG 1.4.11) ---------- */
details.qa summary::after {
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--navy);
    color: var(--navy);
}

details.qa[open] summary::after {
    background: var(--navy);
    box-shadow: none;
    color: #fff;
}

details.qa summary:hover::after {
    background: var(--accent);
    box-shadow: none;
    color: var(--navy);
}

/* Tagi na jasnym pasie sekcji — pastylka musi być czytelna jako kształt */
section.block.tint .chip {
    background: #fff;
    box-shadow: inset 0 0 0 1px #C6D2DD;
    color: var(--navy);
}

/* ---------- L. WCAG: zapas kontrastu na linkach i kaflach mozaiki ---------- */
/* „Więcej o nas" / „Pełne kalendarium" — #66798a miało równo 4,50:1; ciemniejszy odcień tej samej rodziny */
/*.panel .cta-link,*/
/*.cal__more {*/
/*    color: #4C5D6E;*/
/*}*/

/*.panel .cta-link svg,*/
/*.cal__more svg {*/
/*    color: #4C5D6E;*/
/*}*/

/* Kafle mozaiki na zdjęciach — mocniejszy scrim, tekst zawsze na ciemnym */


/* ---------- M. Strefy odbiorców bez wyróżnienia tłem — jak reszta menu ---------- */
.menu > li.aud--readers > a,
.menu > li.aud--librarians > a {
    background: transparent;
    color: inherit;
}

.menu > li.aud--readers:hover > a,
.menu > li.aud--readers:focus-within > a,
.menu > li.aud--librarians:hover > a,
.menu > li.aud--librarians:focus-within > a {
    background: var(--navy);
    color: #fff;
}

@media (max-width: 991.98px) {
    .offcanvas .menu > li.aud--readers > a,
    .offcanvas .menu > li.aud--librarians > a {
        background: transparent;
        color: inherit;
    }
}

/* ---------- N. Strefy odbiorców: identyczne odstępy jak reszta menu ---------- */
.menu > li.aud > a {
    padding: 14px 11px;
    gap: 5px;
}

.menu > li.aud--readers {
    margin-left: auto;
}

.menu > li.aud--librarians {
    margin-left: 0;
}

.menu > li.aud > a .caret {
    width: 9px;
    height: 9px;
    opacity: .7;
}

.menu > li.aud:hover > a,
.menu > li.aud:focus-within > a {
    border-bottom-color: var(--accent);
    background: rgba(255, 255, 255, .05);
    color: #fff;
}

/* ---------- O. Mobile: strefy odbiorców jak reszta pozycji menu ---------- */
@media (max-width: 991.98px) {
    .menu > li.aud--readers,
    .menu > li.aud--librarians {
        margin-left: 0;
        margin-top: 0;
    }

    .offcanvas .menu > li.aud--readers,
    .offcanvas .menu > li.aud--librarians {
        margin-top: 0;
    }

    .offcanvas .menu > li.aud > a {
        padding: 14px 4px;
        margin: 0;
        border-radius: 0;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
        border-top: 0;
        background: transparent;
        color: #E7EEF4;
    }
}

/* ---------- P. Mobile: strefy odbiorców oddzielone przerwą na wysokość pozycji menu ---------- */
@media (max-width: 991.98px) {
    .offcanvas .menu > li.aud--readers {
        margin-top: 50px;
    }
}


/* ============================================================
   BOOTSTRAP BRIDGE — mostki między Bootstrapem 5 a stylami WBP
   Ta sekcja ładuje się na końcu, więc wygrywa z klasami Bootstrapa.
   ============================================================ */

/* ---------- 1. Reboot: przywrócenie założeń projektu ---------- */
h5, h6 {
    margin: 0;
    line-height: 1.18;
    color: var(--navy);
    font-weight: 700
}

p {
    margin: 0
}

address {
    margin: 0;
    font-style: normal
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none
}

label {
    margin: 0
}

summary {
    display: list-item
}

details.qa summary {
    display: flex
}

b, strong {
    font-weight: 700
}

small {
    font-size: inherit
}

a {
    color: inherit;
    text-decoration: none
}

a:hover {
    color: var(--navy-700)
}

.footer a:hover, .social a:hover, .shortcuts a:hover, .offcanvas a:hover, .hero a:hover, .hero__hint a:hover, .banner a:hover, .desto:hover .desto__cta {
    color: #fff
}

.hero__hint a:hover {
    color: var(--accent)
}

/* fokus: pierścień dwukolorowy — granat + złoty halo (widoczny na jasnym i ciemnym tle, ≥3:1) */
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(252, 187, 0, .55)
}

.navbar :focus-visible, .offcanvas :focus-visible, .footer :focus-visible, .social :focus-visible, .shortcuts :focus-visible, .hero :focus-visible, .banner :focus-visible, .desto:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(0, 42, 76, .55)
}

.lead {
    font-size: inherit;
    font-weight: inherit;
    margin-bottom: 0
}

/* ---------- 2. .container = dawny .wrap ---------- */
.container, .container-fluid {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gut)
}

.container-fluid {
    max-width: none
}

.row > * {
    padding-inline: calc(var(--bs-gutter-x) * 0.7);
    padding-block: calc(var(--bs-gutter-y) * 0.7);
}

/* ---------- 3. Siatki sekcji (odwzorowanie dawnych grid-ów) ---------- */
/* HERO: slogan + wyszukiwarka */
.hero .container {
    display: block
}

.row-hero {
    --bs-gutter-x: clamp(28px, 5vw, 60px);
    --bs-gutter-y: 24px
}

@media (min-width: 861px) {
    .row-hero > .col-12 {
        flex: 0 0 auto;
        width: 45.1%
    }

    .row-hero > .col-12 + .col-12 {
        width: 54.9%
    }
}

/* TRIO: baner · opis · kalendarz */
.row-trio {
    --bs-gutter-x: 24px;
    --bs-gutter-y: 24px
}

@media (min-width: 1081px) {
    .row-trio > .col-12 {
        flex: 0 0 auto;
        width: 32.8%
    }

    .row-trio > .col-12:first-child {
        width: 34.4%
    }
}

/* AKTUALNOŚCI: dwie kolumny modułów */
.row-news {
    --bs-gutter-x: clamp(28px, 4vw, 56px);
    --bs-gutter-y: 34px
}

@media (min-width: 901px) {
    .row-news > .col-12 {
        flex: 0 0 auto;
        width: 50%
    }
}

/* NA SKRÓTY + FAQ */
.row-split {
    --bs-gutter-x: 40px;
    --bs-gutter-y: 28px;
    align-items: flex-start
}

@media (min-width: 1081px) {
    .row-split > .col-12:first-child {
        flex: 0 0 auto;
        width: calc(360px + var(--bs-gutter-x))
    }

    .row-split > .col-12:last-child {
        flex: 1 1 0;
        width: auto;
        min-width: 0
    }
}

/* STOPKA */
.row.footer__main {
    display: flex;
    margin-top: 0;
    gap: 40px 0;
    --bs-gutter-x: 44px;
    --bs-gutter-y: 0
}

@media (min-width: 761px) {
    .row.footer__main > .col-12 {
        flex: 0 0 auto;
        width: 22.1%;
        min-width: 0
    }

    .row.footer__main > .col-12:first-child {
        width: 33%
    }
}

@media (max-width: 760px) {
    .row.footer__main {
        gap: 30px 0;
        --bs-gutter-x: 20px
    }

    .row.footer__main > .col-12 {
        flex: 0 0 auto;
        width: 50%;
        min-width: 0
    }

    .row.footer__main > .col-12:first-child {
        width: 100%
    }

    .row.footer__main .footer__links a {
        overflow-wrap: anywhere
    }

    .footer__col {
        display: flex
    }
}

/* MOZAIKA „Warto zajrzeć” pozostaje siatką bento (poza modelem kolumn Bootstrapa) */

/* ---------- 4. Navbar / menu ---------- */
.navbar {
    --bs-navbar-padding-y: 0;
    --bs-navbar-padding-x: 0;
    display: block;
    padding: 0;
    position: relative;
    background: var(--navy);
    border-bottom: 1px solid var(--line)
}

/* tekst menu dziedziczy biel z .navbar (Bootstrap ustawia ciemny --bs-offcanvas-color) */
.navbar .offcanvas {
    --bs-offcanvas-color: inherit;
    color: inherit
}

.navbar-nav {
    flex-direction: row;
    gap: 0
}

.navbar-toggler {
    border: 0;
    padding: 0;
    box-shadow: none !important
}

.navbar-toggler:focus {
    box-shadow: none
}

/* pozycje menu (.menu) zachowują własny wygląd — Bootstrap dostarcza tylko szkielet */
@media (min-width: 992px) {
    .navbar-expand-lg .offcanvas {
        background: transparent
    }

    .navbar-expand-lg .offcanvas .offcanvas-body {
        padding: 0;
        overflow: visible;
        display: flex;
        align-items: stretch
    }

    .navbar-expand-lg .offcanvas .offcanvas-body > .menu {
        flex: 1 1 auto;
        justify-content: space-between
    }
}

@media (max-width: 991.98px) {
    .offcanvas {
        --bs-offcanvas-bg: var(--navy);
        --bs-offcanvas-width: 100%;
        --bs-offcanvas-padding-x: 22px;
        --bs-offcanvas-padding-y: 0;
        --bs-offcanvas-border-width: 0;
        color: #fff
    }

    .offcanvas-header {
        padding: 0 22px
    }

    .offcanvas .offcanvas-header.menu__m-head {
        padding: 14px 22px
    }

    .offcanvas {
        color: #fff
    }

    .offcanvas-body {
        padding: 0 22px 40px;
        display: flex;
        flex-direction: column
    }

    /* dawny overlay .menu.open jest teraz offcanvasem — kasujemy pozycjonowanie fixed */
    .offcanvas .offcanvas-body .menu {
        position: static;
        inset: auto;
        padding: 0;
        background: transparent;
        overflow: visible;
        z-index: auto;
        flex: 1 1 auto
    }

    .navbar-nav {
        flex-direction: column
    }
}

/* ---------- 5. Formularze i przyciski ---------- */
.form-control, .form-control:focus {
    box-shadow: none;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    border-radius: 0
}

.searchbox .search-form input.form-control {
    flex: 1;
    min-width: 0
}

.btn {
    --bs-btn-padding-x: 0;
    --bs-btn-padding-y: 0;
    --bs-btn-border-radius: 0;
    --bs-btn-font-size: inherit;
    --bs-btn-font-weight: inherit;
    --bs-btn-line-height: inherit;
    border: 0;
    box-shadow: none
}

.btn:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(252, 187, 0, .55)
}

/* ============================================================
   PODSTRONY — treść redakcyjna (breadcrumb, typografia, tabele, przyciski)
   Klasy do użycia na kolejnych podstronach:
   .page-head  · pas z breadcrumbem i tytułem H1
   .prose      · kontener treści (h1–h6, p, listy, tabele, cytaty, figure)
   .btn-wbp / --gold / --outline · przyciski marki (na bazie .btn Bootstrapa)
   .row-page   · treść + kolumna boczna
   ============================================================ */
.page-head {
    background: var(--navy-tint);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(18px, 2.4vw, 26px) clamp(22px, 3vw, 34px)
}

.page-head h1, .page-head h2 {
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.12;
    color: var(--navy);
    text-wrap: balance
}

.page-head .page-head__lead {
    margin-top: 12px;
    color: var(--muted);
    font-size: calc(17.5px * var(--fs));
    max-width: 62ch;
    line-height: 1.55
}

/* podstrona: mniejszy odstęp między pasem tytułowym a treścią */
section.block.block--page {
    padding-top: 0;
}

section.block.block--page  > .container {
    padding-top: clamp(22px, 3vw, 38px)
}

.breadcrumb {
    --bs-breadcrumb-divider-color: #4C5D6E;
    --bs-breadcrumb-item-padding-x: .55rem;
    margin: 0 0 14px;
    font-size: calc(13.5px * var(--fs));
    font-weight: 600;
    flex-wrap: wrap
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #4C5D6E
}

.breadcrumb-item a {
    color: #4C5D6E;
    text-decoration: underline;
    text-underline-offset: 2px
}

.breadcrumb-item a:hover {
    color: var(--navy)
}

.breadcrumb-item.active {
    color: var(--navy);
    font-weight: 700
}

.row-page {
    --bs-gutter-x: clamp(28px, 4vw, 52px);
    --bs-gutter-y: 36px;
    align-items: flex-start
}

@media (min-width: 1081px) {
    .row-page > .col-12:first-child {
        flex: 1 1 0;
        width: auto;
        min-width: 0
    }

    .row-page > .col-12 + .col-12 {
        flex: 0 0 auto;
        width: calc(320px + var(--bs-gutter-x))
    }
}

.prose code {
    background: var(--navy-tint);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .92em
}

/* --- tabela --- */
.prose .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px
}

.prose .table-wrap:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(252, 187, 0, .55)
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: calc(15.5px * var(--fs));
    min-width: 520px
}

.prose caption {
    caption-side: top;
    text-align: left;
    padding: 14px 16px;
    font-weight: 800;
    color: var(--navy);
    background: #fff;
    border-bottom: 1px solid var(--line)
}

.prose th, .prose td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top
}

.prose thead th {
    background: var(--navy);
    color: #fff;
    font-size: calc(13.5px * var(--fs));
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 0
}

.prose tbody tr:nth-child(even) {
    background: var(--navy-tint)
}

.prose tbody tr:last-child th, .prose tbody tr:last-child td {
    border-bottom: 0
}

.prose tbody th {
    color: var(--navy);
    font-weight: 800
}

/* --- przyciski --- */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center
}

.btn-wbp {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--navy);
    color: #fff;
    border: 2px solid var(--navy);
    border-radius: 10px;
    padding: 12px 22px;
    font-size: calc(15.5px * var(--fs));
    font-weight: 800;
    text-decoration: none;

    &:hover {
        background: var(--navy-700);
        border-color: var(--navy-700);
        color: #fff;
        text-decoration: none;
    }

    svg {
        width: 16px;
        height: 16px;
        flex: none;
        transition: transform .15s;
    }

    &:hover svg {
        transform: translateX(4px);
    }

    &.btn-wbp--gold {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--navy);

        &:hover {
            background: var(--accent-700);
            border-color: var(--accent-700);
            color: var(--navy);
        }
    }

    &.btn-wbp--outline {
        background: transparent;
        color: var(--navy);

        &:hover {
            background: var(--navy);
            border-color: var(--navy);
            color: #fff;
        }
    }
}

/* --- karta informacyjna / komunikat w treści ---
   Poziomy (widget "WBP – Ramka informacyjna + przyciski") — ta sama paleta
   co w module "Komunikaty" (wbp-banners), dla spójności. Nestowanie w
   miejscu (ta sama pozycja w kaskadzie co wcześniej — tylko czytelniej). */
.note {
    display: flex;
    gap: 14px;
    background: var(--navy-tint);
    border-radius: 10px;
    padding: 18px 20px;

    svg {
        width: 22px;
        height: 22px;
        flex: none;
        color: var(--navy);
        margin-top: 3px;
    }

    > div > span {
        font-size: calc(17px * var(--fs));
        margin: 0 0 4px;
        color: var(--navy);
        font-weight: 700;
        letter-spacing: -.01em;
        line-height: 1.18;
    }

    p {
        font-size: calc(15.5px * var(--fs));
        color: var(--muted);
    }

    &.note--info {
        background: var(--navy-tint);

        svg, > div > span {
            color: var(--navy);
        }
    }

    &.note--success {
        background: #E8F5E9;

        svg, > div > span {
            color: #2E7D32;
        }
    }

    &.note--warning {
        background: #FFF4E5;

        svg, > div > span {
            color: #B7791F;
        }
    }

    &.note--danger {
        background: #FDEBEA;

        svg, > div > span {
            color: #C0392B;
        }
    }
}

/* --- kolumna boczna --- */
.side-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px
}

.side-box + .side-box {
    margin-top: 20px
}

.side-box h2 {
    font-size: calc(17px * var(--fs));
    margin-bottom: 14px;
    margin-top: 0;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;

    a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 8px;
        font-weight: 600;
        font-size: calc(15px * var(--fs));
        color: var(--ink);

        svg {
            width: 14px;
            height: 14px;
            flex: none;
            color: var(--navy);
            opacity: 0;
            transform: translateX(-4px);
            transition: .15s;
        }

        &:hover {
            color: var(--ink);
            background: var(--navy-tint);

            svg {
                opacity: 1;
                transform: translateX(0);
            }
        }

        &[aria-current="page"] {
            background: var(--navy);
            color: #fff;

            svg {
                opacity: 1;
                transform: translateX(0);
                color: var(--accent);
            }
        }
    }
}

.prose > .elementor > div {
    padding: 0;
}

/* ---------- widget Elementora "WBP – Pliki do pobrania" (lista bez ramki, samodzielna) ---------- */
.prose h2.wbp-downloads__title {
    font-size: calc(17px * var(--fs));
    margin-bottom: 14px;
    margin-block-start: 0
}

.wbp-downloads__label {
    flex: 1;
    min-width: 0;
}

.wbp-downloads__meta {
    font-weight: 500;
    font-size: calc(12.5px * var(--fs));
    color: var(--muted);
}

/* --- lista aktualności (archiwum) + stronicowanie --- */
.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 26px
}

.news-filters .chip {
    text-decoration: none
}

.news-filters .chip:hover {
    background: var(--accent);
    color: var(--navy)
}

.news-filters .chip[aria-current="page"], section.block.tint .news-filters .chip[aria-current="page"] {
    background: var(--navy);
    color: #fff;
    box-shadow: none
}

section.block.tint .news-filters .chip:hover {
    background: var(--accent);
    color: var(--navy);
    box-shadow: none
}

.news-list--archive {
    gap: 0
}

.news-list--archive .news-row {
    align-items: flex-start;
    gap: 20px;
    padding: 20px 12px;
    border-radius: 10px;
    border-bottom: 1px solid var(--line)
}

.news-list--archive .news-row:last-child {
    border-bottom: 0
}

.news-list--archive .news-row__thumb {
    width: 200px;
    height: 134px;
    border-radius: 10px
}

.news-list--archive .news-row strong {
    font-size: calc(19px * var(--fs))
}

@media (max-width: 620px) {
    .news-list--archive .news-row {
        flex-direction: column;
        gap: 14px
    }

    .news-list--archive .news-row__thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9
    }

    #main .prose .e-flexbox-base {
        flex-direction: column;
    }
}

.pagination {
    --bs-pagination-padding-x: 0;
    --bs-pagination-padding-y: 0;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 34px;
    justify-content: center
}

.pagination .page-link {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
    font-size: calc(15px * var(--fs));
    text-decoration: none
}

.pagination .page-link:hover {
    background: var(--navy-tint);
    color: var(--navy);
    border-color: var(--line)
}

.pagination .page-link svg {
    width: 15px;
    height: 15px
}

.pagination .page-item.active .page-link {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff
}

.pagination .page-item.disabled .page-link {
    opacity: .45;
    pointer-events: none
}

.pagination .page-item.ellipsis {
    display: grid;
    place-items: center;
    min-width: 28px;
    color: #4C5D6E;
    font-weight: 700
}

.results-meta {
    color: #4C5D6E;
    font-size: calc(14.5px * var(--fs));
    font-weight: 600;
    margin-bottom: 14px
}

/* lista boczna: miniatura nad tekstem (wyróżnione wpisy w kolumnie) */
.news-list--side {
    gap: 14px
}

.news-list--side .news-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 0
}

.news-list--side .news-row:last-child {
    border-bottom: 0;
    padding-bottom: 0
}

.news-list--side .news-row:hover {
    background: transparent;
    box-shadow: none
}

.news-list--side .news-row__thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 8px
}

.news-list--side .news-row strong {
    font-size: calc(16.5px * var(--fs))
}

@media (max-width: 1080px) {
    .news-list--side .news-row {
        flex-direction: row;
        align-items: center;
        gap: 16px
    }

    .news-list--side .news-row__thumb {
        width: 160px;
        flex: none;
        aspect-ratio: 4/3
    }
}

@media (max-width: 520px) {
    .news-list--side .news-row__thumb {
        width: 110px
    }
}

/* archiwum: dwa wpisy w rzędzie w formie wpisu wyróżnionego */
.row-archive {
    --bs-gutter-x: 0;
    --bs-gutter-y: clamp(20px, 2.4vw, 28px)
}

.row-archive > .col-12 {
    container-type: inline-size
}

.row-archive .news-row--feature {
    align-items: flex-start
}

.row-archive .news-row--feature .news-row__thumb {
    align-self: stretch;
    height: auto;
    min-height: 168px;
    flex: 0 0 34%;
    width: 34%;
    max-width: 340px;
    aspect-ratio: auto
}

.row-archive .news-row--feature .news-row__txt {
    gap: 10px
}

.news-row__cta {
    margin-top: 2px;
    font-size: calc(14.5px * var(--fs))
}

.news-row__cta svg {
    width: 15px;
    height: 15px;
    transition: transform .15s
}

.row-archive .news-row:hover {
    background: #F4F7F9;
    box-shadow: var(--shadow-sm)
}

.row-archive .news-row:hover .chip {
    background: #fff;
    box-shadow: inset 0 0 0 1px #C6D2DD;
    color: var(--navy)
}

.news-row:hover .news-row__cta {
    color: var(--navy-700)
}

.news-row:hover .news-row__cta svg {
    transform: translateX(4px)
}

/* wąska karta (niezależnie od szerokości okna): miniatura nad tekstem */
@container (max-width:540px) {
    .row-archive .news-row--feature {
        flex-direction: column;
        gap: 14px
    }

    .row-archive--two .news-row--feature .news-row__thumb.news-row__thumb--photo,
    .row-archive .news-row--feature .news-row__thumb.news-row__thumb--photo {
        flex: none;
        width: 100%;
        aspect-ratio: 16/9
    }

    .row-archive .news-row--feature .news-row__txt {
        padding: 0 2px
    }
}

/* wariant B: wyróżnione wpisy jako karty (miniatura nad tekstem) */
.news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md)
}

.news-card__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    background-color: #E4EAF0
}

.news-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px
}

.news-card__body strong {
    font-size: calc(18.5px * var(--fs));
    line-height: 1.28;
    color: var(--ink);
    font-weight: 700;
    text-wrap: pretty
}

.news-card:hover .news-card__body strong {
    color: var(--navy-700)
}

.news-card:hover .news-row__cta svg {
    transform: translateX(4px)
}

/* wariant B: dwa wpisy w rzędzie */
.row-archive--two {
    --bs-gutter-x: clamp(24px, 3vw, 40px)
}

.row-archive--two .news-row--feature .news-row__thumb {
    flex: 0 0 44%;
    width: 44%;
    max-width: none
}

/* wąska karta: pełna szerokość miniatury (spięte z regułą @container) */
@container (max-width:340px) {
    .row-archive--two .news-row--feature .news-row__thumb {
        flex: none;
        width: 100%;
        max-width: none;
        aspect-ratio: 16/9
    }
}

/* --- panel filtrów (wydarzenia) --- */
.container:has(>.filters) {
    padding-top: 22px;
}
.filters {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px
}

.filters legend, .filters .filters__label {
    display: block;
    font-size: calc(13.5px * var(--fs));
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 7px;
    float: none;
    width: auto;
    padding: 0
}

.filters fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0
}

.filters .form-select, .filters .form-control, .filters input[type="date"] {
    width: 100%;
    height: 46px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: calc(13px * var(--fs));
    color: var(--ink);
    box-shadow: none
}

.filters input[type="date"] {
    padding-right: 8px
}

.filters input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: 4px;
    opacity: .65
}

.filters .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23002A4C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px
}

.filters .form-select:focus, .filters .form-control:focus, .filters input[type="date"]:focus {
    border-color: var(--navy)
}

.filters__dates {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap
}

.filters__dates .form-control {
    flex: 1 1 110px;
    min-width: 0
}

.filters__dates span {
    flex: none;
    color: #4C5D6E;
    font-size: calc(13.5px * var(--fs));
    font-weight: 700
}

.filters__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 0;
    padding-top: 18px;
    border-top: 1px solid var(--line)
}

.filters__reset {
    background: none;
    border: 0;
    padding: 0;
    color: #4C5D6E;
    font-weight: 700;
    font-size: calc(14.5px * var(--fs));
    text-decoration: underline;
    cursor: pointer
}

.filters__reset:hover {
    color: var(--navy)
}

.filters__count {
    margin-left: auto;
    color: #4C5D6E;
    font-size: calc(14.5px * var(--fs));
    font-weight: 700
}

@media (max-width: 620px) {
    .filters__count {
        margin-left: 0
    }
}

/* --- data wydarzenia na kaflu (z ikoną, przy prawej krawędzi) --- */
.event-date {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 7px;
    background: var(--navy);
    color: #fff;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: calc(12.5px * var(--fs));
    font-weight: 800;
    white-space: nowrap
}

.event-date svg {
    width: 14px;
    height: 14px;
    flex: none;
    color: var(--accent)
}

#main .prose .row-events {
    margin-top: 0;
}

#main .prose .row-events > .col-12 {
    margin-top: 0;
}

.row-events .news-row:hover .event-date {
    background: var(--navy-700)
}

/* --- termin (data + godzina w jednej linii) i miejsce wydarzenia --- */
.event-facts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px
}

/* termin — data i godzina na jednej granatowej plakietce */
.event-when {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    background: var(--navy);
    color: #fff;
    border-radius: 6px;
    padding: 6px 11px;
    width: fit-content;
    max-width: 100%
}

.event-fact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: calc(14.5px * var(--fs))
}

.event-fact svg {
    width: 15px;
    height: 15px;
    flex: none
}

.event-when .event-fact {
    color: #fff;
    font-weight: 800;
    font-size: calc(12.5px * var(--fs))
}

.event-when .event-fact svg {
    color: var(--accent);
    width: 14px;
    height: 14px
}

.event-when .event-fact svg * {
    color: var(--accent);
}

/* wariant grupowany: miejsce obok godziny, na tej samej plakietce */
.event-fact--place-inline {
    color: #D6E1EA;
    font-weight: 700
}

.event-fact--place-inline svg {
    color: var(--accent)
}

/* miejsce — lżejsza waga i chłodniejszy szary */
.event-fact--place {
    color: #5A6B79;
    font-weight: 600;
    align-items: flex-start
}

.event-fact--place svg {
    color: #4C5D6E;
    margin-top: 3px
}

.row-events .news-row:hover .event-when {
    background: var(--navy-700)
}

/* rodzaj wydarzenia — pastylka na zdjęciu */
.row-events .news-row__thumb {
    position: relative
}

.row-events .chip.event-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, .94);
    box-shadow: none;
    color: var(--navy);
    max-width: calc(100% - 20px);
    white-space: normal
}

.row-events .news-row:hover .chip.event-type {
    background: #fff;
    box-shadow: none
}

.row-events .event-when {
    margin-bottom: 2px
}

/* --- wariant: wpisy grupowane belką z datą --- */
.events-day + .events-day {
    margin-top: clamp(28px, 3vw, 40px)
}

.events-day__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0 !important;
    flex-wrap: wrap;
    background: var(--navy-tint);
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin-bottom: 0;
}

.events-day__bar svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--navy)
}

.events-day__date {
    font-size: calc(17px * var(--fs));
    font-weight: 800;
    color: var(--navy)
}

.events-day__count {
    margin-left: auto;
    font-size: calc(13px * var(--fs));
    font-weight: 700;
    color: #4C5D6E
}

@media (max-width: 520px) {
    .events-day__count {
        margin-left: 0
    }
}

/* ---------- 6. Drobne ---------- */
/* kalendarz: miesiące przełączane strzałkami, lista rozwijana z limitem wysokości */
.cal__month[hidden] {
    display: none
}

.cal__list--scroll {
    max-height: 236px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin
}

.cal__list.is-open {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin
}

.cal__toggle {
    margin-left: 0;
    padding-top: 5px;
    padding-bottom: 5px;
    border: 0;
    cursor: pointer;
    line-height: 1.5
}

.cal__toggle:hover {
    background: var(--accent)
}

.cal__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px
}

.cal__actions:empty {
    margin-top: 0
}

.cal__reset {
    background: none;
    border: 0;
    padding: 0;
    color: #4C5D6E;
    font-weight: 700;
    font-size: calc(13.5px * var(--fs));
    text-decoration: underline;
    cursor: pointer
}

.cal__reset:hover {
    color: var(--navy)
}

.cal__grid .day.event {
    cursor: pointer
}

.cal__grid .day.is-active {
    background: var(--navy);
    color: #fff;
    font-weight: 800
}

.cal__grid .day.is-active::after {
    background: var(--accent)
}

.cal__txt strong a:hover {
    color: inherit;
    text-decoration: underline
}

.cal__nav button[disabled] {
    opacity: .4;
    cursor: default
}

.cal__nav button[disabled]:hover {
    background: #fff
}

/* rozwijane menu = ten sam wzorzec co megamenu: bez tła na hover, strzałka jako akcent */
.menu .sub a {
    display: flex;
    align-items: center;
    gap: 8px
}

.menu .sub a::after {
    content: "";
    flex: none;
    width: 13px;
    height: 13px;
    background: currentColor;
    opacity: 0;
    transform: translateX(-4px);
    transition: .15s;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat
}

.menu .sub a:hover {
    background: transparent;
    color: var(--ink)
}

.menu .sub a:hover::after {
    opacity: 1;
    transform: translateX(0)
}

/* megamenu: ta sama zasada — hover zmienia tylko strzałkę, nie kolor tekstu */
.mega__col a:hover {
    color: var(--ink)
}

@media (max-width: 991.98px) {
    .menu .sub a:hover {
        background: transparent;
        color: #DCE8F1
    }

    .mega__col a:hover {
        color: #DCE8F1
    }
}

.badge {
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    border-radius: 0;
    color: inherit;
    background: none
}

.alertbar .btn-close {
    filter: none;
    opacity: 1
}

/* --- metryczka wydarzenia (podstrona szczegółów) --- */
.event-meta {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(18px, 2.2vw, 26px);
    margin: 0;
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
    gap: 22px 30px
}

.event-meta__item {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    min-width: 0
}

.event-meta__item dl {
    margin-bottom: 0;
}

.event-meta__item + .event-meta__item {
    position: relative
}

.event-meta__ico {
    width: 38px;
    height: 38px;
    flex: none;
    display: grid;
    place-items: center;
    background: var(--navy-tint);
    border-radius: 9px;
    color: var(--navy)
}

.event-meta__ico svg {
    width: 19px;
    height: 19px
}

.event-meta dt {
    font-size: calc(12px * var(--fs));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #4C5D6E;
    margin-bottom: 3px
}

.event-meta dd {
    margin: 0;
    font-size: calc(16px * var(--fs));
    font-weight: 800;
    color: var(--navy);
    line-height: 1.3
}

.event-meta dd span {
    display: block;
    margin-top: 2px;
    font-weight: 600;
    font-size: calc(13.5px * var(--fs));
    color: var(--muted);
    letter-spacing: 0;
    text-transform: none
}

.page-head .chip.event-type {
    background: #fff;
    box-shadow: inset 0 0 0 1px #C6D2DD;
    color: var(--navy)
}

/* metryczka w kolumnie bocznej */
.event-meta--side {
    grid-template-columns:1fr;
    gap: 18px
}

.side-title {
    font-size: calc(17px * var(--fs));
    color: var(--navy);
    margin-bottom: 12px
}

@media (min-width: 1081px) {
    .event-meta--side {
        position: sticky;
        top: 20px
    }
}

/* przyciski marki w treści .prose (nadpisanie koloru linku) */
.prose a.btn-wbp {
    color: #fff;
    text-decoration: none
}

.prose a.btn-wbp:hover {
    color: #fff
}

.prose a.btn-wbp--gold, .prose a.btn-wbp--gold:hover, .prose a.btn-wbp--outline {
    color: var(--navy)
}

.prose a.btn-wbp--outline:hover {
    color: #fff
}

/* pasek newslettera na podstronach (odsyłacz, nie formularz) */
.nl-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px 32px;
    background: var(--navy);
    border-radius: var(--radius);
    padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 36px)
}

.nl-band__txt {
    min-width: 0;
    max-width: 60ch
}

.nl-band h2 {
    color: #fff;
    font-size: clamp(21px, 2.2vw, 27px);
    margin: 0
}

.nl-band p {
    margin: 8px 0 0;
    color: #C9D8E4;
    font-size: calc(16px * var(--fs));
    line-height: 1.5
}

.nl-cta--band {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    background: var(--accent);
    color: var(--navy);
    border-radius: 10px;
    padding: 14px 24px;
    font-size: calc(15.5px * var(--fs));
    font-weight: 800;
    text-decoration: none
}

.nl-cta--band svg {
    width: 22px;
    height: 22px;
    flex: none
}

.nl-cta--band:hover {
    background: var(--accent-700);
    color: var(--navy);
    text-decoration: none
}

/* ============ PODSTRONA: relacja / aktualność (kolumna wyśrodkowana) ============ */
.container--narrow {
    max-width: 860px
}

.article-date {
    margin-top: 12px;
    color: #5A6B79;
    font-size: calc(14.5px * var(--fs));
    font-weight: 600
}

.article-date time {
    font-weight: 700
}

/* galeria zdjęć w treści */
.gallery-figure {
    margin-top: 16px
}

.gallery {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px
}

.gallery__item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #E4EAF0;
    text-decoration: none
}

.gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
    transition: transform .25s
}

.gallery__item:hover img {
    transform: scale(1.04)
}

.gallery__item:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(252, 187, 0, .55)
}

.prose .gallery-figure figcaption {
    margin-top: 10px
}

/* newsletter na wąskiej kolumnie: pas w jednej kolumnie na mniejszych szerokościach */
@media (max-width: 760px) {
    .nl-band {
        flex-direction: column;
        align-items: flex-start
    }
}

/* galeria: 5 zdjęć w jednym rzędzie / 6 na pełnej szerokości */
.gallery--row5 {
    grid-template-columns:repeat(5, 1fr);
    gap: 10px
}

.gallery--row5 .gallery__item img {
    aspect-ratio: 1/1
}

@media (max-width: 600px) {
    .gallery--row5 {
        grid-template-columns:repeat(3, 1fr)
    }
}

.gallery--wide {
    grid-template-columns:repeat(3, 1fr);
    gap: 14px
}

@media (max-width: 700px) {
    .gallery--wide {
        grid-template-columns:repeat(2, 1fr)
    }
}


/* ============ wariant C: zdjęcie główne zintegrowane z pasem miniatur ============ */
.prose .gal {
    margin: 0 0 6px
}

.gal__pair {
    display: grid;
    grid-template-columns:1fr;
    gap: 10px;
    align-items: stretch
}

@media (min-width: 1081px) {
    .gal__pair {
        grid-template-columns:1fr 320px;
        gap: clamp(28px, 4vw, 52px)
    }
}

.gal__main {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius);
    background: #E4EAF0
}

.gal__side {
    position: relative;
    min-height: 0
}

.galstrip {
    position: absolute;
    inset: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-auto-rows: var(--thumb-h, 1fr);
    align-content: start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: none
}

.galstrip::-webkit-scrollbar {
    width: 0;
    height: 0
}

.prose .galstrip {
    display: grid;
    flex-direction: initial;
    grid-auto-rows: var(--thumb-h, 1fr);
    list-style: none;
    margin: 0;
    padding: 0
}

.prose .galstrip > li {
    list-style: none;
    display: block;
    margin: 0;
    padding: 0
}

.prose .galstrip > li::marker {
    content: ""
}

.galstrip > li {
    min-height: 0;
    height: 100%
}

.galstrip__btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #E4EAF0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer
}

.galstrip__btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform .25s, opacity .2s;
    opacity: .72
}

.galstrip__btn:hover img {
    transform: scale(1.05);
    opacity: 1
}

.galstrip__btn.is-active img {
    opacity: 1
}

.galstrip__btn.is-active {
    box-shadow: 0 0 0 3px var(--accent)
}

.galstrip__btn:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(252, 187, 0, .55)
}

.gal__next {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--navy);
    box-shadow: 0 2px 8px rgba(0, 42, 76, .28);
    cursor: pointer;
    transition: background .2s
}

.gal__next svg {
    width: 20px;
    height: 20px
}

.gal__next:hover {
    background: #fff
}

.gal__next:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px
}

.gal__next[hidden] {
    display: none
}

.prose .gal figcaption {
    margin-top: 10px
}

.gal__count {
    display: block;
    margin-top: 3px;
    font-weight: 700;
    color: var(--navy)
}

@media (max-width: 1080px) {
    .gal__main {
        height: auto
    }

    .prose .galstrip, .galstrip {
        position: static;
        inset: auto;
        height: auto !important;
        grid-auto-rows: auto;
        grid-template-columns:repeat(auto-fill, minmax(88px, 1fr));
        overflow: visible
    }

    .galstrip > li {
        height: auto
    }

    .galstrip__btn {
        height: auto;
        aspect-ratio: 4/3
    }

    .gal__next {
        display: none
    }
}
