/*
Theme Name: Teatr Zdrojowy
Theme URI:
Author: Tomasz Trybek
Author URI:
Description: Lekki, autorski motyw dla Teatru Zdrojowego.
Version: 1.17.1
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teatrzdrojowy
*/

/* ==========================================================================
   Zmienne
   ========================================================================== */

:root {
	--tz-text: #3f3009;
	--tz-tile: #d5c6bf;
	--tz-tile-active: #fff;
	--tz-panel: #fff;
	--tz-column: rgba(255, 255, 255, 0.22);
	--tz-column-width: 1040px;
	--tz-measure: 40rem; /* ok. 70 znaków w linii */
	--tz-gap: 12px;
	--tz-gutter: 16px;
	--tz-font: "Arial Black", "Arial Bold", Arial, "Helvetica Neue", sans-serif;
	--tz-font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

/* ==========================================================================
   Podstawy
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	background-color: #c8c9bd;
	color: var(--tz-text);
	font-family: var(--tz-font-body);
	font-size: 16px;
	line-height: 1.6;
}

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

a {
	color: inherit;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	word-wrap: normal !important;
}

.skip-link:focus {
	z-index: 100;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	clip-path: none;
	background: #fff;
	color: var(--tz-text);
	font-weight: 700;
}

/* ==========================================================================
   Kolumna centralna
   ========================================================================== */

.site {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--tz-column-width);
	min-height: 100vh;
	margin: 0 auto;
	padding: 0 var(--tz-gutter) var(--tz-gutter);
	background: var(--tz-column);
}

.site-main {
	flex: 1;
	margin-top: var(--tz-gap);
}

/* ==========================================================================
   Organizator (gmina) i Facebook – pasek nad logo i plakietka w stopce
   ========================================================================== */

.institution {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
}

.institution a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--tz-text);
	text-decoration: none;
}

.institution a:hover .institution__text,
.institution a:hover .institution__label {
	text-decoration: underline;
}

.institution a:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 3px;
}

.institution__logo {
	display: inline-flex;
	flex: none;
	align-items: center;
	background: #fff;
}

.institution__logo img {
	display: block;
	width: auto;
	height: 100%;
}

.institution__name {
	display: block;
}

.institution__icon {
	flex: none;
	color: var(--tz-text);
}

.institution__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.institution__bip-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 6px;
	border: 2px solid var(--tz-text);
	font-family: var(--tz-font);
	font-size: 0.75rem;
	font-weight: 900;
	line-height: 1;
}

/* Nad logo: same ikony mediów społecznościowych, bez paska – w prawym górnym rogu kolumny. */
.institution--header {
	justify-content: flex-end;
	padding-top: 12px;
}

/* Podpisy tylko dla czytników ekranu – drobny tekst na ozdobnym tle byłby nieczytelny. */
.institution--header .institution__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.institution--header .institution__logo {
	height: 40px;
	padding: 3px 8px;
	border-radius: 4px;
}

.institution--header .institution__icon {
	width: 30px;
	height: 30px;
}

.institution--header .institution__links {
	gap: 10px;
}

/* Plakietka w stopce – jak na stronach innych instytucji gminy. */
.institution--footer {
	justify-content: center;
	gap: 16px 32px;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--tz-tile);
	font-size: 0.875rem;
	text-align: left;
}

.institution--footer .institution__logo {
	height: 100px;
	padding: 10px 22px;
	border: 1px solid var(--tz-tile);
	border-radius: 12px;
}

.institution--footer .institution__gmina {
	gap: 14px;
}

.institution--footer .institution__links {
	justify-content: center;
}

.institution--footer .institution__icon {
	width: 32px;
	height: 32px;
}

.institution--footer .institution__label {
	font-weight: 700;
}

/* ==========================================================================
   Logo
   ========================================================================== */

/* Delikatne przyciemnienie pod logo – czytelność dopisku na tle kratki. */
.site-branding {
	margin: 0 calc(-1 * var(--tz-gutter));
	padding: 28px var(--tz-gutter) 20px;
	background: radial-gradient(closest-side, rgba(63, 48, 9, 0.4), rgba(63, 48, 9, 0));
	text-align: center;
}

.site-logo {
	margin: 0;
	font-size: inherit;
	line-height: 0;
}

.custom-logo-link {
	display: inline-block;
	max-width: 80%;
}

.custom-logo {
	display: block;
	width: 300px;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	filter: drop-shadow(0 0 1px rgba(63, 48, 9, 0.9)) drop-shadow(0 1px 3px rgba(63, 48, 9, 0.5));
}

/* ==========================================================================
   Kafelki nawigacji
   ========================================================================== */

.tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--tz-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tiles li {
	display: flex;
}

.tiles a {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	min-height: 80px;
	padding: 8px 6px;
	background: var(--tz-tile);
	color: var(--tz-text);
	font-family: var(--tz-font);
	font-weight: 900;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease;
}

/* Menu główne: wszystkie pozycje w jednym rzędzie, niezależnie od ich liczby. */
.tiles--main {
	grid-template-columns: none;
	grid-auto-columns: 1fr;
	grid-auto-flow: column;
}

.tiles--main a {
	font-size: clamp(0.8125rem, 1.9vw, 1.125rem);
}

.tiles a:hover,
.tiles .current-menu-item > a,
.tiles .current-menu-ancestor > a,
.tiles .current-menu-parent > a,
.tiles .current-page-ancestor > a,
.tiles .current-page-parent > a {
	background: var(--tz-tile-active);
}

.tiles a:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 2px;
}

/* ==========================================================================
   Treść
   ========================================================================== */

.panel {
	min-height: 60vh;
	padding: 40px 48px;
	background: var(--tz-panel);
}

/*
 * Tekst ciągły zawężony do wygodnej długości linii.
 * Galerie oraz bloki „szerokie” i „pełna szerokość” zajmują cały panel.
 */
.panel > .entry-header,
.panel > .entry-thumbnail,
.panel > .entry-content > * {
	max-width: var(--tz-measure);
	margin-right: auto;
	margin-left: auto;
}

.panel > .entry-content > .alignwide,
.panel > .entry-content > .alignfull,
.panel > .entry-content > .wp-block-gallery {
	max-width: none;
}

/* ==========================================================================
   Galeria (blok „Galeria” z powiększaniem po kliknięciu)
   ========================================================================== */

.entry-content .wp-block-gallery {
	margin-top: 24px;
	margin-bottom: 40px;
}

.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image {
	overflow: hidden;
}

.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
	transition: transform 0.3s ease;
}

.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:hover img {
	transform: scale(1.04);
}

.entry-content h2 {
	margin: 40px auto 8px;
	font-family: var(--tz-font);
	font-size: 1.125rem;
	text-transform: uppercase;
}

/* Tło powiększonego zdjęcia w kolorach motywu. */
.wp-lightbox-overlay .scrim {
	background-color: #1c1604 !important;
	opacity: 0.94 !important;
}

.wp-lightbox-overlay .close-button,
.wp-lightbox-overlay .close-button:hover {
	color: #fff;
}

.entry-title {
	margin: 0 0 4px;
	font-family: var(--tz-font);
	font-size: 1.375rem;
	line-height: 1.25;
	text-transform: uppercase;
}

.entry-header,
.repertoire__title {
	margin-bottom: 28px;
}

.entry-date {
	display: block;
	font-size: 0.875rem;
}

.entry-thumbnail {
	margin-bottom: 20px;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

/* Wyróżniona ramka w treści (klasa „tz-notice” na akapicie). */
.entry-content .tz-notice {
	padding: 14px 18px;
	border-left: 6px solid var(--tz-text);
	background: var(--tz-tile);
}

/* Deklaracja dostępności – hierarchia nagłówków i listy. */
.statement h3,
.statement h4 {
	margin: 28px 0 8px;
	font-family: var(--tz-font);
	line-height: 1.3;
}

.statement h3 {
	font-size: 1rem;
	text-transform: uppercase;
}

.statement h4 {
	font-size: 0.9375rem;
}

.statement ul {
	padding-left: 1.25em;
}

.statement li + li {
	margin-top: 4px;
}

/* Nawigacja działu w panelu: okruszek nad tytułem i zakładki pod nim. */
.section-trail {
	margin-bottom: 4px;
	font-size: 0.875rem;
	font-weight: 700;
}

.section-trail a {
	text-decoration: none;
}

.section-trail a:hover {
	text-decoration: underline;
}

.section-trail__sep {
	margin: 0 6px 0 4px;
}

.section-tabs {
	max-width: var(--tz-measure);
	margin: -12px auto 28px;
	border-bottom: 1px solid var(--tz-tile);
	overflow-x: auto;
	scrollbar-width: thin;
}

.section-tabs ul {
	display: flex;
	gap: 4px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.section-tabs a {
	display: inline-block;
	padding: 8px 4px 10px;
	border-bottom: 3px solid transparent;
	font-size: 0.9375rem;
	text-decoration: none;
}

.section-tabs a:hover {
	border-bottom-color: var(--tz-tile);
}

.section-tabs a[aria-current] {
	border-bottom-color: var(--tz-text);
	font-weight: 700;
}

.section-tabs a:focus-visible,
.section-trail a:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 2px;
}

/* Zakładki przewijają się w poziomie – ramka fokusu w środku, inaczej by się ucięła. */
.section-tabs a:focus-visible {
	outline-offset: -3px;
}

/* Tytuł listy wpisów (archiwa, wyszukiwanie) – na białym pasku, czytelny na tle. */
.list-title {
	margin: 0 0 16px;
	padding: 16px 24px;
	background: var(--tz-panel);
	font-family: var(--tz-font);
	font-size: 1.375rem;
	line-height: 1.25;
	text-transform: uppercase;
}

/* Brak treści / 404 – nagłówek, wyszukiwarka i linki dalej. */
.no-results__title {
	margin-bottom: 16px;
}

.search-form {
	display: flex;
	gap: 8px;
	max-width: 32rem;
	margin: 24px 0;
}

.search-form label {
	flex: 1;
}

.search-form .search-field {
	width: 100%;
	padding: 12px 14px;
	border: 2px solid var(--tz-tile);
	border-radius: 0;
	font: inherit;
}

.search-form .search-field:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 1px;
}

.search-form .search-submit {
	padding: 12px 18px;
	border: 0;
	background: var(--tz-text);
	color: #fff;
	font-family: var(--tz-font);
	font-size: 0.8125rem;
	font-weight: 900;
	text-transform: uppercase;
	cursor: pointer;
}

.search-form .search-submit:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 3px;
}

.no-results__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin: 0;
	font-weight: 700;
}

/* Lista wpisów – białe paski. */
.entry-list {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.entry-row__link {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 64px;
	padding: 12px 24px;
	background: var(--tz-panel);
	font-family: var(--tz-font);
	font-size: 0.875rem;
	font-weight: 900;
	text-decoration: none;
	text-transform: uppercase;
}

.entry-row__title {
	flex: 1;
}

.entry-row__arrow {
	font-size: 1.5rem;
	line-height: 1;
	transition: transform 0.15s ease;
}

.entry-row__link:hover .entry-row__arrow,
.entry-row__link:focus-visible .entry-row__arrow {
	transform: translateX(4px);
}

.entry-row__link:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 2px;
}

.pagination {
	margin-top: 16px;
	text-align: center;
	font-weight: 700;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	background: var(--tz-tile);
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--tz-tile-active);
}

/* ==========================================================================
   Wzorce bloków: karty, oś czasu, przyciski
   ========================================================================== */

/*
 * W motywach klasycznych WordPress opakowuje zawartość grupy w dodatkowy
 * element – pomijamy go, żeby siatka i karty działały na właściwych blokach.
 */
.tz-cards .wp-block-group__inner-container,
.tz-timeline .wp-block-group__inner-container {
	display: contents;
}

.tz-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
	margin-top: 24px;
	margin-bottom: 40px;
}

.tz-cards .tz-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--tz-tile);
}

.tz-card > :not(.wp-block-group__inner-container),
.tz-card > .wp-block-group__inner-container > * {
	margin: 0 20px 12px;
}

.tz-card > :last-child:not(.wp-block-group__inner-container),
.tz-card > .wp-block-group__inner-container > :last-child {
	margin-bottom: 20px;
}

.tz-card .tz-card__image {
	margin: 0 0 16px;
}

.tz-card__image img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.tz-card .tz-card__title {
	margin-top: 20px;
	font-family: var(--tz-font);
	font-size: 1rem;
	line-height: 1.3;
	text-transform: uppercase;
}

.tz-card .tz-card__image + .tz-card__title {
	margin-top: 0;
}

.tz-card--offer {
	background: #faf7f5;
}

.tz-card--offer .wp-block-buttons {
	margin-top: auto;
}

.tz-timeline {
	position: relative;
	margin-top: 24px;
	margin-bottom: 40px;
	padding-left: 28px;
	border-left: 3px solid var(--tz-tile);
}

.tz-timeline__item {
	position: relative;
	margin-bottom: 28px;
}

.tz-timeline__item::before {
	content: "";
	position: absolute;
	top: 6px;
	left: -37px;
	width: 15px;
	height: 15px;
	border: 3px solid var(--tz-panel);
	border-radius: 50%;
	background: var(--tz-text);
}

.tz-timeline__item > :not(.wp-block-group__inner-container),
.tz-timeline__item > .wp-block-group__inner-container > * {
	margin: 0 0 6px;
}

.entry-content .tz-timeline__year {
	margin: 0 0 4px;
	font-family: var(--tz-font);
	font-size: 1.375rem;
}

/* Przyciski z edytora bloków w stylu motywu. */
.entry-content .wp-block-button__link {
	padding: 12px 22px;
	border-radius: 0;
	background: var(--tz-text);
	color: #fff;
	font-family: var(--tz-font);
	font-size: 0.8125rem;
	font-weight: 900;
	text-decoration: none;
	text-transform: uppercase;
}

.entry-content .wp-block-button__link:hover {
	background: #5c4610;
}

.entry-content .wp-block-button__link:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 3px;
}

/* ==========================================================================
   Tabele i bloki rozwijane (np. lista edycji festiwalu)
   ========================================================================== */

.entry-content .wp-block-details {
	margin-top: 16px;
	margin-bottom: 32px;
}

.entry-content .wp-block-details summary {
	display: inline-block;
	padding: 12px 22px;
	background: var(--tz-tile);
	font-family: var(--tz-font);
	font-size: 0.8125rem;
	font-weight: 900;
	text-transform: uppercase;
	cursor: pointer;
}

.entry-content .wp-block-details summary:hover {
	background: #cbb9b0;
}

.entry-content .wp-block-details summary:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 3px;
}

.entry-content .wp-block-details[open] summary {
	margin-bottom: 16px;
}

.entry-content .wp-block-table {
	margin: 0;
	overflow-x: auto;
}

.entry-content .wp-block-table table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	font-size: 0.875rem;
	line-height: 1.4;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
	padding: 8px 10px;
	border: 0;
	border-bottom: 1px solid var(--tz-tile);
	text-align: left;
	vertical-align: top;
}

.entry-content .wp-block-table thead th {
	border-bottom: 2px solid var(--tz-text);
	font-family: var(--tz-font);
	font-size: 0.75rem;
	text-transform: uppercase;
}

.entry-content .wp-block-table tbody tr:nth-child(even) {
	background: #faf7f5;
}

.entry-content .wp-block-table td:first-child {
	font-weight: 700;
	white-space: nowrap;
}

/* ==========================================================================
   Repertuar
   ========================================================================== */

/* Filtr miesięcy. */
.month-filter ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.month-filter a {
	display: block;
	padding: 8px 14px;
	background: var(--tz-tile);
	font-family: var(--tz-font);
	font-size: 0.75rem;
	font-weight: 900;
	text-decoration: none;
	text-transform: uppercase;
}

.month-filter a:hover,
.month-filter a[aria-current="page"] {
	background: var(--tz-text);
	color: #fff;
}

/* Siatka plakatów. */
.poster-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.event-card__link {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-decoration: none;
}

.event-card__poster {
	display: block;
	aspect-ratio: 707 / 1000;
	overflow: hidden;
	background: var(--tz-tile);
	box-shadow: 0 2px 8px rgba(63, 48, 9, 0.18);
}

.event-card__poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.event-card__link:hover .event-card__poster img,
.event-card__link:focus-visible .event-card__poster img {
	transform: scale(1.04);
}

.event-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 12px;
	font-family: var(--tz-font);
	font-weight: 900;
	text-align: center;
	text-transform: uppercase;
}

.event-card__date {
	font-family: var(--tz-font);
	font-size: 0.8125rem;
	font-weight: 900;
	text-transform: uppercase;
}

.event-card__title {
	font-size: 0.875rem;
	line-height: 1.35;
}

.event-card__link:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 4px;
}

.panel + .panel {
	margin-top: var(--tz-gap);
}

/* Strona główna – najbliższe wydarzenia. */
.upcoming {
	min-height: 0;
}

.upcoming__title {
	margin-bottom: 28px;
}

.upcoming__more {
	margin: 32px 0 0;
	text-align: center;
}

.repertoire__empty {
	margin: 0;
	text-align: center;
}

/* Pojedyncze wydarzenie. */
.event {
	display: grid;
	grid-template-columns: 360px 1fr;
	gap: 24px 40px;
	align-items: start;
}

.event > .section-trail {
	grid-column: 1 / -1;
	margin-bottom: -8px;
}

.event__poster img {
	display: block;
	width: 100%;
	box-shadow: 0 2px 8px rgba(63, 48, 9, 0.18);
}

.event__details .entry-title {
	margin-bottom: 16px;
}

.event__date {
	margin: 0 0 12px;
	font-family: var(--tz-font);
	font-weight: 900;
	line-height: 1.4;
	text-transform: uppercase;
}

.event__price {
	margin: 0 0 20px;
}

.event__label {
	font-weight: 700;
}

.event__notice {
	margin: 0;
	padding: 10px 14px;
	background: var(--tz-tile);
	font-weight: 700;
}

.button {
	display: inline-block;
	padding: 14px 28px;
	background: var(--tz-text);
	color: #fff;
	font-family: var(--tz-font);
	font-weight: 900;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease;
}

.button:hover {
	background: #5c4610;
}

.button:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 3px;
}

.event__content {
	margin-top: 28px;
}

.event__back {
	grid-column: 1 / -1;
	margin: 0;
	font-weight: 700;
}

/* ==========================================================================
   Kontakt
   ========================================================================== */

.contact__title {
	margin-bottom: 28px;
}

.contact__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 32px 40px;
	align-items: start;
}

.contact__name {
	margin: 0 0 8px;
	font-family: var(--tz-font);
	font-weight: 900;
	text-transform: uppercase;
}

.contact__address {
	margin-bottom: 20px;
	font-style: normal;
}

.contact__list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 16px;
	margin: 0 0 20px;
}

.contact__list dt {
	font-weight: 700;
}

.contact__list dd {
	margin: 0;
}

.contact__list a,
.contact__content a {
	overflow-wrap: anywhere;
}

.contact__map {
	margin: 0;
}

.contact__map iframe {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	border: 0;
	background: var(--tz-tile);
}

.contact__map figcaption {
	margin-top: 8px;
	font-size: 0.875rem;
	font-weight: 700;
}

/* Dwa wejścia. */
.entrances {
	margin-top: 48px;
}

.entrances__title {
	margin: 0 0 12px;
	font-family: var(--tz-font);
	font-size: 1.125rem;
	text-transform: uppercase;
}

.entrances__notice {
	margin: 0 0 24px;
	padding: 14px 18px;
	border-left: 6px solid var(--tz-text);
	background: var(--tz-tile);
}

.entrances__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.entrance {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--tz-tile);
}

.entrance__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.entrance__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 18px 20px 20px;
}

.entrance__name {
	margin: 0 0 8px;
	font-family: var(--tz-font);
	font-size: 1rem;
	line-height: 1.3;
	text-transform: uppercase;
}

.entrance__desc {
	flex: 1;
	margin: 0 0 16px;
}

.button--small {
	padding: 10px 18px;
	font-size: 0.8125rem;
}

/* ==========================================================================
   Stopka
   ========================================================================== */

.site-footer {
	margin-top: 32px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.82);
	font-size: 0.8125rem;
	text-align: center;
}

.footer-navigation ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 20px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.site-contact {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 20px;
	margin: 0 0 8px;
	font-weight: 700;
}

.site-contact a {
	text-decoration: none;
}

.site-contact a:hover {
	text-decoration: underline;
}

.site-info {
	margin: 0;
}

/* ==========================================================================
   Tablety
   ========================================================================== */

@media (max-width: 900px) {
	.panel {
		padding: 32px 24px;
	}

	.poster-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.event {
		grid-template-columns: 260px 1fr;
		gap: 24px;
	}

	.contact__grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Małe ekrany
   ========================================================================== */

@media (max-width: 520px) {
	.tiles {
		grid-template-columns: repeat(2, 1fr);
	}

	.tiles--main {
		grid-auto-flow: row;
	}

	/* Nieparzysta liczba kafelków: ostatni na całą szerokość. */
	.tiles li:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.tiles a {
		min-height: 64px;
	}

	.panel {
		padding: 24px 16px;
	}

	.entry-row__link {
		padding: 12px 16px;
	}

	.poster-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px 12px;
	}

	.event {
		grid-template-columns: 1fr;
	}

	.event__poster {
		max-width: 280px;
		margin: 0 auto;
	}

	.button {
		display: block;
		text-align: center;
	}

	.entrances__list {
		grid-template-columns: 1fr;
	}

	.entrance__body .button {
		align-self: stretch;
	}

	/* Pasek nad logo: jeden rząd – logo gminy i Facebook; pełny napis w stopce. */
	.institution--header .institution__text,
	.institution--header .institution__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.institution--header .institution__logo {
		height: 34px;
	}

	.institution--footer .institution__gmina {
		flex-direction: column;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tiles a,
	.entry-row__arrow,
	.event-card__poster img,
	.button,
	.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
		transition: none;
	}
}

/* ==========================================================================
   Zgoda na statystyki
   ========================================================================== */

.consent-banner {
	position: fixed;
	right: var(--tz-gutter);
	bottom: var(--tz-gutter);
	left: var(--tz-gutter);
	z-index: 100;
	max-width: 44rem;
	margin: 0 auto;
	padding: 16px 20px;
	border: 2px solid var(--tz-text);
	background: var(--tz-panel);
	color: var(--tz-text);
	font-size: 0.9375rem;
}

.consent-banner[hidden] {
	display: none;
}

.consent-banner:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 2px;
}

.consent-banner__title {
	margin: 0 0 6px;
	font-weight: 700;
}

.consent-banner__text {
	margin: 0 0 12px;
}

.consent-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.consent-banner__button {
	min-width: 8.5rem;
	padding: 10px 20px;
	border: 2px solid var(--tz-text);
	background: var(--tz-panel);
	color: var(--tz-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.consent-banner__button:hover {
	background: var(--tz-tile);
}

.consent-banner__button:focus-visible,
.consent-open:focus-visible {
	outline: 3px solid var(--tz-text);
	outline-offset: 2px;
}

.consent-open {
	margin-left: 12px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.consent-open[hidden] {
	display: none;
}
