/* ==========================================================================
   WCAG 2.2 - dostepnosc: powiekszanie tekstu, kontrast, nawigacja klawiatura
   ========================================================================== */

/* --- Skip link (2.4.1 Bypass Blocks) --- */
.skip-link {
	position: absolute;
	top: -999px;
	left: 0;
	background: #fff;
	color: #000;
	padding: 12px 20px;
	z-index: 100000;
	font-weight: 700;
	text-decoration: none;
	border: 2px solid #0098db;
}
.skip-link:focus {
	top: 0;
}

/* --- Widoczny focus dla nawigacji klawiaturą (2.4.7 Focus Visible / 2.4.11) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.navbar-toggle:focus-visible {
	outline: 3px solid #ffbf47 !important;
	outline-offset: 2px !important;
	box-shadow: none !important;
}

/* Fallback dla przeglądarek bez :focus-visible */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
	outline: 3px solid #ffbf47;
	outline-offset: 2px;
}

/* --- Panel dostępności (powiększanie / kontrast) ---
   Umieszczony w prawym górnym rogu sekcji "hero", tuż pod stałym
   paskiem menu. Nie jest fixed, więc znika po przewinięciu strony. */
header {
	position: relative;
}
.a11y-toolbar {
	position: absolute;
	top: calc(var(--a11y-nav-height, 51px) + 10px); /* wysokość paska menu (mierzona dynamicznie w JS) + odstęp */
	right: 0;
	z-index: 500;
	display: flex;
	gap: 6px;
	background: #fff;
	padding: 8px 10px;
	border-bottom-left-radius: 6px;
    border-top-left-radius: 6px;
}
.a11y-toolbar button {
	background: #fff;
	color: #2f2f2f;
	border: 1px solid #2f2f2f;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1;
	padding: 6px 10px;
	cursor: pointer;
}
.a11y-toolbar button:hover {
	background: #2f2f2f;
	border-color: #2f2f2f;
    color: #fff;
}
.a11y-toolbar button[aria-pressed="true"] {
	background: #ffbf47;
	color: #000;
	border-color: #ffbf47;
}

/* --- Powiększanie tekstu (1.4.4 Resize text) ---
   Strona używa wyłącznie stałych rozmiarów w px (nie em/rem), dlatego
   zmiana font-size na <html> nie propaguje się w dół. Używamy "zoom",
   które skaluje cały układ (wspierane przez Chrome/Edge/Safari oraz
   Firefox 126+). */
html.a11y-font-1 { zoom: 112.5%; }
html.a11y-font-2 { zoom: 125%; }
html.a11y-font-3 { zoom: 137.5%; }

/* Bootstrap ".container" ma stałą szerokość w px zależną od progu
   ("breakpointu") liczonego względem fizycznej szerokości okna, której
   "zoom" nie zmniejsza - po powiększeniu ta stała szerokość (np. 1170px)
   staje się o kilka % szersza niż realny widoczny obszar. Kontener jest
   jednak wyśrodkowany (margin: auto), więc nadmiar jest symetryczny i nie
   ucina żadnej realnej treści - wystarczy ukryć wynikający z tego poziomy
   pasek przewijania. */
html.a11y-font-1,
html.a11y-font-2,
html.a11y-font-3 {
	overflow-x: hidden;
}

/* Menu poziome ("navbar-fixed-top") jest wyliczane względem fizycznej
   szerokości okna, a nie przeskalowanej przez "zoom" - przy powiększeniu
   przestaje się mieścić i powoduje poziomy scroll / ucinanie linków.
   Dlatego przy dowolnym aktywnym stopniu powiększenia wymuszamy tryb
   mobilny (przycisk-hamburger + rozwijane, pionowe menu), tak jak
   robi to Bootstrap poniżej 768px - niezależnie od realnej szerokości okna. */
html.a11y-font-1 .navbar-fixed-top .container,
html.a11y-font-2 .navbar-fixed-top .container,
html.a11y-font-3 .navbar-fixed-top .container {
	width: 100% !important;
	max-width: 100% !important;
}
html.a11y-font-1 .navbar-header,
html.a11y-font-2 .navbar-header,
html.a11y-font-3 .navbar-header {
	float: none !important;
}
html.a11y-font-1 .navbar-toggle,
html.a11y-font-2 .navbar-toggle,
html.a11y-font-3 .navbar-toggle {
	display: block !important;
}
html.a11y-font-1 .navbar-collapse,
html.a11y-font-2 .navbar-collapse,
html.a11y-font-3 .navbar-collapse {
	width: auto;
	border-top: 1px solid transparent;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
html.a11y-font-1 .navbar-collapse.collapse:not(.in),
html.a11y-font-2 .navbar-collapse.collapse:not(.in),
html.a11y-font-3 .navbar-collapse.collapse:not(.in) {
	display: none !important;
	height: 0 !important;
	overflow: hidden !important;
}
html.a11y-font-1 .navbar-collapse.in,
html.a11y-font-2 .navbar-collapse.in,
html.a11y-font-3 .navbar-collapse.in {
	overflow-y: auto;
	max-height: 340px;
}
html.a11y-font-1 .navbar-nav,
html.a11y-font-2 .navbar-nav,
html.a11y-font-3 .navbar-nav {
	float: none !important;
	margin: 7.5px -15px;
}
html.a11y-font-1 .navbar-nav > li,
html.a11y-font-2 .navbar-nav > li,
html.a11y-font-3 .navbar-nav > li {
	float: none;
}
html.a11y-font-1 .navbar-nav > li > a,
html.a11y-font-2 .navbar-nav > li > a,
html.a11y-font-3 .navbar-nav > li > a {
	padding-top: 10px;
	padding-bottom: 10px;
}

/* --- Wysoki kontrast (1.4.3 / 1.4.6 Contrast) --- */
html.a11y-contrast body,
html.a11y-contrast section,
html.a11y-contrast header,
html.a11y-contrast footer,
html.a11y-contrast div {
	background-color: #000 !important;
	color: #fff !important;
	background-image: none !important;
}
html.a11y-contrast a {
	color: #ffe100 !important;
}
html.a11y-contrast a:visited {
	color: #ffcc66 !important;
}
html.a11y-contrast h1,
html.a11y-contrast h2,
html.a11y-contrast h3,
html.a11y-contrast h4,
html.a11y-contrast h5,
html.a11y-contrast p,
html.a11y-contrast li,
html.a11y-contrast label,
html.a11y-contrast span {
	color: #fff !important;
	text-shadow: none !important;
}
html.a11y-contrast img {
	filter: grayscale(100%) contrast(120%);
	opacity: 0.9;
}
html.a11y-contrast .btn,
html.a11y-contrast button {
	background-color: #000 !important;
	color: #ffe100 !important;
	border: 2px solid #ffe100 !important;
}
html.a11y-contrast .form-control {
	background-color: #000 !important;
	color: #fff !important;
	border: 2px solid #fff !important;
}
html.a11y-contrast .a11y-toolbar {
	background: #000;
	border: 2px solid #ffe100;
}
