/**
 * FFW Theme – Ergänzungen zur theme.json.
 *
 * Farben, Schriften, Abstände und die meisten Block-Stile stehen in
 * theme.json. Hier steht nur, was dort nicht geht:
 * 1. Anbindung an das Plugin "FFW Einsatzverwaltung" (--ffw-* Variablen)
 * 2. Kopfbereich (fest oben), Notruf-Button
 * 3. Fußbereich, Social-Media-Kacheln
 * 4. Barrierefreiheit (Fokus) und Hinweise
 *
 * Es gibt keine festen Farben: alles verweist auf die Farben der theme.json
 * (var(--wp--preset--color--…)). Eine spätere Stil-Variante (styles/*.json)
 * ändert damit automatisch auch diese Datei und die Plugin-Ausgaben.
 */

/* ==========================================================================
   1. Plugin-Anbindung: --ffw-* Variablen aus den Theme-Farben
   ========================================================================== */

/*
 * Die Plugins übernehmen die Farben des Themes. "body" ist spezifischer als
 * ":where(:root)" im Plugin-CSS und gewinnt deshalb unabhängig von der
 * Ladereihenfolge. Die Paletten-Variablen wechseln mit der Farbvariante
 * (inc/class-ffw-theme-farben.php), die Plugins damit ebenso.
 * ".editor-styles-wrapper" sorgt für dieselbe Vorschau im Block-Editor.
 */
body,
.editor-styles-wrapper {
	--ffw-farbe-primaer: var(--wp--preset--color--akzent);
	--ffw-farbe-primaer-text: var(--wp--preset--color--weiss);
	--ffw-farbe-akzent-text: var(--wp--preset--color--akzent-hell);
	--ffw-farbe-sekundaer: var(--wp--preset--color--akzent-2);
	--ffw-farbe-sekundaer-flaeche: var(--wp--preset--color--akzent-2);
	--ffw-farbe-sekundaer-text: var(--wp--preset--color--grund);
	--ffw-farbe-text: var(--wp--preset--color--text);
	--ffw-farbe-text-gedaempft: var(--wp--preset--color--text-gedaempft);
	--ffw-farbe-hintergrund: transparent;
	--ffw-farbe-flaeche: var(--wp--preset--color--flaeche);
	--ffw-farbe-flaeche-2: var(--wp--preset--color--flaeche-2);
	--ffw-farbe-rahmen: var(--wp--preset--color--rahmen);
	--ffw-farbe-balken-spur: var(--wp--preset--color--flaeche-2);
	--ffw-farbe-silhouette: var(--wp--preset--color--text-gedaempft);
	--ffw-farbe-fokus: var(--wp--preset--color--akzent-2);
	--ffw-farbe-popup: var(--wp--preset--color--flaeche);
	--ffw-innenabstand: 0;
}

/* ==========================================================================
   2. Kopfbereich und Notruf-Button
   ========================================================================== */

/* Kopfbereich bleibt beim Scrollen oben stehen. */
.wp-site-blocks > header,
.wp-site-blocks > .wp-block-template-part:first-child {
	position: sticky;
	top: 0;
	z-index: 50;
}

/* Sprungziele (z. B. /kontakt/#ffw-kontakt) nicht unter dem festen Kopfbereich. */
:target {
	scroll-margin-top: 7.5rem;
}

/* Admin-Leiste von WordPress berücksichtigen. */
.admin-bar .wp-site-blocks > header {
	top: var(--wp-admin--admin-bar--height, 0);
}

/* Kopf- und Fußband: eigene Schriftfarbe "kopf-text" auf "grund-dunkel". */
.ffw-theme-kopf {
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--kopf-text) 14%, transparent);
	color: var(--wp--preset--color--kopf-text);
}

/* Variante "Hell": Menüband und Fußbereich ebenfalls hell (weiß, dunkle
   Schrift). Die Palettenfarben werden nur innerhalb der beiden Bänder
   umgestellt; Startbild und Fahrzeugkarten bleiben dunkel. */
.ffw-variante-hell .ffw-theme-kopf,
.ffw-variante-hell .ffw-theme-fuss {
	--wp--preset--color--grund-dunkel: var(--wp--preset--color--flaeche);
	--wp--preset--color--kopf-text: var(--wp--preset--color--text);
}

.ffw-variante-hell .ffw-theme-kopf {
	border-top: 4px solid var(--wp--preset--color--akzent);
	border-bottom-color: var(--wp--preset--color--rahmen);
}

/* Menüpunkte kräftiger; beim Darüberfahren rot unterstrichen (wie der aktuelle Punkt). */
.ffw-variante-hell .ffw-theme-kopf .wp-block-navigation {
	font-weight: 600;
}

.ffw-variante-hell .ffw-theme-kopf .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--akzent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.4em;
}

.ffw-variante-hell .ffw-theme-fuss {
	border-top-color: var(--wp--preset--color--rahmen);
}

/* Logo: feste Höhe (Handy 3rem, ab 782px 4rem), Breite nach Seitenverhältnis. */
.ffw-theme-kopf .wp-block-site-logo img {
	display: block;
	width: auto;
	max-width: min(16rem, 45vw);
	height: 3rem;
	object-fit: contain;
}

@media (min-width: 782px) {
	.ffw-theme-kopf .wp-block-site-logo img {
		height: 4rem;
	}
}

/* Menüpunkte im Kopf etwas größer als die übrige Navigation (theme.json: klein). */
.ffw-theme-kopf .wp-block-navigation {
	font-size: var(--wp--preset--font-size--normal);
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50);
	background-color: var(--wp--preset--color--grund-dunkel);
	color: var(--wp--preset--color--text);
}

/*
 * Handy-Menü (geöffnetes Overlay): linksbündige Liste, je Hauptpunkt eine
 * Zeile mit Trennlinie. Untermenüs sind zugeklappt und öffnen über den
 * eigenen Pfeil-Knopf .ffw-menue-knopf (FFW_Theme::menue_knopf(),
 * assets/js/menue.js). Hat ein Hauptpunkt keinen eigenen Link, klappt die
 * ganze Zeile auf. Die langen Selektoren sind nötig, weil die Regeln des
 * Navigationsblocks für das Overlay sehr spezifisch sind.
 */
.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	align-items: stretch;
	width: 100%;
	gap: 0;
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	font-size: var(--wp--preset--font-size--mittel);
}

/* Zeile: Text links, Pfeil rechts, Untermenü darunter über die volle Breite. */
.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container > .wp-block-navigation-item {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--rahmen);
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	grid-row: 1;
	grid-column: 1;
	padding: 0.85rem 0;
	text-align: left;
}

/* Pfeil-Knopf (am Computer ausgeblendet, siehe unten). */
.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .ffw-menue-knopf:not([hidden]) {
	display: flex;
	grid-row: 1;
	grid-column: 2;
	align-items: center;
	justify-content: flex-end;
	align-self: stretch;
	min-width: 3rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

/* Hauptpunkt ohne Link: Der Knopf liegt über der ganzen Zeile (vor dem Text). */
.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:not([href]) ~ .ffw-menue-knopf {
	grid-column: 1 / -1;
	position: relative;
	z-index: 1;
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .ffw-menue-knopf svg {
	transition: transform 0.2s;
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .ffw-menue-knopf[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/* Untermenü: zugeklappt; aufgeklappt eingerückt unter dem Hauptpunkt. Ohne
   Knopf (Skript nicht geladen) bleibt es wie bei WordPress offen. */
.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
	grid-column: 1 / -1;
	align-items: stretch;
	gap: 0 !important;
	padding: 0 0 0.6rem 1rem !important;
	font-size: var(--wp--preset--font-size--normal);
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .ffw-menue-knopf[aria-expanded="false"]:not([hidden]) + .wp-block-navigation__submenu-container {
	display: none;
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item {
	align-items: flex-start;
}

.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 0;
}

@media (prefers-reduced-motion: reduce) {
	.ffw-theme-kopf .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .ffw-menue-knopf svg {
		transition: none;
	}
}

/* Außerhalb des Handy-Menüs gibt es den Pfeil-Knopf nicht. */
.ffw-menue-knopf {
	display: none;
}

/* Untermenü (z. B. "Informationen") am Computer: dunkler Kasten mit Rahmen. */
.ffw-theme-kopf .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
	min-width: 13rem;
	padding-block: 0.4rem;
	border: 1px solid var(--wp--preset--color--rahmen) !important;
	border-radius: 6px;
}

.ffw-theme-kopf .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.45rem 1rem;
}

/* Aktueller Menüpunkt */
.ffw-theme-kopf .wp-block-navigation .current-menu-item > a,
.ffw-theme-kopf .wp-block-navigation [aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--akzent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.4em;
}

.ffw-theme-notruf {
	display: inline-flex;
	margin: 0;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 0.9rem;
	border-radius: 4px;
	background: var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--weiss);
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.ffw-theme-notruf__icon {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}

/* Am Handy kein Notruf-Knopf im Kopf: Die Menüstriche rücken an den
   rechten Rand. */
@media (max-width: 781px) {
	.ffw-theme-kopf .ffw-theme-notruf {
		display: none;
	}
}

/* Knopf "Farbwechsel" (Hell/Dunkel): rund, dünner Rahmen in Schriftfarbe,
   Sonne bzw. Mond. Am Handy links neben den Menüstrichen. */
.ffw-theme-farbwechsel {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 50%;
	color: inherit;
	transition: background-color 0.2s, border-color 0.2s;
}

.ffw-theme-farbwechsel:hover {
	border-color: var(--wp--preset--color--akzent);
	background-color: color-mix(in srgb, currentColor 8%, transparent);
}

.ffw-theme-farbwechsel svg {
	width: 1.15rem;
	height: 1.15rem;
}

@media (max-width: 781px) {
	.ffw-theme-kopf .ffw-theme-farbwechsel {
		order: -1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffw-theme-farbwechsel {
		transition: none;
	}
}

/* ==========================================================================
   3. Fußbereich, Social-Media-Kacheln
   ========================================================================== */

.ffw-theme-fuss {
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--kopf-text) 14%, transparent);
	color: var(--wp--preset--color--kopf-text);
	font-size: var(--wp--preset--font-size--klein);
}

/* Social-Media-Kacheln am rechten Bildschirmrand (FFW_Theme::social_leiste),
   erst ab 782 px Breite; am Handy gibt es derzeit keine Social-Media-Links. */
.ffw-theme-social-leiste {
	display: none;
}

@media (min-width: 782px) {
	.ffw-theme-social-leiste {
		position: fixed;
		top: 50%;
		right: 0;
		z-index: 50;
		display: block;
		transform: translateY(-50%);
	}

	.ffw-theme-social-leiste ul {
		display: flex;
		flex-direction: column;
		gap: 16px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.ffw-theme-social-leiste a {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 3.25rem;
		height: 3.25rem;
		border-radius: 6px 0 0 6px;
		background: var(--wp--preset--color--akzent);
		color: var(--wp--preset--color--weiss);
		transition: background-color 0.2s;
	}

	.ffw-theme-social-leiste .ffw-theme-icon {
		width: 1.6rem;
		height: 1.6rem;
	}

	.ffw-theme-social-leiste__name {
		position: absolute;
		top: 50%;
		right: calc(100% + 0.5rem);
		padding: 0.35rem 0.75rem;
		border-radius: 4px;
		background: var(--wp--preset--color--grund-dunkel);
		color: var(--wp--preset--color--kopf-text);
		font-size: var(--wp--preset--font-size--klein);
		font-weight: 600;
		white-space: nowrap;
		opacity: 0;
		pointer-events: none;
		transform: translate(0.5rem, -50%);
		transition: opacity 0.2s, transform 0.2s;
	}

	.ffw-theme-social-leiste a:hover,
	.ffw-theme-social-leiste a:focus-visible {
		background: var(--wp--preset--color--grund-dunkel);
	}

	.ffw-theme-social-leiste a:hover .ffw-theme-social-leiste__name,
	.ffw-theme-social-leiste a:focus-visible .ffw-theme-social-leiste__name {
		opacity: 1;
		transform: translate(0, -50%);
	}
}

@media print {
	.ffw-theme-social-leiste {
		display: none;
	}
}

/* Fußzeile: Copyright links, mit Abstand daneben Impressum und Datenschutz. */
.ffw-theme-fusszeile {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 3rem;
	color: color-mix(in srgb, var(--wp--preset--color--kopf-text) 72%, transparent);
}

.ffw-theme-fusszeile p {
	margin: 0;
}

.ffw-theme-fusszeile__links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffw-theme-fusszeile__links a {
	color: inherit;
	text-decoration: none;
}

.ffw-theme-fusszeile__links a:hover,
.ffw-theme-fusszeile__links a:focus-visible {
	color: var(--wp--preset--color--kopf-text);
	text-decoration: underline;
}

/* ==========================================================================
   3b. Startseite: Startbild, Kennzahlen, Einsatzkacheln, Band
   ========================================================================== */

.ffw-theme-icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 1.15em;
	height: 1.15em;
}

.ffw-theme-icon svg {
	width: 100%;
	height: 100%;
}

/* Buttons im Startbild (gleicher Stil wie die WordPress-Buttons) */
.ffw-theme-knopf {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	border: 1px solid var(--wp--preset--color--akzent);
	border-radius: 4px;
	background: var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--weiss);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.ffw-theme-knopf:hover,
.ffw-theme-knopf:focus-visible {
	border-color: var(--wp--preset--color--akzent-hell);
	background: var(--wp--preset--color--akzent-hell);
	color: var(--wp--preset--color--grund);
}

.ffw-theme-knopf--umriss {
	border-color: var(--wp--preset--color--text);
	background: transparent;
	color: var(--wp--preset--color--text);
}

.ffw-theme-knopf--umriss:hover,
.ffw-theme-knopf--umriss:focus-visible {
	border-color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--text);
	color: var(--wp--preset--color--grund);
}

/* Startbild */
.ffw-theme-hero {
	position: relative;
	color: var(--wp--preset--color--kopf-text);
	display: flex;
	align-items: center;
	min-height: clamp(26rem, 72vh, 40rem);
	margin-block: 0;
	overflow: hidden;
	background: var(--wp--preset--color--grund-dunkel);
}

.ffw-theme-hero__bild {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Diashow (blocks/hero/render.php, assets/js/startbild.js): Bilder liegen
 * übereinander, das sichtbare hat die Klasse is-aktiv und wird weich
 * eingeblendet. Pause-Knopf oben rechts (unten ragen die Kennzahlen hinein).
 */
.ffw-theme-hero__bilder {
	position: absolute;
	inset: 0;
}

.ffw-theme-hero--diashow .ffw-theme-hero__bild {
	opacity: 0;
	transition: opacity 1.2s ease-in-out;
}

.ffw-theme-hero--diashow .ffw-theme-hero__bild.is-aktiv {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.ffw-theme-hero--diashow .ffw-theme-hero__bild {
		transition: none;
	}
}

.ffw-theme-hero__pause {
	/* Dezent im unteren rechten Eck des Startbilds. Am Handy und auf
	   mittelbreiten Bildschirmen reichen die Kennzahl-Kacheln (3rem in das
	   Startbild, siehe .ffw-theme-hero + .ffw-theme-kennzahlen) bis fast an
	   den Rand; dort sitzt der Knopf im Eck knapp über den Kacheln. */
	position: absolute;
	z-index: 2;
	right: 0.75rem;
	bottom: calc(3rem + 0.75rem);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--grund-dunkel) 40%, transparent);
	color: var(--wp--preset--color--kopf-text);
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.2s, background-color 0.2s;
}

@media (min-width: 1400px) {
	.ffw-theme-hero__pause {
		bottom: 0.75rem;
	}
}

.ffw-theme-hero__pause[hidden] {
	display: none;
}

.ffw-theme-hero__pause:hover,
.ffw-theme-hero__pause:focus-visible,
.ffw-theme-hero__pause[aria-pressed="true"] {
	background: color-mix(in srgb, var(--wp--preset--color--grund-dunkel) 80%, transparent);
	opacity: 1;
}

.ffw-theme-hero__pause:focus-visible {
	outline: 2px solid var(--wp--preset--color--kopf-text);
	outline-offset: 3px;
}

.ffw-theme-hero__pause svg {
	width: 0.95rem;
	height: 0.95rem;
}

/* Angehalten: Abspielen-Zeichen statt Pause-Zeichen. */
.ffw-theme-hero__pause .ffw-theme-hero__weiter-icon,
.ffw-theme-hero__pause[aria-pressed="true"] .ffw-theme-hero__pause-icon {
	display: none;
}

.ffw-theme-hero__pause[aria-pressed="true"] .ffw-theme-hero__weiter-icon {
	display: block;
}

/* Gleichmäßige Abdunklung, damit der Text auf jedem Foto lesbar bleibt. */
.ffw-theme-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--wp--preset--color--grund-dunkel) 62%, transparent);
}

.ffw-theme-hero__inhalt {
	position: relative;
	z-index: 1;
	width: min(var(--wp--style--global--wide-size), 100% - 2 * var(--wp--preset--spacing--40));
	margin-inline: auto;
	padding-block: var(--wp--preset--spacing--70) calc(var(--wp--preset--spacing--70) + 3rem);
}

.ffw-theme-hero__slogan {
	margin: 0 0 0.75rem;
	color: var(--ffw-theme-hero-akzent, var(--wp--preset--color--akzent-hell));
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ffw-theme-hero__titel {
	color: inherit; /* theme.json gibt Überschriften die Textfarbe; hier gilt die helle Bandfarbe. */
	max-width: 15ch;
	margin: 0;
	font-size: var(--wp--preset--font-size--hero);
	line-height: 1.08;
}

.ffw-theme-hero__text {
	max-width: 38rem;
	margin: 1rem 0 0;
	font-size: var(--wp--preset--font-size--mittel);
}

.ffw-theme-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: var(--wp--preset--spacing--50);
}

/* Kennzahlen: ragen direkt unter dem Startbild in das Bild hinein. */
.ffw-theme-kennzahlen {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	margin-block: var(--wp--preset--spacing--50) 0;
	padding: 0;
	list-style: none;
}

.ffw-theme-hero + .ffw-theme-kennzahlen {
	margin-top: -3rem;
}

.ffw-theme-kennzahlen__kachel {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	padding: 0.9rem 1rem;
	border: 1px solid var(--wp--preset--color--rahmen);
	border-radius: 6px;
	background: var(--wp--preset--color--flaeche);
}

.ffw-theme-kennzahlen__kachel .ffw-theme-icon {
	width: 2.25rem;
	height: 2.25rem;
	padding: 0.45rem;
	border-radius: 50%;
	background: var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--weiss);
}

.ffw-theme-kennzahlen__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ffw-theme-kennzahlen__wert {
	font-size: var(--wp--preset--font-size--gross);
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.ffw-theme-kennzahlen__label {
	color: var(--wp--preset--color--text-gedaempft);
	font-size: var(--wp--preset--font-size--klein);
}

@media (min-width: 782px) {
	.ffw-theme-kennzahlen {
		grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
		grid-auto-flow: column;
	}
}

.ffw-theme-mehr-link a {
	font-weight: 600;
	text-decoration: none;
}

.ffw-theme-mehr-link a:hover {
	text-decoration: underline;
}

/* Plugin-Block "Letzte Einsätze" in der Darstellung "Kacheln" */
.is-style-kacheln .ffw {
	margin-block: 0;
}

.is-style-kacheln .ffw-letzte__liste {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	gap: 0.75rem;
	border-top: 0;
}

.is-style-kacheln .ffw-letzte__eintrag {
	border-bottom: 0;
}

.is-style-kacheln .ffw .ffw-letzte__link {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	height: 100%;
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--rahmen);
	border-radius: 6px;
	background: var(--wp--preset--color--flaeche);
}

.is-style-kacheln .ffw .ffw-letzte__link:hover,
.is-style-kacheln .ffw .ffw-letzte__link:focus-visible {
	border-color: var(--wp--preset--color--akzent-2);
}

.is-style-kacheln .ffw-stichwort-icon--klein {
	--ffw-icon-groesse: 2.5rem;
}

/* Im Startbild (abgedunkeltes Foto) immer helle Umriss-Knöpfe. */
.ffw-theme-hero .ffw-theme-knopf--umriss {
	border-color: var(--wp--preset--color--kopf-text);
	color: var(--wp--preset--color--kopf-text);
}

.ffw-theme-hero .ffw-theme-knopf--umriss:hover,
.ffw-theme-hero .ffw-theme-knopf--umriss:focus-visible {
	background: var(--wp--preset--color--kopf-text);
	color: var(--wp--preset--color--grund-dunkel);
}

/* Variante "Hell": Slogan auf dem dunklen Startbild in hellerem Rot. */
.ffw-variante-hell {
	--ffw-theme-hero-akzent: #ff8a80;
}

/* Den Link "Alle Einsätze" zeigt die Startseite schon oben rechts. */
.is-style-kacheln .ffw-letzte__alle {
	display: none;
}

/* Plugin-Block "Letzte Einsätze" in der Darstellung "Letzter Einsatz groß".
   Am Handy wie "Kacheln": alle Einsätze gleich groß untereinander. Ab 782 px:
   neuester Einsatz groß (mit Hinweis und Berichtsanfang aus
   ffw-einsatzverwaltung/letzte-einsaetze.php), die übrigen als Liste daneben.
   Hinweis und Berichtsanfang sind sonst überall ausgeblendet. */
.ffw-letzte__hinweis,
.ffw-letzte__auszug {
	display: none;
}

.is-style-hervorgehoben .ffw {
	margin-block: 0;
}

.is-style-hervorgehoben .ffw-letzte__alle {
	display: none;
}

.is-style-hervorgehoben .ffw-letzte__liste {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
	border-top: 0;
}

.is-style-hervorgehoben .ffw-letzte__eintrag {
	border-bottom: 0;
}

.is-style-hervorgehoben .ffw .ffw-letzte__link {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	height: 100%;
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--rahmen);
	border-radius: 6px;
	background: var(--wp--preset--color--flaeche);
}

.is-style-hervorgehoben .ffw .ffw-letzte__link:hover,
.is-style-hervorgehoben .ffw .ffw-letzte__link:focus-visible {
	border-color: var(--wp--preset--color--akzent-2);
}

.is-style-hervorgehoben .ffw-stichwort-icon--klein {
	--ffw-icon-groesse: 2.5rem;
}

@media (min-width: 782px) {
	.is-style-hervorgehoben .ffw-letzte__liste {
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		grid-auto-rows: 1fr;
		gap: 0.6rem;
	}

	/* Neuester Einsatz: groß, Rand links in der Farbe des Alarmstichworts. */
	.is-style-hervorgehoben .ffw-letzte__eintrag:first-child {
		grid-row: span 3;
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:first-child .ffw-letzte__link {
		flex-direction: row;
		gap: 1rem;
		padding: 1.25rem 1.5rem;
		border-left: 4px solid var(--ffw-stichwort-farbe, var(--wp--preset--color--akzent));
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:first-child .ffw-stichwort-icon--klein {
		--ffw-icon-groesse: 2.75rem;
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:first-child .ffw-letzte__text {
		gap: 0.5rem;
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:first-child .ffw-letzte__kopf {
		flex-direction: column;
		align-items: flex-start;
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:first-child .ffw-letzte__titel {
		font-size: var(--wp--preset--font-size--mittel);
		line-height: 1.3;
	}

	.is-style-hervorgehoben .ffw-letzte__hinweis {
		display: block;
		color: var(--wp--preset--color--text-gedaempft);
		font-size: var(--wp--preset--font-size--klein);
		font-weight: 600;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	.is-style-hervorgehoben .ffw-letzte__auszug {
		display: block;
		color: var(--wp--preset--color--text);
		line-height: 1.55;
	}

	/* Weitere Einsätze: kompakt, ohne Icon, Kürzel links neben dem Titel. */
	.is-style-hervorgehoben .ffw-letzte__eintrag:not(:first-child) .ffw-letzte__link {
		flex-direction: row;
		align-items: center;
		padding: 0.75rem 1rem;
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:not(:first-child) .ffw-stichwort-icon {
		display: none;
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:not(:first-child) .ffw-letzte__kopf {
		flex-wrap: nowrap;
		align-items: flex-start;
	}

	.is-style-hervorgehoben .ffw-letzte__eintrag:not(:first-child) .ffw-badge {
		flex-shrink: 0;
		margin-top: 0.1em;
	}
}

/* Band "Mitmachen": dunkel, links Foto, rechts Gründe und zwei Knöpfe. */
.ffw-theme-mitmachen .wp-block-columns {
	gap: var(--wp--preset--spacing--60);
}

.ffw-theme-mitmachen h2 {
	margin-top: 0.25rem;
	color: inherit;
}

.ffw-theme-mitmachen__kicker {
	margin: 0;
	color: var(--ffw-theme-hero-akzent, var(--wp--preset--color--akzent-hell));
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ffw-theme-mitmachen__gruende {
	display: grid;
	gap: 0.6rem;
	padding: 0;
	list-style: none;
}

/* Haken vor jedem Grund (Icon assets/icons/haken.svg als Maske, Feuerwehrrot). */
.ffw-theme-mitmachen__gruende li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
}

.ffw-theme-mitmachen__gruende li::before {
	content: "";
	flex-shrink: 0;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background: var(--wp--preset--color--akzent);
	-webkit-mask: url(../icons/haken.svg) center / 70% no-repeat, linear-gradient(#000 0 0);
	mask: url(../icons/haken.svg) center / 70% no-repeat, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
}

.ffw-theme-mitmachen .is-style-outline .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--kopf-text);
	background: transparent;
	color: var(--wp--preset--color--kopf-text);
}

.ffw-theme-mitmachen .is-style-outline .wp-block-button__link:hover,
.ffw-theme-mitmachen .is-style-outline .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--kopf-text);
	color: var(--wp--preset--color--grund-dunkel);
}

/* Foto (Block ffw-theme/mitmachen-bild): Querformat 3:2, ohne Bild eine
   dunkle Fläche mit Personen-Symbol. */
.ffw-theme-mitmachen-bild img,
.ffw-theme-mitmachen-bild--leer {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	border-radius: 6px;
	object-fit: cover;
}

.ffw-theme-mitmachen-bild--leer {
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--wp--preset--color--kopf-text) 10%, transparent);
	color: color-mix(in srgb, var(--wp--preset--color--kopf-text) 45%, transparent);
}

.ffw-theme-mitmachen-bild--leer .ffw-theme-icon {
	width: 4rem;
	height: 4rem;
}

/* ==========================================================================
   3c. Inhaltsseiten
   ========================================================================== */

/* Hinweis "Im Notfall 112" (Kontaktseite) */
.ffw-theme-notruf-hinweis {
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--wp--preset--color--rahmen);
	border-inline-start: 4px solid var(--wp--preset--color--akzent);
	border-radius: 4px;
	background: var(--wp--preset--color--flaeche);
}

.ffw-theme-notruf-hinweis p {
	margin: 0;
}

/* Einleitungstext (z. B. Seite "Mitmachen") */
.ffw-theme-einleitung {
	font-size: 1.125rem;
	line-height: 1.6;
}

/* Karte: flacher Kasten, in Spalten gleich hoch */
.ffw-theme-karte {
	height: 100%;
	padding: 1.25rem 1.4rem;
	border: 1px solid var(--wp--preset--color--rahmen);
	border-radius: 6px;
	background: var(--wp--preset--color--flaeche);
}

.ffw-theme-karte > :first-child {
	margin-top: 0;
}

.ffw-theme-karte > :last-child {
	margin-bottom: 0;
}

.ffw-theme-karte h3 {
	font-size: 1.15rem;
}

/* Kurze Angaben in einer Karte (Alter, Übung …) */
.ffw-theme-angaben {
	padding: 0.75rem 0 0;
	border-top: 1px solid var(--wp--preset--color--rahmen);
	list-style: none;
	font-size: 0.95rem;
}

.ffw-theme-angaben li + li {
	margin-top: 0.25rem;
}

/* Nummerierte Schritte mit Zahl im Kreis */
.ffw-theme-schritte {
	display: grid;
	gap: 1rem;
	padding: 0;
	list-style: none;
	counter-reset: ffw-schritt;
}

.ffw-theme-schritte > li {
	position: relative;
	min-height: 2.25rem;
	padding-inline-start: 3.25rem;
	counter-increment: ffw-schritt;
}

.ffw-theme-schritte > li::before {
	content: counter(ffw-schritt);
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--weiss);
	font-weight: 700;
}

/* Aufruf am Seitenende (z. B. "Interesse geweckt?") */
.ffw-theme-aufruf {
	margin-top: var(--wp--preset--spacing--60);
	background: var(--wp--preset--color--flaeche);
	padding: 1.5rem 1.75rem;
	border: 1px solid var(--wp--preset--color--rahmen);
	border-inline-start: 4px solid var(--wp--preset--color--akzent);
	border-radius: 6px;
}

.ffw-theme-aufruf h2 {
	margin-top: 0;
}

/* Seite "Mitmachen" (patterns/seite-mitmachen.php) */

/* Einstieg: Einleitung und Knöpfe links, Gruppenbild rechts (3:2). */
.ffw-theme-einstieg .ffw-theme-einleitung {
	margin-top: 0;
}

.ffw-theme-gruppenbild {
	margin: 0;
}

.ffw-theme-gruppenbild img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	border-radius: 6px;
	object-fit: cover;
}

/* Vorteile: Symbol im roten Kreis über der Überschrift. Kreis mit
   ausgestanzten Linien (Maske mit "exclude"), dahinter die weiße Karte. */
.ffw-theme-vorteil::before {
	content: "";
	display: block;
	width: 2.75rem;
	height: 2.75rem;
	margin-bottom: 0.9rem;
	border-radius: 50%;
	background: var(--wp--preset--color--akzent);
	-webkit-mask: var(--ffw-theme-symbol) center / 55% no-repeat, linear-gradient(#000 0 0);
	mask: var(--ffw-theme-symbol) center / 55% no-repeat, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
}

.ffw-theme-vorteil--team {
	--ffw-theme-symbol: url(../icons/personen.svg);
}

.ffw-theme-vorteil--ausbildung {
	--ffw-theme-symbol: url(../icons/ausbildung.svg);
}

.ffw-theme-vorteil--technik {
	--ffw-theme-symbol: url(../icons/fahrzeug.svg);
}

/* Wege (Einsatzabteilung, Jugendfeuerwehr): rote Kante oben. */
.ffw-theme-weg {
	border-top: 4px solid var(--wp--preset--color--akzent);
	border-radius: 0 0 6px 6px;
}

/* Angaben mit kleinem roten Symbol (Klasse am Listenpunkt). */
.ffw-theme-angaben li[class*="ffw-theme-angabe--"] {
	position: relative;
	padding-inline-start: 1.75rem;
}

.ffw-theme-angaben li[class*="ffw-theme-angabe--"]::before {
	content: "";
	position: absolute;
	top: 0.2em;
	inset-inline-start: 0;
	width: 1.15rem;
	height: 1.15rem;
	background: var(--wp--preset--color--akzent);
	-webkit-mask: var(--ffw-theme-symbol) center / contain no-repeat;
	mask: var(--ffw-theme-symbol) center / contain no-repeat;
}

.ffw-theme-angabe--alter {
	--ffw-theme-symbol: url(../icons/personen.svg);
}

.ffw-theme-angabe--termine {
	--ffw-theme-symbol: url(../icons/kalender.svg);
}

.ffw-theme-angabe--zeit {
	--ffw-theme-symbol: url(../icons/uhr.svg);
}

.ffw-theme-angabe--ort {
	--ffw-theme-symbol: url(../icons/ort.svg);
}

/* Schritte nebeneinander auf einer Linie (ab 782 px). */
@media (min-width: 782px) {
	.ffw-theme-schritte--quer {
		position: relative;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--50);
		text-align: center;
	}

	.ffw-theme-schritte--quer::before {
		content: "";
		position: absolute;
		top: 1.125rem;
		right: 16.66%;
		left: 16.66%;
		height: 2px;
		background: var(--wp--preset--color--rahmen);
	}

	.ffw-theme-schritte--quer > li {
		padding-inline-start: 0;
		padding-top: 3rem;
	}

	.ffw-theme-schritte--quer > li::before {
		inset-inline-start: 50%;
		transform: translateX(-50%);
	}
}

/* Dunkles Abschlussband (statt heller Karte). */
.ffw-theme-aufruf--dunkel {
	gap: 1rem 2rem;
	border: 0;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
}

.ffw-theme-aufruf--dunkel h2 {
	margin-bottom: 0.25rem;
	color: inherit;
}

.ffw-theme-aufruf--dunkel p {
	margin: 0;
	opacity: 0.85;
}

/* ==========================================================================
   4. Barrierefreiheit und Hinweise
   ========================================================================== */

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--akzent-2);
	outline-offset: 2px;
}

/* Sprunglink "Zum Inhalt springen" (setzt WordPress bei Block-Themes ein). */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--grund);
}

/* Hinweise, die nur Administratoren sehen. */
.ffw-theme-hinweis {
	padding: 0.75rem 1rem;
	border: 1px dashed var(--wp--preset--color--akzent-2);
	border-radius: 4px;
	color: var(--wp--preset--color--text-gedaempft);
	font-size: var(--wp--preset--font-size--klein);
}

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

/* 404-Seite: Links nebeneinander, ohne zusätzliche Absatzabstände */
.ffw-theme-links-404 {
	margin-block: var(--wp--preset--spacing--50);
}

.ffw-theme-links-404 p {
	margin: 0;
}

/* Sponsoren: Raster aus Karten (Name, Website) und breite Partner-Karte */
.ffw-theme-sponsoren {
	gap: 0.75rem;
}

.ffw-theme-sponsor {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.25rem;
	min-height: 5.5rem;
	padding: 1rem 1.15rem;
}

.ffw-theme-sponsor > *,
.ffw-theme-partner > * {
	margin-block: 0;
}

.ffw-theme-partner {
	display: grid;
	gap: 0.35rem;
	max-width: 38rem;
	border-inline-start: 4px solid var(--wp--preset--color--akzent);
}

.ffw-theme-sponsor__name {
	font-weight: 600;
	line-height: 1.35;
}

.ffw-theme-partner .ffw-theme-sponsor__name {
	font-size: 1.2rem;
}

.ffw-theme-sponsor__kategorie {
	color: var(--wp--preset--color--text-gedaempft);
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ffw-theme-sponsor__link {
	font-size: var(--wp--preset--font-size--klein);
	overflow-wrap: anywhere;
}

.ffw-theme-sponsor__link a {
	color: var(--wp--preset--color--akzent-2);
	text-decoration: none;
}

.ffw-theme-sponsor__link a:hover,
.ffw-theme-sponsor__link a:focus-visible {
	text-decoration: underline;
}

/*
 * Fahrzeuge (patterns/seite-fahrzeuge.php): Raster aus Karten mit Bild und
 * rot hinterlegtem Textteil, "Mehr erfahren" als weißer Knopf. "Mehr
 * erfahren" ist ein <details>; eine geöffnete Karte nimmt die ganze Zeile
 * ein: großes Bild oben, darunter technische Daten und Ausrüstung in zwei
 * Spalten (Block "Spalten"). Flex statt Raster in der Karte, weil Safari
 * Rasterinhalte in Karten nicht immer zeichnete. Beim Auf- und Zuklappen
 * scrollt assets/js/fahrzeuge.js die Karte in den sichtbaren Bereich.
 */
.ffw-theme-fahrzeuge {
	gap: 1rem;
	grid-auto-flow: row dense; /* Lücke vor einer geöffneten Karte auffüllen. */
}

.ffw-theme-fahrzeug {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
	border: 0;
	background: var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--weiss);
}

.ffw-theme-fahrzeug > *,
.ffw-theme-fahrzeug__text > * {
	margin-block: 0;
}

.ffw-theme-fahrzeug__bild {
	margin: 0;
}

.ffw-theme-fahrzeug__bild img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	/* Bildausschnitt je Bild (Editor-Feld "Bildausschnitt"), sonst Mitte. */
	object-position: var(--ffw-fokus, 50% 50%);
}

.ffw-theme-fahrzeug__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1.25rem 1.4rem 1.4rem;
}

.ffw-theme-fahrzeug .ffw-theme-fahrzeug__text h3 {
	color: inherit;
	font-size: 1.35rem;
	line-height: 1.25;
}

.ffw-theme-fahrzeug__art {
	font-weight: 600;
}

.ffw-theme-fahrzeug__funk {
	opacity: 0.88;
	font-size: var(--wp--preset--font-size--klein);
}

.ffw-theme-fahrzeug details {
	margin-top: auto;
	padding-top: 1rem;
}

/* "Mehr erfahren": weißer Knopf mit Pfeil (zeigt geöffnet nach oben). */
.ffw-theme-fahrzeug summary {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.55rem 1rem;
	border-radius: 4px;
	background: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--akzent);
	cursor: pointer;
	font-weight: 600;
	list-style: none;
}

.ffw-theme-fahrzeug summary::-webkit-details-marker {
	display: none;
}

.ffw-theme-fahrzeug summary::after {
	content: "";
	width: 0.45em;
	height: 0.45em;
	margin-top: -0.2em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.ffw-theme-fahrzeug details[open] > summary::after {
	margin-top: 0.2em;
	transform: rotate(-135deg);
}

.ffw-theme-fahrzeug summary:hover {
	background: color-mix(in srgb, var(--wp--preset--color--weiss) 88%, var(--wp--preset--color--akzent));
}

.ffw-theme-fahrzeug summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--weiss);
	outline-offset: 3px;
}

.ffw-theme-fahrzeug__spalten {
	gap: 1.5rem 3rem;
	margin: 1.5rem 0 0;
}

.ffw-theme-fahrzeug h4 {
	margin: 0 0 0.5rem;
	color: inherit;
	font-size: var(--wp--preset--font-size--klein);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ffw-theme-fahrzeug__daten {
	margin: 0;
}

.ffw-theme-fahrzeug__daten table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.ffw-theme-fahrzeug__daten td {
	padding: 0.45rem 0;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: auto; /* Lange Wörter wie "Löschwassertank" mit Trennstrich umbrechen. */
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	vertical-align: top;
}

.ffw-theme-fahrzeug__daten td:first-child {
	width: 45%;
	padding-inline-end: 1rem;
	opacity: 0.88;
}

.ffw-theme-fahrzeug__ausruestung {
	margin: 0;
	padding-inline-start: 1.2rem;
	font-size: 0.95rem;
	line-height: 1.7;
	column-width: 14rem;
	column-gap: 2rem;
}

.ffw-theme-fahrzeug__ausruestung li {
	break-inside: avoid;
}

/* Geöffnete Karte: ganze Zeile, Bild im Breitformat. */
.ffw-theme-fahrzeug:has(details[open]) {
	grid-column: 1 / -1;
}

.ffw-theme-fahrzeug:has(details[open]) > .ffw-theme-fahrzeug__text {
	padding: 1.5rem 1.75rem 1.75rem;
}

.ffw-theme-fahrzeug:has(details[open]) .ffw-theme-fahrzeug__text h3 {
	font-size: 1.6rem;
}

@media (min-width: 782px) {

	.ffw-theme-fahrzeug:has(details[open]) > .ffw-theme-fahrzeug__bild img {
		aspect-ratio: 21 / 9;
	}
}

/*
 * Abteilungs- und Jugendseite (patterns/seite-abteilung.php,
 * patterns/seite-jugendfeuerwehr.php): rote Zahlen-Kacheln, Bilder mit
 * Bildunterschrift, Chronik als Zeitleiste, Ansprechpartner.
 */
.ffw-theme-zahlen {
	gap: 0.75rem;
}

/* Handy: zwei Kacheln nebeneinander statt einer (überschreibt das Raster-Layout). */
@media (max-width: 599px) {

	.wp-block-group.ffw-theme-zahlen {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.ffw-theme-zahl {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.2rem;
	padding: 1rem 1.15rem;
	border-radius: 6px;
	background: var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--weiss);
}

.ffw-theme-zahl > * {
	margin-block: 0;
}

.ffw-theme-zahl__wert {
	font-size: var(--wp--preset--font-size--gross);
	font-weight: 700;
	line-height: 1.15;
}

.ffw-theme-zahl__bezeichnung {
	opacity: 0.9;
	hyphens: auto;
	font-size: var(--wp--preset--font-size--klein);
	line-height: 1.35;
}

.ffw-theme-stand {
	margin-top: 0.5rem;
	color: var(--wp--preset--color--text-gedaempft);
	font-size: var(--wp--preset--font-size--klein);
}

/* Bilder im Text und Raster (Gerätehaus, Räume, Jugend) */
.ffw-theme-raeume {
	gap: 1rem;
	margin-top: var(--wp--preset--spacing--40);
}

.wp-block-column > .wp-block-image img,
.ffw-theme-raeume .wp-block-image img {
	display: block;
	width: 100%;
	border-radius: 6px;
}

/* Zwischenüberschrift in einer Textspalte (z. B. "Unsere Geschichte" neben
   dem Bild der Jugendfeuerwehr): Abstand zum Text darüber. */
.wp-block-column > .wp-block-heading:not(:first-child) {
	margin-top: var(--wp--preset--spacing--50);
}

/* Bild neben Text (Gerätehaus, Jugendraum): im eigenen Seitenverhältnis,
   nichts wird abgeschnitten. */
.wp-block-column > .wp-block-image img {
	height: auto;
}

.ffw-theme-raeume .wp-block-image {
	margin: 0;
}

/* Raster der Räume: einheitliches Hochformat 4:5 wie die Fotos (ca. 4:5 bis
   9:10), damit kaum etwas abgeschnitten wird. */
.ffw-theme-raeume .wp-block-image img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.wp-block-column > .wp-block-image figcaption,
.ffw-theme-raeume figcaption {
	margin-top: 0.4rem;
	color: var(--wp--preset--color--text-gedaempft);
	font-size: var(--wp--preset--font-size--klein);
	text-align: start;
}

/* Chronik: senkrechte Linie mit roten Punkten */
.ffw-theme-chronik {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	max-width: 48rem;
	margin-inline-start: 0.4rem;
	padding-inline-start: 1.5rem;
	border-inline-start: 2px solid var(--wp--preset--color--rahmen);
}

.ffw-theme-chronik > * {
	margin-block: 0;
}

.ffw-theme-chronik__eintrag {
	position: relative;
}

.ffw-theme-chronik__eintrag::before {
	content: "";
	position: absolute;
	top: 0.4rem;
	left: calc(-1.5rem - 7px);
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--akzent);
}

.ffw-theme-chronik__eintrag > * {
	margin-block: 0;
}

.ffw-theme-chronik__jahr {
	color: var(--wp--preset--color--akzent);
	font-weight: 700;
}

/* Ansprechpartner */
.ffw-theme-ansprechpartner {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 3rem;
	height: auto;
	max-width: 38rem;
	border-inline-start: 4px solid var(--wp--preset--color--akzent);
}

.ffw-theme-ansprechpartner > *,
.ffw-theme-person > * {
	margin-block: 0;
}

/* Mehr Abstand vor den Abschnitten dieser Seiten. */
.ffw-theme-einleitung + h2,
.ffw-theme-zahlen + h2,
.ffw-theme-stand + h2,
.ffw-theme-raeume + h2,
.ffw-theme-chronik + h2,
.ffw-theme-ansprechpartner + h2,
.wp-block-post-content:has(> .ffw-theme-zahlen) > p + h2,
.wp-block-columns + h2 {
	margin-top: var(--wp--preset--spacing--60);
}

.ffw-theme-person__funktion {
	color: var(--wp--preset--color--text-gedaempft);
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ffw-theme-person__name {
	font-size: 1.1rem;
	font-weight: 600;
}

/* Name als Link zum Kontaktformular, mit Brief-Symbol (assets/icons/brief.svg). */
.ffw-theme-person__kontakt {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	color: inherit;
	text-decoration: none;
}

.ffw-theme-person__kontakt::after {
	content: "";
	flex-shrink: 0;
	width: 1.1em;
	height: 1.1em;
	background: var(--wp--preset--color--akzent);
	-webkit-mask: url(../icons/brief.svg) center / contain no-repeat;
	mask: url(../icons/brief.svg) center / contain no-repeat;
}

.ffw-theme-person__kontakt:hover,
.ffw-theme-person__kontakt:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--akzent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
}

