/* ==========================================================================
   Pakiet szablonu ZMiGDP (zmigdp_webpage) – style główne
   WCAG 2.2 AA: kontrasty >= 4.5:1 (tekst) / 3:1 (UI), widoczny fokus,
   cele dotykowe >= 24 px (zalecane 44 px), reflow do 320 px, prefers-reduced-motion.
   ========================================================================== */

:root {
    /* Paleta oparta na parseta.org.pl (niebieski #006EA6, zielony), skorygowana pod kontrast */
    --c-blue-900: #06385a;
    --c-blue-700: #0b5c8c;   /* biały na nim: 7.2:1 */
    --c-blue-500: #006ea6;   /* oryginalny niebieski serwisu, na białym 5.5:1 */
    --c-green-900: #14532d;
    --c-green-700: #00662a;  /* biały na nim: 7.2:1 */
    --c-lime: #b8e06a;       /* akcent tylko na ciemnym tle (8:1 na #06385a) */
    --c-sun: #ffd34d;        /* akcent fokusu / elementów na ciemnym tle */
    --c-text: #2b2a2a;
    --c-muted: #4a4949;
    --c-bg: #ffffff;
    --c-bg-soft: #f3f8f5;
    --c-bg-tint: #eaf4ee;
    --c-border: #6d6d6d;
    --c-border-soft: #cfd9d3;
    --c-focus: #0b3d91;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 2px 4px rgba(6, 56, 90, .08), 0 8px 24px rgba(6, 56, 90, .10);
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: Georgia, "Times New Roman", Times, serif;
    --content-max: 78rem;
    --tap: 2.75rem;
}

/* Wysoki kontrast (przełącznik w nagłówku) – szczegóły na końcu pliku */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 1rem;
}
html[data-fs="1"] { font-size: 112.5%; }
html[data-fs="2"] { font-size: 125%; }
html[data-fs="3"] { font-size: 150%; }
html[data-fs="-1"] { font-size: 93.75%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--c-text);
    background: linear-gradient(180deg, var(--c-bg-tint) 0, var(--c-bg) 28rem) no-repeat, var(--c-bg);
    overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }
figure { margin: 0; }

h1, h2, h3, h4, h5 {
    font-family: var(--font-head);
    line-height: 1.25;
    color: var(--c-blue-700);
    margin: 1.6em 0 .6em;
}
h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.85rem); color: var(--c-green-700); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p, ul, ol, table, blockquote { margin: 0 0 1.1em; }

a { color: var(--c-blue-700); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--c-green-700); text-decoration-thickness: .16em; }

/* Widoczny fokus (WCAG 2.4.7, 2.4.11, 2.4.13) – dwa kontrastowe pierścienie */
:focus { outline: none; }
:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px #fff;
    border-radius: 3px;
}
.site-header :focus-visible,
.mainnav-wrap :focus-visible,
.site-footer :focus-visible,
.cookie-notice :focus-visible,
.carousel :focus-visible {
    outline-color: var(--c-sun);
    box-shadow: 0 0 0 5px var(--c-blue-900);
}
#main-content:focus, #site-footer:focus { outline: none; }

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

/* ---------- Linki pomijające ---------- */
.skip-links { position: absolute; top: 0; left: 0; z-index: 1000; }
.skip-links__link {
    position: absolute; left: -9999px; top: 0;
    background: var(--c-sun); color: #000; font-weight: 700;
    padding: .9rem 1.2rem; border-radius: 0 0 var(--radius-sm) 0; text-decoration: none;
}
.skip-links__link:focus { left: 0; }

/* ---------- Przyciski ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: var(--tap); padding: .55rem 1.2rem;
    font: inherit; font-weight: 700; line-height: 1.2;
    color: #fff; background: var(--c-green-700);
    border: 2px solid var(--c-green-700); border-radius: 999px;
    text-decoration: none; cursor: pointer;
    transition: background-color .2s, color .2s, transform .2s;
}
.btn:hover { background: #fff; color: var(--c-green-700); }
.btn--small { min-height: 2.5rem; padding: .35rem 1rem; font-size: .9rem; }
.btn--light { background: #fff; color: var(--c-blue-900); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }

/* ---------- Nagłówek ---------- */
.site-header {
    position: relative;
    color: #fff;
    background:
        radial-gradient(60rem 18rem at 85% -20%, rgba(184, 224, 106, .28), transparent 60%),
        linear-gradient(115deg, var(--c-blue-900) 0%, var(--c-blue-700) 55%, var(--c-green-700) 130%);
    padding-bottom: 2.4rem;
}
.site-header::after {   /* fala dolna – nawiązanie do rzeki */
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.2rem;
    background: var(--c-bg-tint);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20c150-30 300 30 450 0s300-30 450 0 200 20 300 0v20H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20c150-30 300 30 450 0s300-30 450 0 200 20 300 0v20H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.site-header__inner {
    max-width: var(--content-max); margin: 0 auto;
    padding: 1.25rem 1rem 0;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
}
.brand { display: flex; align-items: center; gap: 1rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__text { display: flex; flex-direction: column; }
.brand__title {
    font-family: var(--font-head); font-weight: 700;
    font-size: clamp(1.35rem, 1rem + 2.2vw, 2.6rem); line-height: 1.12;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.brand__subtitle { font-size: clamp(.95rem, .85rem + .5vw, 1.25rem); color: var(--c-lime); margin-top: .25rem; }

.a11y-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.a11y-tools__btn {
    min-width: var(--tap); min-height: var(--tap); padding: 0 .75rem;
    font: inherit; font-weight: 700; color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 2px solid rgba(255, 255, 255, .85); border-radius: var(--radius-sm); cursor: pointer;
}
.a11y-tools__btn:hover { background: #fff; color: var(--c-blue-900); }
.a11y-tools__btn[aria-pressed="true"] { background: var(--c-sun); color: #000; border-color: var(--c-sun); }

/* ---------- Menu główne (przyciski jak w oryginale) ---------- */
.mainnav-wrap {
    background: var(--c-bg-tint);
    padding: 0 1rem 1rem;
    position: relative;
    z-index: 20;
}
.mainnav, .mainnav-toggle { max-width: var(--content-max); margin-inline: auto; }
.mainnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.mainnav__item { position: relative; display: flex; align-items: stretch; }
.mainnav__link {
    display: inline-flex; align-items: center; min-height: var(--tap);
    padding: .45rem 1rem;
    font-weight: 700; font-size: .95rem; color: #fff; text-decoration: none;
    background: var(--c-green-700);
    border: 2px solid var(--c-green-700); border-radius: var(--radius-sm);
    box-shadow: 0 2px 0 var(--c-green-900);
    transition: background-color .2s, color .2s, transform .15s;
}
.mainnav__item--has-sub .mainnav__link { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.mainnav__link:hover,
.mainnav__link.is-active { background: var(--c-blue-700); border-color: var(--c-blue-700); color: #fff; box-shadow: 0 2px 0 var(--c-blue-900); }
.mainnav__link[aria-current="page"] { background: var(--c-blue-900); border-color: var(--c-blue-900); }
.mainnav__link:hover { transform: translateY(-1px); }

.mainnav__sub-toggle {
    width: var(--tap); min-height: var(--tap); padding: 0; cursor: pointer;
    color: #fff; background: var(--c-green-900);
    border: 2px solid var(--c-green-900); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: 0 2px 0 var(--c-green-900); align-self: stretch; box-sizing: border-box;
}
.mainnav__item--has-sub > .mainnav__link { box-sizing: border-box; }
.mainnav__item--has-sub:hover { transform: translateY(-1px); }
.mainnav__item--has-sub > .mainnav__link:hover { transform: none; }
.mainnav__item { transition: transform .15s; }
.mainnav__sub-toggle::before {
    content: ""; display: block; width: .55rem; height: .55rem; margin: 0 auto;
    border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
}
.mainnav__sub-toggle[aria-expanded="true"]::before { transform: rotate(-135deg) translate(-2px, -2px); }

.mainnav__sub {
    list-style: none; margin: 0; padding: .5rem;
    position: absolute; top: calc(100% + .35rem); left: 0; min-width: 16rem; z-index: 30;
    background: #fff; border: 2px solid var(--c-blue-700); border-radius: var(--radius); box-shadow: var(--shadow);
    display: none;
}
.mainnav__item--open > .mainnav__sub { display: block; }
.mainnav__sub-link {
    display: block; padding: .6rem .9rem; border-radius: var(--radius-sm);
    color: var(--c-blue-900); text-decoration: none; font-weight: 600;
}
.mainnav__sub-link:hover, .mainnav__sub-link.is-active { background: var(--c-bg-tint); color: var(--c-green-700); text-decoration: underline; }

.mainnav-toggle {
    display: none; width: 100%; align-items: center; gap: .75rem;
    min-height: var(--tap); padding: .5rem 1rem;
    font: inherit; font-weight: 700; color: #fff; background: var(--c-green-700);
    border: 2px solid var(--c-green-700); border-radius: var(--radius-sm); cursor: pointer;
}
.mainnav-toggle__icon, .mainnav-toggle__icon::before, .mainnav-toggle__icon::after {
    display: block; width: 1.4rem; height: 3px; background: currentColor; border-radius: 2px; content: ""; position: relative;
}
.mainnav-toggle__icon::before { position: absolute; top: -7px; }
.mainnav-toggle__icon::after { position: absolute; top: 7px; }

/* ---------- Układ ---------- */
.site__body { max-width: var(--content-max); margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.layout { display: block; }
.layout--sidebar {
    display: grid; gap: 2rem 2.5rem;
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    grid-template-areas: "side main";
    align-items: start;
}
.layout--sidebar > .layout__main { grid-area: main; }
.layout--sidebar > .layout__side { grid-area: side; }
.content { min-width: 0; }

.page-title { margin-bottom: 1rem; }
.breadcrumb { font-size: .9rem; margin-bottom: 1.5rem; }
/* Znacznik pod okruszkami na całej szerokości bloku */
.breadcrumb::after {
    content: ""; display: block; width: 100%; height: 5px; margin-top: .6rem; border-radius: 3px;
    background: linear-gradient(90deg, var(--c-green-700), var(--c-blue-500));
}
.breadcrumb__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.breadcrumb__item + .breadcrumb__item::before { content: "›"; margin-right: .5rem; color: var(--c-muted); }
.breadcrumb a { padding: .15rem 0; }

/* ---------- Kolumna boczna ---------- */
.layout__side { min-width: 0; }
.sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-width: 0; }
.sidebar__callout { margin: 0; }
.banners__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.banners__link { display: block; border: 1px solid var(--c-border, #d0d7de); border-radius: .5rem; overflow: hidden; background: #fff; }
.banners__link:hover { box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.banners__link:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.banners__img { display: block; width: 100%; height: auto; }
.banners__item--multi { border: 1px solid var(--c-border, #d0d7de); border-radius: .5rem; overflow: hidden; background: #fff; }
.banners__links { list-style: none; margin: 0; padding: .5rem .75rem .75rem; display: grid; gap: .25rem; }
.banners__links-a { display: block; padding: .5rem .25rem; min-height: 2.75rem; line-height: 1.3; }
.banners__links-a:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.sidebar__callout-link {
    display: block; padding: 1rem 1.1rem; font-weight: 700; color: #fff; text-decoration: none;
    background: linear-gradient(135deg, var(--c-green-900), var(--c-green-700));
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.sidebar__callout-link:hover { color: #fff; text-decoration: underline; }

.search { background: #fff; border: 1px solid var(--c-border-soft); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.search__label { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--c-blue-700); margin-bottom: .5rem; }
.search__row { display: flex; gap: .5rem; }
.search__input {
    flex: 1; min-width: 0; min-height: var(--tap); padding: .4rem .7rem; font: inherit; color: var(--c-text);
    background: #fff; border: 2px solid var(--c-border); border-radius: var(--radius-sm);
}

.sidemenu { background: #fff; border: 1px solid var(--c-border-soft); border-radius: var(--radius); padding: 1rem 1rem .6rem; box-shadow: var(--shadow); }
.sidemenu__title { margin: 0 0 .5rem; font-size: 1.15rem; color: var(--c-blue-700); }
.sidemenu__list { list-style: none; margin: 0; padding: 0; }
.sidemenu__list--level-2, .sidemenu__list--level-3 { margin: 0 0 .4rem .9rem; padding-left: .7rem; border-left: 3px solid var(--c-lime); }
.sidemenu__item { border-bottom: 1px dashed var(--c-border-soft); }
.sidemenu__item:last-child { border-bottom: 0; }
.sidemenu__link {
    display: block; padding: .55rem .5rem; min-height: 2.5rem;
    color: var(--c-green-700); font-weight: 600; text-decoration: none;
}
.sidemenu__link::before { content: "» "; color: var(--c-blue-500); }
.sidemenu__link:hover, .sidemenu__item.is-active > .sidemenu__link { color: var(--c-blue-900); text-decoration: underline; }

/* ---------- Karty aktualności (EXT:news) ---------- */
.news-card {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.1rem 1.25rem; margin-bottom: 1.1rem;
    background: #fff; border: 1px solid var(--c-border-soft); border-left: 6px solid var(--c-green-700); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .2s;
}
.news-card:hover { transform: translateY(-2px); }
.news-card__media { flex: 0 0 auto; }
.news-card__img { display: block; width: auto; height: auto; max-width: 120px; max-height: 90px; border-radius: var(--radius-sm); }
.news-card__body { flex: 1 1 0; min-width: 0; }
.news-card__date, .news-detail__date { margin: 0 0 .25rem; font-size: .9rem; font-weight: 700; color: var(--c-muted); }
.news-card__title { margin: 0 0 .5rem; font-size: 1.3rem; }
.news-card__title-link { color: var(--c-green-700); text-decoration: none; }
.news-card__title-link:hover { color: var(--c-blue-700); text-decoration: underline; }
.news-card__teaser { margin: 0; }

/* Szczegół aktualności */
.news-detail__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 0 0 .75rem; }
.news-detail__cats { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.news-detail__cats li { background: var(--c-bg-tint); color: var(--c-green-900); border-radius: 999px; padding: .15rem .75rem; font-size: .85rem; }
.news-detail__related { margin: 1.5rem 0; }
.news-detail__subtitle { font-size: 1.2rem; margin: 0 0 .75rem; }

/* Lista plików do pobrania */
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.file-list__link {
    --file-c: var(--c-blue-700);
    display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; text-decoration: none; color: var(--c-text);
    background: #fff; border: 1px solid var(--c-border-soft); border-left: 6px solid var(--file-c); border-radius: var(--radius);
    box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.file-list__link[data-ext="pdf"] { --file-c: #9b1c1c; }
.file-list__link[data-ext="doc"], .file-list__link[data-ext="docx"], .file-list__link[data-ext="odt"], .file-list__link[data-ext="rtf"] { --file-c: #1a4f9c; }
.file-list__link[data-ext="xls"], .file-list__link[data-ext="xlsx"], .file-list__link[data-ext="ods"], .file-list__link[data-ext="csv"] { --file-c: #00662a; }
.file-list__link[data-ext="ppt"], .file-list__link[data-ext="pptx"], .file-list__link[data-ext="odp"] { --file-c: #8a3b00; }
.file-list__link[data-ext="zip"], .file-list__link[data-ext="rar"], .file-list__link[data-ext="7z"] { --file-c: #4a4949; }
.file-list__icon {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3.5rem;
    background: var(--file-c); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .03em; border-radius: 6px 14px 6px 6px;
}
.file-list__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.file-list__title { font-weight: 700; color: var(--c-blue-900); overflow-wrap: anywhere; }
.file-list__meta { font-size: .85rem; color: var(--c-muted); }
.file-list__action {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: var(--tap); padding: 0 1rem;
    background: var(--file-c); color: #fff; font-weight: 700; border-radius: 999px; transition: padding .2s;
}
.file-list__link:hover, .file-list__link:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(6, 56, 90, .22); }
.file-list__link:hover .file-list__title { text-decoration: underline; }
.file-list__link:hover .file-list__action { padding-inline: 1.25rem; }
@media (max-width: 30em) { .file-list__action span { display: none; } .file-list__action { padding: 0; width: var(--tap); justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .file-list__link, .file-list__action { transition: none; } }
@media (forced-colors: active) { .file-list__icon, .file-list__action { border: 2px solid ButtonText; } }
.news-detail__filesize { color: var(--c-muted); font-size: .9rem; }
.news-gallery { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.news-gallery__link { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; }
.news-gallery__img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s; }
.news-gallery__link:hover .news-gallery__img { transform: scale(1.05); }
.news-gallery__caption { margin: .3rem 0 0; font-size: .9rem; color: var(--c-muted); }

/* Przycisk powrotu do listy */
.news-back-wrap { margin: 2rem 0 0; }
.news-back {
    display: inline-flex; align-items: center; gap: .75rem; min-height: 3rem; padding: .4rem 1.4rem .4rem .4rem;
    background: linear-gradient(135deg, var(--c-green-700), var(--c-blue-700)); color: #fff; font-weight: 700; text-decoration: none;
    border-radius: 999px; box-shadow: 0 6px 16px rgba(6, 56, 90, .28); transition: transform .2s, box-shadow .2s, padding .2s;
}
.news-back[hidden] { display: none; }
.news-back__icon {
    display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    background: #fff; color: var(--c-green-700); transition: transform .25s;
}
.news-back:hover, .news-back:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(6, 56, 90, .35); color: #fff; }
.news-back:hover .news-back__icon, .news-back:focus-visible .news-back__icon { transform: translateX(-4px); }
.news-back:active { transform: translateY(0); }

/* Lightbox */
.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox__inner { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: 3.5rem .75rem 1rem; box-sizing: border-box; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; height: 100%; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); background: #fff; }
.lightbox__caption { margin-top: .6rem; text-align: center; max-width: 60ch; }
.lightbox__caption:empty { display: none; }
.lightbox__btn {
    display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid #fff;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox__btn:hover { background: #fff; color: #000; }
.lightbox__btn:focus-visible { outline: 3px solid var(--c-sun); outline-offset: 2px; }
.lightbox__close { position: absolute; top: .75rem; right: .75rem; }
.lightbox__btn[hidden] { display: none; }
body:has(dialog.lightbox[open]) { overflow: hidden; }
@media (max-width: 40em) {
    .lightbox__inner { grid-template-columns: minmax(0, 1fr); }
    .lightbox__prev, .lightbox__next { position: absolute; bottom: .75rem; }
    .lightbox__prev { left: .75rem; } .lightbox__next { right: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .news-back, .news-back__icon, .news-gallery__img, .news-card { transition: none; } }

/* Domyślne klasy EXT:news: paginacja i szczegół */
.pagination, .page-navigation ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1.5rem 0; }
.pagination .page-link, .page-navigation a {
    display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 .75rem;
    border: 2px solid var(--c-blue-700); border-radius: var(--radius-sm); color: var(--c-blue-700); text-decoration: none; font-weight: 700; background: #fff;
}
.pagination .active .page-link, .page-navigation .current a { background: var(--c-blue-700); color: #fff; }
.news-single .header h1, .news-single h1 { font-size: 2rem; }
.news-single .news-img-wrap img { border-radius: var(--radius-sm); }
.news-single .news-backlink-wrap a { display: inline-flex; min-height: var(--tap); align-items: center; }

/* ---------- Karuzela ---------- */
.hero { max-width: var(--content-max); margin: 0 auto; padding: 1rem 1rem 0; }
.carousel { position: relative; margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; background: var(--c-blue-900); box-shadow: var(--shadow); }
.carousel__viewport { overflow: hidden; }
.carousel__track { margin: 0; padding: 0; display: grid; }
.carousel__slide { grid-area: 1 / 1; position: relative; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.carousel__slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; z-index: 1; }
.carousel__link { display: block; color: inherit; text-decoration: none; }
.carousel__img { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 520; object-fit: cover; }
.carousel__caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.25rem 4.25rem;
    font-family: var(--font-head); font-size: clamp(1.1rem, .9rem + 1.2vw, 1.9rem); font-weight: 700; color: #fff;
    background: linear-gradient(180deg, transparent, rgba(6, 56, 90, .92));
}
.carousel__controls {
    position: absolute; left: 1rem; bottom: .9rem; z-index: 3;
    display: flex; align-items: center; gap: .4rem;
    padding: .3rem; background: rgba(6, 56, 90, .92); border-radius: 999px;
}
.carousel__btn {
    min-width: var(--tap); min-height: var(--tap); padding: 0 .9rem; cursor: pointer;
    font: inherit; font-size: 1.4rem; font-weight: 700; line-height: 1; color: #fff;
    background: transparent; border: 2px solid rgba(255, 255, 255, .9); border-radius: 999px;
}
.carousel__btn--toggle { font-size: .95rem; }
.carousel__btn:hover { background: #fff; color: var(--c-blue-900); }
.carousel__status { color: #fff; font-size: .9rem; padding: 0 .6rem; font-variant-numeric: tabular-nums; }
.js .carousel:not([data-ready]) .carousel__controls { display: none; }

/* ---------- Galeria ---------- */
.gallery__grid { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.gallery__link { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; }
.gallery__img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s; }
.gallery__link:hover .gallery__img { transform: scale(1.04); }
.gallery__caption { font-size: .9rem; color: var(--c-muted); padding-top: .4rem; }

/* ---------- Treści (FSC) ---------- */
.frame { margin-bottom: 1.5rem; }
.frame-type-text a, .frame-type-textmedia a { word-break: break-word; }
.ce-gallery img { border-radius: var(--radius-sm); }
.ce-bodytext table, .frame table { width: 100%; border-collapse: collapse; }
.frame th, .frame td { border: 1px solid var(--c-border); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.frame th { background: var(--c-bg-tint); color: var(--c-blue-900); }
.table-responsive, .ce-table { overflow-x: auto; }
blockquote { padding: .8rem 1.2rem; border-left: 5px solid var(--c-green-700); background: var(--c-bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Klasy edytora RTE (rte_ckeditor) i fluid_styled_content ----------
   Źródło klas: Configuration/RTE/Default.yaml rte_ckeditor (alignment, style) oraz szablony FSC
   (Layouts/Default, Textmedia, Media/Gallery). W TYPO3 14 FSC nie dostarcza CSS, więc pakiet musi je obsłużyć. */

/* Wyrównanie tekstu: text-start / text-center / text-end / text-justify (+ aliasy text-left / text-right) */
.text-start, .text-left, .frame .text-start, .frame .text-left, .frame th.text-start, .frame td.text-start { text-align: start; }
.text-center, .frame .text-center, .frame th.text-center, .frame td.text-center { text-align: center; }
.text-end, .text-right, .frame .text-end, .frame .text-right, .frame th.text-end, .frame td.text-end { text-align: end; }
.text-justify, .frame .text-justify, .frame td.text-justify { text-align: justify; hyphens: auto; }

/* Style z listy „Styl” edytora: Lead, Small, Muted */
.lead { font-size: 1.25rem; line-height: 1.55; font-weight: 400; color: var(--c-blue-900); }
small { font-size: .875em; }
.text-muted { color: var(--c-muted); }   /* #4a4949 na białym 8.4:1 – spełnia WCAG 1.4.3 */

/* Obrazy i tabele wstawiane w edytorze */
figure.image, .ce-bodytext figure { margin: 0 0 1.1em; }
figure.image img { border-radius: var(--radius-sm); }
figure.image figcaption, figcaption { font-size: .9rem; color: var(--c-muted); padding-top: .4rem; }
figure.table { margin: 0 0 1.1em; overflow-x: auto; }
.contenttable { width: 100%; }
table caption { text-align: start; font-weight: 700; color: var(--c-blue-900); padding: .4rem 0; caption-side: top; }

/* Ramka elementu: frame-space-before-* / frame-space-after-* */
.frame-space-before-extra-small { margin-top: .5rem; }
.frame-space-before-small { margin-top: 1rem; }
.frame-space-before-medium { margin-top: 2rem; }
.frame-space-before-large { margin-top: 3rem; }
.frame-space-before-extra-large { margin-top: 4.5rem; }
.frame-space-after-extra-small { margin-bottom: .5rem; }
.frame-space-after-small { margin-bottom: 1rem; }
.frame-space-after-medium { margin-bottom: 2rem; }
.frame-space-after-large { margin-bottom: 3rem; }
.frame-space-after-extra-large { margin-bottom: 4.5rem; }

/* Ramka elementu: frame-ruler-before / frame-ruler-after / frame-indent* */
.frame-ruler-before::before, .frame-ruler-after::after { content: ""; display: block; height: 0; border-top: 2px solid var(--c-border-soft); margin: 1.5rem 0; }
.frame-indent { padding-inline: 8%; }
.frame-indent-left { padding-inline-start: 8%; }
.frame-indent-right { padding-inline-end: 8%; }

/* Tekst z mediami (CType textmedia / textpic): ce-textpic, ce-left|center|right, ce-above|intext|below, ce-nowrap */
.ce-textpic::after, .ce-bodytext::after { content: ""; display: table; clear: both; }
.ce-gallery { margin-bottom: 1rem; }
.ce-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.ce-row:last-child { margin-bottom: 0; }
.ce-column { flex: 1 1 10rem; min-width: 0; }
.ce-column img, .ce-column picture { display: block; max-width: 100%; height: auto; }
.ce-border img, .ce-border .image-embed-item { border: 2px solid var(--c-border-soft); padding: 3px; }
.ce-center .ce-outer { float: right; position: relative; left: -50%; }
.ce-center .ce-inner { float: right; position: relative; left: 50%; }
.ce-above.ce-center .ce-gallery, .ce-below.ce-center .ce-gallery { text-align: center; }

/* Tekst i obrazy: tekst wizualnie przed obrazami (pozycja "nad tekstem"); DOM zgodny ze standardem TYPO3 */
.ce-textpic.ce-above, .ce-textpic.ce-below { display: flex; flex-direction: column; }
.ce-textpic.ce-above .ce-bodytext { order: 1; }
.ce-textpic.ce-above .ce-gallery { order: 2; margin-top: 1rem; }
.ce-textpic.ce-below .ce-bodytext { order: 1; }
.ce-textpic.ce-below .ce-gallery { order: 2; margin-top: 1rem; }
@media (min-width: 40em) {
    .ce-intext.ce-left .ce-gallery { float: left; margin-right: 1.5rem; }
    .ce-intext.ce-right .ce-gallery { float: right; margin-left: 1.5rem; }
    .ce-intext.ce-left .ce-gallery, .ce-intext.ce-right .ce-gallery { max-width: 50%; }
    .ce-intext.ce-nowrap .ce-bodytext { overflow: hidden; }
}

/* Pliki do pobrania (CType uploads, "Pliki do pobrania" / File links) – karty z plakietką typu pliku */
.ce-uploads { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .75rem; }
.ce-uploads > li {
    --file-c: var(--c-blue-700);
    position: relative; min-height: 4.75rem; padding: .85rem 8rem .85rem 5.25rem; display: block;
    background: #fff; border: 1px solid var(--c-border-soft); border-left: 6px solid var(--file-c); border-radius: var(--radius);
    box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.ce-uploads > li:hover, .ce-uploads > li:focus-within { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(6, 56, 90, .22); }
.ce-uploads-icon { display: none; }
.ce-uploads a { color: var(--c-blue-900); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.ce-uploads a:hover { text-decoration: underline; }
/* Plakietka z rozszerzeniem (z atrybutu href) i rozciągnięty obszar kliknięcia całej karty */
.ce-uploads a::before {
    content: "PLIK"; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center; width: 3rem; height: 3.5rem;
    background: var(--file-c); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .03em; border-radius: 6px 14px 6px 6px;
}
.ce-uploads a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.ce-uploads a:focus-visible { outline: none; }
.ce-uploads a:focus-visible::after { outline: 3px solid var(--c-focus); outline-offset: 2px; }
/* Przycisk "Pobierz" */
.ce-uploads > li::after {
    content: "Pobierz \2193"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 1.1rem;
    background: var(--file-c); color: #fff; font-weight: 700; border-radius: 999px; transition: padding .2s;
}
.ce-uploads > li:hover::after { padding-inline: 1.35rem; }
.ce-uploads-description, .ce-uploads-filesize { display: block; font-size: .875rem; color: var(--c-muted); font-weight: 400; }
.ce-uploads > li:has(a[href$=".pdf" i]) { --file-c: #9b1c1c; }
.ce-uploads a[href$=".pdf" i]::before { content: "PDF"; }
.ce-uploads > li:has(a[href$=".doc" i]), .ce-uploads > li:has(a[href$=".docx" i]), .ce-uploads > li:has(a[href$=".odt" i]), .ce-uploads > li:has(a[href$=".rtf" i]) { --file-c: #1a4f9c; }
.ce-uploads a[href$=".doc" i]::before, .ce-uploads a[href$=".docx" i]::before, .ce-uploads a[href$=".odt" i]::before, .ce-uploads a[href$=".rtf" i]::before { content: "DOC"; }
.ce-uploads > li:has(a[href$=".xls" i]), .ce-uploads > li:has(a[href$=".xlsx" i]), .ce-uploads > li:has(a[href$=".ods" i]), .ce-uploads > li:has(a[href$=".csv" i]) { --file-c: #00662a; }
.ce-uploads a[href$=".xls" i]::before, .ce-uploads a[href$=".xlsx" i]::before, .ce-uploads a[href$=".ods" i]::before, .ce-uploads a[href$=".csv" i]::before { content: "XLS"; }
.ce-uploads > li:has(a[href$=".ppt" i]), .ce-uploads > li:has(a[href$=".pptx" i]), .ce-uploads > li:has(a[href$=".odp" i]) { --file-c: #8a3b00; }
.ce-uploads a[href$=".ppt" i]::before, .ce-uploads a[href$=".pptx" i]::before, .ce-uploads a[href$=".odp" i]::before { content: "PPT"; }
.ce-uploads > li:has(a[href$=".zip" i]), .ce-uploads > li:has(a[href$=".rar" i]), .ce-uploads > li:has(a[href$=".7z" i]) { --file-c: #4a4949; }
.ce-uploads a[href$=".zip" i]::before, .ce-uploads a[href$=".rar" i]::before, .ce-uploads a[href$=".7z" i]::before { content: "ZIP"; }
@media (max-width: 30em) {
    .ce-uploads > li { padding-right: 4.5rem; }
    .ce-uploads > li::after { content: "\2193"; width: var(--tap); padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .ce-uploads > li, .ce-uploads > li::after { transition: none; } }
@media (forced-colors: active) { .ce-uploads a::before, .ce-uploads > li::after { border: 2px solid ButtonText; } }

/* Obrazy z rte_ckeditor_image: wyrównanie i wyłączenie z opływu */
img.image-left, figure.image-left, figure.image-style-align-left { float: left; margin: 0 1.5rem 1rem 0; max-width: 100%; }
img.image-right, figure.image-right, figure.image-style-align-right { float: right; margin: 0 0 1rem 1.5rem; max-width: 100%; }
img.image-center, figure.image-center, figure.image-style-block-align-center { display: block; float: none; margin: 0 auto 1.1em; }
img.image-inline { display: inline-block; vertical-align: middle; }
.ce-bodytext img, figure.image img { max-width: 100%; height: auto; }
@media (max-width: 40em) {
    img.image-left, img.image-right, figure.image-left, figure.image-right,
    figure.image-style-align-left, figure.image-style-align-right { float: none; max-width: 100%; margin: 0 0 1rem; }
}

/* Listy: style z menu "Styl" edytora + typy z właściwości listy */
.frame ul, .frame ol, .ce-bodytext ul, .ce-bodytext ol { margin: 0 0 1.1em; padding-inline-start: 1.6em; }
.frame li { margin-bottom: .3em; }
.frame li > ul, .frame li > ol { margin-top: .3em; margin-bottom: 0; }
ul.list-unstyled { list-style: none; padding-inline-start: 0; }
ul.list-check { list-style: none; padding-inline-start: 0; }
ul.list-check > li { position: relative; padding-inline-start: 1.8em; }
ul.list-check > li::before { content: ""; position: absolute; inset-inline-start: 0; top: .35em; width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--c-green-700); }
ul.list-check > li::after { content: ""; position: absolute; inset-inline-start: .38em; top: .5em; width: .3em; height: .55em; border: solid #fff; border-width: 0 .14em .14em 0; transform: rotate(45deg); }
ul.list-columns { columns: 2 14rem; column-gap: 2rem; }
ul.list-columns > li { break-inside: avoid; }
ol.list-steps { list-style: none; counter-reset: step; padding-inline-start: 0; }
ol.list-steps > li { counter-increment: step; position: relative; padding-inline-start: 2.6em; min-height: 2em; margin-bottom: .8em; }
ol.list-steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--c-blue-700); color: #fff; font-weight: 700; text-align: center; line-height: 1.9em; }
@media (forced-colors: active) {
    ul.list-check > li::before { background: Highlight; }
    ol.list-steps > li::before { background: Highlight; color: HighlightText; }
}

/* ---------- Stopka ---------- */
.site-footer { color: #fff; background: linear-gradient(115deg, var(--c-blue-900), var(--c-green-900)); }
.site-footer__inner { max-width: var(--content-max); margin: 0 auto; padding: .5rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--c-lime); }
.site-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.site-footer__copy { margin: 0 0 0 auto; font-size: .85rem; color: #e6eef2; text-align: right; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.social:not(:has(li)) { display: none; }
.social__link { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 50%; transition: background .2s; }
.social__link:hover { background: rgba(255, 255, 255, .18); }

/* Stopka przytwierdzona do dołu okna (tylko gdy okno jest dość duże – reflow/zoom WCAG 1.4.10) */
@media (min-width: 48em) and (min-height: 36em) {
    :root { --footer-h: 3.25rem; }
    html { scroll-padding-bottom: calc(var(--footer-h) + 1rem); }
    body { padding-bottom: var(--footer-h); }
    .site-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; box-shadow: 0 -3px 14px rgba(0, 0, 0, .25); }
    .cookie-notice { bottom: var(--footer-h); }
}
.cookie-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--c-blue-900); color: #fff; box-shadow: 0 -4px 20px rgba(0, 0, 0, .3); }
.cookie-notice[hidden] { display: none; }
.cookie-notice__inner { max-width: var(--content-max); margin: 0 auto; padding: 1rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.cookie-notice__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.cookie-notice__text { flex: 1 1 22rem; margin: 0; }
.cookie-notice__link { color: var(--c-lime); }

/* ---------- RWD ---------- */
@media (max-width: 62em) {
    .layout--sidebar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
    /* Lewa kolumna jest całkowicie ukryta (także dla czytników ekranu) */
    .layout__side { display: none; }
}

@media (max-width: 48em) {
    .mainnav-toggle { display: flex; }
    .js .mainnav { display: none; margin-top: .5rem; }
    .js .mainnav.is-open { display: block; }
    .mainnav__list { flex-direction: column; flex-wrap: nowrap; }
    .mainnav__item { width: 100%; }
    .mainnav__link { flex: 1; }
    .mainnav__sub { position: static; width: 100%; min-width: 0; margin: .35rem 0 0; box-shadow: none; }
    .mainnav__item--has-sub { flex-wrap: wrap; }
    .mainnav__item--has-sub > .mainnav__sub { flex-basis: 100%; }
    .carousel__caption { padding-bottom: 5rem; }
    .carousel__img { aspect-ratio: 4 / 3; }
    .a11y-tools { width: 100%; }
}

@media (max-width: 24em) {
    .carousel__controls { left: .5rem; right: .5rem; justify-content: space-between; }
    .carousel__status { display: none; }
}

/* ---------- Preferencje użytkownika ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    .btn, .mainnav__link, .a11y-tools__btn, .carousel__btn { border: 2px solid ButtonText; }
}

@media print {
    .skip-links, .site-header, .mainnav-wrap, .site-footer, .sidebar, .cookie-notice, .carousel__controls { display: none !important; }
    body { background: #fff; color: #000; font-size: 11pt; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}

/* ---------- Przycisk „do góry” ---------- */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.to-top {
    position: fixed; right: 1rem; bottom: calc(var(--footer-h, 0px) + 1rem); z-index: 850;
    display: inline-flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--c-blue-900); color: #fff; border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35); text-decoration: none;
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--c-sun); color: #000; }
.to-top:focus-visible { outline: 3px solid var(--c-sun); outline-offset: 3px; }
html.hc .to-top { background: #000; border-color: #ff0; color: #ff0; }
@media print { .to-top { display: none !important; } }
@media (forced-colors: active) { .to-top { border: 2px solid ButtonText; } }

/* ---------- Wysoki kontrast: czarne tło, żółte linki, pełna szerokość ---------- */
html.hc {
    --c-blue-900: #000;
    --c-blue-700: #ffff00;   /* kolor linków */
    --c-blue-500: #00ffff;
    --c-green-900: #000;
    --c-green-700: #ffff00;
    --c-lime: #ffff00;
    --c-sun: #ffff00;
    --c-text: #fff;
    --c-muted: #fff;
    --c-bg: #000;
    --c-bg-soft: #000;
    --c-bg-tint: #000;
    --c-border: #fff;
    --c-border-soft: #fff;
    --c-focus: #ffff00;
    --shadow: none;
    color-scheme: dark;
}
html.hc body { background: #000; color: #fff; }
html.hc .site,
html.hc .site__body,
html.hc .content { background: #000; color: #fff; }
html.hc .site-header,
html.hc .mainnav-wrap,
html.hc .site-footer,
html.hc .cookie-notice { background: #000; color: #fff; border-color: #fff; }
html.hc .site-header::after { display: none; }
html.hc .site-header,
html.hc .mainnav-wrap { border-bottom: 1px solid #fff; }
html.hc .site-footer { border-top: 1px solid #fff; box-shadow: none; }
html.hc a { color: #ffff00; text-decoration: underline; }
html.hc a:hover { color: #fff; }
html.hc .brand,
html.hc .brand:hover,
html.hc .brand__title { color: #fff; }
html.hc .brand__subtitle { color: #ffff00; }

/* logotypy ukryte, lewa kolumna ukryta, treść na maksymalną szerokość */
html.hc .layout__side { display: none; }
html.hc .layout--sidebar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
html.hc .site__body { max-width: none; width: 100%; }
html.hc .site-header__inner,
html.hc .mainnav,
html.hc .site-footer__inner { max-width: none; }

/* elementy z jasnym tłem -> czarne z białą ramką */
html.hc .btn,
html.hc .btn--light,
html.hc .a11y-tools__btn,
html.hc .carousel__btn,
html.hc .lightbox__btn { background: #000; color: #ffff00; border: 2px solid #ffff00; }
html.hc .btn:hover,
html.hc .btn--light:hover,
html.hc .a11y-tools__btn:hover,
html.hc .carousel__btn:hover,
html.hc .lightbox__btn:hover { background: #ffff00; color: #000; }
html.hc .a11y-tools__btn[aria-pressed="true"] { background: #ffff00; color: #000; }
html.hc .news-item,
html.hc .news-card,
html.hc .search,
html.hc .sidemenu,
html.hc .banners__link,
html.hc .banners__item--multi,
html.hc .ce-uploads li,
html.hc .file-list__item,
html.hc .mainnav__sub,
html.hc .carousel,
html.hc table,
html.hc th,
html.hc td { background: #000; color: #fff; border-color: #fff; }
html.hc .mainnav__link { color: #fff; background: #000; }
html.hc .mainnav__link:hover,
html.hc .mainnav__link[aria-current] { background: #ffff00; color: #000; }
html.hc input,
html.hc select,
html.hc textarea { background: #000; color: #fff; border: 2px solid #fff; }
html.hc .breadcrumb::after { background: #fff; }
html.hc :focus-visible { outline: 3px solid #ffff00; outline-offset: 2px; }
html.hc .hero,
html.hc .cookie-notice__inner { max-width: none; }
html.hc .news-card__title-link,
html.hc .news-card__title-link:hover { color: #ffff00; }
html.hc .news-detail__cats li { background: #000; color: #fff; border: 1px solid #fff; }
html.hc .news-card__date,
html.hc .news-detail__date,
html.hc .news-gallery__caption { color: #fff; }

/* Wysoki kontrast: menu – ramki przycisków rozwinięcia i odsunięcie od górnej linii */
html.hc .mainnav-wrap { padding-top: 1rem; }
html.hc .mainnav__link { border: 2px solid #ffff00; box-shadow: none; }
html.hc .mainnav__item--has-sub .mainnav__link { border-right-width: 1px; }
html.hc .mainnav__sub-toggle,
html.hc .mainnav-toggle { background: #000; color: #ffff00; border: 2px solid #ffff00; box-shadow: none; }
html.hc .mainnav__sub-toggle { border-left-width: 1px; }
html.hc .mainnav__sub-toggle:hover,
html.hc .mainnav__sub-toggle[aria-expanded="true"],
html.hc .mainnav-toggle:hover { background: #ffff00; color: #000; }
html.hc .mainnav__sub { background: #000; border: 2px solid #ffff00; }
html.hc .mainnav__sub-link { color: #ffff00; }
html.hc .mainnav__sub-link:hover,
html.hc .mainnav__sub-link.is-active { background: #ffff00; color: #000; }

/* Wysoki kontrast: poprawki kontrastu (WAVE) – żółte tło zawsze z czarnym tekstem */
html.hc .skip-links__link,
html.hc .skip-links__link:hover,
html.hc .skip-links__link:focus { background: #ffff00; color: #000; }
html.hc .news-back,
html.hc .news-back:hover { background: #000; color: #ffff00; border: 2px solid #ffff00; }
html.hc .news-back:hover { background: #ffff00; color: #000; }
html.hc .pagination .active .page-link,
html.hc .page-navigation .current a { background: #ffff00; color: #000; }
html.hc ul.list-check > li::before { background: #ffff00; }
html.hc ol.list-steps > li::before { background: #ffff00; color: #000; }

/* listy plików – jedna kolorystyka niezależnie od typu pliku */
html.hc .file-list__link,
html.hc .ce-uploads > li { --file-c: #ffff00 !important; background: #000; color: #fff; border: 1px solid #fff; border-left: 6px solid #ffff00; box-shadow: none; }
html.hc .file-list__icon,
html.hc .file-list__action,
html.hc .ce-uploads a::before,
html.hc .ce-uploads > li::after { background: #ffff00; color: #000; }
html.hc .file-list__title,
html.hc .ce-uploads a { color: #ffff00; }
html.hc .file-list__meta,
html.hc .ce-uploads-description,
html.hc .ce-uploads-filesize { color: #fff; }
html.hc .file-list__link:hover,
html.hc .ce-uploads > li:hover { box-shadow: none; transform: none; }

/* Obrazy z edytora: rozmiar z atrybutów width/height (proporcje z atrybutów), nigdy poza kolumnę */
.ce-bodytext img[width], .news-detail__text img[width], figure.image img[width] { max-width: 100%; height: auto; }
figure.image { max-width: 100%; }
figure.image > img { display: block; }

/* ---------- Paginator aktualności ---------- */
.pager { margin: 2rem 0 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-top: 1rem; border-top: 5px solid transparent; border-image: linear-gradient(90deg, var(--c-green-700), var(--c-blue-500)) 1; }
.pager__status { margin: 0; color: var(--c-muted); }
.pager__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.pager__link {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-width: var(--tap); min-height: var(--tap); padding: 0 .8rem;
    font-weight: 700; text-decoration: none; color: var(--c-blue-700);
    background: #fff; border: 2px solid var(--c-blue-700); border-radius: var(--radius-sm);
    transition: background-color .2s, color .2s;
}
a.pager__link:hover { background: var(--c-bg-tint); color: var(--c-blue-900); }
.pager__link--nav { padding: 0 1rem; }
.pager__link--current { background: var(--c-blue-700); color: #fff; }
.pager__gap { display: inline-flex; min-width: 1.5rem; justify-content: center; color: var(--c-muted); font-weight: 700; }
.pager__link:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
@media (max-width: 36em) { .pager { justify-content: center; } .pager__status { width: 100%; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .pager__link { transition: none; } }
@media (forced-colors: active) { .pager__link { border: 2px solid ButtonText; } .pager__link--current { border-width: 4px; } }
@media print { .pager { display: none; } }
html.hc .pager { border-image: none; border-top: 1px solid #fff; }
html.hc .pager__link { background: #000; color: #ffff00; border: 2px solid #ffff00; box-shadow: none; }
html.hc a.pager__link:hover { background: #ffff00; color: #000; }
html.hc .pager__link--current { background: #ffff00; color: #000; }
html.hc .pager__status, html.hc .pager__gap { color: #fff; }

/* ---------- Filmy w aktualnościach ---------- */
.news-video { margin: 1.5rem auto; max-width: 48rem; }
.news-video .news-gallery__caption { text-align: center; }
.news-video iframe, .news-video video, .news-video__media { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); background: #000; }
.news-video--html iframe { aspect-ratio: 16 / 9; }
.news-gallery:not(:has(li)) { display: none; }
.pager__list { justify-content: center; }

/* Obrazy z edytora w jednej linii: domyślnie układają się obok siebie, o ile się mieszczą */
img.image-block, img.image.image-block { display: inline-block; vertical-align: top; margin: 0 1rem 1rem 0; }
figure.image-block, figure.image.image-block { display: inline-block; vertical-align: top; margin: 0 1rem 1rem 0; max-width: 100%; }
.ce-bodytext p:has(> img.image:only-child), .news-detail__text p:has(> img.image:only-child) { display: inline-block; vertical-align: top; margin: 0 1rem 1rem 0; max-width: 100%; }

/* Paginator na całą szerokość: „Poprzednia” z lewej, „Następna” z prawej, numery pośrodku */
.pager { display: block; }
.pager__list { width: 100%; justify-content: center; }
.pager__item--prev { margin-right: auto; }
.pager__item--next { margin-left: auto; }
@media (max-width: 36em) { .pager__item--prev, .pager__item--next { margin: 0; } }

/* Miejsce zarezerwowane na nieaktywne „Poprzednia/Następna” – numery stron nie przesuwają się */
.pager__item--placeholder { visibility: hidden; pointer-events: none; }
.pager__item--placeholder .pager__link { border-color: transparent; }

/* Ikona BIP w stopce */
.social__link--bip { width: auto; min-width: var(--tap); padding: .3rem .6rem; background: #fff; border-radius: var(--radius-sm); }
.social__link--bip:hover { background: #fff; }
.social__link--bip svg .cls-1 { fill: #c00418; }
.social__link--bip svg { display: block; height: 1.5rem; width: auto; }
.social__link--bip:focus-visible { outline: 3px solid var(--c-sun); outline-offset: 2px; }
@media (forced-colors: active) { .social__link--bip svg .cls-1 { fill: CanvasText; } }
html.hc .social__link--bip { background: #fff; }

/* ---------- Narzędzia dostępności w nagłówku: dwa rzędy po prawej; na małych ekranach – pasek na samej górze ---------- */
.a11y-tools { display: grid; gap: .4rem; justify-items: stretch; align-self: center; }
.a11y-tools__row { display: flex; gap: .4rem; justify-content: flex-end; }
.a11y-tools__row--contrast .a11y-tools__btn { width: 100%; }
.a11y-tools__icon { display: none; flex: none; }
.a11y-tools__btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
@media (max-width: 48em) {
    .site-header__inner { padding-top: .5rem; }
    .a11y-tools { order: -1; width: 100%; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: .35rem; align-self: auto; }
    .a11y-tools__row { display: contents; }
    .a11y-tools__btn { min-width: 2.25rem; min-height: 2.25rem; padding: 0 .4rem; font-size: .85rem; border-width: 1px; }
    .a11y-tools__row--contrast .a11y-tools__btn { width: auto; }
    .a11y-tools__icon { display: block; }
    .a11y-tools__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Odstęp menu od nagłówka; mniejsze przyciski dostępności */
.mainnav-wrap { margin-top: .5rem; }
.a11y-tools__btn { min-width: 2.5rem; min-height: 2.5rem; padding: 0 .55rem; font-size: .9rem; }
@media (max-width: 48em) {
    .a11y-tools__btn { min-width: 2rem; min-height: 2rem; padding: 0 .35rem; font-size: .8rem; }
    .a11y-tools__icon { width: 16px; height: 16px; }

    /* Pasek menu na całą szerokość ekranu, bez zaokrągleń */
    .mainnav-wrap { padding-inline: 0; padding-bottom: 0; }
    .mainnav-toggle, .mainnav { max-width: none; margin-inline: 0; width: 100%; }
    .mainnav-toggle { border-radius: 0; border-inline: 0; }
    .mainnav__list { gap: 0; }
    .mainnav__link, .mainnav__item--has-sub .mainnav__link, .mainnav__sub-toggle, .mainnav__sub, .mainnav__sub-link { border-radius: 0; }
    .mainnav__link { box-shadow: none; border-inline: 0; }
    .mainnav__sub-toggle { border-inline-end: 0; }
    .mainnav__sub { border-inline: 0; margin-top: 0; }
}


/* ---------- Logo w nagłówku i w sekcji banerów ---------- */
.brand__logos { display: flex; align-items: center; flex: none; padding: .4rem .6rem; background: #fff; border-radius: .5rem; }
.brand__logo { display: block; height: clamp(3rem, 7vw, 5rem); width: auto; max-width: 12rem; }
@media (max-width: 36em) { .brand { flex-wrap: wrap; } .brand__logo { max-width: 8rem; } }
.banners__item--logo { display: block; overflow: hidden; background: #fff; border: 1px solid var(--c-border, #d0d7de); border-radius: .5rem; }
.banners__logo-link { display: block; }
.banners__item--logo:has(.banners__logo-link:hover) { box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.banners__logo-link:focus-visible { outline: 3px solid currentColor; outline-offset: -3px; }
.banners__logo { display: block; width: 100%; height: auto; }
html.hc .brand__logos { display: none; }
html.hc .banners__item--logo { background: #000; border-color: #fff; }
.banners__list, .banners__list > li, .banners__links, .banners__links > li { list-style: none; }
