/* VfL Gummersbach Action Boxes – Frontend */

.vflab-section {
	--vflab-cols: 3;
	--vflab-gap: 14px;
	--vflab-radius: 0px;
	--vflab-minh: 230px;
	--vflab-maxw: 1320px;
	--vflab-pad: 40px;
	--vflab-title-size: 58px;
	--vflab-bg: #004898;
	--vflab-bg-hover: #00356f;
	--vflab-title: #ffffff;
	--vflab-kicker: #ffffff;
	--vflab-accent: #7fc4ff;
	--vflab-section-bg: transparent;
	--vflab-logo-h: 34px;

	box-sizing: border-box;
	width: 100%;
	padding: var(--vflab-pad) 20px;
	background: var(--vflab-section-bg);
	font-family: var(--vflab-font, inherit);
}

.vflab-section *,
.vflab-section *::before,
.vflab-section *::after {
	box-sizing: border-box;
}

.vflab-inner {
	max-width: var(--vflab-maxw);
	margin: 0 auto;
}

.vflab-heading {
	margin: 0 0 12px;
	font-size: clamp(22px, 2.4vw, 34px);
	line-height: 1.15;
	font-family: var(--vflab-heading-font, var(--vflab-font, inherit));
	font-weight: var(--vflab-heading-weight, 700);
	color: var(--vflab-bg);
}

.vflab-intro {
	margin: 0 0 24px;
	max-width: 70ch;
}

.vflab-intro p:last-child {
	margin-bottom: 0;
}

.vflab-grid {
	display: grid;
	grid-template-columns: repeat(var(--vflab-cols), minmax(0, 1fr));
	gap: var(--vflab-gap);
	align-items: stretch;
}

/* --- Hintergrundbild & Overlay --- */

.vflab-box__bg,
.vflab-box__overlay {
	position: absolute;
	inset: 0;
	display: block;
	pointer-events: none;
	border-radius: inherit;
}

.vflab-box__bg {
	overflow: hidden;
	z-index: 0;
}

.vflab-box img.vflab-bg-img {
	width: 100%;
	height: 100%;
	margin: 0;
	max-width: none;
	object-fit: var(--vflab-bg-fit, cover);
	object-position: var(--vflab-bg-pos, center center);
	transition: transform 0.45s ease;
}

.vflab-box--zoom:hover img.vflab-bg-img,
.vflab-box--zoom:focus-visible img.vflab-bg-img {
	transform: scale(1.06);
}

.vflab-box__overlay {
	z-index: 1;
	opacity: var(--vflab-overlay-alpha, 0.55);
	transition: opacity 0.25s ease;
}

.vflab-overlay--solid {
	background-color: var(--vflab-overlay-color, #004898);
}

.vflab-overlay--gradient-bottom {
	background-image: linear-gradient(
		to top,
		var(--vflab-overlay-color, #004898) 0%,
		var(--vflab-overlay-color, #004898) 35%,
		transparent 100%
	);
}

.vflab-overlay--gradient-top {
	background-image: linear-gradient(
		to bottom,
		var(--vflab-overlay-color, #004898) 0%,
		var(--vflab-overlay-color, #004898) 35%,
		transparent 100%
	);
}

/* Inhalte liegen über Bild und Overlay. */
.vflab-box > span:not(.vflab-box__bg):not(.vflab-box__overlay) {
	position: relative;
	z-index: 2;
}

/* Etwas mehr Halt für Text auf Fotos. */
.vflab-box--has-bg .vflab-title,
.vflab-box--has-bg .vflab-kicker,
.vflab-box--has-bg .vflab-sub {
	text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}

/* Bei Bildhintergrund bleibt die Hover-Farbe dezent. */
.vflab-box--has-bg:hover,
.vflab-section a.vflab-box--has-bg:hover,
.vflab-section a.vflab-box--has-bg:focus-visible {
	background: var(--vflab-bg);
}

.vflab-box--has-bg:hover .vflab-box__overlay,
.vflab-box--has-bg:focus-visible .vflab-box__overlay {
	opacity: calc(var(--vflab-overlay-alpha, 0.55) + 0.12);
}

/* --- Box --- */

.vflab-box {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 14px;
	min-height: var(--vflab-minh);
	padding: 26px 28px 24px;
	border-radius: var(--vflab-radius);
	background: var(--vflab-bg);
	color: var(--vflab-title);
	text-decoration: none;
	overflow: hidden;
	transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
	-webkit-tap-highlight-color: transparent;
}

/*
 * Höhere Spezifität, damit Theme-Linkstile (z. B. Avada: .fusion-body a { … })
 * die Boxen nicht überschreiben.
 */
.vflab-section a.vflab-box,
.vflab-section a.vflab-box:visited {
	color: var(--vflab-title);
	text-decoration: none;
	border: 0;
	box-shadow: none;
}

.vflab-box:hover,
.vflab-box:focus-visible,
.vflab-section a.vflab-box:hover,
.vflab-section a.vflab-box:focus,
.vflab-section a.vflab-box:focus-visible,
.vflab-section a.vflab-box:active {
	text-decoration: none;
	color: var(--vflab-title);
	background: var(--vflab-bg-hover);
}

.vflab-section a.vflab-box .vflab-title,
.vflab-section a.vflab-box:hover .vflab-title {
	color: var(--vflab-title);
}

.vflab-section a.vflab-box .vflab-sub,
.vflab-section a.vflab-box:hover .vflab-sub {
	color: var(--vflab-accent);
}

.vflab-box:focus-visible {
	outline: 3px solid var(--vflab-accent);
	outline-offset: 3px;
}

.vflab-hover-lift .vflab-box:hover,
.vflab-hover-lift .vflab-box:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.vflab-hover-zoom .vflab-box:hover,
.vflab-hover-zoom .vflab-box:focus-visible {
	transform: scale(1.02);
}

.vflab-hover-fade .vflab-box:hover,
.vflab-hover-fade .vflab-box:focus-visible {
	opacity: 0.88;
}

.vflab-box--static {
	cursor: default;
}

.vflab-box__head {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
}

.vflab-kicker {
	display: block;
	font-size: clamp(15px, 1.2vw, var(--vflab-kicker-size, 19px));
	font-family: var(--vflab-kicker-font, var(--vflab-font, inherit));
	font-style: var(--vflab-kicker-style, italic);
	font-weight: var(--vflab-kicker-weight, 400);
	line-height: 1.2;
	color: var(--vflab-kicker);
	opacity: 0.95;
}

.vflab-logo-wrap {
	display: block;
	line-height: 0;
}

.vflab-box img.vflab-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: var(--vflab-logo-h);
	margin: 0;
	object-fit: contain;
	object-position: left center;
}

.vflab-title {
	display: block;
	margin-top: auto;
	font-size: clamp(28px, 3.2vw, var(--vflab-title-size));
	font-family: var(--vflab-title-font, var(--vflab-font, inherit));
	font-weight: var(--vflab-title-weight, 700);
	line-height: 1.03;
	letter-spacing: var(--vflab-title-ls, -0.015em);
	color: var(--vflab-title);
	overflow-wrap: break-word;
	hyphens: auto;
	text-wrap: balance;
}

/*
 * Titelgröße an die Boxbreite koppeln (statt an die Fensterbreite),
 * damit lange Wörter wie „Auswärtsticket" auch bei 3 Spalten passen.
 */
@supports (container-type: inline-size) {
	.vflab-box {
		container-type: inline-size;
	}

	.vflab-title {
		font-size: clamp(28px, 11cqw, var(--vflab-title-size));
	}
}

.vflab-sub {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: clamp(13px, 1.05vw, var(--vflab-sub-size, 17px));
	font-family: var(--vflab-sub-font, var(--vflab-font, inherit));
	font-weight: var(--vflab-sub-weight, 500);
	line-height: 1.25;
	letter-spacing: var(--vflab-sub-ls, 0.01em);
	color: var(--vflab-accent);
}

.vflab-sub--upper {
	text-transform: uppercase;
}

.vflab-sub__text {
	display: inline-block;
}

.vflab-arrow {
	flex: 0 0 auto;
	width: 1.15em;
	height: 1.15em;
	transition: transform 0.25s ease;
}

.vflab-box:hover .vflab-arrow,
.vflab-box:focus-visible .vflab-arrow {
	transform: translateX(5px);
}

/* --- Responsive --- */

@media (max-width: 1100px) {
	.vflab-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vflab-grid[data-count="1"] {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 680px) {
	.vflab-section {
		padding-left: 16px;
		padding-right: 16px;
	}

	.vflab-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.vflab-box {
		min-height: 0;
		padding: 22px 22px 20px;
		gap: 10px;
	}

	.vflab-title {
		font-size: clamp(28px, 9vw, 44px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.vflab-box,
	.vflab-arrow,
	.vflab-box img.vflab-bg-img {
		transition: none;
	}

	.vflab-box--zoom:hover img.vflab-bg-img {
		transform: none;
	}

	.vflab-hover-lift .vflab-box:hover,
	.vflab-hover-zoom .vflab-box:hover {
		transform: none;
	}
}
