/*
 * SP Startseite – Block „Startseiten-Kopf“, Variante 2 „Zentrale“, Stil „Sammelkarte“.
 * Referenz: docs/prototyp-kopf.html (#v2-desk-4-karte, #v2-desk-1-karte, #v2-desk-0-karte, Tablet/Handy).
 * Tokens und Bausteine (Rahmen, Textbox, Kiste, Panel, Glas-Pille) kommen aus spst-basis.css.
 * Container Queries (spst-block) stylen nur Kinder von .spst-kopf, nie den Block selbst.
 */

.spst-kopf {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #08142c;
}

/* Ein Hintergrundbild hinter allem, fest beim Scrollen, neutrale dunkle Abdunklung (kein blauer Schein) */
.spst-kopf__hintergrund {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
}
.spst-kopf__hintergrund::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(10, 12, 28, .82) 0%, rgba(10, 12, 28, .45) 55%, rgba(10, 12, 28, .7) 100%);
}
/* iOS kann kein fixed: dort scrollt das Bild normal mit (akzeptiert) */
@supports (-webkit-touch-callout: none) {
	.spst-kopf__hintergrund { background-attachment: scroll; }
}

.spst-kopf__innen {
	max-width: 1280px;
	margin: 0 auto;
	padding: 54px 32px 56px;
}

/* ---------- Willkommen + Zahlen ---------- */

.spst-kopf__oben {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 30px;
	align-items: end;
	margin-bottom: 34px;
}
.spst-kopf__kicker {
	display: block;
	font-size: 13px;
	letter-spacing: .26em;
}
.spst-kopf .spst-kopf__h1 {
	margin: 6px 0 0;
	font-family: var(--spst-schrift);
	font-size: 48px;
	font-weight: 400;
	line-height: .98;
	letter-spacing: .005em;
	color: #fff;
}
.spst-kopf .spst-kopf__text {
	max-width: 52ch;
	margin: 14px 0 0;
	font-size: 19px;
	line-height: 1.35;
	color: #c8daff;
}
.spst-kopf__knoepfe {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}
.spst-kopf .spst-glas--leise {
	background: rgba(10, 22, 40, .45);
	border-color: rgba(120, 170, 255, .35);
	box-shadow: none;
}

/* Zahlen als Kisten untereinander, rechts bündig am Rand des Inhalts */
.spst-kopf__zahlen {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 300px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.spst-kopf__zahl {
	gap: 24px;
	/* Rechts bündig mit Event-Panel und News darunter, nicht mehr über den Rand (Tim, 24.10.2026) */
	margin: 0;
	padding: 5px 22px 6px 20px;
	align-items: center;
}
.spst-kopf__zahl .spst-kiste__label { font-size: 22px; }
.spst-kopf__zahl .spst-kiste__wert { font-size: 30px; }

/* ---------- Raster: News links, Events rechts ---------- */

.spst-kopf__raster {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 18px;
	align-items: stretch;
}

/* ---------- News-Bühne (immer 16:9) ---------- */

.spst-kopf__news {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}
.spst-kopf__buehne {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #0a1628;
}
.spst-kopf__panel {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .7s, visibility 0s .7s;
}
.spst-kopf__panel.is-aktiv {
	opacity: 1;
	visibility: visible;
	transition: opacity .7s;
}
.spst-kopf .spst-kopf__link {
	position: absolute;
	inset: 0;
	display: block;
	color: #fff;
	text-decoration: none;
}
.spst-kopf__bild {
	position: absolute;
	inset: 0;
	overflow: hidden;
}
.spst-kopf__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .8s ease;
}
.spst-kopf__link:hover .spst-kopf__img { transform: scale(1.04); }
.spst-kopf__verlauf {
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(16, 17, 41, .35), rgba(16, 17, 41, 0) 40%);
}
.spst-kopf__textbox {
	position: absolute;
	left: 0;
	bottom: 18px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: min(440px, 58%);
	padding: 12px 18px 14px;
	border-radius: 0 var(--spst-radius-kiste) var(--spst-radius-kiste) 0;
}
.spst-kopf .spst-kopf__news-titel {
	margin-top: 4px;
	font-size: 26px;
	color: #fff;
}
.spst-kopf__auszug {
	display: -webkit-box;
	margin-top: 6px;
	overflow: hidden;
	font-size: 16px;
	line-height: 1.3;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.spst-kopf__zeile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin-top: 10px;
}
.spst-kopf__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}
.spst-kopf__chip {
	padding: 2px 9px;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .55);
	border-radius: 999px;
}
.spst-kopf .spst-kopf__weiter {
	flex: 0 0 auto;
	padding: .5em 1.2em;
	font-size: 14px;
	border-color: rgba(255, 255, 255, .5);
}
.spst-kopf__link:hover .spst-kopf__weiter,
.spst-kopf__link:focus-visible .spst-kopf__weiter { background: #1d4fa6; }

/* Tabs unter der Bühne, aktiver Tab massiv blau mit Fortschrittsbalken */
.spst-kopf__steuerung {
	display: flex;
	gap: 6px;
}
.spst-kopf:not(.spst-kopf--js) .spst-kopf__steuerung { display: none; }
.spst-kopf__tabs {
	display: flex;
	flex: 1;
	gap: 6px;
	min-width: 0;
}
.spst-kopf .spst-kopf__tab {
	position: relative;
	display: grid;
	flex: 1 1 0;
	grid-template-columns: 60px 1fr;
	gap: 12px;
	align-items: center;
	min-width: 0;
	margin: 0;
	padding: 6px;
	overflow: hidden;
	font: inherit;
	text-align: left;
	color: inherit;
	background: rgba(8, 18, 36, .66);
	border: 1px solid rgba(120, 170, 255, .22);
	border-radius: 12px;
	cursor: pointer;
	transition: background-color .25s, border-color .25s;
}
.spst-kopf .spst-kopf__tab:hover { border-color: rgba(120, 170, 255, .45); }
.spst-kopf__tab-bild {
	width: 60px;
	height: 46px;
	max-width: none;
	object-fit: cover;
	border-radius: 5px;
	filter: saturate(.5) brightness(.75);
	transition: filter .3s;
}
.spst-kopf__tab:hover .spst-kopf__tab-bild,
.spst-kopf__tab.is-aktiv .spst-kopf__tab-bild { filter: none; }
.spst-kopf__tab-text { min-width: 0; }
.spst-kopf__tab-datum {
	display: block;
	font-size: 11px;
	letter-spacing: .16em;
	color: var(--spst-gelb);
}
.spst-kopf__tab-titel {
	display: -webkit-box;
	overflow: hidden;
	font-size: 17px;
	line-height: 1.1;
	text-transform: uppercase;
	color: #c8daff;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.spst-kopf .spst-kopf__tab.is-aktiv {
	background: var(--spst-kiste);
	border-color: var(--spst-kiste);
}
.spst-kopf__tab.is-aktiv .spst-kopf__tab-datum { color: var(--spst-kicker-blau); }
.spst-kopf__tab.is-aktiv .spst-kopf__tab-titel { color: #fff; }
.spst-kopf__fortschritt {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: #fff;
	opacity: .8;
	transform: scaleX(0);
	transform-origin: left center;
}
.spst-kopf__tab.is-laeuft .spst-kopf__fortschritt { animation: spst-kopf-fortschritt var(--spst-intervall, 8s) linear forwards; }
.spst-kopf__news.is-steht .spst-kopf__fortschritt { animation-play-state: paused; }
@keyframes spst-kopf-fortschritt { to { transform: scaleX(1); } }

/* Pause/Play (WCAG 2.2.2) */
.spst-kopf .spst-kopf__pause {
	display: flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	color: #fff;
	background: rgba(8, 18, 36, .66);
	border: 1px solid rgba(120, 170, 255, .22);
	border-radius: 12px;
	cursor: pointer;
}
.spst-kopf .spst-kopf__pause:hover { border-color: rgba(120, 170, 255, .6); }
.spst-kopf .spst-kopf__pause[hidden] { display: none; }
.spst-kopf__pause-icon {
	display: block;
	width: 10px;
	height: 12px;
	border-left: 3px solid currentColor;
	border-right: 3px solid currentColor;
}
.spst-kopf__pause[aria-pressed="true"] .spst-kopf__pause-icon {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent currentColor;
}

.spst-kopf .spst-kopf__alle {
	display: flex;
	width: 100%;
}

/* ---------- Event-Panel ---------- */

.spst-kopf__events {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px;
}
.spst-kopf__ev-kopf {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.spst-kopf .spst-kopf__h2 {
	margin: 2px 0 0;
	font-size: 28px;
}
.spst-kopf .spst-kopf__mehr {
	font-size: 14px;
	letter-spacing: .12em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #8fa6c4;
	text-decoration: none;
}
.spst-kopf .spst-kopf__mehr:hover { color: #fff; }

/* Nächstes Event groß: Bild 16:9, Datum unten links, Hinweis oben rechts, Text in blauer Fläche */
.spst-kopf .spst-kopf__event,
.spst-kopf .spst-kopf__buchung {
	position: relative;
	display: block;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 0 18px rgba(42, 125, 225, .45);
}
.spst-kopf__event { margin-bottom: 8px; }
.spst-kopf__event-bild {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.spst-kopf__event-bild .spst-kopf__img {
	position: absolute;
	inset: 0;
}
.spst-kopf__event:hover .spst-kopf__img,
.spst-kopf__buchung:hover .spst-kopf__img { transform: scale(1.04); }
.spst-kopf__datum {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 6px 0 5px;
	font-style: italic;
	letter-spacing: .025em;
	color: #fff;
	background: var(--spst-kiste);
	border-radius: 12px;
}
.spst-kopf__datum-tag {
	font-size: 28px;
	line-height: .9;
}
.spst-kopf__datum-monat {
	margin-top: 3px;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.spst-kopf__datum--bild {
	position: absolute;
	left: 10px;
	bottom: 10px;
	width: 58px;
}
.spst-kopf__hinweis {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 2px 8px;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #1a1200;
	background: var(--spst-gelb);
	border-radius: 3px;
}
.spst-kopf__event-text {
	display: block;
	padding: 10px 12px 12px;
	background: var(--spst-kiste);
}
.spst-kopf .spst-kopf__event-titel {
	display: block;
	font-size: 24px;
	line-height: 1.05;
	color: #fff;
}
.spst-kopf__event-meta {
	display: block;
	margin-top: 3px;
	font-size: 15px;
	color: var(--spst-kicker-blau);
}

/* Weitere Events als Zeilen: links rund, rechts bündig am Panelrand */
.spst-kopf__ev-liste {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.spst-kopf__ev-liste li { margin: 0; }
.spst-kopf .spst-kopf__ev-zeile {
	display: grid;
	grid-template-columns: 58px 1fr auto;
	gap: 14px;
	align-items: center;
	margin-right: -16px;
	padding: 9px 12px 9px 9px;
	color: #fff;
	text-decoration: none;
	background: rgba(56, 123, 232, .14);
	border: 1px solid rgba(74, 144, 226, .35);
	border-right: 0;
	border-radius: 14px 0 0 14px;
	transition: background-color .25s;
}
.spst-kopf .spst-kopf__ev-zeile:hover { background: rgba(56, 123, 232, .3); }
.spst-kopf__ev-text { min-width: 0; }
.spst-kopf__ev-titel {
	display: block;
	overflow: hidden;
	font-size: 20px;
	line-height: 1.05;
	text-transform: uppercase;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.spst-kopf__ev-meta {
	display: block;
	margin-top: 3px;
	font-size: 15px;
	color: #8fa6c4;
}
.spst-kopf__ev-hinweis {
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--spst-gelb);
}

/* Desktop-Variante (Panel) füllt die Höhe, damit die Buchungskarte unten sitzt */
.spst-kopf__ev-panel {
	display: flex;
	flex: 1;
	flex-direction: column;
}

/* Buchungskarte bei weniger als 3 Events, unten im Panel */
.spst-kopf__buchung { margin-top: auto; }
.spst-kopf__ev-liste + .spst-kopf__buchung { margin-top: 8px; }
.spst-kopf__buchung .spst-kopf__img { filter: saturate(.7) brightness(.55); }
.spst-kopf__buchung-text {
	position: absolute;
	right: 14px;
	bottom: 14px;
	left: 14px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

/* Tickets (Tablet/Handy): Bild 16:9 oben, Datums-Abriss links, Text rechts. Am Desktop aus. */
.spst-kopf__tickets {
	display: none;
	margin: 0;
	padding: 0;
	list-style: none;
}
.spst-kopf__ticket-eintrag {
	margin: 0;
	scroll-snap-align: start;
}
.spst-kopf .spst-kopf__ticket {
	display: grid;
	grid-template-columns: 76px 1fr;
	grid-template-rows: auto 1fr;
	height: 100%;
	overflow: hidden;
	color: #fff;
	text-decoration: none;
	background: rgba(16, 17, 41, .85);
	border: 4px solid var(--spst-rahmen);
	border-radius: var(--spst-radius-kiste);
	transition: box-shadow .25s, transform .25s;
}
.spst-kopf .spst-kopf__ticket:hover {
	box-shadow: 0 0 18px rgba(42, 125, 225, .45);
	transform: translateY(-2px);
}
.spst-kopf__ticket-bild {
	position: relative;
	grid-column: 1 / -1;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.spst-kopf__ticket-bild .spst-kopf__img {
	position: absolute;
	inset: 0;
}
.spst-kopf__ticket-abriss {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 10px 0;
	font-style: italic;
	letter-spacing: .025em;
	color: #fff;
	background: var(--spst-kiste);
	border-right: 2px dashed rgba(255, 255, 255, .55);
}
.spst-kopf__ticket-abriss .spst-kopf__datum-tag { font-size: 34px; }
.spst-kopf__ticket-abriss .spst-kopf__datum-monat { font-size: 13px; }
.spst-kopf__ticket-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 12px 14px;
}
.spst-kopf__ticket-text .spst-kopf__ev-hinweis { margin-bottom: 4px; }
.spst-kopf__ticket-titel {
	font-size: 21px;
	line-height: 1.05;
	text-transform: uppercase;
}

/* Keine Events */
.spst-kopf__leer {
	padding: 16px;
	color: #c8daff;
	border: 1px dashed rgba(120, 170, 255, .35);
	border-radius: 10px;
}
.spst-kopf .spst-kopf__leer-text {
	margin: 0 0 12px;
	font-size: 18px;
	line-height: 1.35;
}

.spst-kopf a:focus-visible,
.spst-kopf button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}
.spst-kopf .spst-kopf__link:focus-visible { outline-offset: -4px; }

/* ---------- Tablet (Grundgerüst, Tickets folgen in M9) ---------- */

@container spst-block (max-width: 1000px) {
	.spst-kopf__innen { padding: 44px 20px 46px; }
	.spst-kopf__oben { grid-template-columns: 1fr; }
	.spst-kopf .spst-kopf__h1 { font-size: 42px; }
	/* Zahlen in einer Kiste nebeneinander, mit Trennstrichen */
	.spst-kopf__zahlen {
		flex-direction: row;
		gap: 0;
		min-width: 0;
		/* Tablet/Handy: bis an den Rand, sonst hängt die Leiste in der Luft (Tim). Desktop bündig mit dem Panel. */
		margin-right: -20px;
		padding: 4px 6px 5px 4px;
		background: var(--spst-kiste);
		border-radius: var(--spst-radius-kiste) 0 0 var(--spst-radius-kiste);
	}
	.spst-kopf__zahl {
		flex: 1 1 0;
		gap: 10px;
		margin: 0;
		padding: 4px 16px;
		background: none;
		border-radius: 0;
	}
	.spst-kopf__zahl + .spst-kopf__zahl { border-left: 1px solid rgba(255, 255, 255, .35); }
	.spst-kopf__raster { grid-template-columns: 1fr; }
	/* Events vor den News, ohne Panel, als Tickets zum Wischen (2 sichtbar + Anschnitt) */
	.spst-kopf__events {
		order: -1;
		padding: 0;
		background: none;
		border: 0;
	}
	.spst-kopf__ev-panel { display: none; }
	.spst-kopf__tickets {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 44%;
		gap: 12px;
		margin: 0 -20px;
		padding: 0 20px 4px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 20px;
		scrollbar-width: none;
		overscroll-behavior-x: contain;
	}
	.spst-kopf__tickets::-webkit-scrollbar { display: none; }
	/* 1 oder 2 Events mittig */
	.spst-kopf__tickets[data-anzahl="1"],
	.spst-kopf__tickets[data-anzahl="2"] { justify-content: center; }
	.spst-kopf__tabs { overflow-x: auto; scrollbar-width: none; }
	.spst-kopf__tabs::-webkit-scrollbar { display: none; }
	.spst-kopf .spst-kopf__tab { flex: 0 0 220px; }
}

/* ---------- Handy (Grundgerüst) ---------- */

@container spst-block (max-width: 699.98px) {
	.spst-kopf__innen { padding: 30px 14px 32px; }
	.spst-kopf .spst-kopf__h1 { font-size: 34px; }
	.spst-kopf .spst-kopf__text { font-size: 17px; }
	.spst-kopf__knoepfe .spst-glas {
		flex: 1;
		padding: .6em 1em;
	}
	.spst-kopf__zahlen { margin-right: -14px; }
	.spst-kopf__zahl { padding: 3px 10px; gap: 6px; }
	.spst-kopf__zahl .spst-kiste__label { font-size: 16px; }
	.spst-kopf__zahl .spst-kiste__wert { font-size: 22px; }
	/* News: Bild 16:9, Text massiv darunter, kein Überblenden */
	.spst-kopf__buehne {
		aspect-ratio: auto;
		border-width: 5px;
		border-radius: var(--spst-radius-kiste);
	}
	.spst-kopf__panel {
		position: relative;
		inset: auto;
		display: none;
		transition: none;
	}
	.spst-kopf__panel.is-aktiv { display: block; }
	.spst-kopf .spst-kopf__link {
		position: relative;
		inset: auto;
		display: flex;
		flex-direction: column;
	}
	.spst-kopf__bild {
		position: relative;
		inset: auto;
		aspect-ratio: 16 / 9;
	}
	.spst-kopf__verlauf { display: none; }
	.spst-kopf__textbox {
		position: static;
		width: auto;
		padding: 14px 16px 16px;
		background: var(--spst-kiste);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		border-radius: 0;
	}
	.spst-kopf__auszug { -webkit-line-clamp: 3; }
	.spst-kopf__chips { display: none; }
	/* Wischleiste nur links bis an den Rand, rechts bleibt der Pause-Schalter frei */
	.spst-kopf__tabs {
		margin-left: -14px;
		padding-left: 14px;
	}
	.spst-kopf .spst-kopf__tab {
		flex: 0 0 190px;
		grid-template-columns: 48px 1fr;
		gap: 10px;
	}
	.spst-kopf__tab-bild {
		width: 48px;
		height: 40px;
	}
	.spst-kopf__tab-titel { font-size: 16px; }
	.spst-kopf .spst-kopf__h2 { font-size: 30px; }
	/* Tickets: eins mit ca. 80 %, das nächste schaut heraus. Nur ein einzelnes Event mittig. */
	.spst-kopf__tickets {
		grid-auto-columns: 80%;
		margin: 0 -14px;
		padding: 0 14px 4px;
		scroll-padding-inline: 14px;
	}
	.spst-kopf__tickets[data-anzahl="2"] { justify-content: start; }
	.spst-kopf__ev-kopf { margin-bottom: 10px; }
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
	.spst-kopf__link:hover .spst-kopf__img,
	.spst-kopf__event:hover .spst-kopf__img,
	.spst-kopf__buchung:hover .spst-kopf__img { transform: none; }
	.spst-kopf__fortschritt { display: none; }
	.spst-kopf .spst-kopf__ticket:hover { transform: none; }
}
