/* Dostępność: fokus, kontrast i cele dotykowe. Skala tekstu: typography.css. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width:900px) {
 .navigation > a, .nav-trigger, .dropdown a { min-height:44px; display:flex; align-items:center; }
 .pager a, .pager span { min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
 .footer-grid > div > a:not(.brand) { padding-block:6px; }
 .slide-counter { white-space:nowrap; }
 .post-row { gap:14px; padding-inline:16px; }
 .post-row .notice-date { width:auto; min-width:74px; padding-right:14px; }
 .post-row .notice-date small { letter-spacing:.4px; }
}
@media(max-width:600px) { .slider { height:auto; min-height:550px; } }

/*
 * Fokus i reflow (WCAG 2.4.7, 1.4.10).
 * Kolor obrysu fokusa: zmienna --focus (style.css, :root = --gold; jasna w ciemnych sekcjach).
 */
/* pola wyszukiwania mają outline:0 — obrys rysujemy na całym polu z przyciskiem */
.search-mini:focus-within, .nav-search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
/* 320 px: „Wszystkie aktualności” nie mieści się obok nagłówka — przenosimy pod spód */
@media (max-width: 420px) {
	.section-heading { flex-wrap: wrap; }
	.section-heading .text-link { white-space: normal; }
}
/* cel dotykowy ≥ 24 px (WCAG 2.5.8) dla linków pod intencjami */
.intentions-all { min-height: 24px; }

/*
 * Przełącznik „Wysoki kontrast” (WCAG 1.4.3, 1.4.11 — technika G174).
 * Domyślny widok = zatwierdzony projekt; wersja wysokokontrastowa po kliknięciu przycisku
 * w nagłówku (partials/header.php) albo automatycznie przy prefers-contrast: more.
 * Atrybut html[data-contrast] ustawia skrypt w <head> (layout.php) przed renderem; bez JS
 * atrybutu nie ma i przycisk jest ukryty (nie działałby).
 */
.contrast-bar { display: contents; }
.contrast-toggle { display: none; }
html[data-contrast] .contrast-toggle {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
	width: 40px; min-height: 40px; padding: 8px; border: 1px solid var(--muted); border-radius: 5px;
	background: transparent; color: var(--brown);  font-weight: 600; white-space: nowrap;
}
.contrast-toggle .icon { width: 19px; height: 19px; }
.contrast-toggle:hover { background: #efebe2; }
html[data-contrast="high"] .contrast-toggle { background: var(--brown); border-color: var(--brown); color: var(--white); }
.header-links { margin-left: auto; }
@media (max-width: 900px) {
	/* tablet/telefon: obok nazwy parafii brak miejsca — przycisk w wąskim pasku nad nagłówkiem
	   (wysokość nagłówka + 38 px; układ samego nagłówka bez zmian) */
	html[data-contrast] .masthead { position: relative; height: auto; min-height: 133px; padding-top: 44px; padding-bottom: 16px; }
	html[data-contrast] .contrast-bar { display: block; position: absolute; top: 6px; right: 0; }
	html[data-contrast] .contrast-toggle { width: 36px; min-height: 36px; padding: 8px;  gap: 7px; }
	.contrast-toggle .icon { width: 17px; height: 17px; }
}
@media (max-width: 600px) {
	html[data-contrast] .masthead { height: auto; min-height: 140px; }
}

html[data-contrast="high"] {
	--text: #3e352e;      /* 10.6:1 na tle strony */
	--muted: #4a3f35;     /*  9.0:1 na tle strony, 7.8:1 w stopce */
	--gold: #5c4626;      /*  7.9:1 na tle strony, 6.8:1 w stopce */
	--hc-footer: #4a3f35;
	--hc-on-dark: #fffaf0;
	--hc-on-dark-soft: #f3ecdf;
}
html[data-contrast="high"] ::placeholder { color: var(--muted); opacity: 1; }
html[data-contrast="high"] .prose { color: var(--text); }
html[data-contrast="high"] .prose a { color: var(--gold); text-decoration-color: currentColor; }
html[data-contrast="high"] .office > p { color: var(--muted); }
/* pola i przyciski — obramowanie ≥ 3:1 (1.4.11) */
html[data-contrast="high"] .search-mini, html[data-contrast="high"] .search-form input,
html[data-contrast="high"] .mobile-menu { border-color: var(--muted); }
@media (max-width: 900px) { html[data-contrast="high"] .nav-search { border-color: var(--muted); } }
/* stopka */
html[data-contrast="high"] .footer-grid p, html[data-contrast="high"] .footer-grid > div > a:not(.brand),
html[data-contrast="high"] .footer-grid small, html[data-contrast="high"] .footer-bottom { color: var(--hc-footer); }
/* karta Mszy — ciemniejsza oliwka, jasne podpisy (7.4:1) */
html[data-contrast="high"] .mass-card { background: #4f4f3a; border-color: #4f4f3a; }
html[data-contrast="high"] .mass-card .small-label, html[data-contrast="high"] .mass-line > span,
html[data-contrast="high"] .weekdays > span { color: var(--hc-on-dark-soft); }
/* tekst na zdjęciach — mocne przyciemnienie, kontrast nie zależy od zdjęcia */
html[data-contrast="high"] .slide-shade { background: linear-gradient(90deg, #1d1712f2 0%, #1d1712e6 55%, #1d1712cc 100%); }
html[data-contrast="high"] .slide-content p, html[data-contrast="high"] .slider-caption,
html[data-contrast="high"] .slide-counter, html[data-contrast="high"] .slide-counter > span,
html[data-contrast="high"] .eyebrow.light { color: var(--hc-on-dark-soft); }
html[data-contrast="high"] .slider-controls button { background: #1d1712cc; border-color: var(--hc-on-dark); }
html[data-contrast="high"] .slider-controls .pause-button { background: transparent; border-color: transparent; }
/* pełne przyciemnienie pod tekstem, przejście tylko w górnym marginesie bloku */
html[data-contrast="high"] .photo-tile-copy { background: linear-gradient(0deg, #1d1712f2 calc(100% - 30px), #1d171200 100%); }
html[data-contrast="high"] .photo-tile-copy small { opacity: 1; color: var(--hc-on-dark-soft); }
html[data-contrast="high"] .lb-count { opacity: 1; }
html[data-contrast="high"] .image-label, html[data-contrast="high"] .about-image > a { background: var(--white); }

/* Pasek podglądu motywów (partials/theme-switcher.php) — neutralne kolory, niezależne od motywu */
.theme-switcher{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;padding:7px 24px;background:#f1f0ec;border-bottom:1px solid #d6d3cb;color:#2b2b2b;font-family:'DM Sans',Arial,sans-serif;font-weight:400;line-height:1.3;position:relative;z-index:60}
.theme-switcher ul{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.theme-switcher-label{font-weight:600}
.theme-switcher a{display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border:1px solid #c9c5bb;border-radius:5px;color:#2b2b2b;background:#fff}
.theme-switcher a:hover{border-color:#2b2b2b}
.theme-switcher a[aria-current]{background:#2b2b2b;border-color:#2b2b2b;color:#fff}
.theme-switcher a:focus-visible{outline:3px solid #2b2b2b;outline-offset:2px}
.theme-switcher .theme-switcher-reset{margin-left:auto;border-color:transparent;background:transparent;text-decoration:underline}
@media(max-width:600px){.theme-switcher{padding:6px 12px;}.theme-switcher-label{width:100%}.theme-switcher .theme-switcher-reset{margin-left:0}}

/* pasek zgód na cookies — wysoki kontrast: wyraźna ramka (1.4.11) i ciemniejsze opisy */
html[data-contrast="high"] .consent-box { border: 2px solid var(--brown); }
html[data-contrast="high"] .consent-option small { color: var(--text); }

.masthead{flex-wrap:wrap}
.navigation{flex-wrap:wrap}
