/**
 * Kubota Europe product highlights slider (WPBakery element
 * `vc_kbeu_product_highlights`).
 *
 * Based on the Figma design 3721-2808 (each slide: a light grey card #f6f6f6,
 * radius 14px, with a bold title — 32px / 700, black, line-height 1.37 — over a
 * light paragraph — 24px / 300, #1d1d1b, line-height 1.55) and 3721-2893 (the
 * control: teal prev/next chevrons with a dots pager, the active dot an elongated
 * teal pill). Two cards show per view on desktop, one on mobile; the JS
 * (`kbeu-product-highlights.js`) translates the track and drives the control.
 *
 * Font family "Helvetica Neue LT Pro" is provided by the plugin's fonts stylesheet
 * (this handle depends on `kbeu-fonts`) and referenced via `--kbeu-font-principal`.
 */

.kbeu-product-highlights {
	--kbeu-hl-teal: #03a8a9;
	--kbeu-hl-dot: #d3d6d8;
	--kbeu-hl-gap: clamp(20px, 2vw, 29px);
}

.kbeu-product-highlights__inner {
	margin: 0 auto;
}

/* Viewport clips the overflowing track. */
.kbeu-highlights__viewport {
	overflow: hidden;
}

.kbeu-highlights__track {
	display: flex;
	align-items: stretch;
	gap: var( --kbeu-hl-gap );
	/* Slides change with a crossfade: the JS fades the track out, repositions it
	   instantly, then fades it back in (no horizontal sliding). An opacity fade is
	   gentle enough to keep even under prefers-reduced-motion. */
	transition: opacity 0.3s ease;
	will-change: opacity;
}

.kbeu-highlights__track.is-fading {
	opacity: 0;
}

/* Two cards per view on desktop. */
.kbeu-highlights__item {
	flex: 0 0 calc( ( 100% - var( --kbeu-hl-gap ) ) / 2 );
	min-width: 0;
	display: flex;
}

/* A lone highlight spans the full width instead of a half column. */
.kbeu-highlights__item:only-child {
	flex-basis: 100%;
}

.kbeu-highlights__card {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	background: #f6f6f6;
	border-radius: 14px;
	padding: clamp( 28px, 3vw, 52px );
	min-height: clamp( 260px, 26vw, 423px );
}

.kbeu-highlights__title {
	margin: 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 700;
	line-height: 1.37;
	font-size: clamp( 24px, 2.4vw, 32px );
	color: #000;
}

.kbeu-highlights__text {
	margin-top: clamp( 16px, 1.6vw, 28px );
	font-family: var( --kbeu-font-principal );
	font-weight: 300;
	line-height: 1.55;
	font-size: clamp( 17px, 1.7vw, 24px );
	color: #1d1d1b;
}

.kbeu-highlights__text > :first-child {
	margin-top: 0;
}

.kbeu-highlights__text > :last-child {
	margin-bottom: 0;
}

/* Control: prev/next chevrons + dots pager. */
.kbeu-highlights__control {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp( 16px, 2.5vw, 32px );
	margin-top: clamp( 28px, 3vw, 48px );
}

.kbeu-highlights__control[hidden] {
	display: none;
}

.kbeu-highlights__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: var( --kbeu-hl-teal );
	cursor: pointer;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.kbeu-highlights__arrow:hover {
	color: #027a7b;
}

.kbeu-highlights__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.kbeu-highlights__dots {
	display: flex;
	align-items: center;
	gap: 10px;
}

.kbeu-highlights__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var( --kbeu-hl-dot );
	cursor: pointer;
	transition: width 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.kbeu-highlights__dot.is-active {
	width: 28px;
	border-radius: 4px;
	background: var( --kbeu-hl-teal );
	cursor: default;
}

/* One card per view on mobile. */
@media ( max-width: 860px ) {
	.kbeu-highlights__item {
		flex-basis: 100%;
	}
}
