/* ==========================================================================
   Hero-Slider v2 (Startseite) – nur geladen, wenn usables_hero_v2_active()
   Markup: template-parts/hero-slider-v2.php · Script: js/hero-slider-v2.js

   Die Bühne ist ein 16:9-Rahmen wie die Banner-Motive. Gestaltete Slides
   skalieren ihre Schrift mit der Bühnenbreite (cqw), sehen also bei jeder
   Breite aus wie ein Banner.
   ========================================================================== */

.hs {
	--hs-blue: #2f9bff;
	--hs-violet: #8b3dff;
	--hs-green: #00a779;
	--hs-green-dark: #008a64;
	--hs-navy: #0b1a33;
	--hs-muted: #9aa6c0;
	--hs-grad: linear-gradient(90deg, var(--hs-blue), var(--hs-violet));
	--hs-font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Alte .hero-section-Regeln (feste Höhe, Flex) für den neuen Slider aufheben */
.hero-section.hs {
	height: auto;
	display: block;
	background: #000;
	overflow: hidden;
}

/* ---------- Bühne ---------- */
.hs-stage {
	position: relative;
	width: min(100%, calc((85vh - 190px) * 16 / 9));
	min-width: min(100%, 640px);
	aspect-ratio: 16 / 9;
	margin: 0 auto;
	container-type: inline-size;
	background: #000;
	overflow: hidden;
	outline: none;
}

.hs-slide {
	position: absolute;
	inset: 0;
	display: block;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility 0s linear .6s;
	color: #fff;
	text-decoration: none;
	font-family: var(--hs-font);
}

.hs-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity .6s ease;
}

.hs-grad {
	background: var(--hs-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hs-btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font: 700 max(13px, 1.3cqw)/1 var(--hs-font);
	color: #fff;
	background: var(--hs-green);
	padding: 1em 1.5em;
	border-radius: 999px;
	text-decoration: none;
	transition: background .2s;
}

.hs-btn:hover,
.hs-btn:focus-visible {
	background: var(--hs-green-dark);
	color: #fff;
}

/* Globale Link-/Button-Farben des Themes (a:visited lila, button:focus Rahmen) neutralisieren */
.hs a.hs-slide,
.hs a.hs-slide:visited,
.hs a.hs-slide:hover,
.hs a.hs-btn,
.hs a.hs-btn:visited,
.hs a.hs-btn:hover {
	color: #fff;
}

.hs .hs-tile:focus,
.hs .hs-tile:active,
.hs .hs-tile:hover {
	color: #fff;
	border-color: transparent;
}

.hs .hs-tile.is-active,
.hs .hs-tile.is-active:focus,
.hs .hs-tile.is-active:hover {
	border-color: rgba(47, 155, 255, .45);
}

/* ---------- Bild-Banner: ganzes Motiv ist der Link ---------- */
.hs-banner {
	cursor: pointer;
}

div.hs-banner {
	cursor: default;
}

.hs-banner-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hs-banner-hint {
	position: absolute;
	right: 2.4cqw;
	bottom: 2.4cqw;
	z-index: 2;
	font: 700 max(12px, 1.15cqw)/1 var(--hs-font);
	color: #fff;
	background: var(--hs-green);
	padding: .85em 1.2em;
	border-radius: 999px;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s, transform .25s;
}

.hs-banner:hover .hs-banner-hint,
.hs-banner:focus-visible .hs-banner-hint {
	opacity: 1;
	transform: none;
}

/* Kurztitel steckt im Bild – auf Desktop nur für Screenreader/Google, auf dem Handy sichtbar */
.hs-banner-caption {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Gestalteter Slide ---------- */
.hs-built {
	background: #000;
}

/* Bild steht rechts neben dem Text, nur der Übergang links wird abgedunkelt */
.hs-built-media {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 38%;
	display: block;
}

a.hs-built-media {
	cursor: pointer;
}

.hs-built-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
	display: block;
}

.hs-built-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .45) 12%, rgba(0, 0, 0, 0) 30%);
}

.hs-built-text {
	position: relative;
	z-index: 2;
	height: 100%;
	width: 56%;
	padding: 7cqw 0 0 7.5cqw;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.6cqw;
}

.hs-badge {
	font: 700 max(11px, 1.05cqw)/1 var(--hs-font);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	background: var(--hs-green);
	padding: .6em .9em;
	border-radius: 999px;
}

/* Spezifisch genug, um die globalen h2-Regeln (Teko, Abstände) zu schlagen */
.hs .hs-title {
	font: 900 6cqw/1.02 var(--hs-font);
	letter-spacing: -.01em;
	text-transform: none;
	color: #fff;
	margin: 0;
	clear: none;
	text-wrap: balance;
}

.hs .hs-title a {
	color: inherit;
	text-decoration: none;
}

.hs .hs-sub {
	font: 700 max(13px, 1.75cqw)/1.3 var(--hs-font);
	color: #fff;
	margin: 0;
	max-width: 40ch;
}

.hs-points {
	list-style: none;
	margin: .6cqw 0 0;
	padding: 0 0 0 1.6cqw;
	border-left: 2px solid var(--hs-blue);
	display: grid;
	gap: 1.1cqw;
}

.hs-points li {
	display: flex;
	align-items: center;
	gap: 1.2cqw;
	font: 500 max(12px, 1.55cqw)/1.25 var(--hs-font);
	color: #fff;
	margin: 0;
}

.hs-points svg {
	width: max(14px, 2cqw);
	height: max(14px, 2cqw);
	flex: none;
	stroke: var(--hs-blue);
}

.hs-foot {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 2.6cqw;
	margin-top: auto;
	padding-bottom: 6cqw;
}

.hs-price {
	display: flex;
	align-items: flex-end;
	gap: .8cqw;
}

.hs-price b {
	font: 900 6.2cqw/.9 var(--hs-font);
}

.hs-price small {
	font: 700 max(11px, 1.5cqw)/1.2 var(--hs-font);
	color: #fff;
	padding-bottom: .5cqw;
}

/* ---------- Mini-Vorschau ---------- */
.hs-nav {
	background: var(--hs-navy);
	padding: 10px 0;
}

.hs-thumbs {
	list-style: none;
	margin: 0 auto;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 8px;
}

.hs-thumbs li {
	margin: 0;
	min-width: 0;
}

.hs-tile {
	position: relative;
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 8px;
	background: rgba(255, 255, 255, .03);
	border: 1px solid transparent;
	border-radius: 8px;
	color: #fff;
	font-family: var(--hs-font);
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	transition: background .2s, border-color .2s;
}

.hs-tile:hover {
	background: rgba(255, 255, 255, .07);
}

.hs-tile.is-active {
	background: rgba(47, 155, 255, .12);
	border-color: rgba(47, 155, 255, .45);
}

.hs-tile img {
	width: 84px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 4px;
	display: block;
	background: #000;
}

.hs-tile-text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.hs-tile-title {
	font: 700 14px/1.25 var(--hs-font);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hs-tile-meta {
	font: 400 12px/1.3 var(--hs-font);
	color: var(--hs-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hs-tile-progress {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 2px;
	width: 0;
	background: var(--hs-grad);
}

.hs-stage:focus-visible,
.hs-tile:focus-visible,
.hs-btn:focus-visible,
.hs-banner:focus-visible {
	outline: 2px solid var(--hs-blue);
	outline-offset: 2px;
}

/* ---------- Tablet / Handy ---------- */
@media (max-width: 1100px) {
	.hs-thumbs {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}
	.hs-thumbs::-webkit-scrollbar {
		display: none;
	}
	.hs-thumbs li {
		flex: 0 0 260px;
		scroll-snap-align: start;
	}
}

@media (max-width: 700px) {
	.hs-stage {
		width: 100%;
		min-width: 0;
		aspect-ratio: 4 / 5;
	}
	.hs-thumbs li {
		flex-basis: 72%;
	}
}

/* Schmale Bühne: Banner oben + Kurztitel darunter, gestaltete Slides untereinander */
@container (max-width: 560px) {
	.hs-banner-img {
		height: 56.25cqw;
		bottom: auto;
	}
	.hs-banner-hint {
		display: none;
	}
	.hs-banner-caption {
		position: absolute;
		top: 56.25cqw;
		right: 0;
		bottom: 0;
		left: 0;
		width: auto;
		height: auto;
		clip: auto;
		white-space: normal;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: flex-start;
		gap: 2.6cqw;
		padding: 0 6cqw;
	}
	.hs-banner-caption-title {
		font: 900 7.4cqw/1.1 var(--hs-font);
		color: #fff;
	}
	.hs-banner-caption-meta {
		font: 400 4cqw/1.4 var(--hs-font);
		color: var(--hs-muted);
	}
	.hs-banner-caption .hs-btn {
		font-size: 3.8cqw;
	}

	.hs-built-media {
		left: 0;
		bottom: 45%;
	}
	.hs-built-media img {
		object-position: 50% 45%;
	}
	.hs-built-media::after {
		background: linear-gradient(0deg, #000 2%, rgba(0, 0, 0, 0) 45%);
	}
	.hs-built-text {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: 58%;
		padding: 0 6cqw;
		gap: 2.6cqw;
	}
	.hs-badge {
		font-size: 2.8cqw;
	}
	.hs .hs-title {
		font-size: 10cqw;
	}
	.hs .hs-sub {
		font-size: 4cqw;
	}
	.hs-points {
		gap: 1.8cqw;
		padding-left: 3.4cqw;
	}
	.hs-points li {
		font-size: 3.7cqw;
		gap: 2.4cqw;
	}
	.hs-points li:nth-child(n+4) {
		display: none;
	}
	.hs-points svg {
		width: 4.4cqw;
		height: 4.4cqw;
	}
	.hs-foot {
		gap: 4cqw;
		padding-bottom: 6cqw;
	}
	.hs-price b {
		font-size: 11cqw;
	}
	.hs-price small {
		font-size: 3.4cqw;
	}
	.hs-btn {
		font-size: 3.6cqw;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hs-slide,
	.hs-slide.is-active,
	.hs-banner-hint,
	.hs-tile {
		transition: none;
	}
}
