/* Hermanns Image Slider – v2.0.0 */

.hs {
	--hs-h: 500px;
	--hs-visible-d: 3;
	/* Der Shortcode setzt --hs-visible-d inline. Der abgeleitete Wert bleibt
	   überschreibbar, damit die Breakpoints weiter unten greifen können. */
	--hs-visible: var(--hs-visible-d, 3);
	--hs-gap: 0px;
	--hs-bg: #786854;
	--hs-dim: .5;
	--hs-arrow: #fff;
	/* Deutliches Ausrollen am Ende statt hartem Stopp. */
	--hs-ease: cubic-bezier(.22, .68, .18, 1);

	position: relative;
	background: var(--hs-bg);
	overflow: hidden;
}

.hs-viewport {
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
}

.hs-viewport.is-dragging {
	cursor: grabbing;
}

.hs-track {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform .65s var(--hs-ease);
	will-change: transform;
}

.hs-slide {
	box-sizing: border-box;
	margin: 0;
	padding: 0 calc(var(--hs-gap) / 2);
	opacity: var(--hs-dim);
	transition: opacity .5s ease;
	cursor: pointer;
}

.hs-slide.is-active {
	opacity: 1;
	cursor: default;
}

.hs-img {
	display: block;
	-webkit-user-drag: none;
	user-select: none;
	pointer-events: none;
}

/* Modus "auto": gleiche Höhe, Breite folgt dem Seitenverhältnis.
   Nichts wird abgeschnitten, unterschiedlich große Bilder stehen
   unterschiedlich breit nebeneinander. */

.hs--auto .hs-slide {
	flex: 0 0 auto;
}

.hs--auto .hs-img {
	height: var(--hs-h);
	width: auto;
	max-width: none;
	object-fit: cover;
}

/* Modus "cover": gleich breite Kacheln, Bilder mittig zugeschnitten. */

.hs--cover .hs-slide {
	flex: 0 0 calc(100% / var(--hs-visible));
}

.hs--cover .hs-img {
	width: 100%;
	height: var(--hs-h);
	max-width: none;
	object-fit: cover;
}

/* Pfeile ------------------------------------------------------------ */

.hs-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 38px;
	height: 38px;
	padding: 8px;
	margin: 0;
	border: 0;
	border-radius: 50%;
	/* Runde Deckkraftfläche statt filter:drop-shadow – SVG-Filter werden
	   auf iOS Safari bei jedem Repaint in der Nähe neu rastert und sind
	   eine der häufigsten Ruckel-Ursachen bei animierten Slidern. */
	background: rgba(0, 0, 0, .32);
	color: var(--hs-arrow);
	cursor: pointer;
	transform: translateY(-50%);
	transition: left .5s ease, right .5s ease;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.hs-arrow svg {
	display: block;
	width: 100%;
	height: 100%;
}

.hs-prev { left: 20px; }
.hs-next { right: 20px; }

.hs-prev:hover, .hs-prev:focus-visible { left: 15px; }
.hs-next:hover, .hs-next:focus-visible { right: 15px; }

.hs-arrow:focus { outline: none; }

.hs-arrow:focus-visible {
	outline: 2px solid var(--hs-arrow);
	outline-offset: 6px;
	border-radius: 2px;
}

/* Punkte ------------------------------------------------------------ */

.hs-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 10px;
	padding: 7px 14px;
	margin: 0 auto;
	width: fit-content;
	border-radius: 999px;
	/* Bewusst kein backdrop-filter: blur() – auf iOS Safari erzwingt das
	   eine Neuberechnung des Weichzeichners in jedem Animationsframe und
	   verursacht spürbares Ruckeln, gerade während der Track daneben
	   verschiebt. Eine reine Deckkraftfläche kostet praktisch nichts. */
	background: rgba(0, 0, 0, .38);
}

.hs-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	opacity: .45;
	cursor: pointer;
	transition: opacity .3s ease;
	box-shadow: 0 0 3px rgba(0, 0, 0, .35);
}

.hs-dot[aria-current="true"] { opacity: 1; }

.hs-dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* Screenreader-Meldung ---------------------------------------------- */

.hs-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.hs-notice {
	padding: 12px 16px;
	background: #fcf3d8;
	border-left: 4px solid #d9a441;
	font-size: 14px;
}

/* Ein einziges Bild ------------------------------------------------- */

.hs-single .hs-slide { opacity: 1; cursor: default; }
.hs-single .hs-arrow,
.hs-single .hs-dots { display: none; }
.hs-single .hs-viewport { cursor: default; }

/* Volle Bildschirmbreite ---------------------------------------------
   Bricht aus einer schmaleren Textspalte aus, unabhängig davon, wie
   breit oder mit welchem Innenabstand die Spalte gebaut ist. Braucht
   kein "position:relative" auf einem Elternelement. */

.hs--full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Mobil -------------------------------------------------------------- */

@media screen and (max-width: 1024px) {
	.hs--cover { --hs-visible: 1.5; }
	.hs--cover .hs-img { height: min(var(--hs-h), 50vw); }
	.hs--auto .hs-img { height: min(var(--hs-h), 50vw); max-width: 94vw; }
}

@media screen and (max-width: 640px) {
	/* Fast randfüllend statt schmalem Streifen – die Nachbarn wirken sonst
	   wie ein abgeschnittener Rand statt wie eine bewusste Vorschau. */
	.hs--cover { --hs-visible: 1.06; }
	.hs--cover .hs-img { height: min(var(--hs-h), 78vw); }
	.hs--auto .hs-img { height: min(var(--hs-h), 78vw); max-width: 96vw; }

	.hs-arrow { width: 32px; height: 32px; padding: 6px; }
	.hs-prev { left: 10px; }
	.hs-next { right: 10px; }
	.hs-prev:hover, .hs-prev:focus-visible { left: 7px; }
	.hs-next:hover, .hs-next:focus-visible { right: 7px; }
	.hs-dots { bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.hs-track,
	.hs-slide,
	.hs-arrow { transition: none !important; }
}
