/* TG Voerde – Grundstile für Header, Navigation und Footer (Phase 1) */

/* --- Barrierefreiheit: sichtbare Fokuszustände (Phase 7) ---
   Standardmäßig nur der Browser-Standard-Outline (unauffällig/inkonsistent
   je nach Browser) – hier stattdessen ein deutlicher, markenfarbener
   Fokusring für alle interaktiven Elemente, aber ausschließlich bei
   Tastatur-/Tastentool-Fokus (:focus-visible), nicht bei Mausklick. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--wp--preset--color--akzent);
	outline-offset: 2px;
}

/* Hinweis zum Skip-Link "Zum Inhalt springen": WordPress-Core liefert für
   Block-Themes bereits automatisch einen vollständig barrierefreien
   Skip-Link (id="wp-skip-link", Ziel ist die id="main" auf jedem <main>-
   Element), inklusive korrektem Verstecken/Sichtbarwerden bei Fokus. Ein
   eigener Skip-Link im Theme wäre nur eine redundante zweite Tab-Stop vor
   der Navigation – deshalb bewusst nicht neu gebaut, sondern die
   Core-Funktion genutzt (siehe id="main" in allen templates/*.html). */

/* --- Header --- */
.tgv-site-header {
	position: sticky;
	/* Bleibt unterhalb der WordPress-Admin-Leiste (nur für eingeloggte Redakteure
	   sichtbar) – für normale Besucher ist die Variable leer, dann greift 0px. */
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: var(--wp--preset--color--primaer);
	padding-top: 20px;
	padding-bottom: 20px;
	padding-left: clamp(16px, 4vw, 48px);
	padding-right: clamp(16px, 4vw, 48px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	transition: padding 0.25s ease, box-shadow 0.25s ease;
}

.tgv-site-header .wp-block-site-logo img {
	transition: max-height 0.25s ease;
	max-height: 64px;
	width: auto;
}

.tgv-site-header.is-scrolled {
	padding-top: 8px;
	padding-bottom: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tgv-site-header.is-scrolled .wp-block-site-logo img {
	max-height: 40px;
}

@media (prefers-reduced-motion: reduce) {
	.tgv-site-header,
	.tgv-site-header .wp-block-site-logo img {
		transition: none;
	}
}

/* --- Navigation --- */
.tgv-site-header .wp-block-navigation a {
	text-decoration: none;
	color: var(--wp--preset--color--sekundaer);
	font-weight: 500;
	padding-bottom: 2px;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.tgv-site-header .wp-block-navigation a:hover,
.tgv-site-header .wp-block-navigation a:focus {
	color: var(--wp--preset--color--akzent);
	border-bottom-color: var(--wp--preset--color--akzent);
}

@media (prefers-reduced-motion: reduce) {
	.tgv-site-header .wp-block-navigation a {
		transition: none;
	}
}

/* --- Buttons & Links (site-weit): weiche Übergänge für ein "smootheres" Gefühl --- */
.wp-element-button,
.wp-block-button__link,
a {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	.wp-element-button,
	.wp-block-button__link,
	a {
		transition: none;
	}
}

.tgv-site-header .wp-block-navigation-submenu__content {
	background: var(--wp--preset--color--primaer);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* --- Option: Fließtext & Menü in Grau (Customizer-Toggle, siehe functions.php) ---
   Überschriften bleiben bewusst unberührt und damit weiterhin schwarz. */
body.tgv-muted-text :where(p, li, blockquote, figcaption, .wp-block-post-excerpt) {
	color: var(--wp--preset--color--textgrau);
}

body.tgv-muted-text .tgv-site-header .wp-block-navigation a {
	color: var(--wp--preset--color--textgrau);
}

body.tgv-muted-text .tgv-site-header .wp-block-navigation a:hover,
body.tgv-muted-text .tgv-site-header .wp-block-navigation a:focus {
	color: var(--wp--preset--color--akzent);
	border-bottom-color: var(--wp--preset--color--akzent);
}

.tgv-site-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--primaer);
}

/* --- Header-Suche: immer sichtbar, kompakt neben dem Hauptmenü --- */
.tgv-header-right {
	gap: 16px;
}

.tgv-header-search {
	width: 170px;
}

.tgv-header-search .wp-block-search__input {
	border-color: rgba(0, 0, 0, 0.15);
	height: 38px;
	padding-left: 14px;
}

.tgv-header-search .wp-block-search__button {
	/* Ohne diese expliziten Maße erbt der Button die große Pill-Polsterung
	   des globalen ".wp-element-button"-Stils (siehe theme.json/Core-Block-
	   Bibliothek), die eigentlich für den großen "Weiterlesen"-Button im
	   Hero-Slider gedacht ist – dadurch wirkte das Suchfeld bisher weit
	   überdimensioniert. Hier stattdessen ein kompakter, quadratischer
	   Icon-Button in Höhe des Eingabefelds, wie im Original. */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	min-width: 38px;
	padding: 0;
	margin: 0;
	background: var(--wp--preset--color--sekundaer);
	color: var(--wp--preset--color--primaer);
	border-radius: 999px;
}

.tgv-header-search .wp-block-search__button svg {
	width: 16px;
	height: 16px;
}

.tgv-header-search .wp-block-search__button:hover,
.tgv-header-search .wp-block-search__button:focus-visible {
	background: var(--wp--preset--color--akzent);
}

@media (max-width: 600px) {
	.tgv-header-search {
		width: 44px;
	}
	.tgv-header-search .wp-block-search__input {
		/* Auf sehr schmalen Bildschirmen bleibt neben Logo und Menü-Symbol nur
		   Platz für das Such-Icon; das Eingabefeld wird per Fokus wieder breiter,
		   damit die Suche trotzdem erreichbar bleibt, ohne Header-Umbruch. */
		width: 0;
		padding-left: 0;
		padding-right: 0;
		border-width: 0;
	}
	.tgv-header-search .wp-block-search__input:focus {
		width: 140px;
		padding-left: 14px;
		border-width: 1px;
	}
}

/* --- Footer --- */
.tgv-site-footer {
	background: var(--wp--preset--color--sekundaer);
	color: var(--wp--preset--color--primaer);
	padding: 32px clamp(16px, 4vw, 48px);
}

.tgv-site-footer a {
	color: var(--wp--preset--color--primaer);
	text-decoration: none;
}

.tgv-site-footer a:hover,
.tgv-site-footer a:focus {
	color: var(--wp--preset--color--akzent);
}

.tgv-footer-columns {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
}

.tgv-footer-legal {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.tgv-footer-brand {
	gap: 14px;
}

.tgv-footer-logo img {
	display: block;
	border-radius: 4px;
}

@media (max-width: 600px) {
	.tgv-footer-columns {
		flex-direction: column;
	}
	.tgv-footer-legal {
		align-items: flex-start;
	}
	.tgv-footer-brand {
		flex-wrap: wrap;
	}
}

/* --- Hero-Slider (Startseite) --- */
.tgv-hero-slider {
	position: relative;
	height: 60vh;
	min-height: 420px;
	max-height: 720px;
	overflow: hidden;
	background-color: var(--wp--preset--color--sekundaer);
}

.tgv-hero-slider--empty {
	height: auto;
	min-height: 0;
	padding: 24px clamp(16px, 4vw, 48px);
	color: var(--wp--preset--color--textgrau);
	font-style: italic;
}

.tgv-hero-slider__track {
	position: relative;
	height: 100%;
}

.tgv-hero-slider__slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease;
	display: flex;
	align-items: flex-end;
}

.tgv-hero-slider__slide.is-active {
	opacity: 1;
	visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
	.tgv-hero-slider__slide {
		transition: none;
	}
}

.tgv-hero-slider__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0) 100%);
}

.tgv-hero-slider__content {
	position: relative;
	z-index: 1;
	color: var(--wp--preset--color--primaer);
	padding: 32px clamp(16px, 4vw, 64px) 56px;
	max-width: 760px;
}

.tgv-hero-slider__date {
	color: var(--wp--preset--color--akzent);
	font-weight: 600;
	margin: 0 0 8px;
}

.tgv-hero-slider__title {
	color: var(--wp--preset--color--primaer);
	font-size: var(--wp--preset--font-size--xx-large);
	margin: 0 0 20px;
	line-height: 1.2;
}

.tgv-hero-slider__button {
	display: inline-block;
	background: var(--wp--preset--color--primaer);
	color: var(--wp--preset--color--sekundaer);
	text-decoration: none;
	padding: 12px 24px;
	border-radius: 999px;
	font-weight: 700;
}

.tgv-hero-slider__button:hover,
.tgv-hero-slider__button:focus {
	background: var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--primaer);
}

.tgv-hero-slider__dots {
	position: absolute;
	z-index: 2;
	right: clamp(16px, 4vw, 48px);
	bottom: 24px;
	display: flex;
	gap: 8px;
}

.tgv-hero-slider__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--primaer);
	background: transparent;
	padding: 0;
	cursor: pointer;
}

.tgv-hero-slider__dot.is-active {
	background: var(--wp--preset--color--primaer);
}

.tgv-hero-slider__arrow {
	position: absolute;
	z-index: 2;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.35);
	color: var(--wp--preset--color--primaer);
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.tgv-hero-slider__arrow:hover,
.tgv-hero-slider__arrow:focus {
	background: var(--wp--preset--color--akzent);
}

.tgv-hero-slider__arrow--prev {
	left: clamp(8px, 2vw, 24px);
}

.tgv-hero-slider__arrow--next {
	right: clamp(8px, 2vw, 24px);
}

@media (max-width: 600px) {
	.tgv-hero-slider {
		height: 70vh;
	}
	.tgv-hero-slider__title {
		font-size: var(--wp--preset--font-size--x-large);
	}
	.tgv-hero-slider__arrow {
		width: 34px;
		height: 34px;
		font-size: 1.25rem;
	}
}

/* --- Seiten-Hero-Pattern (Unterseiten) --- */
.tgv-page-hero {
	min-height: 280px;
}

/* --- Card-Baustein für das Blockraster (Phase 3) --- */
.tgv-card {
	background: var(--wp--preset--color--primaer);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	padding: 24px;
	height: 100%;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tgv-card:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

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

.tgv-card .tgv-card__image img {
	border-radius: 10px;
	display: block;
	width: 100%;
	height: auto;
}

.tgv-card .wp-block-buttons {
	margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
	.tgv-card {
		transition: none;
	}
	.tgv-card:hover {
		transform: none;
	}
}

/* Spalten des Blockrasters sollen auf Mobilgeräten weiterhin gestapelt werden
   (Standardverhalten des Spalten-Blocks) und gleichmäßige Abstände erhalten. */
.wp-block-columns {
	gap: 24px;
}

/* --- Personen-Block (Phase 4) --- */
.tgv-personen-grid {
	display: grid;
	grid-template-columns: repeat( var( --tgv-personen-columns, 3 ), minmax( 0, 1fr ) );
	gap: 24px;
}

.tgv-personen-grid--empty {
	color: var( --wp--preset--color--textgrau );
	font-style: italic;
}

.tgv-person-card {
	text-align: center;
}

.tgv-person-card__photo {
	width: 120px;
	height: 120px;
	margin: 0 auto 16px;
	border-radius: 999px;
	overflow: hidden;
}

.tgv-person-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 999px;
}

.tgv-person-card__name {
	margin: 0 0 4px;
}

.tgv-person-card__role {
	color: var( --wp--preset--color--akzent );
	font-weight: 600;
	margin: 0 0 8px;
}

.tgv-person-card__contact {
	margin: 0;
	font-size: var( --wp--preset--font-size--small );
}

@media ( max-width: 780px ) {
	.tgv-personen-grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

@media ( max-width: 480px ) {
	.tgv-personen-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Termine/Events-Liste (Phase 4) --- */
.tgv-event-liste {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tgv-event-liste--empty {
	color: var( --wp--preset--color--textgrau );
	font-style: italic;
}

.tgv-event-item {
	display: flex;
	align-items: center;
	gap: 20px;
	background: var( --wp--preset--color--primaer );
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	border-radius: 14px;
	padding: 16px 22px;
	text-decoration: none;
	color: var( --wp--preset--color--sekundaer );
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tgv-event-item:hover,
.tgv-event-item:focus {
	box-shadow: 0 10px 24px rgba( 0, 0, 0, 0.08 );
	transform: translateY( -2px );
	color: var( --wp--preset--color--sekundaer );
}

.tgv-event-item__date {
	min-width: 68px;
	text-align: center;
	background: var( --wp--preset--color--primaer );
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	border-radius: 10px;
	padding: 8px 4px;
	flex-shrink: 0;
}

.tgv-event-item__day {
	display: block;
	font-weight: 800;
	font-size: 1.25rem;
	color: var( --wp--preset--color--akzent );
	line-height: 1.1;
}

.tgv-event-item__month {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var( --wp--preset--color--textgrau );
}

.tgv-event-item__title {
	margin: 0 0 4px;
}

.tgv-event-item__meta {
	margin: 0;
	color: var( --wp--preset--color--textgrau );
	font-size: var( --wp--preset--font-size--small );
}

@media ( prefers-reduced-motion: reduce ) {
	.tgv-event-item {
		transition: none;
	}
}

/* --- Einzelansicht Personen/Termine (Phase 4) --- */
.tgv-person-hero {
	align-items: center;
	gap: 24px;
	margin-bottom: 24px;
}

.tgv-person-hero__photo img {
	border-radius: 999px;
	width: 160px;
	height: 160px;
	object-fit: cover;
}

.tgv-detail-box {
	background: rgba( 0, 0, 0, 0.03 );
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	border-radius: 14px;
	padding: 16px 20px;
	margin: 0 0 24px;
}

.tgv-detail-box p {
	margin: 0 0 4px;
}

.tgv-detail-box p:last-child {
	margin-bottom: 0;
}

.tgv-detail-box__role,
.tgv-detail-box__date {
	font-weight: 700;
	color: var( --wp--preset--color--akzent );
}

/* --- Vereinschronik: Zeitstrahl-Pattern (Phase 5) --- */
.tgv-chronik {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/* Durchgehende Verbindungslinie über alle Stationen hinweg; liegt exakt an der
   Grenze der ersten Spalte (Jahreszahl) jeder Station, da alle Stationen
   dieselbe Spaltenbreite verwenden. */
.tgv-chronik::before {
	content: "";
	position: absolute;
	left: 100px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: rgba( 0, 0, 0, 0.1 );
}

.tgv-chronik-station {
	position: relative;
	display: grid;
	grid-template-columns: 100px 1fr;
	gap: 24px;
	align-items: start;
}

.tgv-chronik-station__year {
	position: relative;
	margin: 0;
	padding-right: 24px;
	text-align: right;
	font-size: 1.75rem;
	font-weight: 800;
	color: var( --wp--preset--color--akzent );
	line-height: 1.2;
}

.tgv-chronik-station__year::after {
	content: "";
	position: absolute;
	top: 6px;
	right: -7px;
	width: 14px;
	height: 14px;
	border-radius: 999px;
	background: var( --wp--preset--color--akzent );
	border: 3px solid var( --wp--preset--color--primaer );
	box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.08 );
}

.tgv-chronik-station__body p {
	margin: 0 0 12px;
}

.tgv-chronik-station__body p:last-child {
	margin-bottom: 0;
}

.tgv-chronik-station__image {
	margin: 12px 0 0;
}

.tgv-chronik-station__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
}

@media ( max-width: 600px ) {
	.tgv-chronik::before {
		left: 64px;
	}
	.tgv-chronik-station {
		grid-template-columns: 64px 1fr;
		gap: 16px;
	}
	.tgv-chronik-station__year {
		padding-right: 16px;
		font-size: 1.25rem;
	}
}

/* --- Karten-Block mit Klick-Aktivierung (Phase 6) --- */
.tgv-karte__heading {
	margin: 0 0 16px;
}

.tgv-karte__frame {
	position: relative;
	height: var( --tgv-karte-height, 400px );
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba( 0, 0, 0, 0.08 );
}

.tgv-karte__preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 100%;
	padding: 32px clamp( 16px, 4vw, 48px );
	text-align: center;
	background: rgba( 0, 0, 0, 0.03 );
}

.tgv-karte__pin {
	color: var( --wp--preset--color--akzent );
}

.tgv-karte__hint {
	margin: 0;
	max-width: 480px;
	color: var( --wp--preset--color--textgrau );
	font-size: var( --wp--preset--font-size--small );
}

.tgv-karte__load-button {
	display: inline-block;
	background: var( --wp--preset--color--sekundaer );
	color: var( --wp--preset--color--primaer );
	border: none;
	padding: 12px 28px;
	border-radius: 999px;
	font-weight: 700;
	cursor: pointer;
}

.tgv-karte__load-button:hover,
.tgv-karte__load-button:focus-visible {
	background: var( --wp--preset--color--akzent );
}

.tgv-karte__iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.tgv-karte__route-link {
	display: inline-block;
	margin-top: 16px;
	font-weight: 600;
	color: var( --wp--preset--color--akzent );
}

.tgv-karte--empty {
	color: var( --wp--preset--color--textgrau );
	font-style: italic;
}

/* --- Sponsoren-Logos im Footer (Phase 7 / Nutzerwunsch) --- */
.tgv-footer-sponsoren {
	margin-bottom: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.15 );
}

.tgv-footer-sponsoren__heading {
	margin: 0 0 20px;
	color: var( --wp--preset--color--primaer );
	font-size: var( --wp--preset--font-size--large );
	text-align: center;
}

.tgv-sponsoren-liste {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 20px;
}

.tgv-sponsor-item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 12px 20px;
	background: var( --wp--preset--color--primaer );
	border-radius: 10px;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tgv-sponsor-item:hover,
.tgv-sponsor-item:focus-visible {
	box-shadow: 0 8px 20px rgba( 0, 0, 0, 0.3 );
	transform: translateY( -2px );
}

.tgv-sponsor-item img {
	display: block;
	max-height: 48px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
}

.tgv-sponsor-item__name {
	color: var( --wp--preset--color--sekundaer );
	font-weight: 700;
}

.tgv-sponsoren-liste--empty {
	color: rgba( 255, 255, 255, 0.6 );
	font-style: italic;
	text-align: center;
}

@media ( prefers-reduced-motion: reduce ) {
	.tgv-sponsor-item {
		transition: none;
	}
	.tgv-sponsor-item:hover,
	.tgv-sponsor-item:focus-visible {
		transform: none;
	}
}
