/*
 * VfL News Hero Slider
 * Alles unter .vfl-nhs gekapselt – kein Selektor greift außerhalb des Sliders.
 * Die Doppelklasse (.vfl-nhs .vfl-nhs__x) ist Absicht: Themes wie Avada setzen
 * Überschriften über Selektoren wie ".fusion-body h2", die sonst gewinnen.
 */

.vfl-nhs {
	--vfl-nhs-h: 670px;
	--vfl-nhs-h-tablet: 600px;
	--vfl-nhs-h-mobile: 450px;
	--vfl-nhs-box-w: 60%;
	--vfl-nhs-box-w-tablet: 80%;
	--vfl-nhs-box-pad: 1.5rem;
	--vfl-nhs-box-bg: #ffffff;
	--vfl-nhs-overlay: 0;
	--vfl-nhs-title-font: inherit;
	--vfl-nhs-title-size: 24px;
	--vfl-nhs-title-size-mobile: 25px;
	--vfl-nhs-title-color: #004898;
	--vfl-nhs-title-weight: bold;
	--vfl-nhs-title-transform: none;
	--vfl-nhs-btn-font: inherit;
	--vfl-nhs-btn-size: 18px;
	--vfl-nhs-btn-size-mobile: 16px;
	--vfl-nhs-btn-bg: #004898;
	--vfl-nhs-btn-color: #ffffff;
	--vfl-nhs-btn-bg-hover: #003b7d;
	--vfl-nhs-btn-color-hover: #ffffff;
	--vfl-nhs-btn-transform: uppercase;
	--vfl-nhs-arrow-bg: #1e4b9c;
	--vfl-nhs-arrow-bg-hover: #004898;
	--vfl-nhs-arrow-color: #ffffff;
	--vfl-nhs-arrow-color-hover: #ffffff;
	--vfl-nhs-arrow-size: 70px;
	--vfl-nhs-arrow-size-mobile: 50px;
	--vfl-nhs-arrow-icon: 40px;
	--vfl-nhs-arrow-stroke: 2;
	--vfl-nhs-arrow-radius: 0px;
	--vfl-nhs-arrow-x: 0px;
	--vfl-nhs-arrow-y: 0px;
	--vfl-nhs-arrow-gap: 0px;
	--vfl-nhs-fade: 600ms;

	position: relative;
	width: 100%;
	height: var(--vfl-nhs-h);
	overflow: hidden;
	isolation: isolate;
	background: #000;
}

/* --- Screenreader-Text (Fallback, falls das Theme keinen mitbringt) ------ */

.vfl-nhs .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

/* --- Slides -------------------------------------------------------------- */

.vfl-nhs .vfl-nhs__viewport {
	position: absolute;
	inset: 0;
}

.vfl-nhs .vfl-nhs__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--vfl-nhs-fade) ease, visibility 0s linear var(--vfl-nhs-fade);
}

.vfl-nhs .vfl-nhs__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
	transition: opacity var(--vfl-nhs-fade) ease, visibility 0s;
}

.vfl-nhs .vfl-nhs__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

.vfl-nhs .vfl-nhs__img--empty {
	display: block;
	width: 100%;
	height: 100%;
	background: #004898;
}

.vfl-nhs .vfl-nhs__overlay {
	position: absolute;
	inset: 0;
	background: #000;
	opacity: var(--vfl-nhs-overlay);
	pointer-events: none;
}

/* --- Weiße Box ----------------------------------------------------------- */

.vfl-nhs .vfl-nhs__boxwrap {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	justify-content: center;
	pointer-events: none;
}

.vfl-nhs .vfl-nhs__box {
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	gap: 1.5rem;
	width: var(--vfl-nhs-box-w);
	padding: var(--vfl-nhs-box-pad);
	background: var(--vfl-nhs-box-bg);
	pointer-events: auto;
}

.vfl-nhs .vfl-nhs__title {
	margin: 0;
	padding: 0;
	font-family: var(--vfl-nhs-title-font);
	font-size: var(--vfl-nhs-title-size);
	font-weight: var(--vfl-nhs-title-weight);
	line-height: 1.2;
	color: var(--vfl-nhs-title-color);
	text-transform: var(--vfl-nhs-title-transform);
	overflow-wrap: anywhere;
}

/* --- Button -------------------------------------------------------------- */

.vfl-nhs .vfl-nhs__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7em 1.4em;
	border: 0;
	border-radius: 0;
	background: var(--vfl-nhs-btn-bg);
	color: var(--vfl-nhs-btn-color);
	font-family: var(--vfl-nhs-btn-font);
	font-size: var(--vfl-nhs-btn-size);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: var(--vfl-nhs-btn-transform);
	white-space: nowrap;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.vfl-nhs .vfl-nhs__btn:hover,
.vfl-nhs .vfl-nhs__btn:focus-visible {
	background: var(--vfl-nhs-btn-bg-hover);
	color: var(--vfl-nhs-btn-color-hover);
	text-decoration: none;
}

.vfl-nhs .vfl-nhs__btn:focus-visible {
	outline: 3px solid var(--vfl-nhs-btn-bg);
	outline-offset: 3px;
}

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

.vfl-nhs .vfl-nhs__arrow {
	position: absolute;
	bottom: var(--vfl-nhs-arrow-y);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--vfl-nhs-arrow-size);
	height: var(--vfl-nhs-arrow-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--vfl-nhs-arrow-radius);
	background: var(--vfl-nhs-arrow-bg);
	color: var(--vfl-nhs-arrow-color);
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.vfl-nhs .vfl-nhs__arrow--prev {
	left: var(--vfl-nhs-arrow-x);
}

.vfl-nhs .vfl-nhs__arrow--next {
	right: var(--vfl-nhs-arrow-x);
}

/* Beide Pfeile unten rechts. */
.vfl-nhs[data-arrows="right"] .vfl-nhs__arrow--prev {
	right: calc(var(--vfl-nhs-arrow-x) + var(--vfl-nhs-arrow-size) + var(--vfl-nhs-arrow-gap));
	left: auto;
}

/* Beide Pfeile unten links. */
.vfl-nhs[data-arrows="left"] .vfl-nhs__arrow--next {
	right: auto;
	left: calc(var(--vfl-nhs-arrow-x) + var(--vfl-nhs-arrow-size) + var(--vfl-nhs-arrow-gap));
}

/* Mittig an den Seitenrändern. */
.vfl-nhs[data-arrows="middle"] .vfl-nhs__arrow {
	top: 50%;
	bottom: auto;
	transform: translateY(-50%);
}

.vfl-nhs .vfl-nhs__arrow:hover,
.vfl-nhs .vfl-nhs__arrow:focus-visible {
	background: var(--vfl-nhs-arrow-bg-hover);
	color: var(--vfl-nhs-arrow-color-hover);
}

.vfl-nhs .vfl-nhs__arrow:focus-visible {
	outline: 2px solid var(--vfl-nhs-arrow-color);
	outline-offset: -4px;
}

.vfl-nhs .vfl-nhs__chevron {
	width: var(--vfl-nhs-arrow-icon);
	height: var(--vfl-nhs-arrow-icon);
	pointer-events: none;
}

.vfl-nhs .vfl-nhs__chevron path {
	stroke-width: var(--vfl-nhs-arrow-stroke);
}

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

.vfl-nhs .vfl-nhs__dots {
	position: absolute;
	bottom: 14px;
	left: 50%;
	z-index: 5;
	display: flex;
	gap: 8px;
	transform: translateX(-50%);
}

.vfl-nhs .vfl-nhs__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.vfl-nhs .vfl-nhs__dot.is-active {
	background: #ffffff;
	transform: scale(1.2);
}

/* --- Fortschrittsbalken (unten, wie im alten Slider) --------------------- */

.vfl-nhs .vfl-nhs__progress {
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 4;
	width: 100%;
	height: 5px;
	background: transparent;
	pointer-events: none;
}

.vfl-nhs .vfl-nhs__progress span {
	display: block;
	width: 0;
	height: 100%;
	background: rgba(255, 255, 255, 0.75);
}

/*
 * --- Theme-Regeln überschreiben -----------------------------------------
 * Nur aktiv, wenn die Option gesetzt ist. Die !important-Regeln stehen
 * ausschließlich innerhalb von .vfl-nhs und können nichts außerhalb
 * des Sliders beeinflussen.
 */

.vfl-nhs.vfl-nhs--force .vfl-nhs__title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--vfl-nhs-title-font) !important;
	font-size: var(--vfl-nhs-title-size) !important;
	font-weight: var(--vfl-nhs-title-weight) !important;
	line-height: 1.2 !important;
	color: var(--vfl-nhs-title-color) !important;
	text-transform: var(--vfl-nhs-title-transform) !important;
}

.vfl-nhs.vfl-nhs--force .vfl-nhs__btn {
	background: var(--vfl-nhs-btn-bg) !important;
	color: var(--vfl-nhs-btn-color) !important;
	font-family: var(--vfl-nhs-btn-font) !important;
	font-size: var(--vfl-nhs-btn-size) !important;
	text-transform: var(--vfl-nhs-btn-transform) !important;
}

.vfl-nhs.vfl-nhs--force .vfl-nhs__btn:hover,
.vfl-nhs.vfl-nhs--force .vfl-nhs__btn:focus-visible {
	background: var(--vfl-nhs-btn-bg-hover) !important;
	color: var(--vfl-nhs-btn-color-hover) !important;
}

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

@media only screen and (max-width: 1024px) {

	.vfl-nhs {
		height: var(--vfl-nhs-h-tablet);
	}

	.vfl-nhs .vfl-nhs__box {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 15px;
		width: var(--vfl-nhs-box-w-tablet);
	}

	.vfl-nhs .vfl-nhs__title {
		font-size: var(--vfl-nhs-title-size-mobile);
		text-align: center;
	}

	.vfl-nhs .vfl-nhs__btn {
		font-size: var(--vfl-nhs-btn-size-mobile);
	}

	.vfl-nhs.vfl-nhs--force .vfl-nhs__title {
		font-size: var(--vfl-nhs-title-size-mobile) !important;
		text-align: center !important;
	}

	.vfl-nhs.vfl-nhs--force .vfl-nhs__btn {
		font-size: var(--vfl-nhs-btn-size-mobile) !important;
	}
}

@media only screen and (max-width: 640px) {

	.vfl-nhs {
		height: var(--vfl-nhs-h-mobile);
	}

	.vfl-nhs .vfl-nhs__arrow {
		width: var(--vfl-nhs-arrow-size-mobile);
		height: var(--vfl-nhs-arrow-size-mobile);
	}

	.vfl-nhs .vfl-nhs__chevron {
		width: calc(var(--vfl-nhs-arrow-icon) * 0.75);
		height: calc(var(--vfl-nhs-arrow-icon) * 0.75);
	}
}

@media only screen and (max-width: 350px) {

	.vfl-nhs .vfl-nhs__title {
		width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

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

@media (prefers-reduced-motion: reduce) {

	.vfl-nhs .vfl-nhs__slide,
	.vfl-nhs .vfl-nhs__btn,
	.vfl-nhs .vfl-nhs__arrow,
	.vfl-nhs .vfl-nhs__dot {
		transition: none;
	}
}
