/**
 * Kubota Europe feature cards (WPBakery element `vc_kbeu_feature_cards`).
 *
 * Based on the Figma design 4595-1671: a row of tall rounded (14px) cards, three
 * per row on desktop. Each card has a full-bleed background image (or a muted,
 * looping background video) under a dark overlay (rgba(0,0,0,0.2)), a small bold
 * white text pinned to the top-right
 * corner (18px / Bold) and, at the bottom-left, a bold white title (32px / Bold)
 * over a lighter white paragraph (20px / Roman). The card keeps a portrait ratio
 * (~591 x 751 in the design) and collapses to two, then one, column on narrower
 * viewports.
 *
 * Font family "Inter" is provided by the plugin's fonts stylesheet
 * (this handle depends on `kbeu-fonts`), referenced via `--kbeu-font-principal`.
 * The bundled family ships the 300 / 400 / 500 / 700 weights, so the design's 400 (Roman)
 * paragraph matches exactly.
 */

.kbeu-feature-cards {
	font-family: var( --kbeu-font-principal );
}

.kbeu-feature-cards__grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: clamp( 16px, 2vw, 32px );
}

.kbeu-feature-cards__card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	aspect-ratio: 591 / 751;
	min-height: 420px;
	padding: clamp( 24px, 2.4vw, 40px );
	border-radius: 14px;
	overflow: hidden;
	background-color: var( --kbeu-color-ink );
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	color: #fff;
	text-decoration: none;
}

/* Background video: covers the card, sits above the background image and below
   the overlay and text. Decorative (muted / looping), so it is not interactive. */
.kbeu-feature-cards__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.kbeu-feature-cards__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.2 );
	pointer-events: none;
}

/* Keep the text layers above the overlay. */
.kbeu-feature-cards__top,
.kbeu-feature-cards__body {
	position: relative;
	z-index: 1;
}

.kbeu-feature-cards__top {
	margin: 0 0 auto auto;
	max-width: 62%;
	font-weight: 700;
	line-height: 1.5;
	font-size: clamp( 15px, 1.2vw, 18px );
	text-align: right;
}

.kbeu-feature-cards__body {
	margin-top: clamp( 24px, 3vw, 48px );
}

.kbeu-feature-cards__title {
	margin: 0;
	font-weight: 700;
	line-height: 1.2;
	font-size: clamp( 24px, 2.4vw, 32px );
	color: #fff;
}

.kbeu-feature-cards__text {
	margin: clamp( 10px, 1.2vw, 18px ) 0 0;
	font-weight: 400;
	line-height: 1.5;
	font-size: clamp( 16px, 1.5vw, 20px );
	color: #fff;
}

/* Clickable cards lift slightly and reveal a touch more of the image on hover. */
.kbeu-feature-cards__card--link {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kbeu-feature-cards__card--link:hover,
.kbeu-feature-cards__card--link:focus-visible {
	transform: translateY( -4px );
	box-shadow: 0 12px 30px rgba( 0, 0, 0, 0.25 );
}

.kbeu-feature-cards__card--link .kbeu-feature-cards__overlay {
	transition: background-color 0.25s ease;
}

.kbeu-feature-cards__card--link:hover .kbeu-feature-cards__overlay,
.kbeu-feature-cards__card--link:focus-visible .kbeu-feature-cards__overlay {
	background: rgba( 0, 0, 0, 0.32 );
}

.kbeu-feature-cards__placeholder {
	margin: 0;
	padding: 24px;
	border: 1px dashed #b5b5b5;
	border-radius: 14px;
	color: #6d6d6d;
	text-align: center;
}

/* --- Responsive ------------------------------------------------------- */

@media ( max-width: 1024px ) {
	.kbeu-feature-cards__grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 640px ) {
	.kbeu-feature-cards__grid {
		grid-template-columns: 1fr;
	}

	.kbeu-feature-cards__card {
		aspect-ratio: auto;
		min-height: 360px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.kbeu-feature-cards__card--link {
		transition: none;
	}

	.kbeu-feature-cards__card--link:hover,
	.kbeu-feature-cards__card--link:focus-visible {
		transform: none;
	}
}
