/*
Theme Name: SZPO Hodonín
Theme URI: https://www.szpo.cz
Description: Šablona webu Spolku zdravotně postižených občanů, Spolkový výbor Hodonín. Velké a dobře čitelné písmo (Atkinson Hyperlegible), vysoký kontrast, přepínač velikosti písma, jednoduché menu, přehledné karty pobytů a prohlížeč fotek. Podřazená šablona Twenty Twenty-Five.
Author: Ing. Michal Svátek
Template: twentytwentyfive
Version: 1.0.1
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: szpo
*/

/* ===================================================================
 * Velikost písma celé stránky (přepínač A / A+ / A++, inc/pismo.php)
 * Vše v šabloně je v rem – zvětší se text, nadpisy, tlačítka i mezery.
 * =================================================================== */
html { font-size: 100%; }
html.szpo-pismo-2 { font-size: 125%; }
html.szpo-pismo-3 { font-size: 150%; }

body {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	overflow-wrap: break-word;
	hyphens: manual;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Zvýraznění při ovládání klávesnicí: tmavý obrys + žlutý lem – viditelné na světlém i tmavém pozadí. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #ffd23f;
	border-radius: 0.25rem;
}

a {
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 0.14em; }

strong, b { font-weight: 700; }

/* ===================================================================
 * Hlavička
 * =================================================================== */
.szpo-preskocit {
	position: absolute;
	left: 0.5rem;
	top: -10rem;
	z-index: 1000;
	padding: 0.75rem 1.25rem;
	background: #ffd23f;
	color: #1a1a1a;
	font-weight: 700;
	border-radius: 0.5rem;
}
.szpo-preskocit:focus { top: 0.5rem; }

.szpo-hlavicka {
	background: #fff;
	border-bottom: 0;
}
.szpo-hlavicka__in {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0.85rem 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
}

.szpo-logo {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	color: #1a1a1a;
	text-decoration: none;
	min-width: 0;
}
.szpo-logo:hover { text-decoration: none; }
.szpo-logo:hover strong { text-decoration: underline; }
.szpo-logo__znak {
	width: 3.6rem;
	height: 3.6rem;
	flex: none;
}
.szpo-logo__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.szpo-logo__text strong {
	font-size: 1.6rem;
	color: #0a4f5c;
	letter-spacing: 0.01em;
}
.szpo-logo__text span {
	font-size: 1rem;
	color: #3d3d3d;
}

/* Přepínač velikosti písma */
.szpo-pismo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}
.szpo-pismo__popis {
	font-size: 1rem;
	font-weight: 700;
	color: #1a1a1a;
}
.szpo-pismo__tlacitka {
	display: inline-flex;
	gap: 0.4rem;
}
.szpo-pismo__btn {
	min-width: 3rem;
	height: 3rem;
	padding: 0 0.5rem;
	border: 2px solid #0a4f5c;
	border-radius: 0.5rem;
	background: #fff;
	color: #0a4f5c;
	font-family: inherit;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.szpo-pismo__btn--1 { font-size: 1.05rem; }
.szpo-pismo__btn--2 { font-size: 1.3rem; }
.szpo-pismo__btn--3 { font-size: 1.55rem; }
.szpo-pismo__btn:hover { background: #e7f1f2; }
.szpo-pismo__btn[aria-pressed="true"] {
	background: #0a4f5c;
	color: #fff;
}

/* Hlavní menu: tři položky, vždy viditelné (bez ☰) */
.szpo-menu {
	background: #0a4f5c;
}
.szpo-menu__in {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1rem;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}
.szpo-menu__in li {
	flex: 0 1 auto;
	margin: 0;
}
.szpo-menu__in a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.5rem;
	padding: 0.6rem 1.3rem;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	line-height: 1.2;
	border-bottom: 0.35rem solid transparent;
}
.szpo-menu__in a:hover {
	background: #063a44;
	text-decoration: underline;
}
.szpo-menu__in a[aria-current="page"] {
	background: #fff;
	color: #0a4f5c;
	border-bottom-color: #ffd23f;
}
.szpo-menu__in a:focus-visible {
	outline-offset: -5px;
	box-shadow: inset 0 0 0 6px #ffd23f;
}

@media (max-width: 40rem) {
	.szpo-hlavicka__in { padding: 0.75rem 1rem; }
	.szpo-logo__znak { width: 3rem; height: 3rem; }
	.szpo-logo__text strong { font-size: 1.35rem; }
	.szpo-logo__text span { font-size: 0.95rem; }
	/* Na telefonu stejně široké položky přes celou šířku: při běžném písmu tři vedle sebe
	   (delší název se zalomí mezi slovy), při největším písmu se samy přeskládají pod sebe. */
	.szpo-menu__in {
		padding: 0;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(6.2rem, 1fr));
	}
	.szpo-menu__in li + li a { border-left: 1px solid rgba(255, 255, 255, 0.35); }
	.szpo-menu__in a {
		height: 100%;
		box-sizing: border-box;
		padding: 0.5rem 0.4rem;
		font-size: 1.05rem;
		overflow-wrap: normal;
		border-top: 1px solid rgba(255, 255, 255, 0.35);
	}
}

/* ===================================================================
 * Obsah
 * =================================================================== */
.szpo-main {
	padding: 1.5rem 1rem 4rem;
}
.szpo-main > * { box-sizing: border-box; }

.szpo-nadpis-stranky {
	margin-top: 0.5rem;
	margin-bottom: 1.5rem;
	font-size: 2.4rem;
	color: #1a1a1a;
}
@media (max-width: 40rem) {
	.szpo-nadpis-stranky { font-size: 2rem; }
}

.szpo-obsah h2 { margin-top: 2.5rem; }
.szpo-obsah h3 { margin-top: 2rem; }
.szpo-obsah p,
.szpo-obsah li { max-width: 44rem; }
.szpo-obsah ul,
.szpo-obsah ol { padding-left: 1.6rem; }
.szpo-obsah li + li { margin-top: 0.4rem; }

/* Kde jste (drobečková navigace) */
.szpo-drobecky {
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}
.szpo-drobecky ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0;
}
.szpo-drobecky li { margin: 0; }
.szpo-drobecky li + li::before {
	content: "›";
	margin: 0 0.55rem;
	color: #3d3d3d;
	font-weight: 700;
}
.szpo-drobecky [aria-current] { color: #3d3d3d; }

/* Tlačítka */
.wp-block-button__link,
.szpo-tlacitko {
	min-height: 3rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	text-decoration: none;
	border: 2px solid #0a4f5c;
}
.szpo-tlacitko {
	padding: 0.7rem 1.3rem;
	border-radius: 0.5rem;
	background: #0a4f5c;
	color: #fff;
	font-family: inherit;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
}
.szpo-tlacitko:hover { background: #063a44; color: #fff; text-decoration: underline; }
.wp-block-button__link:hover { text-decoration: underline; }
.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline,
.szpo-tlacitko--obrys {
	background: #fff;
	color: #0a4f5c;
	border: 2px solid #0a4f5c;
}
.is-style-outline > .wp-block-button__link:hover,
.szpo-tlacitko--obrys:hover {
	background: #e7f1f2;
	color: #063a44;
}
.szpo-ikona {
	width: 1.4em;
	height: 1.4em;
	flex: none;
}

/* Odkazy na PDF: je vidět, že se otevře dokument */
a.szpo-pdf::after {
	content: " (PDF)";
	font-weight: 400;
	white-space: nowrap;
}

/* Telefonní čísla se nezalamují */
.szpo-tel { white-space: nowrap; }

/* Karta pobytu */
.szpo-pobyt {
	margin-block: 2rem;
	padding: 1.25rem 1.5rem 1.5rem;
	background: #fff;
	border: 2px solid #b9cfd2;
	border-top: 0.5rem solid #0a4f5c;
	border-radius: 0.75rem;
	box-shadow: 0 0.15rem 0.6rem rgba(6, 58, 68, 0.08);
}
.szpo-pobyt > :first-child { margin-top: 0; }
.szpo-pobyt > h2,
.szpo-pobyt > h3:first-child {
	color: #0a4f5c;
	font-size: 1.6rem;
	line-height: 1.3;
}
.szpo-pobyt h3:not(:first-child),
.szpo-pobyt .szpo-foto-nadpis {
	font-size: 1.3rem;
	margin-top: 1.75rem;
	margin-bottom: 0.75rem;
}
@media (max-width: 40rem) {
	.szpo-pobyt { padding: 1rem 1rem 1.25rem; }
	.szpo-pobyt > h2 { font-size: 1.4rem; }
}

/* Rámeček s důležitými informacemi (přihlášky, platby) */
.szpo-info {
	margin-block: 2rem;
	padding: 1.25rem 1.5rem;
	background: #e7f1f2;
	border-left: 0.5rem solid #0a4f5c;
	border-radius: 0.5rem;
}
.szpo-info > :first-child { margin-top: 0; }
.szpo-info > :last-child { margin-bottom: 0; }
.szpo-info h2 { font-size: 1.5rem; }

/* Galerie fotek: dlaždice stejné velikosti, na telefonu dvě vedle sebe */
.wp-block-gallery.has-nested-images {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
	gap: 0.75rem !important;
	margin-block: 1rem 1.5rem;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
	width: auto !important;
	margin: 0 !important;
	flex: none;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
	aspect-ratio: 4 / 3;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0.4rem;
	background: #e7f1f2;
}
@media (max-width: 30rem) {
	.wp-block-gallery.has-nested-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html.szpo-pismo-3 .wp-block-gallery.has-nested-images { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); }
.wp-block-gallery figcaption { font-size: 1rem; }
.szpo-pic { display: contents; }
.szpo-zoom { cursor: zoom-in; display: block; }
.wp-block-gallery .szpo-zoom { height: 100%; width: 100%; display: flex; }
.szpo-zoom:hover img { outline: 4px solid #0a4f5c; outline-offset: -4px; }

.wp-block-image figcaption { font-size: 1.05rem; color: #3d3d3d; }
.wp-block-image img { border-radius: 0.4rem; }

/* Tabulky */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td,
.wp-block-table th { border: 1px solid #b9cfd2; padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }

/* Oddělovač */
.wp-block-separator {
	border: 0;
	border-top: 2px solid #b9cfd2;
	margin-block: 2.5rem;
}

/* Kopírování čísla účtu */
.szpo-kopie {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
}
.szpo-kopie__btn {
	min-height: 2.6rem;
	padding: 0.3rem 0.9rem;
	border: 2px solid #0a4f5c;
	border-radius: 0.5rem;
	background: #fff;
	color: #0a4f5c;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}
.szpo-kopie__btn:hover { background: #e7f1f2; }
.szpo-kopie__btn.is-hotovo { background: #0a4f5c; color: #fff; }

/* Kontaktní karty */
.szpo-main .wp-block-post-content > .szpo-kontakty { max-width: 62rem; }
.szpo-kontakty {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 1.25rem;
	margin-block: 1.5rem 2rem;
}
.szpo-kontakty > .wp-block-group {
	margin: 0 !important;
	padding: 1.25rem 1.5rem;
	border: 2px solid #b9cfd2;
	border-radius: 0.75rem;
	background: #fff;
}
.szpo-kontakty h2 {
	margin-top: 0;
	font-size: 1.35rem;
	color: #0a4f5c;
}
.szpo-kontakty p { margin-block: 0.5rem; }
.szpo-velky-text { font-size: 1.5rem; font-weight: 700; }

/* Tlačítko tisku a zpět */
.szpo-tisk,
.szpo-zpet { margin-top: 2.5rem; }

/* ===================================================================
 * Dlaždice (archiv ročníků, pobyty v ročníku)
 * =================================================================== */
.szpo-dlazdice-seznam {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
	gap: 1.25rem;
}
/* Obal obsahu stránky je přes celou šířku (sloupec textu hlídá jeho vlastní rozvržení),
   aby dlaždice archivu mohly být širší než text. */
.szpo-main > .wp-block-post-content { max-width: none !important; }
.szpo-main .wp-block-post-content > .szpo-dlazdice-seznam,
.szpo-main > .szpo-podstranky { max-width: 72rem; margin-left: auto !important; margin-right: auto !important; }
.szpo-main > .szpo-podstranky { margin-top: 3rem; }
.szpo-dlazdice { margin: 0 !important; }
.szpo-dlazdice a {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 2px solid #b9cfd2;
	border-radius: 0.75rem;
	overflow: hidden;
	background: #fff;
	color: #1a1a1a;
	text-decoration: none;
}
.szpo-dlazdice a:hover {
	border-color: #0a4f5c;
	box-shadow: 0 0.25rem 0.9rem rgba(6, 58, 68, 0.15);
}
.szpo-dlazdice a:hover strong { text-decoration: underline; }
.szpo-dlazdice__foto {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: #e7f1f2;
}
.szpo-dlazdice__foto--prazdne {
	display: flex;
	align-items: center;
	justify-content: center;
}
.szpo-dlazdice__znak { width: 5rem; height: 5rem; opacity: 0.9; }
.szpo-dlazdice__text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.9rem 1.1rem 1.1rem;
}
.szpo-dlazdice__text strong {
	font-size: 1.4rem;
	color: #0a4f5c;
	line-height: 1.25;
}
.szpo-dlazdice__text span { font-size: 1.05rem; color: #3d3d3d; }

/* ===================================================================
 * Patička
 * =================================================================== */
.szpo-paticka {
	background: #063a44;
	color: #fff;
	margin-top: 0;
}
.szpo-paticka a { color: #fff; }
.szpo-paticka a:hover { color: #ffd23f; }
.szpo-paticka__in {
	max-width: 72rem;
	margin: 0 auto;
	padding: 2.5rem 1rem 1.5rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 1.5rem 2.5rem;
}
/* Každý řádek patičky: sloupec 3rem na ikonu (logo i ikonky vystředěné) + text.
   Text, nadpisy i tlačítko tak ve všech sloupcích začínají na stejné svislici. */
.szpo-paticka {
	--szpo-ikony: 3rem;
	--szpo-mezera: 0.85rem;
}
.szpo-paticka p {
	margin: 0 0 1.1rem;
	display: grid;
	grid-template-columns: var(--szpo-ikony) minmax(0, 1fr);
	column-gap: var(--szpo-mezera);
	align-items: start;
	line-height: 1.5;
}
.szpo-paticka p > svg { justify-self: center; }
.szpo-paticka .szpo-ikona { margin-top: 0.1em; color: #ffd23f; }
.szpo-paticka__nadpis,
.szpo-paticka__odsazeni > a {
	margin-left: calc(var(--szpo-ikony) + var(--szpo-mezera));
}
.szpo-paticka p.szpo-paticka__odsazeni { display: block; }
.szpo-paticka__nadpis {
	margin-top: 0;
	margin-bottom: 1rem;
	font-size: 1.3rem;
	line-height: 1.3;
	color: #ffd23f;
	/* Nadpis má stejnou výšku jako logo v prvním sloupci, aby řádky pod ním začínaly stejně. */
	min-height: var(--szpo-ikony);
	display: flex;
	align-items: center;
}
.szpo-paticka__nazev { font-size: 1.15rem; }
.szpo-paticka__nazev > span { align-self: center; }
.szpo-paticka__znak { width: var(--szpo-ikony); height: var(--szpo-ikony); }
.szpo-paticka__drobne { font-size: 1.05rem; }
.szpo-paticka__ucet,
.szpo-paticka__banka { white-space: nowrap; }
.szpo-paticka__ucet { font-size: 1.35rem; letter-spacing: 0.02em; }
.szpo-paticka__tlacitko {
	display: inline-flex;
	align-items: center;
	min-height: 3rem;
	padding: 0.5rem 1.2rem;
	border: 2px solid #fff;
	border-radius: 0.5rem;
	font-weight: 700;
	text-decoration: none;
}
.szpo-paticka__tlacitko:hover { background: #fff; color: #063a44 !important; }
.szpo-paticka__spodek {
	max-width: 72rem;
	margin: 0 auto;
	padding: 1rem 1rem 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.3);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	font-size: 1.05rem;
}
.szpo-paticka__spodek p { margin: 0; display: block; }

/* ===================================================================
 * Prohlížeč fotek (inc/lightbox.php) – velké ovládání s popisky
 * =================================================================== */
.szpo-lb-lock { overflow: hidden; }
.szpo-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 14, 16, 0.96);
	font-size: 1.15rem;
}
.szpo-lb.is-open { display: flex; }
.szpo-lb__img {
	max-width: 94vw;
	max-height: calc(100vh - 10rem);
	max-height: calc(100dvh - 10rem);
	object-fit: contain;
	border-radius: 0.25rem;
	background: #fff;
}
.szpo-lb__btn {
	position: absolute;
	min-width: 4rem;
	height: 4rem;
	padding: 0 1rem;
	border: 2px solid #fff;
	border-radius: 2rem;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-family: inherit;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
}
.szpo-lb__btn span { font-size: 2.2rem; line-height: 0.8; }
.szpo-lb__close span { font-size: 1.8rem; }
.szpo-lb__btn:hover,
.szpo-lb__btn:focus-visible { background: #ffd23f; color: #1a1a1a; border-color: #ffd23f; }
.szpo-lb__close { top: 0.75rem; right: 0.75rem; }
.szpo-lb__prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.szpo-lb__next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.szpo-lb.is-single .szpo-lb__prev,
.szpo-lb.is-single .szpo-lb__next { display: none; }
.szpo-lb__bar {
	position: absolute;
	left: 5.5rem;
	right: 5.5rem;
	bottom: 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	color: #fff;
	text-align: center;
}
.szpo-lb__count { font-weight: 700; }
.szpo-lb__cap:empty { display: none; }
@media (max-width: 40rem) {
	.szpo-lb__img { max-height: calc(100dvh - 12rem); }
	.szpo-lb__prev, .szpo-lb__next { top: auto; bottom: 0.75rem; transform: none; }
	.szpo-lb__bar { bottom: 1.6rem; }
}

/* ===================================================================
 * Tisk: jen obsah (pobyty, termíny, ceny, přihlášky) bez menu a fotek
 * =================================================================== */
@media print {
	html, html.szpo-pismo-2, html.szpo-pismo-3 { font-size: 11pt; }
	body { background: #fff; color: #000; }
	.szpo-menu,
	.szpo-pismo,
	.szpo-preskocit,
	.szpo-drobecky,
	.szpo-tisk,
	.szpo-zpet,
	.szpo-podstranky,
	.szpo-paticka__sloupec:last-child,
	.szpo-paticka__spodek,
	.wp-block-gallery,
	.szpo-foto-nadpis,
	.wp-block-buttons,
	.szpo-lb { display: none !important; }
	.szpo-hlavicka__in { padding: 0 0 0.5rem; }
	.szpo-main { padding: 0.5rem 0 1rem; }
	.szpo-nadpis-stranky { font-size: 20pt; margin: 0.25rem 0 0.75rem; }
	.szpo-pobyt,
	.szpo-info {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #000;
		border-top-width: 3px;
		padding: 0.5rem 0.8rem;
		margin-block: 0.75rem;
		background: #fff;
	}
	.szpo-pobyt > h2 { font-size: 13pt; color: #000; }
	a { color: #000; text-decoration: none; }
	a.szpo-pdf::after { content: ""; }
	.szpo-paticka { background: #fff; color: #000; border-top: 1px solid #000; }
	.szpo-paticka a { color: #000; }
	.szpo-paticka .szpo-ikona,
	.szpo-paticka__nadpis { color: #000; }
	.szpo-paticka__in { padding: 0.5rem 0; gap: 0.5rem 1.5rem; }
}

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