/*
 * Neuigkeiten („Aktuelles“): Karten auf der Startseite (Block fhd/termine-uebersicht, seit Runde 19 über beiden Spalten),
 * auf den Gruppenseiten (Block fhd/neuigkeiten) und die Teile der Seite einer Neuigkeit (Block fhd/neuigkeit-details,
 * Theme-Vorlage single-fhd_neuigkeit). Nach DESIGN.md: Karte = Fläche mit 10 px Radius ohne Rahmen und ohne Schatten
 * (sie liegt im Papier, sie schwebt nicht), Titel in Geologica, Amber nur am Klickbaren (Link-Unterstrich, „Weiterlesen“-Pfeil,
 * Knopf), keine Schmucklabels. Die ganze Karte ist klickbar (Runde 19): Der Titel-Link überdeckt sie mit ::after, ein
 * eigener Knopf und das Bild (öffnet sich groß) liegen darüber. Farben und Schriften aus theme.json.
 */

.fhd-aktuelles {
	margin-block: 0;
}

.fhd-aktuelles__liste {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fhd-aktuelles__liste > li {
	margin: 0;
}

/* ---------- Startseite: über beiden Spalten (Veranstaltungen | Regelmäßig), gleicher Spaltenkopf ---------- */

.fhd-termine.fhd-termine--uebersicht > .fhd-aktuelles--startseite {
	grid-column: 1 / -1;
}

.fhd-termine.fhd-termine--uebersicht.fhd-termine--mit-aktuelles {
	row-gap: clamp(36px, 4vw, 56px);
}

/* Karten nebeneinander, so viele wie laufen (1–3); eine einzelne höchstens etwa zwei Drittel breit */
.fhd-aktuelles--startseite .fhd-aktuelles__liste {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 16px;
	margin-top: 16px;
}

.fhd-aktuelles--startseite .fhd-aktuelles__liste[data-anzahl="1"] {
	max-width: 46rem;
}

/* Eine einzelne Neuigkeit ab 981 px (QA 24.09.2026: die 46rem breite Karte ließ rechts eine Lücke ohne Bezug): Sie steht
   genau über der Spalte „Veranstaltungen“ — Aktuelles übernimmt per subgrid das Raster darunter (1,2 / 1), Überschrift
   und Linie laufen weiter über beide Spalten. Der freie Platz rechts fluchtet so mit „Regelmäßig“ und gehört zum Raster
   (Keine-Hälften-Regel). Eine zweispaltige Karte hätte rechts nur „Weiterlesen“ oder die Unterschrift getragen — zu
   wenig für eine eigene Spalte. */
@media (min-width: 981px) {
	@supports (grid-template-columns: subgrid) {
		.fhd-termine.fhd-termine--uebersicht > .fhd-aktuelles--startseite:has(> .fhd-aktuelles__liste[data-anzahl="1"]) {
			display: grid;
			grid-template-columns: subgrid;
			align-content: start;
		}

		.fhd-termine--uebersicht > .fhd-aktuelles--startseite:has(> .fhd-aktuelles__liste[data-anzahl="1"]) > * {
			grid-column: 1 / -1;
		}

		.fhd-termine--uebersicht > .fhd-aktuelles--startseite > .fhd-aktuelles__liste[data-anzahl="1"] {
			grid-column: 1;
			max-width: none;
		}
	}
}

/* ---------- Startseite: eigener Abschnitt „Aktuelles“ (Block fhd/aktuelles, seit 19.11.2026) ----------
   Lukas: „aktuelles und termine … zu einzelnen blöcken machen? damit man das mehr erkennt, gerne auch schöner gestalten“.
   Ein helles Band (Fläche) über die ganze Breite, darin die Abschnittsüberschrift wie „Termine“ und „Unsere Werte“ und die
   Karten — hier in Papier, weil das Band selbst die Fläche ist. Das Plakat ist größer als in der Gruppenkarte und zeigt
   sich ganz (nicht beschnitten), mit einem leichten Schatten wie ein ausgelegter Zettel. Eine einzelne Neuigkeit steht
   breit mit dem Plakat links; mehrere stehen nebeneinander, das Plakat rechts. */

/* Abstand nach oben: auf der Startseite steht darüber die Karte „Letzte Predigt“ — das Band soll sie nicht berühren.
   Kompakter als die übrigen Abschnitte (Lukas, 19.11.2026: „mach bitte kompakter, so dass oben und unten bei beiden blöcke
   nicht so viel leerer platz ist“): vorher 130 px innen oben und unten bei 1440 px Breite, jetzt höchstens 52. */
.fhd-aktuelles.fhd-aktuelles--band {
	margin-block: clamp(28px, 3vw, 44px) 0;
}

.fhd-aktuelles--band {
	padding-block: clamp(32px, 3.6vw, 52px);
	background: var(--wp--preset--color--flaeche, #f4f4f2);
}

.fhd-aktuelles--band .fhd-aktuelles__innen {
	width: min(100% - 2 * var(--wp--custom--rand, 24px), var(--wp--style--global--wide-size, 1240px));
	margin-inline: auto;
}

.fhd-aktuelles--band .fhd-aktuelles__band-titel {
	margin: 0 0 clamp(18px, 2vw, 28px);
	font-family: var(--wp--preset--font-family--titel, inherit);
	font-size: var(--wp--preset--font-size--h-2, clamp(2rem, 1.4rem + 2.2vw, 3.25rem));
	font-weight: 650;
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--espresso, #1b1e15);
}

.fhd-aktuelles--band .fhd-aktuelles__liste {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	gap: 20px;
}

.fhd-aktuelles--band .fhd-aktuelles__karte {
	padding: 24px 26px 26px;
	background: var(--wp--preset--color--papier, #fcfcfb);
}

.fhd-aktuelles--band .fhd-aktuelles__karte--mit-bild {
	grid-template-columns: minmax(0, 1fr) 7.5rem;
	column-gap: 22px;
}

/* „auto 2 / 3“: das echte Seitenverhältnis des Plakats, 2 : 3 nur, solange es fehlt. Ein bloßes „auto“ ließ das Bild 1500 px
   hoch werden: WordPress gibt Bildern mit sizes="auto" contain-intrinsic-size 3000 × 1500 (gemessen 19.11.2026). */
.fhd-aktuelles--band .fhd-aktuelles__bild {
	aspect-ratio: auto 2 / 3;
	object-fit: contain;
	box-shadow:
		0 1px 2px color-mix(in srgb, var(--wp--preset--color--espresso, #1b1e15) 14%, transparent),
		0 10px 24px -14px color-mix(in srgb, var(--wp--preset--color--espresso, #1b1e15) 45%, transparent);
}

/* Eine einzelne Neuigkeit: breite Karte, Plakat links groß, Titel in Title-Größe, mehr Text */
.fhd-aktuelles--band .fhd-aktuelles__liste[data-anzahl="1"] {
	max-width: 60rem;
}

@media (min-width: 700px) {
	.fhd-aktuelles--band [data-anzahl="1"] .fhd-aktuelles__karte {
		padding: clamp(24px, 3vw, 36px);
	}

	.fhd-aktuelles--band [data-anzahl="1"] .fhd-aktuelles__karte--mit-bild {
		grid-template-columns: clamp(10rem, 16vw, 14rem) minmax(0, 1fr);
		column-gap: clamp(24px, 3.4vw, 44px);
	}

	.fhd-aktuelles--band [data-anzahl="1"] .fhd-aktuelles__karte--mit-bild > :is(.fhd-aktuelles__bild-link, .fhd-aktuelles__bild) {
		grid-row: 1;
		grid-column: 1;
	}

	.fhd-aktuelles--band [data-anzahl="1"] .fhd-aktuelles__karte--mit-bild > .fhd-aktuelles__text {
		grid-row: 1;
		grid-column: 2;
	}

	.fhd-aktuelles--band [data-anzahl="1"] .fhd-aktuelles__titel {
		font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
		line-height: 1.2;
	}

	.fhd-aktuelles--band [data-anzahl="1"] .fhd-aktuelles__auszug {
		-webkit-line-clamp: 6;
		line-clamp: 6;
		max-width: 38rem;
		font-size: 1.0625rem;
	}
}

@media (max-width: 420px) {
	.fhd-aktuelles--band .fhd-aktuelles__karte {
		padding: 20px 18px 22px;
	}

	.fhd-aktuelles--band .fhd-aktuelles__karte--mit-bild {
		grid-template-columns: minmax(0, 1fr) 5.5rem;
		column-gap: 16px;
	}
}

/* ---------- Gruppenseite: eigener Abschnitt unter der Sprungleiste, Karten im Raster ---------- */

.wp-block-fhd-neuigkeiten.fhd-aktuelles--gruppe {
	margin-top: clamp(32px, 4vw, 56px);
	/* Abstand zum folgenden Block (auf der Musikseite stieß das Bibelzitat direkt an die Karte, QA 24.09.2026) */
	margin-bottom: clamp(32px, 4vw, 56px);
}

.fhd-aktuelles--gruppe .fhd-aktuelles__ueberschrift {
	margin: 0 0 20px;
}

.fhd-aktuelles--gruppe .fhd-aktuelles__liste {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 16px;
}

.fhd-aktuelles--leer p {
	margin: 0;
	padding: 16px 20px;
	border: 1px dashed var(--wp--preset--color--linie, #d9d9d5);
	border-radius: var(--wp--custom--radius--gross, 10px);
	color: var(--wp--preset--color--tinte-leise, #54574e);
}

/* ---------- Karte ---------- */

.fhd-aktuelles__karte {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: 18px;
	height: 100%;
	padding: 20px 22px 22px;
	border-radius: var(--wp--custom--radius--gross, 10px);
	background: var(--wp--preset--color--flaeche, #f4f4f2);
	color: var(--wp--preset--color--tinte, #22251d);
	transition: box-shadow var(--wp--custom--uebergang, 160ms ease);
}

/* Überfahren (nicht über dem eigenen Knopf): leichter Rand und Schatten, Titel unterstrichen, Pfeil rückt */
.fhd-aktuelles__karte:has(.fhd-aktuelles__titel a:hover) {
	box-shadow:
		inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--espresso, #1b1e15) 30%, transparent),
		0 6px 18px -10px color-mix(in srgb, var(--wp--preset--color--espresso, #1b1e15) 35%, transparent);
}

/* Fokus: der Ring gehört der ganzen Karte, nicht nur dem Titeltext (DESIGN.md „Fokus“) */
.fhd-aktuelles__karte:has(.fhd-aktuelles__titel a:focus-visible) {
	outline: 3px solid var(--wp--preset--color--espresso, #1b1e15);
	outline-offset: 3px;
	box-shadow: 0 0 0 7px color-mix(in srgb, var(--wp--preset--color--amber, #f49e00) 45%, transparent);
}

.fhd-aktuelles .fhd-aktuelles__titel a:focus-visible {
	outline: none;
	box-shadow: none;
}

.fhd-aktuelles__karte--mit-bild {
	grid-template-columns: minmax(0, 1fr) 5.5rem;
}

.fhd-aktuelles__text > * {
	margin: 0;
}

.fhd-aktuelles__text > * + * {
	margin-top: 8px;
}

.fhd-aktuelles__marken {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.fhd-aktuelles__marke {
	display: inline-block;
	padding: 2px 7px;
	border: 1px solid var(--wp--preset--color--linie, #d9d9d5);
	border-radius: var(--wp--custom--radius--klein, 6px);
	background: var(--wp--preset--color--papier, #fcfcfb);
	font-size: 0.875rem; /* 14 px wie die Marken der Terminlisten (08.10.2026, vorher 13) */
	font-weight: 600;
	line-height: 1.35;
	white-space: nowrap;
	color: var(--wp--preset--color--tinte-leise, #54574e);
}

.fhd-aktuelles .fhd-aktuelles__titel {
	font-family: var(--wp--preset--font-family--titel, inherit);
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--espresso, #1b1e15);
	text-wrap: balance;
	hyphens: auto;
}

.fhd-aktuelles .fhd-aktuelles__titel a {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

/* Die Überdeckung: macht die ganze Karte zum Klickziel des Titel-Links (kein verschachteltes <a>) */
.fhd-aktuelles .fhd-aktuelles__titel a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.fhd-aktuelles .fhd-aktuelles__titel a:hover,
.fhd-aktuelles .fhd-aktuelles__titel a:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--amber, #f49e00);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.fhd-aktuelles__wann {
	font-family: var(--wp--preset--font-family--titel, inherit);
	font-size: 0.9375rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--espresso, #1b1e15);
}

.fhd-aktuelles__auszug {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	overflow: hidden;
	font-size: 1rem;
	line-height: 1.55;
}

.fhd-aktuelles__unterschrift {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--wp--preset--color--tinte-leise, #54574e);
}

.fhd-aktuelles .fhd-aktuelles__knopf {
	position: relative;
	z-index: 1; /* über der Überdeckung des Titel-Links: bleibt ein eigener Knopf */
	margin-top: 14px;
}

/* Text als Spalte, damit „Weiterlesen“ in gleich hohen Karten unten steht */
.fhd-aktuelles__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.fhd-aktuelles__text > * {
	align-self: stretch;
}

.fhd-aktuelles .fhd-aktuelles__weiter {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 14px;
	font-family: var(--wp--preset--font-family--titel, inherit);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--espresso, #1b1e15);
}

.fhd-aktuelles__pfeil {
	flex: none;
	color: var(--wp--preset--color--amber, #f49e00);
	transition: transform var(--wp--custom--uebergang, 160ms ease);
}

.fhd-aktuelles__karte:has(.fhd-aktuelles__titel a:is(:hover, :focus-visible)) .fhd-aktuelles__pfeil {
	transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
	.fhd-aktuelles__karte,
	.fhd-aktuelles__pfeil {
		transition: none;
	}

	.fhd-aktuelles__karte:has(.fhd-aktuelles__titel a:is(:hover, :focus-visible)) .fhd-aktuelles__pfeil {
		transform: none;
	}
}

/* Knopf in der Karte etwas kleiner als die Handlungsknöpfe der Seite, Zielhöhe bleibt ≥ 44 px */
.fhd-aktuelles .fhd-aktuelles__knopf > .wp-block-button__link {
	min-height: 44px;
	padding: 0 18px;
	font-size: 1rem;
}

.fhd-aktuelles__bild {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	align-self: start;
	border-radius: var(--wp--custom--radius--klein, 6px);
}

/* Das Bild zeigt sich per Klick groß (inc/bild-gross.php): eigener Link über der Überdeckung des Titel-Links, wie der Knopf. */
.fhd-aktuelles__bild-link {
	position: relative;
	z-index: 1;
	display: block;
	align-self: start;
	border-radius: var(--wp--custom--radius--klein, 6px);
	cursor: zoom-in;
}

.fhd-aktuelles__bild-link:focus-visible {
	outline: 3px solid var(--wp--preset--color--amber, #f49e02);
	outline-offset: 3px;
}

@media (hover: hover) {
	.fhd-aktuelles__bild-link:hover .fhd-aktuelles__bild {
		filter: brightness(0.94);
	}
}

@media (max-width: 420px) {
	.fhd-aktuelles__karte {
		padding: 18px 16px 20px;
	}

	.fhd-aktuelles__karte--mit-bild {
		grid-template-columns: minmax(0, 1fr) 4.5rem;
		column-gap: 14px;
	}
}

/* ---------- Seite einer Neuigkeit (Vorlage single-fhd_neuigkeit, Raster aus dem Theme: .fhd-veranstaltung__raster) ---------- */

.fhd-neuigkeit > * {
	margin: 0;
}

.fhd-veranstaltung__raster > .fhd-neuigkeit {
	margin-top: 16px;
}

.fhd-neuigkeit > * + * {
	margin-top: 16px;
}

.fhd-neuigkeit__abgelaufen {
	padding: 16px 20px;
	border-radius: var(--wp--custom--radius--gross, 10px);
	background: var(--wp--preset--color--flaeche, #f4f4f2);
	font-size: 1rem;
	line-height: 1.55;
}

.fhd-neuigkeit__abgelaufen p {
	margin: 0;
}

.fhd-neuigkeit__abgelaufen strong {
	display: block;
	margin-bottom: 4px;
	font-family: var(--wp--preset--font-family--titel, inherit);
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--wp--preset--color--espresso, #1b1e15);
}

.fhd-veranstaltung__raster > .fhd-neuigkeit--fuss {
	margin-top: 24px;
}

.fhd-neuigkeit__unterschrift {
	font-family: var(--wp--preset--font-family--titel, inherit);
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--wp--preset--color--espresso, #1b1e15);
}

.fhd-neuigkeit__aktionen {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Mit Bild: das Theme stellt es ab 900 px rechts neben alles (grid-row 1 / -1) — hier eine Zeile mehr für den Fuß */
@media (min-width: 900px) {
	.fhd-neuigkeit-seite .wp-block-group.fhd-veranstaltung__raster:has(> .fhd-veranstaltung__bild) {
		grid-template-rows: repeat(4, auto) 1fr;
	}
}
