/*
 * Pułtuska Biblioteka Publiczna - szablon 2026
 * Ładowany po bootstrap.min.css (Bootstrap 3 zostaje jako baza dla modułów i treści z CMS).
 * Kolory serwisu: #1B619F (nagłówek), #2781BF (menu), #333333 (stopka).
 * Tryby kontrastu: html.contrast-1 (biały na czarnym), html.contrast-2 (żółty na czarnym).
 * Rozmiar tekstu: html.fs-1, html.fs-2 - wszystkie rozmiary w rem, więc skalują się razem.
 */

@font-face {
    font-family: "Inter var";
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    src: url("../fonts/inter/Inter-roman.var.woff2?v=3.18") format("woff2");
}

@font-face {
    font-family: "Inter var";
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
    src: url("../fonts/inter/Inter-italic.var.woff2?v=3.18") format("woff2");
}

/* Font Awesome 4 z lokalnego pliku - używany w treściach z CMS (np. kafelek e-booka) */
@font-face {
    font-family: "FontAwesome";
    font-weight: normal;
    font-style: normal;
    src: url("../fonts/fontawesome-webfont.woff") format("woff");
}

.fa {
    display: inline-block;
    font: normal normal normal 1em/1 FontAwesome;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.fa-arrow-right:before { content: "\f061"; }
.fa-arrow-left:before { content: "\f060"; }
.fa-chevron-right:before { content: "\f054"; }
.fa-plus:before { content: "\f067"; }
.fa-download:before { content: "\f019"; }
.fa-external-link:before { content: "\f08e"; }

/* ------------------------------------------------------------------ */
/* Zmienne                                                             */
/* ------------------------------------------------------------------ */

:root {
    --blue-900: #133f66;
    --blue-800: #164f80;
    --blue-700: #1b619f;
    --blue-500: #2781bf;
    --blue-100: #e3eef8;
    --blue-50: #f2f7fc;

    --ink: #1d2733;
    --ink-2: #47525e;
    --line: #dbe3ea;
    --surface: #ffffff;
    --surface-2: #f4f7fa;
    --footer: #333333;
    --footer-2: #2a2a2a;

    --focus-inner: #0b0c0c;
    --focus-outer: #ffdd00;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow-md: 0 12px 28px -12px rgba(16, 24, 40, .28);
    --shadow-lg: 0 24px 48px -16px rgba(16, 24, 40, .35);

    --font: "Inter var", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --container: 1240px;
    --gutter: 20px;
}

/* ------------------------------------------------------------------ */
/* Podstawy (nadpisują Bootstrap 3)                                    */
/* ------------------------------------------------------------------ */

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 80px;
}

html.fs-1 { font-size: 112.5%; }
html.fs-2 { font-size: 125%; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--ink);
    margin: 0 0 .6em;
}

h1, .h1 { font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem); color: var(--blue-700); }
h2, .h2 { font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem); color: var(--blue-700); }
h3, .h3 { font-size: 1.25rem; }
h4, .h4 { font-size: 1.125rem; }
h5, .h5, h6, .h6 { font-size: 1rem; }

p { margin: 0 0 1em; }

a {
    color: var(--blue-700);
    text-underline-offset: .18em;
    text-decoration-thickness: 1px;
}

a:hover, a:focus {
    color: var(--blue-900);
}

img { max-width: 100%; }

small, .small { font-size: .875rem; }

hr { border-top-color: var(--line); }

[hidden] { display: none !important; }

.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Wyraźny fokus klawiatury: czarna obwódka + żółta poświata - widoczna na jasnym i niebieskim tle */
:focus { outline: none; }

:focus-visible,
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid var(--focus-inner);
    outline-offset: 0;
    box-shadow: 0 0 0 6px var(--focus-outer);
    border-radius: 4px;
}

.icon {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.25em;
}

.icon--fill {
    fill: currentColor;
    stroke: none;
}

/* Kontener - płynny, maks. 1240 px (zastępuje stałe szerokości Bootstrapa) */
.container {
    width: auto;
    max-width: calc(var(--container) + 2 * var(--gutter));
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .container { width: auto; }
}

@media (min-width: 992px) {
    .container { width: auto; }
}

@media (min-width: 1200px) {
    .container { width: auto; }
}

/* Clearfix Bootstrapa (::before/::after) w kontenerach flex/grid tworzyłby puste komórki układu */
.topbar__inner::before,
.topbar__inner::after,
.brandbar__inner::before,
.brandbar__inner::after,
.mainnav__bar::before,
.mainnav__bar::after,
.layout::before,
.layout::after,
.site-footer__grid::before,
.site-footer__grid::after,
.site-footer__bottom-inner::before,
.site-footer__bottom-inner::after,
.funding-footer__row::before,
.funding-footer__row::after {
    content: none;
    display: none;
}

/* Zagnieżdżone .container z modułów i treści CMS w kolumnie treści nie dodają kolejnych marginesów */
.layout .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Link "Przejdź do treści" */
.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--focus-outer);
    color: var(--focus-inner);
    font-weight: 700;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    color: var(--focus-inner);
}

/* ------------------------------------------------------------------ */
/* Pasek górny: dostępność                                             */
/* ------------------------------------------------------------------ */

.topbar {
    background: var(--blue-900);
    color: #fff;
    font-size: .875rem;
}

.topbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 24px;
    min-height: 44px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.topbar__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topbar a {
    color: #fff;
    text-decoration: none;
}

.topbar a:hover {
    color: #fff;
    text-decoration: underline;
}

.topbar__links a,
.mainnav__extra a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar__links .icon {
    width: 1.05em;
    height: 1.05em;
    opacity: .85;
}

.topbar__links a[aria-current] {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .25em;
}

/* Odnośniki na skróty w rozwiniętym menu - tylko na telefonie (tam pasek nad nagłówkiem jest ukryty) */
.mainnav__extra { display: none; }

@media (max-width: 767px) {
    .mainnav__extra {
        display: block;
        margin: 12px calc(-1 * var(--gutter)) 0;
        padding: 8px 0 0;
        border-top: 1px solid rgba(255, 255, 255, .22);
        list-style: none;
    }

    .mainnav__extra a {
        width: 100%;
        min-height: 48px;
        padding: 0 var(--gutter);
        color: #fff;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
    }

    .mainnav__extra a:hover,
    .mainnav__extra a:focus {
        background: var(--blue-700);
        color: #fff;
    }

    .mainnav__extra a[aria-current] { text-decoration: underline; }

    .mainnav__extra .icon { width: 1.15em; height: 1.15em; }
}

.a11y-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
}

.a11y-tools__group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.a11y-tools__label {
    margin-right: 2px;
    opacity: .9;
}

.a11y-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.a11y-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .12);
}

.a11y-btn[aria-pressed="true"] {
    border-color: #fff;
    background: #fff;
    color: var(--blue-900);
}

/* Podgląd trybów kontrastu na przyciskach */
.a11y-btn--c1 { background: #000; color: #fff; border-color: #fff; }
.a11y-btn--c2 { background: #000; color: #ff0; border-color: #ff0; }

.a11y-btn--c1[aria-pressed="true"],
.a11y-btn--c2[aria-pressed="true"] {
    box-shadow: 0 0 0 3px var(--blue-900), 0 0 0 5px #fff;
}

.a11y-btn--c1[aria-pressed="true"] { background: #000; color: #fff; }
.a11y-btn--c2[aria-pressed="true"] { background: #000; color: #ff0; }

.a11y-btn--fs1 { font-size: 1.0625rem; }
.a11y-btn--fs2 { font-size: 1.25rem; }

/* Telefon: odnośniki z paska są też w menu i stopce, przełączniki w jednym wierszu */
@media (max-width: 767px) {
    .topbar__links { display: none; }

    .topbar__inner { justify-content: flex-end; }

    .a11y-tools { gap: 6px 14px; }
}

@media (max-width: 479px) {
    .a11y-tools__label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .a11y-tools { justify-content: space-between; width: 100%; }

    .a11y-btn { min-width: 36px; height: 36px; }
}

/* ------------------------------------------------------------------ */
/* Nagłówek z nazwą biblioteki                                         */
/* ------------------------------------------------------------------ */

.brandbar {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% -30%, rgba(255, 255, 255, .14) 0, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 8% 140%, rgba(39, 129, 191, .55) 0, rgba(39, 129, 191, 0) 45%),
        var(--blue-700);
    color: #fff;
}

.brandbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: #fff;
    text-decoration: none;
}

.brand:hover,
.brand:focus {
    color: #fff;
    text-decoration: none;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 16px;
}

.brand__mark .icon {
    width: 36px;
    height: 36px;
    stroke-width: 1.6;
}

.brand__name {
    display: block;
    margin: 0;
    color: #fff;
    font-size: clamp(1.25rem, .95rem + 1.4vw, 2.125rem);
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: -.015em;
}

.brand__name-line { display: block; }

.brand__patron {
    display: block;
    margin-top: 6px;
    font-size: clamp(.9375rem, .85rem + .4vw, 1.125rem);
    font-weight: 500;
    letter-spacing: .01em;
    opacity: .92;
}

.social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social__link {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    color: #fff;
    transition: background-color .2s, color .2s, border-color .2s;
}

.social__link:hover,
.social__link:focus {
    border-color: #fff;
    background: #fff;
    color: var(--blue-700);
}

.social__link .icon { width: 22px; height: 22px; }

.social__bip {
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

@media (max-width: 767px) {
    .brandbar__inner {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .brand { gap: 12px; }

    .brand__mark {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 12px;
    }

    .brand__mark .icon { width: 28px; height: 28px; }

    .brandbar .social { display: none; }
}

/* ------------------------------------------------------------------ */
/* Menu główne (układ jak dotychczas: pasek #2781BF, rozwijane działy, */
/* wyszukiwarka po prawej)                                             */
/* ------------------------------------------------------------------ */

.mainnav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--blue-500);
    color: #fff;
    box-shadow: 0 2px 10px rgba(10, 30, 50, .18);
}

.mainnav__bar {
    display: flex;
    align-items: stretch;
    gap: 12px;
    min-height: 60px;
}

.mainnav__burger {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    margin-left: -14px;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1.1875rem;
    font-weight: 700;
    cursor: pointer;
}

.mainnav__burger:hover { background: var(--blue-700); }

.mainnav__burger-icon {
    position: relative;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: background-color .2s;
}

.mainnav__burger-icon::before,
.mainnav__burger-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s;
}

.mainnav__burger-icon::before { top: -7px; }
.mainnav__burger-icon::after { top: 7px; }

.mainnav__burger[aria-expanded="true"] .mainnav__burger-icon { background: transparent; }
.mainnav__burger[aria-expanded="true"] .mainnav__burger-icon::before { transform: translateY(7px) rotate(45deg); }
.mainnav__burger[aria-expanded="true"] .mainnav__burger-icon::after { transform: translateY(-7px) rotate(-45deg); }

.mainnav__panel {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
}

.mainnav__list {
    display: flex;
    align-items: stretch;
    margin: 0 0 0 -14px;
    padding: 0;
    list-style: none;
}

.mainnav__item {
    position: relative;
    display: flex;
}

/* Etykiety menu 19 px pogrubione = "duży tekst" w rozumieniu WCAG (kontrast z #2781BF > 3:1) */
.mainnav__link,
.mainnav__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.mainnav__link:hover,
.mainnav__link:focus,
.mainnav__toggle:hover,
.mainnav__toggle[aria-expanded="true"],
.mainnav__item:hover > .mainnav__toggle {
    background: var(--blue-700);
    color: #fff;
    text-decoration: none;
}

.mainnav__item.is-active > .mainnav__link::after,
.mainnav__item.is-active > .mainnav__toggle::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: #fff;
}

.mainnav__chevron {
    width: 18px;
    height: 18px;
    transition: transform .2s;
}

.mainnav__toggle[aria-expanded="true"] .mainnav__chevron { transform: rotate(180deg); }

.mainnav__home .icon {
    width: 24px;
    height: 24px;
}

.mainnav__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 950;
    min-width: 280px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
}

.mainnav__item--end .mainnav__sub {
    left: auto;
    right: 0;
}

.mainnav__toggle[aria-expanded="true"] + .mainnav__sub { display: block; }

@media (hover: hover) and (min-width: 1100px) {
    .mainnav__item:hover > .mainnav__sub { display: block; }
}

.mainnav__sub a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
}

.mainnav__sub a:hover,
.mainnav__sub a:focus {
    background: var(--blue-50);
    color: var(--blue-700);
}

.mainnav__sub a[aria-current] {
    color: var(--blue-700);
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--blue-500);
}

/* Wyszukiwarka */
.search-form {
    display: flex;
    align-items: center;
    align-self: center;
    position: relative;
    width: 280px;
    max-width: 100%;
}

.search-form__input {
    width: 100%;
    height: 42px;
    padding: 0 48px 0 18px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
    -webkit-appearance: none;
    appearance: none;
}

.search-form__input::placeholder { color: #5f6b77; }

.search-form__input:focus-visible {
    border-color: var(--focus-inner);
    box-shadow: 0 0 0 4px var(--focus-outer);
    border-radius: 999px;
}

.search-form__btn {
    position: absolute;
    right: 4px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-top: -18px;
    border: 0;
    border-radius: 50%;
    background: var(--blue-700);
    color: #fff;
    cursor: pointer;
}

.search-form__btn:hover { background: var(--blue-900); }
.search-form__btn .icon { width: 18px; height: 18px; }

/* Menu na mniejszych ekranach */
@media (max-width: 1099px) {
    .mainnav__burger { display: inline-flex; }

    .mainnav__bar { flex-wrap: wrap; }

    .mainnav__panel {
        display: none;
        flex: 1 1 100%;
        flex-direction: column;
        gap: 0;
        padding: 4px 0 20px;
        max-height: calc(100vh - 60px);
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
    }

    .mainnav.is-open .mainnav__panel { display: flex; }

    .mainnav__panel .search-form {
        order: -1;
        width: 100%;
        margin: 4px 0 12px;
    }

    .mainnav__list {
        flex-direction: column;
        margin: 0 calc(-1 * var(--gutter));
    }

    .mainnav__item {
        flex-direction: column;
        border-top: 1px solid rgba(255, 255, 255, .22);
    }

    .mainnav__link,
    .mainnav__toggle {
        justify-content: space-between;
        width: 100%;
        min-height: 54px;
        padding: 0 var(--gutter);
        text-align: left;
        white-space: normal;
    }

    .mainnav__item.is-active > .mainnav__link::after,
    .mainnav__item.is-active > .mainnav__toggle::after {
        left: 0;
        right: auto;
        top: 10px;
        bottom: 10px;
        width: 4px;
        height: auto;
        border-radius: 0 4px 4px 0;
    }

    .mainnav__home .mainnav__home-label {
        position: static !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        clip: auto !important;
        overflow: visible !important;
        white-space: normal !important;
    }

    .mainnav__home .mainnav__link { justify-content: flex-start; gap: 10px; }

    .mainnav__sub {
        position: static;
        min-width: 0;
        margin: 0 var(--gutter) 12px;
        border-radius: var(--radius-sm);
        box-shadow: none;
    }
}

/* ------------------------------------------------------------------ */
/* Ścieżka (okruszki)                                                  */
/* ------------------------------------------------------------------ */

.breadcrumbs {
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    font-size: .9375rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 12px 0;
    list-style: none;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    color: var(--ink-2);
}

.breadcrumbs li + li::before {
    content: "";
    display: inline-block;
    width: .45em;
    height: .45em;
    margin: 0 .75em 0 .55em;
    border-top: 2px solid #8a96a3;
    border-right: 2px solid #8a96a3;
    transform: rotate(45deg);
}

.breadcrumbs a {
    color: var(--blue-700);
    text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

.breadcrumbs [aria-current] {
    color: var(--ink);
    font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Układ strony                                                        */
/* ------------------------------------------------------------------ */

.site-main { outline: none; }

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 56px;
}

@media (min-width: 992px) {
    .layout--aside {
        grid-template-columns: minmax(0, 1fr) 22.5rem;
        gap: 48px;
    }
}

.layout__main > :first-child,
.layout__aside > :first-child { margin-top: 0; }

/* Bootstrapowe .row z modułów nie wychodzą poza kolumnę */
.layout__main > .row,
.layout__main > .articleList,
.layout__main > .htmlList {
    margin-left: 0;
    margin-right: 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem);
    color: var(--ink);
}

.section-title::before {
    content: "";
    width: 6px;
    height: 1.1em;
    border-radius: 3px;
    background: var(--blue-500);
}

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--blue-700);
    text-decoration: none;
}

.more-link:hover {
    text-decoration: underline;
}

.more-link .icon {
    width: 1.1em;
    height: 1.1em;
    transition: transform .2s;
}

.more-link:hover .icon { transform: translateX(3px); }

.page-title {
    margin-bottom: 24px;
}

/* ------------------------------------------------------------------ */
/* Przyciski                                                           */
/* ------------------------------------------------------------------ */

.button,
.linkButton,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 22px;
    border: 2px solid var(--blue-700);
    border-radius: 999px;
    background: var(--blue-700);
    color: #fff;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}

.button:hover,
.button:focus,
.linkButton:hover,
.linkButton:focus,
.btn:hover,
.btn:focus {
    border-color: var(--blue-900);
    background: var(--blue-900);
    color: #fff !important;
    text-decoration: none !important;
}

.button--ghost,
.btn-default {
    background: #fff;
    color: var(--blue-700);
}

.button--ghost:hover,
.btn-default:hover,
.btn-default:focus {
    background: var(--blue-50);
    border-color: var(--blue-700);
    color: var(--blue-900) !important;
}

.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 1.0625rem; }
.btn-sm, .btn-xs { min-height: 36px; padding: 6px 14px; font-size: .9375rem; }

/* Formularze modułów (Bootstrap) */
.form-control {
    height: auto;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #a9b4bf;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem;
    box-shadow: none;
}

.form-control:focus {
    border-color: var(--blue-700);
    box-shadow: 0 0 0 3px rgba(39, 129, 191, .3);
}

textarea.form-control { min-height: 140px; }

label {
    font-weight: 600;
    color: var(--ink);
}

.input-group .form-control:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group-btn:last-child > .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; min-height: 46px; }

.alert {
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.alert p { margin: 0 0 6px; }
.alert ul { margin: 0; padding-left: 1.2em; }

/* Formularz kontaktowy */
.contact { max-width: 760px; }

.contact__intro { color: var(--ink-2); }

.contact__form { margin-top: 24px; }

.form-grid {
    display: grid;
    gap: 0 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.form-group { margin-bottom: 20px; }

.form-group label { display: block; margin-bottom: 6px; }

.form-control[aria-invalid="true"] {
    border-color: #b42318;
    box-shadow: 0 0 0 1px #b42318;
}

.form-error {
    margin: 6px 0 0;
    color: #b42318;
    font-size: .9375rem;
    font-weight: 600;
}

.contact__rodo {
    margin: 4px 0 24px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: .875rem;
    line-height: 1.55;
}

.panel {
    border-radius: var(--radius);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------------ */
/* Wyróżnione (dawny slider)                                           */
/* ------------------------------------------------------------------ */

.hero {
    padding-top: 32px;
}

.hero__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero__item {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: var(--radius);
    background: var(--blue-700);
    isolation: isolate;
}

.hero__media,
.hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero__media img {
    object-fit: cover;
    transition: transform .6s ease;
}

.hero__item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(8, 26, 44, 0) 30%, rgba(8, 26, 44, .55) 58%, rgba(8, 26, 44, .92) 100%);
    pointer-events: none;
}

.hero__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 22px 24px;
    color: #fff;
}


.hero__title {
    margin: 0;
    color: #fff;
    font-size: 1.1875rem;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.hero__title a {
    color: #fff;
    text-decoration: none;
}

/* Cała karta klikalna, w drzewie dostępności tylko link w tytule */
.hero__title a::after,
.card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
}

.hero__item:hover .hero__title a,
.hero__title a:focus {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.hero__item:hover .hero__media img { transform: scale(1.04); }

.hero__title a:focus-visible {
    outline: none;
    box-shadow: none;
}

.hero__item:focus-within {
    outline: 3px solid var(--focus-inner);
    box-shadow: 0 0 0 6px var(--focus-outer);
}

.hero__lead {
    display: -webkit-box;
    margin: 10px 0 0;
    max-width: 62ch;
    overflow: hidden;
    color: rgba(255, 255, 255, .94);
    font-size: 1.0625rem;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hero__item--main .hero__title {
    font-size: clamp(1.375rem, 1rem + 1.5vw, 2.125rem);
}

@media (max-width: 767px) {
    .hero { padding-top: 20px; }

    .hero__item { min-height: 0; aspect-ratio: 16 / 10; }

    .hero__item--main .hero__lead { display: none; }
}

@media (min-width: 768px) {
    .hero__grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        grid-auto-rows: 1fr;
        height: clamp(380px, 40vw, 520px);
    }

    .hero__grid--1 { grid-template-columns: minmax(0, 1fr); }

    .hero__grid--3 .hero__item--main { grid-row: span 2; }

    .hero__body { padding: 28px 32px; }

    .hero__item:not(.hero__item--main) .hero__body { padding: 18px 22px; }
}

/* ------------------------------------------------------------------ */
/* Karty treści                                                        */
/* ------------------------------------------------------------------ */

.card-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card:focus-within {
    outline: 3px solid var(--focus-inner);
    box-shadow: 0 0 0 6px var(--focus-outer);
}

.card__media {
    aspect-ratio: 700 / 294;
    overflow: hidden;
    background: var(--blue-50);
}

.card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.card:hover .card__media img { transform: scale(1.04); }

.card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 22px;
}

.card__meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-2);
    font-size: .875rem;
    font-weight: 500;
}

.card__meta .icon { width: 1.05em; height: 1.05em; color: var(--blue-500); }

.card__title {
    margin: 0;
    font-size: 1.1875rem;
    line-height: 1.35;
}

.card__title a {
    color: var(--ink);
    text-decoration: none;
}

.card:hover .card__title a,
.card__title a:focus {
    color: var(--blue-700);
    text-decoration: underline;
}

.card__title a:focus-visible {
    outline: none;
    box-shadow: none;
}

.card__lead {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--ink-2);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.section-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.empty-state {
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--ink-2);
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* Boczna kolumna                                                      */
/* ------------------------------------------------------------------ */

.layout__aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.layout__aside > * { margin-top: 0; margin-bottom: 0; }

.widget {
    padding: 22px 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.widget__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 1.25rem;
}

.widget__title::before {
    content: "";
    width: 5px;
    height: 1.05em;
    border-radius: 3px;
    background: var(--blue-500);
}

.widget__foot {
    margin-top: 16px;
}

/* Wyróżniony link "Biblioteki w powiecie" */
.cta-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
    color: #fff;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}

.cta-link:hover,
.cta-link:focus {
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.cta-link__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
}

.cta-link__text { flex: 1 1 auto; }

.cta-link .icon--arrow { transition: transform .2s; }
.cta-link:hover .icon--arrow { transform: translateX(4px); }

/* Lista informacji */
.news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-list__item {
    position: relative;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.news-list__item:first-child {
    padding-top: 0;
    border-top: 0;
}

.news-list__date {
    display: block;
    margin-bottom: 4px;
    color: var(--blue-700);
    font-size: .875rem;
    font-weight: 700;
}

.news-list__title {
    margin: 0 0 4px;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
}

.news-list__title a {
    color: var(--ink);
    text-decoration: none;
}

.news-list__title a:hover,
.news-list__title a:focus {
    color: var(--blue-700);
    text-decoration: underline;
}

.news-list__lead {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--ink-2);
    font-size: .9375rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Lista linków (Biblioteka poleca, podstrony działów) */
.link-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-list li + li { margin-top: 8px; }

.link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s;
}

.link-list a:hover,
.link-list a:focus {
    border-color: var(--blue-500);
    background: var(--blue-50);
    color: var(--blue-700);
}

.link-list .icon {
    width: 1.1em;
    height: 1.1em;
    color: var(--blue-500);
    transition: transform .2s;
}

.link-list a:hover .icon { transform: translateX(3px); }

/* Kafelki podstron działu (menu/list, menu/category) */
.tile-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    min-height: 88px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, border-color .2s, color .2s;
}

.tile:hover,
.tile:focus {
    border-color: var(--blue-500);
    color: var(--blue-700);
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tile__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    background: var(--blue-50);
    color: var(--blue-700);
}

/* Nowości książkowe */
.book-teaser {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.book-teaser + .book-teaser {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.book-teaser__cover img {
    display: block;
    width: 96px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .45);
}

.book-teaser__title {
    margin: 0 0 6px;
    font-size: 1.0625rem;
}

.book-teaser__title a {
    color: var(--ink);
    text-decoration: none;
}

.book-teaser__title a:hover { color: var(--blue-700); text-decoration: underline; }

/* Kafelek e-booka (treść z CMS + ebook.css) */
.layout__aside .ebook-teaser { margin: 0; }

.tile__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tile__desc {
    color: var(--ink-2);
    font-size: .9375rem;
    font-weight: 400;
    line-height: 1.45;
}

/* Data nad tytułem tylko wizualnie - w kodzie tytuł jest pierwszy */
.card__meta { order: -1; }

.news-list__item {
    display: flex;
    flex-direction: column;
}

.news-list__date { order: -1; }

.footer-text h2 { margin-bottom: 12px; }

.footer-photos__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-photos__list img {
    display: block;
    width: 75px;
    height: 75px;
    border-radius: 6px;
    object-fit: cover;
}

.error-page { max-width: 720px; padding: 24px 0 48px; }

.error-page__code {
    margin: 0;
    color: var(--blue-100);
    font-size: clamp(4rem, 3rem + 6vw, 8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
}

.breadcrumbs--inline {
    margin-bottom: 20px;
    border: 0;
    background: none;
}

.breadcrumbs--inline ol { padding: 0; }

/* ------------------------------------------------------------------ */
/* Artykuł                                                             */
/* ------------------------------------------------------------------ */

.article { max-width: 860px; }

.article__header { margin-bottom: 24px; }

.article__title { margin-bottom: 14px; }

.article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 18px;
    color: var(--ink-2);
    font-size: .9375rem;
}

.article__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--surface-2);
}

.article__meta-item .icon { width: 1.05em; height: 1.05em; color: var(--blue-500); }

.article__lead {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem);
    font-weight: 600;
    line-height: 1.55;
}

.article__lead p { margin: 0; }

.article__figure {
    margin: 0 0 28px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.article__figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* Treść z edytora CMS */
.prose {
    font-size: 1.125rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.prose > :first-child { margin-top: 0; }

.prose p,
.prose ul,
.prose ol,
.prose table,
.prose blockquote,
.prose figure {
    margin: 0 0 1.15em;
}

.prose h2, .prose h3, .prose h4 {
    margin-top: 1.6em;
    margin-bottom: .6em;
}

.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }

.prose a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.prose a:hover { text-decoration-thickness: 2px; }

.prose img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: var(--radius-sm);
}

.prose blockquote {
    padding: 12px 20px;
    border-left: 4px solid var(--blue-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--blue-50);
    font-size: inherit;
}

.prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 1rem;
}

.prose th,
.prose td {
    padding: 8px 12px;
    border: 1px solid var(--line);
    vertical-align: top;
}

.prose th { background: var(--surface-2); }

.prose iframe,
.prose video {
    max-width: 100%;
}

/* Paginacja (znaczniki Bootstrapa) */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 36px 0 8px;
    padding: 0;
    border-radius: 0;
}

.pagination > li { display: block; }

.pagination > li > a,
.pagination > li > span {
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px !important;
    background: #fff;
    color: var(--blue-700);
    font-weight: 700;
    line-height: 1;
}

.pagination > li > a:hover,
.pagination > li > a:focus {
    border-color: var(--blue-500);
    background: var(--blue-50);
    color: var(--blue-900);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > a:focus {
    border-color: var(--blue-700);
    background: var(--blue-700);
    color: #fff;
}

.pagination > .disabled > span {
    border-color: transparent;
    background: transparent;
    color: var(--ink-2);
}

/* Galeria zdjęć artykułu */
.gallery { margin-top: 40px; }

.gallery__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f1720;
}

.gallery__stage img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery__nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: var(--blue-700);
    box-shadow: var(--shadow-md);
    transition: transform .2s, background-color .2s;
}

.gallery__nav:hover,
.gallery__nav:focus {
    background: #fff;
    color: var(--blue-900);
    transform: scale(1.06);
}

.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }

.gallery__nav .icon { width: 26px; height: 26px; }

.gallery__thumbs ul {
    position: relative;
    display: flex;
    gap: 10px;
    margin: 12px 0 0;
    padding: 6px 4px 10px;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.gallery__thumbs li {
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.gallery__thumbs a {
    display: block;
    border-radius: var(--radius-sm);
    opacity: .75;
    transition: opacity .2s;
}

.gallery__thumbs a:hover,
.gallery__thumbs a:focus,
.gallery__thumbs a[aria-current] {
    opacity: 1;
}

.gallery__thumbs a[aria-current] {
    outline: 3px solid var(--blue-700);
    outline-offset: 2px;
}

.gallery__thumbs img {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

/* ------------------------------------------------------------------ */
/* Wyszukiwarka - strona wyników                                       */
/* ------------------------------------------------------------------ */

.search-page__form {
    display: flex;
    gap: 10px;
    max-width: 720px;
    margin-bottom: 32px;
}

.search-page__form .form-control {
    flex: 1 1 auto;
    border-radius: 999px;
    padding-left: 20px;
}

.searchResult {
    max-width: none;
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.searchResult::after {
    content: "";
    display: table;
    clear: both;
}

.searchResult .title a {
    color: var(--ink);
    font-size: 1.1875rem;
    font-weight: 700;
    text-decoration: none;
}

.searchResult .title a:hover { color: var(--blue-700); text-decoration: underline; }

.searchResult .list_photo {
    float: left;
    max-width: 220px;
    margin: 0 20px 10px 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.searchResult .lead {
    float: none;
    color: var(--ink-2);
    text-align: left;
}

.searchResult .lead a { color: inherit; text-decoration: none; }

.searchResult .sites,
.searchResult .results {
    font-size: .9375rem;
    color: var(--ink-2);
}

/* ------------------------------------------------------------------ */
/* Pas z informacją o dofinansowaniu (treść z CMS)                     */
/* ------------------------------------------------------------------ */

.funding-footer {
    width: 100%;
    padding: 36px 0 24px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.funding-footer__row {
    display: flex;
    align-items: center;
}

.funding-footer__column {
    display: flex;
    align-items: center;
    justify-content: center;
}

.funding-footer__logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

.funding-footer__logo--ministry { max-width: 380px; }
.funding-footer__logo--bn { max-width: 285px; }

.funding-footer__title {
    margin: 0;
    color: #0865b3;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
}

.funding-footer__description {
    margin: 18px 0 0;
    color: #333;
    font-size: .875rem;
    font-style: italic;
    line-height: 1.45;
}

@media (max-width: 767px) {
    .funding-footer__row { display: block; }

    .funding-footer__column {
        margin-bottom: 22px;
        text-align: center;
    }

    .funding-footer__title,
    .funding-footer__description { text-align: center; }
}

/* ------------------------------------------------------------------ */
/* Stopka                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
    background: var(--footer);
    color: #ececec;
    font-size: 1rem;
    line-height: 1.7;
}

.site-footer__grid {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    padding-top: 48px;
    padding-bottom: 48px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1.1875rem;
}

.site-footer a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .45);
}

.site-footer a:hover,
.site-footer a:focus {
    color: #fff;
    text-decoration-color: #fff;
}

.site-footer .vcard,
.site-footer .vcard a {
    font-size: 1rem;
    color: #ececec;
}

.site-footer .vcard a { color: #fff; }

.site-footer .vcard .adr { margin-top: 10px; }

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li + li { margin-top: 6px; }

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus { text-decoration: underline; }

.footer-links .icon { width: 1em; height: 1em; opacity: .7; }

.foterBlogLink {
    margin: 0;
    padding: 0;
    list-style: none;
}

.foterBlogLink a { color: #fff; }

.site-footer .social__link {
    width: 44px;
    height: 44px;
    border-color: rgba(255, 255, 255, .45);
    text-decoration: none;
}

.site-footer .social__link:hover,
.site-footer .social__link:focus {
    background: #fff;
    color: var(--footer);
}

.site-footer__social { margin-bottom: 18px; }

.site-footer__bottom {
    background: var(--footer-2);
    font-size: .9375rem;
}

.site-footer__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .45);
    text-underline-offset: .18em;
    cursor: pointer;
}

.link-button:hover { text-decoration-color: currentColor; }

/* Osadzenie z serwisu zewnętrznego wymagające zgody (Facebook) */
.consent-embed {
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, .4);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    font-size: .9375rem;
    line-height: 1.55;
}

.consent-embed p { margin: 0 0 14px; }

.consent-embed .button {
    min-height: 40px;
    padding: 8px 18px;
    border-color: #fff;
    background: #fff;
    color: var(--footer);
    font-size: .9375rem;
}

.consent-embed .button:hover,
.consent-embed .button:focus {
    background: var(--blue-100);
    border-color: var(--blue-100);
    color: var(--footer) !important;
}

.consent-embed--loaded {
    padding: 0;
    border: 0;
    background: none;
}

.consent-embed iframe {
    display: block;
    width: 100%;
    max-width: 500px;
    border: 0;
    border-radius: var(--radius-sm);
    background: #fff;
}

/* Przycisk "do góry" */
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 800;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 2px solid var(--blue-700);
    border-radius: 50%;
    background: #fff;
    color: var(--blue-700);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, visibility .25s;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover,
.to-top:focus {
    background: var(--blue-700);
    color: #fff;
}

body.cc-banner-open .to-top { bottom: calc(var(--cc-banner-h, 0px) + 32px); }

/* Baner zgody nie zasłania na stałe końca strony */
body.cc-banner-open { padding-bottom: calc(var(--cc-banner-h, 0px) + 32px); }

.site-footer__copy { margin: 0; }

/* Bez JavaScriptu: menu rozwinięte, a przełączniki dostępności ukryte (nie działałyby) */
.no-js .a11y-tools { display: none; }

@media (max-width: 1099px) {
    .no-js .mainnav__burger { display: none; }
    .no-js .mainnav__panel { display: flex; }
    .no-js .mainnav__sub { display: block; }
}

/* Pasek administratora (widoczny tylko po zalogowaniu) */
#admin_panel_link a { color: #fff; }

/* ------------------------------------------------------------------ */
/* Zgoda na cookies                                                    */
/* ------------------------------------------------------------------ */

.cc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1500;
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--blue-500);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    font-size: .9375rem;
    line-height: 1.55;
}

.cc-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 32px;
}

.cc-banner__text {
    flex: 1 1 520px;
    max-height: 40vh;
    overflow-y: auto;
}

.cc-banner__title {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 1.1875rem;
}

.cc-banner__text p { margin: 0 0 6px; }
.cc-banner__text p:last-child { margin-bottom: 0; }

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cc-banner .cc-actions { flex: 0 1 auto; }

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 20px;
    border: 2px solid var(--blue-700);
    border-radius: 999px;
    background: var(--blue-700);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.cc-btn:hover {
    border-color: var(--blue-900);
    background: var(--blue-900);
}

.cc-btn--secondary {
    background: #fff;
    color: var(--blue-700);
}

.cc-btn--secondary:hover {
    background: var(--blue-50);
    color: var(--blue-900);
}

@media (max-width: 600px) {
    .cc-banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 16px 16px 14px;
        font-size: .875rem;
        line-height: 1.5;
    }

    .cc-banner__title { font-size: 1.0625rem; }

    .cc-banner__inner { gap: 12px; }

    .cc-banner .cc-actions { width: 100%; gap: 8px; }

    .cc-actions .cc-btn {
        flex: 1 1 calc(50% - 4px);
        min-height: 46px;
        padding: 8px 12px;
        font-size: .9375rem;
    }

    .cc-banner .cc-btn--secondary,
    .cc-dialog__foot .cc-btn { flex-basis: 100%; }
}

.cc-dialog {
    width: min(760px, calc(100% - 24px));
    max-height: min(88vh, 900px);
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    font-size: 1rem;
    line-height: 1.55;
}

.cc-dialog[open] {
    display: flex;
    flex-direction: column;
}

.cc-dialog::backdrop { background: rgba(10, 20, 30, .6); }

.cc-dialog__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: inherit;
    margin: 0;
}

.cc-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}

.cc-dialog__title {
    margin: 0;
    color: var(--ink);
    font-size: 1.375rem;
}

.cc-dialog__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink);
    cursor: pointer;
}

.cc-dialog__close:hover { background: var(--blue-100); }

.cc-dialog__body {
    flex: 1 1 auto;
    padding: 20px 24px;
    overflow-y: auto;
}

.cc-dialog__body > p { margin: 0 0 12px; }

.cc-dialog__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    border-radius: 0 0 var(--radius) var(--radius);
}

.cc-category {
    margin: 16px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.cc-category__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cc-category__name {
    margin: 0;
    color: var(--ink);
    font-size: 1.0625rem;
    font-weight: 700;
}

.cc-category__name label {
    margin: 0;
    font-weight: inherit;
    cursor: pointer;
}

.cc-category__desc {
    margin: 8px 0 0;
    color: var(--ink-2);
    font-size: .9375rem;
}

.cc-category__always {
    color: var(--blue-700);
    font-size: .875rem;
    font-weight: 700;
    white-space: nowrap;
}

.cc-category details { margin-top: 10px; font-size: .875rem; }

.cc-category summary {
    color: var(--blue-700);
    font-weight: 700;
    cursor: pointer;
}

.cc-table-wrap { overflow-x: auto; }

.cc-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.cc-table th,
.cc-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.cc-table th { color: var(--ink); font-weight: 700; background: var(--surface-2); }

.cc-switch {
    position: relative;
    width: 52px;
    height: 30px;
    flex: 0 0 52px;
    margin: 0;
    border-radius: 999px;
    background: #8996a3;
    cursor: pointer;
    transition: background-color .2s;
    -webkit-appearance: none;
    appearance: none;
}

.cc-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s;
}

.cc-switch:checked { background: var(--blue-700); }
.cc-switch:checked::before { transform: translateX(22px); }
.cc-switch:disabled { cursor: not-allowed; opacity: .55; }

.cc-switch:focus-visible {
    outline: 3px solid var(--focus-inner);
    box-shadow: 0 0 0 6px var(--focus-outer);
    border-radius: 999px;
}

.cc-note {
    margin-top: 16px;
    color: var(--ink-2);
    font-size: .875rem;
}

/* ------------------------------------------------------------------ */
/* Tryby wysokiego kontrastu (mechanizm zmiany kolorów serwisu)        */
/* contrast-1: biały tekst na czarnym tle, contrast-2: żółty na czarnym */
/* ------------------------------------------------------------------ */

html.contrast-1 { --hc-fg: #ffffff; }
html.contrast-2 { --hc-fg: #ffff00; }

html.contrast-1,
html.contrast-2 {
    background: #000;
    color-scheme: dark;
}

html.contrast-1 body,
html.contrast-2 body,
html.contrast-1 body *,
html.contrast-2 body * {
    background-color: #000 !important;
    background-image: none !important;
    color: var(--hc-fg) !important;
    border-color: var(--hc-fg) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.contrast-1 a,
html.contrast-2 a {
    text-decoration: underline !important;
}

html.contrast-1 img,
html.contrast-2 img {
    background-color: #fff !important;
}

/* Elementy z ramką, by w trybie kontrastu było widać ich granice */
html.contrast-1 .card,
html.contrast-2 .card,
html.contrast-1 .widget,
html.contrast-2 .widget,
html.contrast-1 .tile,
html.contrast-2 .tile,
html.contrast-1 .link-list a,
html.contrast-2 .link-list a,
html.contrast-1 .cta-link,
html.contrast-2 .cta-link,
html.contrast-1 .mainnav,
html.contrast-2 .mainnav,
html.contrast-1 .mainnav__sub,
html.contrast-2 .mainnav__sub,
html.contrast-1 .cc-banner,
html.contrast-2 .cc-banner,
html.contrast-1 .cc-dialog,
html.contrast-2 .cc-dialog,
html.contrast-1 .search-form__input,
html.contrast-2 .search-form__input,
html.contrast-1 .form-control,
html.contrast-2 .form-control,
html.contrast-1 .to-top,
html.contrast-2 .to-top {
    border: 2px solid var(--hc-fg) !important;
}

html.contrast-1 .mainnav,
html.contrast-2 .mainnav,
html.contrast-1 .brandbar,
html.contrast-2 .brandbar,
html.contrast-1 .topbar,
html.contrast-2 .topbar {
    border-width: 0 0 2px !important;
}

/* Elementy aktywne/wciśnięte - odwrócone kolory */
html.contrast-1 [aria-pressed="true"],
html.contrast-2 [aria-pressed="true"],
html.contrast-1 .pagination > .active > a,
html.contrast-2 .pagination > .active > a,
html.contrast-1 .pagination > .active > span,
html.contrast-2 .pagination > .active > span,
html.contrast-1 .cc-btn:hover,
html.contrast-2 .cc-btn:hover,
html.contrast-1 .btn:hover,
html.contrast-2 .btn:hover,
html.contrast-1 .mainnav__link:hover,
html.contrast-2 .mainnav__link:hover,
html.contrast-1 .mainnav__toggle:hover,
html.contrast-2 .mainnav__toggle:hover,
html.contrast-1 .mainnav__toggle[aria-expanded="true"],
html.contrast-2 .mainnav__toggle[aria-expanded="true"],
html.contrast-1 .mainnav__sub a:hover,
html.contrast-2 .mainnav__sub a:hover,
html.contrast-1 .link-list a:hover,
html.contrast-2 .link-list a:hover,
html.contrast-1 .tile:hover,
html.contrast-2 .tile:hover,
html.contrast-1 .skip-link:focus,
html.contrast-2 .skip-link:focus {
    background-color: var(--hc-fg) !important;
    color: #000 !important;
}

html.contrast-1 [aria-pressed="true"] *,
html.contrast-2 [aria-pressed="true"] *,
html.contrast-1 .mainnav__link:hover *,
html.contrast-2 .mainnav__link:hover *,
html.contrast-1 .mainnav__toggle:hover *,
html.contrast-2 .mainnav__toggle:hover *,
html.contrast-1 .mainnav__toggle[aria-expanded="true"] *,
html.contrast-2 .mainnav__toggle[aria-expanded="true"] *,
html.contrast-1 .link-list a:hover *,
html.contrast-2 .link-list a:hover *,
html.contrast-1 .tile:hover *,
html.contrast-2 .tile:hover *,
html.contrast-1 .cc-btn:hover *,
html.contrast-2 .cc-btn:hover * {
    background-color: transparent !important;
    color: #000 !important;
}

/* Przyciski podglądu trybów zachowują swoje kolory */
html.contrast-1 .a11y-btn--c1,
html.contrast-2 .a11y-btn--c1 { color: #fff !important; border-color: #fff !important; }
html.contrast-1 .a11y-btn--c2,
html.contrast-2 .a11y-btn--c2 { color: #ff0 !important; border-color: #ff0 !important; }
html.contrast-1 .a11y-btn--c1[aria-pressed="true"],
html.contrast-2 .a11y-btn--c2[aria-pressed="true"] {
    outline: 3px solid var(--hc-fg);
    outline-offset: 2px;
    background-color: #000 !important;
}
html.contrast-1 .a11y-btn--c1[aria-pressed="true"],
html.contrast-1 .a11y-btn--c1[aria-pressed="true"] * { color: #fff !important; }
html.contrast-2 .a11y-btn--c2[aria-pressed="true"],
html.contrast-2 .a11y-btn--c2[aria-pressed="true"] * { color: #ff0 !important; }

/* Nawigacja jest oczywista bez podkreśleń - podkreślone zostają linki w treści */
html.contrast-1 .mainnav__link,
html.contrast-2 .mainnav__link,
html.contrast-1 .brand,
html.contrast-2 .brand,
html.contrast-1 .social__link,
html.contrast-2 .social__link,
html.contrast-1 .tile,
html.contrast-2 .tile {
    text-decoration: none !important;
}

html.contrast-1 .mainnav__item.is-active > .mainnav__link::after,
html.contrast-2 .mainnav__item.is-active > .mainnav__link::after,
html.contrast-1 .mainnav__item.is-active > .mainnav__toggle::after,
html.contrast-2 .mainnav__item.is-active > .mainnav__toggle::after,
html.contrast-1 .section-title::before,
html.contrast-2 .section-title::before,
html.contrast-1 .widget__title::before,
html.contrast-2 .widget__title::before,
html.contrast-1 .cc-switch::before,
html.contrast-2 .cc-switch::before,
html.contrast-1 .mainnav__burger-icon::before,
html.contrast-2 .mainnav__burger-icon::before,
html.contrast-1 .mainnav__burger-icon::after,
html.contrast-2 .mainnav__burger-icon::after {
    background: var(--hc-fg) !important;
}

html.contrast-1 .mainnav__burger-icon,
html.contrast-2 .mainnav__burger-icon {
    background-color: var(--hc-fg) !important;
}

html.contrast-1 .mainnav__burger[aria-expanded="true"] .mainnav__burger-icon,
html.contrast-2 .mainnav__burger[aria-expanded="true"] .mainnav__burger-icon {
    background-color: transparent !important;
}

html.contrast-1 .cc-switch,
html.contrast-2 .cc-switch {
    border: 2px solid var(--hc-fg) !important;
}

html.contrast-1 .cc-switch:checked,
html.contrast-2 .cc-switch:checked {
    background-color: var(--hc-fg) !important;
}

html.contrast-1 .cc-switch:checked::before,
html.contrast-2 .cc-switch:checked::before {
    background: #000 !important;
}

html.contrast-1 .hero__item::after,
html.contrast-2 .hero__item::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .9) 75%) !important;
}

html.contrast-1 .hero__body,
html.contrast-2 .hero__body,
html.contrast-1 .hero__body *,
html.contrast-2 .hero__body * {
    background-color: transparent !important;
}

html.contrast-1 .hero__media,
html.contrast-2 .hero__media,
html.contrast-1 .hero__media *,
html.contrast-2 .hero__media * {
    background-color: transparent !important;
}

html.contrast-1 .cc-dialog::backdrop,
html.contrast-2 .cc-dialog::backdrop {
    background: rgba(0, 0, 0, .85);
}

html.contrast-1 :focus-visible,
html.contrast-2 :focus-visible {
    outline: 3px solid var(--hc-fg) !important;
    outline-offset: 3px !important;
}

/* Tryb wysokiego kontrastu systemu Windows */
@media (forced-colors: active) {
    .a11y-btn,
    .cc-btn,
    .button,
    .btn,
    .card,
    .widget,
    .tile,
    .cc-switch { border: 2px solid ButtonText; }

    .hero__item::after { display: none; }
}

/* ------------------------------------------------------------------ */
/* Ograniczenie animacji                                               */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }

    .card:hover,
    .tile:hover,
    .cta-link:hover { transform: none; }

    .card:hover .card__media img,
    .hero__item:hover .hero__media img { transform: none; }
}

/* ------------------------------------------------------------------ */
/* Wydruk                                                              */
/* ------------------------------------------------------------------ */

@media print {
    .topbar,
    .mainnav,
    .breadcrumbs,
    .layout__aside,
    .site-footer__grid,
    .to-top,
    .cc-banner,
    .cc-dialog,
    .gallery__thumbs,
    .gallery__nav,
    .skip-link { display: none !important; }

    .brandbar { background: none !important; color: #000 !important; }
    .brand, .brand__name { color: #000 !important; }
    .brand__mark { display: none; }
    .brandbar .social { display: none; }
    .layout { display: block; padding: 0; }
    .site-footer, .site-footer__bottom { background: none !important; color: #000 !important; }
    .site-footer a { color: #000 !important; }
    .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}
