/* =========================================================
   Szkoła w Sękowej – style motywu
   ========================================================= */

:root {
	--navy: #23283f;
	--gold: #a36700;
	--gold-light: #f2b544; /* złoty na ciemnym tle (baner, stopka) */
	--red: #8e1915;
	--red-dark: #6f120f;
	--text: #3a3d4a;
	--muted: #6b6f80;
	--bg: #fff;
	--bg-soft: #f6f5f2;
	--border: #e6e4df;
	--radius: 10px;
	--shadow: 0 2px 14px rgba(35, 40, 63, .08);
	--shadow-hover: 0 14px 32px rgba(35, 40, 63, .16);
	--font-head: "Roboto", system-ui, sans-serif;
	--font-body: "Poppins", system-ui, sans-serif;
	--container: 1140px;
	--gutter: 20px;
	--header-h: 76px;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.75;
}
img, svg, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover, a:focus-visible { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 600; color: var(--navy); line-height: 1.25; margin: 1.4em 0 .6em; }
h1:first-child, h2:first-child, h3:first-child { margin-top: 0; }
p { margin: 0 0 1em; }
.icon { display: inline-block; vertical-align: -.15em; flex-shrink: 0; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 10px; top: -60px; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 16px; }
.skip-link:focus { top: 10px; color: #fff; }

/* ---------- Przyciski ---------- */
.button {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 26px;
	background: var(--red); color: #fff;
	font-family: var(--font-body); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
	border: 0; border-radius: 6px; cursor: pointer;
	box-shadow: 0 4px 14px rgba(142, 25, 21, .22);
	transition: background .2s, box-shadow .2s, transform .2s;
}
.button:hover, .button:focus-visible { background: var(--navy); color: #fff; box-shadow: 0 6px 18px rgba(35, 40, 63, .25); transform: translateY(-1px); }
.button .icon { transition: transform .2s; }
.button:hover .icon { transform: translateX(3px); }
.button--light { background: #fff; color: var(--navy); }
.button--light:hover { background: var(--gold); color: #fff; }

/* ---------- Nagłówek ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: #fff;
	transition: box-shadow .2s;
}
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0, 0, 0, .1); }
.site-header__inner { display: flex; align-items: center; justify-content: flex-end; gap: 24px; min-height: var(--header-h); }
.site-logo { margin-right: auto; display: flex; align-items: center; }
.site-logo img { max-height: 56px; width: auto; }
.site-logo--text { gap: 12px; color: var(--navy); line-height: 1.15; }
.site-logo--text:hover { color: var(--navy); }
.site-logo__badge {
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 50%;
	background: var(--red); color: #fff; font-size: 24px;
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(163, 103, 0, .35);
}
.site-logo__name { display: flex; flex-direction: column; font-family: var(--font-head); }
.site-logo__small { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.site-logo__big { font-size: 21px; font-weight: 700; }

.main-nav .menu, .main-nav .sub-menu, .main-nav .children { list-style: none; margin: 0; padding: 0; }
.main-nav .menu { display: flex; align-items: center; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a {
	display: flex; align-items: center; gap: 6px;
	padding: 10px 14px;
	color: var(--navy); font-size: 14px; font-weight: 500;
	transition: color .2s;
}
/* Złota kreska pod aktywną / wskazaną pozycją (tylko pierwszy poziom, na komputerze). */
@media (min-width: 1025px) {
	.main-nav .menu > li > a { position: relative; }
	.main-nav .menu > li > a::before {
		content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
		background: var(--gold); border-radius: 2px;
		transform: scaleX(0); transition: transform .25s;
	}
	.main-nav .menu > li:hover > a::before,
	.main-nav .menu > .current-menu-item > a::before,
	.main-nav .menu > .current-menu-ancestor > a::before,
	.main-nav .menu > .current_page_item > a::before,
	.main-nav .menu > .current_page_ancestor > a::before { transform: scaleX(1); }
}
@media (min-width: 1025px) and (max-width: 1200px) {
	.main-nav a { padding-left: 10px; padding-right: 10px; }
	.main-nav .menu > li > a::before { left: 10px; right: 10px; }
}
.main-nav a:hover, .main-nav a:focus-visible,
.main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a,
.main-nav .current_page_item > a, .main-nav .current_page_ancestor > a,
.main-nav .current-menu-parent > a { color: var(--gold); }

.main-nav .menu-item-has-children > a::after,
.main-nav .page_item_has_children > a::after {
	content: ""; width: 7px; height: 7px; margin-left: 2px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-3px);
}
.submenu-toggle { display: none; }

.main-nav .sub-menu, .main-nav .children {
	position: absolute; top: 100%; left: 0; min-width: 240px;
	background: #fff; box-shadow: 0 14px 30px rgba(35, 40, 63, .14);
	border-top: 3px solid var(--gold); border-radius: 0 0 8px 8px;
	padding: 8px 0;
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.main-nav .sub-menu .sub-menu, .main-nav .children .children { top: -11px; left: 100%; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu,
.main-nav li:hover > .children, .main-nav li:focus-within > .children { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a, .main-nav .children a { padding: 8px 20px; font-size: 13.5px; transition: color .2s, background .2s, padding .2s; }
@media (min-width: 1025px) {
	.main-nav .sub-menu a:hover, .main-nav .children a:hover { background: var(--bg-soft); padding-left: 24px; }
}

.nav-toggle {
	display: none;
	background: none; border: 0; padding: 8px; cursor: pointer;
	color: var(--navy); font-size: 30px; line-height: 1;
}
.nav-toggle__close { display: none; }

@media (max-width: 1024px) {
	.nav-toggle { display: block; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }
	.main-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		background: #fff; box-shadow: 0 12px 20px rgba(0, 0, 0, .12);
		max-height: calc(100vh - var(--header-h)); overflow-y: auto;
		display: none;
	}
	.main-nav.is-open { display: block; }
	.main-nav .menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 16px; }
	.main-nav li { border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; }
	.main-nav li > a { flex: 1; padding: 13px var(--gutter); font-size: 15px; }
	.main-nav .menu-item-has-children > a::after, .main-nav .page_item_has_children > a::after { display: none; }
	.submenu-toggle {
		display: flex; align-items: center; justify-content: center;
		width: 52px; background: none; border: 0; border-left: 1px solid var(--border);
		color: var(--navy); font-size: 24px; cursor: pointer;
	}
	.submenu-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
	.main-nav .sub-menu, .main-nav .children {
		position: static; width: 100%; min-width: 0; display: none;
		opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border-top: 0; padding: 0; background: var(--bg-soft);
	}
	.main-nav .sub-menu.is-open, .main-nav .children.is-open { display: block; }
	.main-nav .sub-menu li:last-child, .main-nav .children li:last-child { border-bottom: 0; }
	.main-nav .sub-menu a, .main-nav .children a { padding-left: calc(var(--gutter) + 16px); }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* ---------- Baner główny ---------- */
.hero {
	position: relative;
	display: flex; align-items: center;
	min-height: clamp(380px, 72vh, 660px);
	background: var(--navy) center / cover no-repeat;
	color: #fff;
}
.hero::before {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(90deg, rgba(20, 23, 38, .72) 0%, rgba(20, 23, 38, .35) 50%, rgba(20, 23, 38, 0) 100%),
		linear-gradient(0deg, rgba(20, 23, 38, .35) 0%, rgba(20, 23, 38, 0) 35%);
}
.hero__inner { position: relative; padding-top: 60px; padding-bottom: 60px; }
.hero__title { margin: 0; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.hero__kicker { display: block; color: var(--gold-light); font-size: clamp(22px, 3.2vw, 38px); font-weight: 600; }
.hero__main::after {
	content: ""; display: block; width: 70px; height: 4px; margin-top: 22px;
	background: var(--gold-light); border-radius: 2px;
}
.hero__main { display: block; font-size: clamp(42px, 6.5vw, 70px); line-height: 1.05; }
.hero__text { max-width: 560px; margin: 20px 0 0; font-size: 17px; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.hero .button { margin-top: 28px; }

/* ---------- Baner podstron ---------- */
.page-banner {
	position: relative;
	display: flex; align-items: flex-end;
	min-height: clamp(230px, 24vw, 340px);
	background: var(--navy) center / cover no-repeat;
	color: #fff;
}
.page-banner::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(20, 23, 38, .2) 0%, rgba(20, 23, 38, .35) 45%, rgba(20, 23, 38, .85) 100%);
}
.page-banner--empty { min-height: 200px; background-image: radial-gradient(circle at 90% 0, rgba(242, 181, 68, .18), rgba(242, 181, 68, 0) 50%); }
.page-banner__inner { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 34px; }
.page-banner__title {
	margin: 0; max-width: 900px; color: #fff;
	font-size: clamp(26px, 3.6vw, 42px); text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
	animation: szs-fade-up .7s ease both;
}
.page-banner__title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 16px; background: var(--gold-light); border-radius: 2px; }
.page-banner__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.page-banner__meta > span { display: inline-flex; align-items: center; gap: 7px; }
.page-banner__meta .icon { color: var(--gold-light); }

.breadcrumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, .75); }
.breadcrumbs li + li::before { content: "›"; color: var(--gold-light); margin-right: 2px; }
.breadcrumbs a { color: rgba(255, 255, 255, .9); }
.breadcrumbs a:hover { color: var(--gold-light); }
.breadcrumbs [aria-current] { color: rgba(255, 255, 255, .7); }

/* ---------- Sekcje strony głównej ---------- */
.home-section { padding: 80px 0; }
.home-section--przedszkole { background: var(--bg-soft); }
.home .site-footer { margin-top: 0; }

/* Nagłówek sekcji: mały napis + tytuł, po prawej link „zobacz wszystkie”. */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 30px; flex-wrap: wrap; margin-bottom: 38px; }
.section-head .section-title { margin: 0; }
.section-kicker {
	margin: 0 0 6px; color: var(--gold);
	font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.6px;
}
.section-link {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 0;
	color: var(--navy); font-size: 14px; font-weight: 600;
	border-bottom: 2px solid var(--gold);
}
.section-link .icon { color: var(--gold); transition: transform .2s; }
.section-link:hover { color: var(--red); }
.section-link:hover .icon { transform: translateX(4px); }
.section-title, .page-title {
	font-size: clamp(26px, 3vw, 34px);
	margin: 0 0 40px;
}
.section-title::after, .page-title::after {
	content: ""; display: block;
	width: 56px; height: 3px; margin-top: 16px;
	background: var(--gold); border-radius: 2px;
}

/* ---------- Na skróty (kafelki pod banerem) ---------- */
.hero--with-shortcuts .hero__inner { padding-bottom: 120px; }
.shortcuts { position: relative; z-index: 2; margin-top: -70px; }
.shortcuts__list {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.shortcuts__list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shortcuts__list--5, .shortcuts__list--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shortcuts__item {
	display: flex; align-items: center; gap: 16px; height: 100%;
	padding: 24px 22px; background: #fff; border-radius: 12px;
	box-shadow: 0 12px 34px rgba(35, 40, 63, .14);
	color: var(--navy); line-height: 1.35;
	border-bottom: 3px solid transparent;
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.shortcuts__item:hover, .shortcuts__item:focus-visible { color: var(--navy); transform: translateY(-5px); box-shadow: 0 18px 40px rgba(35, 40, 63, .2); border-color: var(--gold); }
.shortcuts__icon {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 54px; height: 54px; border-radius: 50%;
	background: #fbf1f0; color: var(--red); font-size: 26px;
	transition: background .25s, color .25s;
}
.shortcuts__item:hover .shortcuts__icon { background: var(--red); color: #fff; }
.shortcuts__text { display: flex; flex-direction: column; gap: 3px; }
.shortcuts__text strong { font-family: var(--font-head); font-size: 17px; font-weight: 600; }
.shortcuts__text span { color: var(--muted); font-size: 13px; }
@media (max-width: 1024px) {
	.shortcuts__list, .shortcuts__list--3, .shortcuts__list--5, .shortcuts__list--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 560px) {
	.hero { min-height: 440px; }
	.hero--with-shortcuts .hero__inner { padding-bottom: 90px; }
	.shortcuts { margin-top: -50px; }
	.shortcuts__item { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
	.shortcuts__icon { width: 44px; height: 44px; font-size: 22px; }
	.shortcuts__text strong { font-size: 15px; }
	.shortcuts__text span { font-size: 12px; }
}

/* ---------- Kafelki ---------- */
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}
.card-grid--single { grid-template-columns: minmax(0, 360px); justify-content: center; }
.card {
	display: flex; flex-direction: column;
	background: #fff; box-shadow: var(--shadow);
	border-radius: var(--radius); overflow: hidden;
	transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__image img { transform: scale(1.05); }
.card__placeholder {
	display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
	background: linear-gradient(135deg, #2c3250 0%, var(--navy) 100%); color: rgba(255, 255, 255, .35); font-size: 54px;
}
.card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 24px 22px; }
.card__date { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.card__title { font-size: 18.5px; margin: 0 0 18px; }
.card__title a { color: var(--red); }
.card__title a:hover { color: var(--gold); }
.card__more {
	display: inline-flex; align-self: flex-start; margin-top: auto;
	color: var(--red); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
	transition: color .2s, transform .2s;
}
.card:hover .card__more { color: var(--gold); transform: translateX(3px); }
.card-grid--single { grid-template-columns: minmax(0, 320px); }
.card-grid--single .card__image { aspect-ratio: 1; }
.card-grid--single .card__image img { object-fit: contain; background: #fff; }

/* Wyróżniony (najnowszy) wpis: duży kafelek na 2 kolumny i 2 wiersze. */
.card--featured { grid-column: span 2; grid-row: span 2; }
.card--featured .card__image { position: relative; aspect-ratio: auto; flex: 1 1 auto; min-height: 300px; }
.card--featured .card__image img, .card--featured .card__placeholder { position: absolute; inset: 0; }
.card--featured .card__body { flex: 0 0 auto; padding: 26px 32px 28px; }
.card--featured .card__title { font-size: clamp(21px, 2.2vw, 26px); margin-bottom: 12px; }
.card__excerpt { color: var(--muted); font-size: 15px; margin: 0 0 18px; }

@media (max-width: 900px) {
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
	.card--featured { grid-row: auto; }
	.card--featured .card__image { aspect-ratio: 16 / 9; min-height: 0; }
}
@media (max-width: 560px) {
	.card-grid { grid-template-columns: minmax(0, 1fr); }
	.card--featured { grid-column: auto; }
	.card--featured .card__body { padding: 20px 24px 22px; }
}

/* ---------- Logotypy ---------- */
.home-section.home-section--partners { padding: 56px 0 70px; background: var(--bg-soft); }
.partners__title {
	display: flex; align-items: center; gap: 18px; margin: 0 0 28px;
	color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.6px;
}
.partners__title::before, .partners__title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.partners {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; align-items: stretch;
}
.partners li > a, .partners li > span {
	display: flex; align-items: center; justify-content: center; height: 110px; padding: 14px;
	background: #fff; border-radius: 10px; border: 1px solid var(--border);
	transition: box-shadow .25s, transform .25s, border-color .25s;
}
.partners li > a:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: transparent; }
.partners img { max-height: 76px; width: auto; object-fit: contain; }

/* ---------- Jadłospis na stronie głównej ---------- */
.menu-box {
	display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
	border-radius: 16px; overflow: hidden; color: #fff;
	background: radial-gradient(circle at 100% 0, rgba(242, 181, 68, .2), rgba(242, 181, 68, 0) 55%), var(--navy);
	box-shadow: 0 20px 50px rgba(35, 40, 63, .22);
}
.menu-box__image { display: block; background: #fff; }
.menu-box__image img { display: block; width: 100%; height: 100%; max-height: 360px; object-fit: contain; padding: 18px; transition: transform .5s; }
.menu-box:hover .menu-box__image img { transform: scale(1.04); }
.menu-box__body { display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; }
.menu-box .section-kicker { color: var(--gold-light); }
.menu-box .section-title { color: #fff; margin-bottom: 22px; }
.menu-box .section-title::after { background: var(--gold-light); }
.menu-box__dates { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; font-size: 19px; font-weight: 500; }
.menu-box__dates .icon { color: var(--gold-light); }
.menu-box__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.menu-box__all { color: rgba(255, 255, 255, .85); font-size: 14px; font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.menu-box__all:hover { color: var(--gold-light); border-color: var(--gold-light); }
.button--gold { background: var(--gold-light); color: var(--navy); box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.button--gold:hover, .button--gold:focus-visible { background: #fff; color: var(--navy); }
@media (max-width: 760px) {
	.menu-box { grid-template-columns: minmax(0, 1fr); }
	.menu-box__image img { max-height: 220px; }
	.menu-box__body { padding: 32px 26px 36px; }
	.menu-box__dates { font-size: 16px; }
}

/* ---------- Pojawianie się elementów przy przewijaniu (włącza main.js) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
.hero__title, .hero__text, .hero .button { animation: szs-fade-up .9s ease both; }
.hero__text { animation-delay: .15s; }
.hero .button { animation-delay: .3s; }
@keyframes szs-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .partners { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .partners { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .partners li > a, .partners li > span { height: 90px; } }

/* ---------- Treść podstron ---------- */
.content-area { padding-top: 55px; padding-bottom: 80px; }
.section-block { margin-bottom: 40px; }
.block-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 18px; }
.block-title__count {
	display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 8px;
	border-radius: 12px; background: var(--bg-soft); color: var(--muted); font-family: var(--font-body); font-size: 12px; font-weight: 600;
}

/* ---------- Pojedynczy wpis ---------- */
/* Tekst w wygodnej kolumnie; galeria, PDF i nawigacja na pełnej szerokości. */
.entry .entry-content { max-width: 820px; margin-left: auto; margin-right: auto; font-size: 16.5px; }
.entry > .share, .entry > .post-nav, .entry > .section-block:not(.gallery-block) { max-width: 820px; margin-left: auto; margin-right: auto; }
.entry .entry-content + .section-block { margin-top: 44px; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(142, 25, 21, .35); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; }
.entry-content li { margin-bottom: .35em; }
.entry-content li::marker { color: var(--gold); }
.entry-content hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

.photo-grid__item.is-extra { display: none; }
.gallery-more { margin: 22px 0 0; text-align: center; }
.button--outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.button--outline:hover, .button--outline:focus-visible { background: var(--navy); color: #fff; box-shadow: inset 0 0 0 2px var(--navy); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); }
.share__label { color: var(--muted); font-size: 14px; margin-right: 4px; }
.share__btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
	border: 1px solid var(--border); border-radius: 30px; background: #fff;
	color: var(--navy); font: 500 13.5px var(--font-body); cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.share__btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.share__btn--fb .icon { color: #1877f2; }
.share__btn--fb:hover { background: #1877f2; border-color: #1877f2; }
.share__btn--fb:hover .icon { color: #fff; }
.share__btn.is-done { background: #e8f4ea; border-color: #9bcfa5; color: #1d6b2c; }

.related { background: var(--bg-soft); padding: 70px 0 80px; }
.single:not(.single-jadlospis) .site-footer { margin-top: 0; }

/* ---------- Lista wpisów: filtry i wyszukiwarka ---------- */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.year-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.year-filter__item {
	padding: 8px 16px; border-radius: 30px; border: 1px solid var(--border); background: #fff;
	color: var(--navy); font-size: 14px; font-weight: 500; transition: background .2s, color .2s, border-color .2s;
}
.year-filter__item:hover { border-color: var(--gold); color: var(--navy); }
.year-filter__item.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.list-search {
	display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 4px 4px 4px 14px;
	border: 1px solid var(--border); border-radius: 30px; background: #fff; color: var(--muted);
	transition: border-color .2s, box-shadow .2s;
}
.list-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(163, 103, 0, .12); }
.list-search input { border: 0; outline: none; background: transparent; font: inherit; font-size: 14px; padding: 6px 0; width: 220px; color: var(--text); }
.list-search__submit {
	border: 0; border-radius: 30px; padding: 8px 18px; cursor: pointer;
	background: var(--red); color: #fff; font: 600 13px var(--font-body); transition: background .2s;
}
.list-search__submit:hover { background: var(--navy); }
.list-summary { margin: -14px 0 28px; color: var(--muted); font-size: 14px; }
.empty-state { padding: 50px 20px; text-align: center; background: var(--bg-soft); border-radius: var(--radius); }
.empty-state__icon { display: inline-flex; width: 60px; height: 60px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--gold); font-size: 28px; margin-bottom: 10px; }
@media (max-width: 700px) {
	.list-search { margin-left: 0; width: 100%; }
	.list-search input { width: auto; flex: 1; min-width: 0; }
}

.entry-content { overflow-wrap: break-word; }
/* Tekst wyjustowany; dzielenie wyrazów (lang="pl") zapobiega dużym odstępom w wąskich kolumnach. */
.entry-content p, .entry-content li, .entry-content blockquote, .notice-box p {
	text-align: justify;
	-webkit-hyphens: auto; hyphens: auto;
}
.card__excerpt { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.entry-content .has-text-align-center, .entry-content .aligncenter { text-align: center; }
.entry-content .has-text-align-right { text-align: right; }
.entry-content .has-text-align-left { text-align: left; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); font-style: italic; }
.entry-content iframe { width: 100%; }
.entry-content .alignleft { float: left; margin: 0 20px 10px 0; }
.entry-content .alignright { float: right; margin: 0 0 10px 20px; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); }

/* Stara treść (np. pozostałości po Elementorze) – czytelnie i bez rozjeżdżania. */
.entry-content--legacy img { display: inline-block; }
.entry-content--legacy [class*="elementor"] { max-width: 100%; }
.entry-content--legacy .elementor-widget-spacer { display: none; }

.notice-box {
	padding: 18px 22px;
	border-left: 4px solid var(--red); border-radius: 0 8px 8px 0;
	background: #fbf1f0; color: var(--red); font-weight: 500;
}
.notice-box > *:last-child { margin-bottom: 0; }

/* Galeria */
.photo-grid, .gallery {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.photo-grid__item, .gallery .gallery-item a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); border-radius: 6px; }
.photo-grid__item img, .gallery .gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; }
.photo-grid__item:hover img, .gallery .gallery-item a:hover img { transform: scale(1.05); opacity: .9; }
.gallery { margin-bottom: 1.5em; }
.gallery-columns-1 { grid-template-columns: minmax(0, 1fr); }
.gallery-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery .gallery-item { margin: 0; width: auto !important; }
.gallery .gallery-caption { display: none; }
.gallery br { display: none; }
@media (max-width: 900px) { .photo-grid, .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .photo-grid, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pliki i linki */
.file-list, .link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.file-list a {
	display: flex; align-items: center; gap: 14px;
	padding: 14px 18px; background: var(--bg-soft); color: var(--navy);
	border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
	transition: background .2s, box-shadow .2s;
}
.file-list a:hover { background: #fff; box-shadow: var(--shadow); color: var(--red); }
.file-list__icon { color: var(--red); font-size: 24px; display: flex; }
.file-list__name { flex: 1; font-weight: 500; }
.file-list__meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.link-list a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--navy); }
.link-list a .icon { color: var(--gold); }
.link-list a:hover { color: var(--red); }

/* PDF */
.pdf-block__frame { display: block; width: 100%; height: min(85vh, 1000px); border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); margin-bottom: 16px; }
@media (max-width: 700px) { .pdf-block__frame { height: 60vh; } }

/* Tabela osób */
.people { display: grid; grid-template-columns: 1fr auto; gap: 0 20px; align-items: end; }
.people__title { margin: 0; text-align: left; }
.people .table-wrap { grid-column: 1 / -1; margin-top: 16px; }
.people__search {
	grid-column: 2; display: flex; align-items: center; gap: 8px;
	border: 1px solid var(--border); border-radius: 6px; padding: 0 12px; color: var(--muted);
}
.people__search input { border: 0; padding: 10px 0; font: inherit; outline: none; min-width: 200px; background: transparent; }
.people__search:focus-within { border-color: var(--gold); }
.people__table { width: 100%; border-collapse: collapse; font-size: 14px; }
@media (min-width: 701px) {
	.people .table-wrap { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
	.people__table tbody tr { transition: background .15s; }
	.people__table tbody tr:hover { background: #efece5; }
}
.people__table th { background: var(--navy); color: #fff; text-align: left; padding: 12px 14px; font-weight: 500; }
.people__table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.people__table tbody tr:nth-child(even) { background: var(--bg-soft); }
.people__table tr[hidden] { display: none; }
@media (max-width: 700px) {
	.people { grid-template-columns: 1fr; }
	.people__search { grid-column: 1; margin-top: 12px; }
	.people__search input { min-width: 0; width: 100%; }
	.people__table thead { display: none; }
	.people__table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
	.people__table td { display: block; border: 0; padding: 2px 12px; }
	.people__table td:first-child { font-weight: 600; color: var(--navy); }
}

/* Nawigacja wpisów i stronicowanie */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.post-nav__link {
	display: flex; align-items: center; gap: 16px; padding: 14px;
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--navy);
	transition: box-shadow .25s, border-color .25s, transform .25s;
}
.post-nav__link:hover { color: var(--navy); border-color: transparent; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.post-nav__link--next { flex-direction: row-reverse; text-align: right; }
.post-nav__thumb { flex-shrink: 0; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.post-nav__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-nav__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post-nav__label { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.post-nav__link--next .post-nav__label { justify-content: flex-end; }
.post-nav__title { font-family: var(--font-head); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-nav__link:hover .post-nav__title { color: var(--red); }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav > span:empty { display: none; } }

.pagination { margin-top: 50px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 42px; height: 42px; padding: 0 10px;
	border: 1px solid var(--border); border-radius: 6px; color: var(--navy); font-weight: 500;
	transition: background .2s, border-color .2s, color .2s;
}
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .88); margin-top: 40px; border-top: 4px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.1fr; gap: 40px; padding-top: 70px; padding-bottom: 50px; }
.footer-grid--no-links { grid-template-columns: 1.1fr 1fr; gap: 60px; }
.footer-title { color: #fff; font-family: var(--font-body); font-size: 16px; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 22px; }
.footer-title::after { content: ""; display: block; width: 40px; height: 2px; margin-top: 12px; background: var(--gold-light); border-radius: 2px; }
.contact-list, .footer-links { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.contact-list li { margin-bottom: 12px; }
.contact-list__icon {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 30px; height: 30px; border-radius: 50%;
	background: rgba(255, 255, 255, .08); color: var(--gold-light); font-size: 15px;
}
.contact-list a, .contact-list span, .footer-links a { color: inherit; }
.contact-list strong { color: #fff; }
.contact-list a, .contact-list li > span:last-child { padding-top: 3px; }
.contact-list a:hover, .contact-list a:hover strong, .footer-links a:hover { color: var(--gold-light); }
.footer-links li { margin-bottom: 6px; }
.footer-links .icon { color: var(--gold-light); }
.footer-map iframe { display: block; width: 100%; height: 240px; border: 0; border-radius: 10px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0; text-align: center; font-size: 13px; }
.footer-bottom p { margin: 0 0 4px; }
.footer-bottom { color: rgba(255, 255, 255, .6); }
.footer-bottom a { color: var(--gold-light); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-map { grid-column: 1 / -1; } .footer-grid--no-links .footer-map { grid-column: auto; } }
@media (max-width: 700px) { .footer-grid, .footer-grid--no-links { grid-template-columns: 1fr; gap: 36px; padding-top: 50px; } .footer-grid--no-links .footer-map { grid-column: 1 / -1; } }

/* Przycisk „do góry” */
.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90;
	width: 44px; height: 44px; border-radius: 50%; border: 0;
	background: var(--red); color: #fff; font-size: 24px; cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .2s, visibility .2s, background .2s, transform .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold); }

/* ---------- Podgląd zdjęć ---------- */
.lightbox {
	position: fixed; inset: 0; z-index: 100000; /* nad paskiem admina */
	background: rgba(10, 12, 20, .92);
	display: flex; align-items: center; justify-content: center;
	padding: 60px 70px;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox__caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; padding: 0 20px; }
.lightbox__counter { position: absolute; top: 20px; left: 24px; color: rgba(255, 255, 255, .7); font-size: 14px; }
.lightbox button {
	position: absolute; background: rgba(255, 255, 255, .1); border: 0; color: #fff;
	width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 12px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 60px 10px; } .lightbox__prev, .lightbox__next { top: auto; bottom: 10px; transform: none; } }

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