/* TS Hero-Slider */
.tsh {
	--tsh-accent: #a50f0f;
	--tsh-overlay: .7;
	--tsh-interval: 5000ms;
	--tsh-radius: 24px;
	--tsh-pad-x: 10%;
	--tsh-pad-b: clamp(28px, 3.9vw, 72px);
	--tsh-ease: cubic-bezier(.22, .61, .36, 1);
	position: relative;
	display: grid;
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 1800 / 840;
	min-height: 480px;
	max-height: 92vh;
	margin: 0;
	overflow: hidden;
	border-radius: var(--tsh-radius);
	background: #1c2c5f;
	color: #fff;
	isolation: isolate;
}
.tsh *, .tsh *::before, .tsh *::after { box-sizing: border-box; }

/* Über die Bildschirmbreite (mit Rand), auch aus schmalen Containern heraus */
.tsh.tsh--wide {
	--tsh-vw: calc(100vw - var(--tsh-sbw, 0px));
	--tsh-g: var(--tsh-gutter);
	width: calc(var(--tsh-vw) - 2 * var(--tsh-g)) !important;
	max-width: none !important;
	margin-left: calc(50% - var(--tsh-vw) / 2 + var(--tsh-g)) !important;
	margin-right: 0 !important;
	aspect-ratio: auto;
	height: calc((var(--tsh-vw) - 2 * var(--tsh-g)) * 840 / 1800);
}

/* Bild(er) */
.tsh .tsh-media, .tsh .tsh-img, .tsh .tsh-shade { position: absolute; inset: 0; }
.tsh .tsh-img { opacity: 0; transition: opacity 1.2s ease; }
.tsh .tsh-img.is-active { opacity: 1; }
.tsh .tsh-pic {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
}
/* Verlauf von unten (Navy wie im Layout), Stärke über Einstellung */
.tsh .tsh-shade {
	background:
		linear-gradient(to top, rgba(22, 36, 92, .92) 0%, rgba(26, 42, 100, .72) 22%, rgba(30, 48, 110, .38) 45%, rgba(30, 48, 110, 0) 68%),
		linear-gradient(to right, rgba(16, 28, 70, .28) 0%, rgba(16, 28, 70, 0) 55%);
	opacity: var(--tsh-overlay);
	pointer-events: none;
}

/* Text: drei feste Zeilen (kleiner Text, Headline, Button), damit beim Wechsel nichts springt */
.tsh { container-type: inline-size; }
.tsh .tsh-content {
	position: relative;
	z-index: 2;
	align-self: end;
	padding: 0 var(--tsh-pad-x) var(--tsh-pad-b);
}
.tsh .tsh-row { display: grid; align-items: end; }
.tsh .tsh-row > * { grid-area: 1 / 1; min-width: 0; }

.tsh .tsh-item {
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition:
		opacity var(--tsh-fade, .6s) var(--tsh-ease),
		transform var(--tsh-fade, .6s) var(--tsh-ease),
		visibility 0s linear var(--tsh-fade, .6s);
}
.tsh .tsh-item.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition:
		opacity var(--tsh-fade, .6s) var(--tsh-ease),
		transform var(--tsh-fade, .6s) var(--tsh-ease),
		visibility 0s;
}
.tsh .tsh-item.is-leaving { transform: translateY(-10px); }

.tsh .tsh-eyebrow {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: clamp(15px, 1.12cqw, 20px);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: #fff;
	text-shadow: 0 1px 12px rgba(10, 20, 50, .35);
}
.tsh .tsh-row--eyebrow { margin-bottom: clamp(12px, 1.7cqw, 30px); }

/* Headline: feste Breite (Standard 70 % der Bildbreite), Höhe = längste Headline */
.tsh .tsh-row--title {
	width: calc(var(--tsh-title-w, 70) * 1cqw);
	max-width: 100%;
	margin-bottom: clamp(22px, 2.4cqw, 44px);
	font-family: inherit;
	font-size: clamp(34px, 4.25cqw, 82px);
	font-weight: 300;
	line-height: 1.04;
	letter-spacing: -.025em;
	color: #fff;
	align-items: start;
}
.tsh .tsh-sizer { display: grid; visibility: hidden; pointer-events: none; }
.tsh .tsh-sizer > span { grid-area: 1 / 1; }
.tsh .tsh-title {
	margin: 0;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	color: #fff;
	text-shadow: 0 2px 24px rgba(10, 20, 50, .3);
	transition:
		opacity var(--tsh-fade, .6s) var(--tsh-ease),
		transform var(--tsh-fade, .6s) var(--tsh-ease),
		filter var(--tsh-fade, .6s) var(--tsh-ease);
}
.tsh .tsh-title::before, .tsh .tsh-title::after { display: none; }
.tsh .tsh-title-text { display: block; }
.tsh .tsh-title .tsh-typed { display: inline; }
.tsh .tsh-title.is-out { opacity: 0; transform: translateY(-18px); filter: blur(6px); }
.tsh .tsh-title.is-in { opacity: 0; transform: translateY(22px); filter: blur(6px); transition: none; }
.tsh .tsh-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tsh .tsh-cursor { display: none; }
.tsh.tsh--cursor .tsh-cursor {
	display: inline-block;
	width: .055em;
	height: .9em;
	margin-left: .06em;
	vertical-align: -.08em;
	background: currentColor;
	animation: tsh-blink 1s steps(1) infinite;
}
.tsh.tsh--cursor.is-typing .tsh-cursor { animation: none; }
@keyframes tsh-blink { 50% { opacity: 0; } }

.tsh .tsh-btn {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 10px 30px;
	border: 0;
	border-radius: 999px;
	background: var(--tsh-accent);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 6px 20px rgba(80, 0, 0, .25);
}
.tsh .tsh-btn.is-active { transition: opacity var(--tsh-fade, .6s) var(--tsh-ease), transform var(--tsh-fade, .6s) var(--tsh-ease), visibility 0s, background-color .2s ease, box-shadow .2s ease; }
.tsh .tsh-btn:hover, .tsh .tsh-btn:focus-visible {
	background: color-mix(in srgb, var(--tsh-accent) 85%, #000);
	color: #fff;
	box-shadow: 0 10px 24px rgba(80, 0, 0, .3);
}
.tsh .tsh-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Gleicher Inhalt in aufeinanderfolgenden Slides bleibt stehen */
.tsh .tsh-item.is-kept { transition: none !important; }

/* Fortschritt und Pause */
.tsh .tsh-progress {
	position: absolute;
	z-index: 3;
	right: var(--tsh-pad-b);
	bottom: var(--tsh-pad-b);
	display: flex;
	align-items: center;
	gap: 8px;
}
.tsh .tsh-progress button {
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
	box-shadow: none;
}
.tsh .tsh-dot { display: grid; place-items: center; width: 34px; height: 28px; }
.tsh .tsh-dot span {
	position: relative;
	display: block;
	width: 100%;
	height: 3px;
	overflow: hidden;
	border-radius: 3px;
	background: rgba(255, 255, 255, .35);
}
.tsh .tsh-dot span::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: #fff;
	transform: scaleX(0);
	transform-origin: left center;
}
.tsh .tsh-dot.is-active span::after { animation: tsh-fill var(--tsh-cycle, 5000ms) linear forwards; }
.tsh .tsh-dot.is-current span { background: rgba(255, 255, 255, .55); }
.tsh.is-paused .tsh-dot.is-active span::after { animation-play-state: paused; }
@keyframes tsh-fill { to { transform: scaleX(1); } }
.tsh .tsh-pause { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; opacity: .75; }
.tsh .tsh-pause:hover, .tsh .tsh-pause:focus-visible { opacity: 1; }
.tsh .tsh-pause svg { width: 14px; height: 14px; fill: currentColor; }
.tsh .tsh-pause .i-play, .tsh.is-stopped .tsh-pause .i-pause { display: none; }
.tsh.is-stopped .tsh-pause .i-play { display: block; }
.tsh .tsh-progress button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.tsh.tsh--noprogress .tsh-progress { opacity: 0; pointer-events: none; }
.tsh.tsh--noprogress .tsh-progress:focus-within { opacity: 1; pointer-events: auto; }

/* Tablet und Smartphone */
@media (max-width: 1024px) {
	.tsh { aspect-ratio: 4 / 3; --tsh-pad-x: 7%; }
	.tsh.tsh--wide { height: calc((var(--tsh-vw) - 2 * var(--tsh-g)) * 3 / 4); }
}
@media (max-width: 680px) {
	.tsh {
		aspect-ratio: 4 / 5;
		min-height: 520px;
		max-height: none;
		--tsh-radius: 18px;
		--tsh-pad-x: 24px;
		--tsh-pad-b: 26px;
	}
	.tsh.tsh--wide { --tsh-g: min(16px, var(--tsh-gutter)); height: auto; aspect-ratio: 4 / 5; }
	.tsh .tsh-br { display: none; }
	.tsh .tsh-row--title { width: 100%; font-size: clamp(32px, 9vw, 44px); line-height: 1.08; }
	.tsh .tsh-content { padding-bottom: calc(var(--tsh-pad-b) + 36px); }
	.tsh .tsh-progress { left: var(--tsh-pad-x); right: auto; bottom: 18px; }
	.tsh .tsh-dot { width: 26px; }
	.tsh .tsh-shade {
		background: linear-gradient(to top, rgba(22, 36, 92, .94) 0%, rgba(26, 42, 100, .78) 30%, rgba(30, 48, 110, .35) 55%, rgba(30, 48, 110, 0) 75%);
	}
}

/* Höhe = Bildschirmhöhe minus Header und Abstand unten (Header + Abstand + Slider = 100vh) */
.tsh.tsh--screen.tsh--screen {
	--tsh-head-now: var(--tsh-head, 175px);
	aspect-ratio: auto;
	min-height: var(--tsh-min-h, 420px);
	max-height: none;
	height: calc(100vh - var(--tsh-head-now) - var(--tsh-gap-b, 50px));
	height: calc(100svh - var(--tsh-head-now) - var(--tsh-gap-b, 50px));
}
.tsh.tsh--screen.tsh--gap { margin-bottom: var(--tsh-gap-b, 50px) !important; }
@media (max-width: 680px) {
	.tsh.tsh--screen.tsh--screen { --tsh-head-now: var(--tsh-head-m, 100px); }
}

@media (prefers-reduced-motion: reduce) {
	.tsh .tsh-item, .tsh .tsh-title { transform: none !important; filter: none !important; }
	.tsh .tsh-img { transition-duration: .3s; }
}
