.nh-youtube-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.nh-youtube-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.nh-fotogalerie-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
}

.nh-fotogalerie-item {
	margin: 0;
}

.nh-fotogalerie-item a,
.nh-fotogalerie-image {
	display: block;
	width: 100%;
}

.nh-fotogalerie-image {
	height: auto;
}

/*
 * Optional Bricks helper for a sponsor Query Loop. Empty grid tracks collapse,
 * so every published sponsor receives an equal share of the available row.
 */

.nh-sponsor-grid {
	--nh-sponsor-min-width: 120px;
	--nh-sponsor-gap: clamp(16px, 2vw, 32px);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(var(--nh-sponsor-min-width), 100%), 1fr));
	gap: var(--nh-sponsor-gap);
	align-items: center;
}

.nh-sponsor-grid > * {
	min-width: 0;
}

/*
 * Gönner boxes (Bricks layout with the class nh-goenner-boxen): benefit lists
 * from {nh_goenner_paket_N_leistungen} / {nh_goenner_paket_N_zusatz} get check
 * marks. Colour of the check: --nh-goenner-check (default: accent red).
 */
.nh-goenner-boxen .nh-goenner-leistungen {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nh-goenner-boxen .nh-goenner-leistungen li {
	position: relative;
	padding-left: 1.75em;
	line-height: 1.4;
}

.nh-goenner-boxen .nh-goenner-leistungen li::before {
	content: "";
	position: absolute;
	top: 0.15em;
	left: 0;
	width: 1.1em;
	height: 1.1em;
	background: var(--nh-goenner-check, var(--mc-color-3, #e30613));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nh-goenner-boxen .nh-goenner-leistungen li.is-alles {
	font-weight: 700;
}

/* A box with a coloured background: add the class nh-goenner-hervorgehoben
   to it and the check marks take the text colour. */
.nh-goenner-boxen .nh-goenner-hervorgehoben {
	--nh-goenner-check: currentColor;
}

/* ------------------------------------------------------------------ */
/* Vereinsseite: helper classes for Bricks (set under CSS classes)     */
/* ------------------------------------------------------------------ */

/* Text from {nh_verein_inhalt:…}: tidy spacing. */
.nh-verein-text > :first-child {
	margin-top: 0;
}

.nh-verein-text > :last-child {
	margin-bottom: 0;
}

.nh-verein-text p {
	margin: 0 0 1em;
}

/* Lists as check list in two columns (Werte). */
.nh-checkliste ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: 0.9em 2.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nh-checkliste li {
	position: relative;
	padding: 0 0 0.9em 1.9em;
	border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
	line-height: 1.4;
}

.nh-checkliste li::before {
	content: "";
	position: absolute;
	top: 0.15em;
	left: 0;
	width: 1.15em;
	height: 1.15em;
	background: var(--nh-check, var(--mc-color-3, #e30613));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Lists as chips (Sujet: Kostüme, Grende …). */
.nh-chips ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 0.25em 0 1em;
	padding: 0;
	list-style: none;
}

.nh-chips li {
	padding: 0.35em 0.95em;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, currentColor 8%, transparent);
	font-family: var(--mc-font-heading, inherit);
	font-size: 1.15em;
	line-height: 1.2;
}

/* Images with a fixed shape, filled (class on the image element). */
.nh-bild-hoch,
.nh-bild-quer,
.nh-bild-breit,
.nh-bild-portrait {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: var(--radius-s, 6px);
}

.nh-bild-hoch { aspect-ratio: 4 / 5; }
.nh-bild-quer { aspect-ratio: 3 / 2; }
.nh-bild-breit { aspect-ratio: 16 / 9; }
.nh-bild-portrait { aspect-ratio: 4 / 5; }

/*
 * Vertical timeline (Geschichte): class nh-zeitachse on the block that holds
 * the query loop. Each loop item contains .nh-zeitachse-punkt (dot),
 * .nh-zeitachse-jahr (year) and .nh-zeitachse-karte (card, may be a link).
 * Cards alternate left and right; on phones the line runs on the left.
 * While scrolling, the line fills up to the middle of the screen
 * (zeitachse.js) and every dot reached turns red.
 * Adjust per page in Bricks, e.g. %root% { --nh-zeitachse-farbe: …; }
 */
.nh-zeitachse {
	--nh-zeitachse-farbe: var(--mc-color-3, #e30613);
	--nh-zeitachse-linie: 3px;
	--nh-zeitachse-punkt: 1.15rem;
	--nh-zeitachse-hintergrund: var(--mc-color-1, #111);
	--nh-zeitachse-karte: color-mix(in srgb, currentColor 8%, var(--nh-zeitachse-hintergrund));
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--abstand-m, 16px);
	width: 100%;
	padding: var(--abstand-s, 12px) 0;
}

.nh-zeitachse::before,
.nh-zeitachse::after {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: var(--nh-zeitachse-linie);
	margin-left: calc(var(--nh-zeitachse-linie) / -2);
	border-radius: 999px;
	pointer-events: none;
}

.nh-zeitachse::before {
	bottom: 0;
	background: color-mix(in srgb, currentColor 18%, transparent);
}

.nh-zeitachse::after {
	height: var(--nh-zeitachse-fortschritt, 0px);
	background: var(--nh-zeitachse-farbe);
	transition: height 0.15s linear;
}

.nh-zeitachse > * {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) calc(var(--nh-zeitachse-punkt) + 2 * var(--abstand-m, 16px)) minmax(0, 1fr);
	grid-template-areas: "jahr punkt karte";
	align-items: center;
	width: 100%;
}

.nh-zeitachse > :nth-child(even) {
	grid-template-areas: "karte punkt jahr";
}

/* Whatever is not dot or year is the card (also an accordion or a block
 * without .nh-zeitachse-karte), so it never lands in the narrow dot column. */
.nh-zeitachse > * > :not(.nh-zeitachse-punkt):not(.nh-zeitachse-jahr) {
	grid-area: karte;
	min-width: 0;
}

.nh-zeitachse-punkt {
	grid-area: punkt;
	justify-self: center;
	width: var(--nh-zeitachse-punkt);
	height: var(--nh-zeitachse-punkt);
	box-sizing: border-box;
	border: var(--nh-zeitachse-linie) solid color-mix(in srgb, currentColor 35%, transparent);
	border-radius: 50%;
	background: var(--nh-zeitachse-hintergrund);
	transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.nh-zeitachse > .is-erreicht .nh-zeitachse-punkt {
	border-color: var(--nh-zeitachse-farbe);
	background: var(--nh-zeitachse-farbe);
	transform: scale(1.15);
}

.nh-zeitachse-jahr {
	grid-area: jahr;
	justify-self: end;
	font-family: var(--mc-font-heading, inherit);
	font-size: var(--text-xl, 2rem);
	line-height: 1;
	color: color-mix(in srgb, currentColor 45%, transparent);
	transition: color 0.3s ease;
}

.nh-zeitachse > :nth-child(even) .nh-zeitachse-jahr {
	justify-self: start;
}

.nh-zeitachse > .is-erreicht .nh-zeitachse-jahr {
	color: var(--nh-zeitachse-farbe);
}

.nh-zeitachse-karte {
	grid-area: karte;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: var(--abstand-m, 16px);
	width: 100%;
	box-sizing: border-box;
	padding: var(--abstand-s, 12px);
	border-radius: var(--radius-s, 8px);
	background: var(--nh-zeitachse-karte);
	color: inherit;
	text-decoration: none;
}

a.nh-zeitachse-karte:is(:hover, :focus-visible) {
	background: color-mix(in srgb, currentColor 14%, var(--nh-zeitachse-hintergrund));
	color: inherit;
}

.nh-zeitachse-karte :is(img, picture) {
	flex: 0 0 auto;
	width: clamp(4.5rem, 9vw, 7rem);
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius-xs, 4px);
}

.nh-zeitachse-karte :is(h3, h4, p) {
	margin: 0;
	font-size: var(--text-s, 1.1rem);
	line-height: 1.2;
}

@media (max-width: 767px) {
	.nh-zeitachse::before,
	.nh-zeitachse::after {
		left: calc(var(--nh-zeitachse-punkt) / 2);
	}

	.nh-zeitachse > *,
	.nh-zeitachse > :nth-child(even) {
		grid-template-columns: var(--nh-zeitachse-punkt) minmax(0, 1fr);
		grid-template-areas: "punkt jahr" ". karte";
		column-gap: var(--abstand-m, 16px);
		row-gap: var(--abstand-xs, 6px);
	}

	.nh-zeitachse-jahr,
	.nh-zeitachse > :nth-child(even) .nh-zeitachse-jahr {
		justify-self: start;
		font-size: var(--text-l, 1.6rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nh-zeitachse::after,
	.nh-zeitachse-punkt,
	.nh-zeitachse-jahr {
		transition: none;
	}
}
