/*
 * fx14_referenzen — Referenz-Slider.
 *
 * Schriftgroessen, Farben und Container kommen aus project.css. Hier stehen nur
 * Layout, Abstaende und Zustaende dieses Moduls.
 */

section.fx14_referenzen .fx14_kopf {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	margin-bottom: var(--fx-pad-block-gross);
}

section.fx14_referenzen .fx14_topline { margin-bottom: var(--fx-gap-block-klein); }
section.fx14_referenzen .fx14_titel   { margin: 0; }

section.fx14_referenzen .fx14_intro {
	margin: 0;
	max-width: 330px;
	color: var(--fx-text);
}

/* Der Hinweis ersetzt das Intro unter 992px — siehe Media Query unten. */
section.fx14_referenzen .fx14_hinweis {
	display: none;
	margin: 0;
	color: var(--fx-text);
}

section.fx14_referenzen .fx14_slider {
	border: 1px solid var(--fx-line);
	border-top: 1px solid var(--fx-navy);
}

/*
 * minmax(0, 1fr) statt 1fr: 1fr ist minmax(auto, 1fr), und der Slick-Track in der
 * Buehne ist tausende Pixel breit. Mit auto als Minimum sprengt er die Spalte.
 * Die Textspalte waechst ab der Entwurfsbreite mit, unten bei 430px verankert.
 */
section.fx14_referenzen .fx14_raster {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(430px, 28vw, 620px);
	/* Zusaetzlich an der Bildschirmhoehe gedeckelt — siehe --fx-buehne-* in project.css. */
	min-height: min( clamp(480px, 38vw, 760px), var(--fx-buehne-mittel) );
}

/* ---------- Buehne ---------- */

section.fx14_referenzen .fx14_buehne {
	position: relative;
	background: var(--fx-tint);
	overflow: hidden;
}

/*
 * Der Medien-Track liegt absolut in der Buehne. Sonst haette er keine definierte
 * Hoehe: height:100% an einem Elternteil ohne feste Hoehe faellt auf auto zurueck,
 * das Bild rendert in Originalgroesse und zieht die ganze Zeile auf.
 */
section.fx14_referenzen .fx14_medien_track {
	position: absolute;
	inset: 0;
}

section.fx14_referenzen .fx14_medien_track .slick-list,
section.fx14_referenzen .fx14_medien_track .slick-track,
section.fx14_referenzen .fx14_medium {
	height: 100%;
}

section.fx14_referenzen .fx14_medium {
	position: relative;
}

section.fx14_referenzen .fx14_bild,
section.fx14_referenzen .fx14_video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Glanzkanten aus dem Entwurf: deuten die Teilung einer Fensterflaeche an. */
section.fx14_referenzen .fx14_glanz {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
section.fx14_referenzen .fx14_glanz::before,
section.fx14_referenzen .fx14_glanz::after {
	content: "";
	position: absolute;
	background: var(--fx-glare-45);
}
section.fx14_referenzen .fx14_glanz::before {
	left: 38%;
	top: 0;
	bottom: 0;
	width: 4px;
}
section.fx14_referenzen .fx14_glanz::after {
	left: 0;
	right: 0;
	top: 64%;
	height: 4px;
	background: var(--fx-glare-45);
}

section.fx14_referenzen .fx14_play {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 48px;
	padding: 20px 28px;
	border: 0;
	background: var(--fx-white);
	color: var(--fx-navy);
	font: 700 var(--fx-fs-label-gross)/1 var(--font-body);
	letter-spacing: var(--fx-ls-button);
	text-transform: uppercase;
	cursor: pointer;
	transition: background .18s ease;
}
section.fx14_referenzen .fx14_play:hover { background: var(--fx-tint); }
section.fx14_referenzen .fx14_play_icon  { display: flex; color: var(--fx-azure); }

section.fx14_referenzen .fx14_art {
	position: absolute;
	right: 20px;
	bottom: 20px;
	z-index: 2;
	padding: 9px 14px;
	background: var(--fx-overlay);
	color: var(--fx-white);
}

section.fx14_referenzen .fx14_medien_nav {
	position: absolute;
	right: 20px;
	top: 20px;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 1px;
}

section.fx14_referenzen .fx14_medien_pfeil {
	width: 48px;
	height: 48px;
	border: 0;
	background: var(--fx-overlay);
	color: var(--fx-white);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .18s ease;
}
section.fx14_referenzen .fx14_medien_pfeil:hover { background: var(--fx-azure); }

section.fx14_referenzen .fx14_medien_pfeil[disabled] {
	opacity: .35;
	cursor: default;
}
section.fx14_referenzen .fx14_medien_pfeil[disabled]:hover { background: var(--fx-overlay); }

section.fx14_referenzen .fx14_medien_zaehler {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 14px;
	background: var(--fx-overlay);
	color: var(--fx-white);
	letter-spacing: var(--fx-ls-meta);
}

/* ---------- Textspalte ---------- */

section.fx14_referenzen .fx14_text {
	display: flex;
	flex-direction: column;
	padding: var(--fx-pad-block-gross) 36px var(--fx-pad-block);
	border-left: 1px solid var(--fx-line);
}

section.fx14_referenzen .fx14_marke {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: var(--fx-gap-block-klein);
}
section.fx14_referenzen .fx14_nr {
	font: 800 var(--fx-fs-nr)/1 var(--font-heading);
	color: var(--fx-azure);
}
section.fx14_referenzen .fx14_linie {
	flex: 1;
	height: 1px;
	background: var(--fx-line);
}
section.fx14_referenzen .fx14_zaehler {
	letter-spacing: var(--fx-ls-versal);
	text-transform: uppercase;
	color: var(--fx-text);
}

section.fx14_referenzen .fx14_referenz_titel { margin: 0; }

section.fx14_referenzen .fx14_kurztext {
	margin: var(--fx-gap-block-klein) 0 0;
	color: var(--fx-text);
}

section.fx14_referenzen .fx14_daten {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: var(--fx-gap-block-klein) 20px;
	margin: var(--fx-gap-block) 0 0;
	padding-top: var(--fx-gap-block-klein);
	border-top: 1px solid var(--fx-line);
}
section.fx14_referenzen .fx14_daten_bezeichnung {
	margin: 0;
	font-weight: 600;
	font-size: var(--fx-fs-label);
	line-height: 1.4;
	letter-spacing: var(--fx-ls-versal);
	text-transform: uppercase;
	color: var(--fx-text);
}
section.fx14_referenzen .fx14_daten_wert {
	margin: 0;
	font-weight: 600;
	line-height: 1.4;
	color: var(--fx-navy);
}

section.fx14_referenzen .fx14_medienleiste {
	margin-top: var(--fx-gap-block);
	padding-top: var(--fx-gap-block-klein);
	border-top: 1px solid var(--fx-line);
}
section.fx14_referenzen .fx14_medien_label {
	margin: 0 0 12px;
	color: var(--fx-text);
}

section.fx14_referenzen .fx14_thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
/* Miniaturen schrumpfen auf niedrigen Schirmen mit — das Seitenverhaeltnis 66:52
   aus dem Entwurf bleibt dabei erhalten. */
section.fx14_referenzen .fx14_thumb {
	position: relative;
	height: clamp(42px, 6.9vh, 52px);
	width: calc(clamp(42px, 6.9vh, 52px) * 66 / 52);
	padding: 0;
	border: 0;
	outline: 1px solid var(--fx-line);
	outline-offset: -3px;
	background: var(--fx-tint);
	cursor: pointer;
}
section.fx14_referenzen .fx14_thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
section.fx14_referenzen .fx14_thumb--aktiv { outline: 3px solid var(--fx-azure); }

section.fx14_referenzen .fx14_thumb_marke {
	position: absolute;
	left: 0;
	bottom: 0;
	display: flex;
	padding: 3px 6px;
	background: var(--fx-overlay-strong);
	color: var(--fx-white);
}

/*
 * margin-top:auto schiebt die CTA an den Spaltenfuss. Geht die Spalte genau auf,
 * bleibt dabei kein Abstand uebrig und die CTA klebt an den Miniaturen. Der
 * Mindestabstand muss deshalb an den Vorgaenger — am Knopf selbst waere es
 * dieselbe Eigenschaft wie margin-top:auto und wuerde das Ausrichten abschalten.
 */
section.fx14_referenzen .fx14_text:has( > .fx14_cta ) > *:nth-last-child( 2 ) {
	margin-bottom: var(--fx-gap-block);
}

section.fx14_referenzen .fx14_cta {
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: auto;
	padding: var(--fx-gap-block-klein) 26px;
	min-height: 48px;
	box-sizing: border-box;
	background: var(--fx-navy);
	color: var(--fx-white);
	font: 700 var(--fx-fs-btn-klein)/1 var(--font-heading);
	transition: background .18s ease;
}
section.fx14_referenzen .fx14_cta:hover { background: var(--fx-azure); color: var(--fx-white); }

/* ---------- Navigation unter dem Slider ---------- */

section.fx14_referenzen .fx14_nav {
	display: flex;
	align-items: stretch;
	border-top: 1px solid var(--fx-line);
}

section.fx14_referenzen .fx14_pfeil {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 28px;
	min-height: 64px;
	border: 0;
	background: var(--fx-white);
	color: var(--fx-navy);
	font: 700 var(--fx-fs-label)/1 var(--font-body);
	letter-spacing: var(--fx-ls-button);
	text-transform: uppercase;
	cursor: pointer;
	transition: background .18s ease;
}
section.fx14_referenzen .fx14_pfeil:hover { background: var(--fx-tint); }
section.fx14_referenzen .fx14_pfeil--prev { border-right: 1px solid var(--fx-line); }

section.fx14_referenzen .fx14_pfeil[disabled] {
	opacity: .35;
	cursor: default;
}
section.fx14_referenzen .fx14_pfeil[disabled]:hover { background: var(--fx-white); }

section.fx14_referenzen .fx14_tabs {
	flex: 1;
	display: flex;
	align-items: stretch;
	overflow: hidden;
}

section.fx14_referenzen .fx14_tab {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 0 24px;
	min-height: 64px;
	border: 0;
	border-right: 1px solid var(--fx-line);
	background: var(--fx-white);
	color: var(--fx-navy);
	font: 700 var(--fx-fs-tab)/1.3 var(--font-heading);
	text-align: left;
	cursor: pointer;
	transition: background .18s ease, color .18s ease;
}
section.fx14_referenzen .fx14_tab_nr {
	flex: none;
	font: 800 var(--fx-fs-label-gross)/1 var(--font-heading);
	opacity: .65;
}
section.fx14_referenzen .fx14_tab_titel {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
section.fx14_referenzen .fx14_tab:hover { background: var(--fx-tint); }
section.fx14_referenzen .fx14_tab--aktiv,
section.fx14_referenzen .fx14_tab--aktiv:hover {
	background: var(--fx-navy);
	color: var(--fx-white);
}

section.fx14_referenzen .fx14_fussnote {
	margin: var(--fx-gap-block-klein) 0 0;
	letter-spacing: var(--fx-ls-versal);
	text-transform: uppercase;
	color: var(--fx-text);
}

/* ---------- Unter 992px: gestapelt ---------- */

@media (max-width: 991px) {
	section.fx14_referenzen .fx14_kopf {
		display: block;
		margin-bottom: 22px;
	}
	section.fx14_referenzen .fx14_topline { margin-bottom: 14px; }
	section.fx14_referenzen .fx14_titel   { margin-bottom: 10px; }
	section.fx14_referenzen .fx14_intro   { display: none; }
	section.fx14_referenzen .fx14_hinweis { display: block; }

	section.fx14_referenzen .fx14_raster {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	section.fx14_referenzen .fx14_buehne { height: clamp(240px, 72vw, 340px); }

	section.fx14_referenzen .fx14_medien_nav { right: 12px; top: 12px; }
	section.fx14_referenzen .fx14_medien_zaehler { padding: 0 10px; }

	/* Im Entwurf sitzt die Marke mobil unten links, nicht rechts. */
	section.fx14_referenzen .fx14_art {
		right: auto;
		left: 0;
		bottom: 0;
	}

	section.fx14_referenzen .fx14_text {
		padding: 24px 20px 26px;
		border-left: 0;
	}
	section.fx14_referenzen .fx14_marke { gap: 12px; margin-bottom: 14px; }
	section.fx14_referenzen .fx14_kurztext { margin-top: 12px; }

	section.fx14_referenzen .fx14_daten {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 10px 16px;
		margin-top: 20px;
		padding-top: 16px;
	}
	/* Der Umfang steht im Entwurf nur auf der Desktop-Breite. */
	section.fx14_referenzen .fx14_daten_zeile--desktop { display: none; }

	section.fx14_referenzen .fx14_medienleiste {
		margin-top: 20px;
		padding-top: 0;
		border-top: 0;
	}
	section.fx14_referenzen .fx14_medien_label { display: none; }
	section.fx14_referenzen .fx14_thumb { width: 62px; height: 48px; }

	/* Tableiste und CTA sind im mobilen Entwurf nicht vorgesehen. */
	section.fx14_referenzen .fx14_cta  { display: none; }
	section.fx14_referenzen .fx14_tabs { display: none; }

	section.fx14_referenzen .fx14_nav {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
	section.fx14_referenzen .fx14_pfeil {
		justify-content: center;
		gap: 10px;
		padding: 0 12px;
		min-height: 56px;
		font-size: var(--fx-fs-label-gross);
		letter-spacing: var(--fx-ls-versal);
	}
	section.fx14_referenzen .fx14_pfeil--next {
		background: var(--fx-navy);
		color: var(--fx-white);
	}
	section.fx14_referenzen .fx14_pfeil--next:hover { background: var(--fx-azure); }
	section.fx14_referenzen .fx14_pfeil--next[disabled]:hover { background: var(--fx-navy); }

	section.fx14_referenzen .fx14_fussnote { margin-top: 18px; }
}

/* Der Entwurf zeigt die Beschriftungen noch bei 390px. Erst darunter wird es eng. */
@media (max-width: 340px) {
	section.fx14_referenzen .fx14_pfeil_text { display: none; }
	section.fx14_referenzen .fx14_play { padding: 14px 18px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	section.fx14_referenzen .fx14_play,
	section.fx14_referenzen .fx14_cta,
	section.fx14_referenzen .fx14_tab,
	section.fx14_referenzen .fx14_pfeil,
	section.fx14_referenzen .fx14_medien_pfeil { transition: none; }
}
