/* =========================================================
   M43 - Referenzen (hone)
   Tokens: bar rgba(31,31,31,.9) | gold #a5936f | weiss
   Font: cresta | Font-Sizes in rem (Basis 20px), Spacing in px.
   Figma: 31:187 (03_Referenzen) — 3-spaltiges Grid in breiter
   Flucht (1760), Karte 573x477, Info-Bar unten 176px.
   Vertikal-Abstand kommt aus dem Abstand-Klonfeld.
   ========================================================= */

section.m43_referenzen {
	background: transparent;
}

section.m43_referenzen.m43_hell {
	background-color: #fff;
}

/* ---------- Header (optional) ---------- */
section.m43_referenzen .m43_header {
	margin-bottom: 50px;
}

section.m43_referenzen .m43_titel {
	margin: 0;
	line-height: 1;
	font-weight: 500;
	letter-spacing: 0.875px;
	text-transform: uppercase;
	color: #fff;
}

section.m43_referenzen .m43_titel span,
section.m43_referenzen.m43_hell .m43_titel span {
	color: #a5936f;
}

section.m43_referenzen .m43_text {
	max-width: 574px;
	margin-top: 28px;
	font-size: 0.9rem;         /* 18px (Basis 20px) */
	line-height: 1.4444;
	letter-spacing: 0.45px;
	font-weight: 300;
	color: #fff;
}

section.m43_referenzen.m43_hell .m43_titel,
section.m43_referenzen.m43_hell .m43_text {
	color: #1f1f1f;
}

/* ---------- Grid ---------- */
section.m43_referenzen .m43_grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* ---------- Karte ---------- */
section.m43_referenzen .m43_card {
	position: relative;
	display: block;
	aspect-ratio: 573 / 477;
	overflow: hidden;
	background-color: #1f1f1f;
	text-decoration: none;
	cursor: pointer;
}

section.m43_referenzen .m43_card_media {
	position: absolute;
	inset: 0;
}

section.m43_referenzen .m43_card_img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s;
}

section.m43_referenzen .m43_card:hover .m43_card_img {
	transform: scale(1.04);
}

/* Info-Bar unten (Figma: 176px, Text-Inset 63px) */
section.m43_referenzen .m43_card_bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;                /* wie m37: haelt den halbtransparenten Layer in der Karte */
	min-height: 176px;
	box-sizing: border-box;
	padding: 27px 63px 20px 63px;
	background-color: rgba(31, 31, 31, 0.9);
}

section.m43_referenzen .m43_card_titel {
	margin: 0;
	min-height: 56px;          /* 2 Zeilen — Folgezeilen aller Karten auf einer Linie */
	font-size: 1.1rem;         /* 22px (Basis 20px) */
	line-height: 1.2727;       /* 28px */
	font-weight: 500;
	letter-spacing: 0.875px;
	text-transform: uppercase;
	color: #a5936f;
}

section.m43_referenzen .m43_card_flaeche {
	margin: 0;
	font-size: 0.75rem;        /* 15px (Basis 20px) */
	line-height: 1.7333;       /* 26px */
	letter-spacing: 0.45px;
	font-weight: 300;
	color: #a5936f;
}

section.m43_referenzen .m43_card_einheiten {
	margin: 14px 0 0 0;
	font-size: 0.75rem;        /* 15px (Basis 20px) */
	line-height: 1.2;          /* 18px */
	letter-spacing: 0.45px;
	font-weight: 300;
	color: #fff;
}

/* ---------- Breite Flucht (Figma-Grid 1760 bei Container 1462) ---------- */
@media (min-width: 1560px) {
	section.m43_referenzen .m43_grid {
		margin-left: clamp(-149px, calc(-50vw + 811px), 0px);
		margin-right: clamp(-149px, calc(-50vw + 811px), 0px);
	}
}

@media (min-width: 2200px) {
	section.m43_referenzen .m43_grid {
		margin-left: clamp(-149px, calc(-50vw + 920px), 0px);  /* Container 1680 */
		margin-right: clamp(-149px, calc(-50vw + 920px), 0px);
	}
}

@media (min-width: 2400px) {
	section.m43_referenzen .m43_grid {
		margin-left: clamp(-149px, calc(-50vw + 980px), 0px);  /* Container 1800 */
		margin-right: clamp(-149px, calc(-50vw + 980px), 0px);
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 1399px) {
	section.m43_referenzen .m43_card_bar {
		padding: 24px 30px 18px 30px;
	}
}

/* 3 Spalten nur ab Figma-Breite (>=1560). Darunter 2 Spalten UND Info-Bar
   unter das Bild (statt Overlay, das sonst zu viel vom Bild verdeckt). */
@media (max-width: 1559px) {
	section.m43_referenzen .m43_grid {
		grid-template-columns: repeat(2, 1fr);
	}

	section.m43_referenzen .m43_card_titel {
		min-height: 0;
	}

	section.m43_referenzen .m43_card {
		aspect-ratio: auto;
	}

	section.m43_referenzen .m43_card_media {
		position: relative;
		inset: auto;
		aspect-ratio: 573 / 400;
	}

	section.m43_referenzen .m43_card_bar {
		position: relative;
		min-height: 0;
	}
}

@media (max-width: 767px) {
	section.m43_referenzen .m43_grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 575px) {
	section.m43_referenzen .m43_titel {
		line-height: 1.15;
	}

	/* Info-Bar-Text sass mit 30px zu weit vom Kartenrand -> auf schmalem
	   Screen wirkt der Text-Teil unnoetig eingerueckt. Enger ans Raster. */
	section.m43_referenzen .m43_card_bar {
		padding: 22px 24px 18px 24px;
	}
}
