/*
 * verdure/referenzreihe (docs/landingpages-scroll.md, Abschnitt 5.1; Referenz nav#referenzen in
 * docs/referenz/landingpages/landingpage-webdesign.html). H2 im Inhaltsraster, die Karten in fast voller Breite wie die
 * Leistungen (Rand 20 bis 40 px, höchstens 1920 px). Karten mindestens 300 px (mobil 80 %), bei Platz wachsen sie, bis
 * alle in die Reihe passen (fünf ab etwa 1720 px); sonst scrollt die Reihe, und nur dann erscheinen die Pfeiltasten
 * (landingpage.js). Ab 960 px steht jede zweite Karte 140 px tiefer. Farben und Button im Website-Stand.
 */

.wp-block-verdure-referenzreihe {
	--lp-refrow-kante: max(var(--wp--style--root--padding-left, 20px), (100% - var(--wp--style--global--content-size, 1170px)) / 2);
	--lp-refrow-abstand: clamp(20px, 2.6vw, 36px);
	--lp-refrow-rand: clamp(20px, 3vw, 40px);
}

/* Doppelte Klasse: schlägt „:root :where(.is-layout-constrained) > *“ aus den globalen Stilen (gleiche Spezifität, später geladen) */
.wp-block-verdure-referenzreihe.wp-block-verdure-referenzreihe {
	margin-block-start: clamp(100px, 14vw, 200px);
}

.lp-refrow__ueberschrift {
	box-sizing: border-box;
	max-width: calc(18em + var(--lp-refrow-kante));
	margin: 0 0 72px;
	padding-inline: var(--lp-refrow-kante) 0;
	font-size: clamp(36px, 4.2vw, 60px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -1.13px;
}

.lp-refrow {
	display: flex;
	align-items: flex-start;
	gap: var(--lp-refrow-abstand);
	box-sizing: border-box;
	max-width: 1920px;
	margin: 0 auto;
	padding: 0 0 16px var(--lp-refrow-rand);
	overflow-x: auto;
	scroll-padding-left: var(--lp-refrow-rand);
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	list-style: none;
}

.lp-refrow::-webkit-scrollbar {
	display: none;
}

.lp-refrow:focus-visible {
	outline: 2px solid var(--wp--preset--color--schwarz);
	outline-offset: 4px;
}

.lp-refrow__item {
	flex: 1 0 min(300px, 80vw);
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}

/* Rand rechts als Platzhalter (statt Innenabstand, den nicht jeder Browser beim Scrollen mitzählt); hebt den Abstand davor auf */
.lp-refrow__ende {
	flex: 0 0 var(--lp-refrow-rand);
	margin-left: calc(-1 * var(--lp-refrow-abstand));
}

@media (min-width: 960px) {
	.lp-refrow__item:nth-child(even) {
		padding-top: 140px;
	}
}

.lp-refrow__karte {
	display: block;
	color: var(--wp--preset--color--schwarz);
	text-decoration: none;
}

.lp-refrow__karte:hover,
.lp-refrow__karte:hover * {
	color: var(--wp--preset--color--schwarz);
	text-decoration: none;
}

.lp-refrow__karte:focus-visible {
	outline: 2px solid var(--wp--preset--color--schwarz);
	outline-offset: 4px;
}

.lp-refrow__bild {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--wp--preset--color--hellgrau);
}

.lp-refrow__bild img,
.lp-refrow__ohne-bild {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 452 / 500;
	object-fit: cover;
	transition: transform 0.25s ease-in-out;
}

.lp-refrow__karte:hover .lp-refrow__bild img {
	transform: scale(1.02);
}

.lp-refrow__pfeil {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 64px;
	height: 64px;
	background: var(--wp--preset--color--schwarz);
}

.lp-refrow__pfeil::after,
.lp-refrow__taste::after,
.lp-refrow__alle::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 24px;
	height: 24px;
	background-color: var(--wp--preset--color--weiss);
	-webkit-mask: url(../../../icons/pfeil-rechts.svg) center / contain no-repeat;
	mask: url(../../../icons/pfeil-rechts.svg) center / contain no-repeat;
}

.lp-refrow__dachzeile {
	display: block;
	margin: 20px 0 10px;
	color: var(--wp--preset--color--grau-dunkel);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2.4px;
	text-transform: uppercase;
}

.lp-refrow__titel {
	margin: 0;
	font-size: clamp(21px, 2vw, 26px);
	font-weight: 600;
	line-height: 1.3;
}

/* Steuerung unter der Reihe: links Pfeiltasten, rechts „Alle Referenzen“ */
.lp-refrow__steuerung {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 32px;
	box-sizing: border-box;
	max-width: 1920px;
	margin: 0 auto;
	padding: 40px var(--lp-refrow-rand) 0;
}

.lp-refrow__pfeiltasten:not([hidden]) {
	display: flex;
	gap: 12px;
}

.lp-refrow__taste {
	position: relative;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 2px solid var(--wp--preset--color--schwarz);
	background: var(--wp--preset--color--weiss);
	cursor: pointer;
}

.lp-refrow__taste::after {
	background-color: var(--wp--preset--color--schwarz);
}

.lp-refrow__taste--zurueck::after {
	transform: scaleX(-1);
}

.lp-refrow__taste:hover:not([aria-disabled="true"]) {
	background: var(--wp--preset--color--gruen);
}

.lp-refrow__taste[aria-disabled="true"] {
	opacity: 0.35;
	cursor: default;
}

.lp-refrow__taste:focus-visible,
.lp-refrow__alle:focus-visible {
	outline: 2px solid var(--wp--preset--color--schwarz);
	outline-offset: 3px;
}

.lp-refrow__alle {
	position: relative;
	margin-left: auto;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 20px 66px 20px 26px;
	background: var(--wp--preset--color--schwarz);
	color: var(--wp--preset--color--weiss);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2.4px;
	text-decoration: none;
	text-transform: uppercase;
}

.lp-refrow__alle::after {
	right: 26px;
	left: auto;
	width: 18px;
	height: 18px;
}

/* text-decoration: Die globale Link-Regel a:where(:not(.wp-element-button)):hover aus theme.json ist spezifischer
 * als .lp-refrow__alle und würde den Knopf beim Überfahren unterstreichen. Knöpfe werden nie unterstrichen. */
.lp-refrow__alle:hover {
	background: var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--schwarz);
	text-decoration: none;
}

.lp-refrow__alle:hover::after {
	background-color: var(--wp--preset--color--schwarz);
}

@media (prefers-reduced-motion: reduce) {
	.lp-refrow__bild img {
		transition: none;
	}

	.lp-refrow__karte:hover .lp-refrow__bild img {
		transform: none;
	}
}
