/**
 * Kubota Europe News carousel (WPBakery element `vc_kbeu_news`).
 *
 * Implements the Figma design (node 4595-1768): a full-bleed section with a
 * configurable background image under a dark overlay, a left-aligned white header
 * (eyebrow + title + paragraph) with the circular prev/next arrows on its right, a
 * row of news cards (three per view on desktop, two on tablet, one on mobile) and a
 * centered outlined "Discover more" button below.
 *
 * Each card is a rounded, full-bleed featured image with the publish date pinned to
 * the top-right and a frosted "glass" box over the bottom-left holding the news title
 * in white and an outlined "Read More" button. The glass box matches the promotions
 * card (rgba(0,0,0,.27) + backdrop blur, 29px radius).
 *
 * The carousel mechanics (viewport / track / item widths, the crossfade) are the
 * shared carousel component: the root carries the `kbeu-carousel` class, so
 * `kbeu-carousel.js` drives it and `kbeu-carousel.css` lays out the track — this
 * file only sets the per-view tokens (three / two / one, breakpoints matching the
 * root's `data-kbeu-bp-*`), keeps the arrows in the header row and styles the
 * section and the cards. Font family "Inter" comes from the
 * plugin's fonts stylesheet (this handle depends on `kbeu-fonts`) via
 * `--kbeu-font-principal`.
 */

.kbeu-news {
	--kbeu-news-radius: 14px;
	--kbeu-carousel-gap: clamp( 16px, 1.6vw, 30px );
	/* Card proportion from Figma (595.197 × 422.943 ≈ 1.4 landscape). */
	--kbeu-news-ratio: 595 / 423;
	--kbeu-news-teal: var( --kbeu-color-teal );
	position: relative;
	overflow: hidden;
	padding: clamp( 48px, 6vw, 104px ) 0;
	color: #fff;
}

/* Full-bleed background image + dark overlay. */
.kbeu-news__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: #0d0d0d;
}

.kbeu-news__bg-img,
.kbeu-news__bg-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kbeu-news__bg-overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, var( --kbeu-news-overlay, 0.62 ) );
}

/* The content column is width-capped and centered; the background (`.kbeu-news__bg`)
   stays full-bleed at 100%. The cap is the "Content max width" param, default 1600px. */
.kbeu-news__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var( --kbeu-news-max-width, 1600px );
	margin: 0 auto;
	padding: 0 clamp( 20px, 5vw, 90px );
}

/* Header row: intro texts on the left, carousel arrows on the right. */
.kbeu-news__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: clamp( 20px, 4vw, 64px );
	margin-bottom: clamp( 28px, 3.4vw, 56px );
}

.kbeu-news__intro {
	max-width: 720px;
}

.kbeu-news__eyebrow {
	margin: 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 300;
	line-height: 1.2;
	font-size: clamp( 18px, 1.9vw, 28px );
	color: #fff;
}

.kbeu-news__title {
	margin: clamp( 8px, 1vw, 16px ) 0 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 400;
	line-height: 1.1;
	font-size: clamp( 40px, 5vw, 64px );
	color: #fff;
}

.kbeu-news__intro-text {
	margin: clamp( 12px, 1.4vw, 22px ) 0 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 300;
	line-height: 1.55;
	font-size: clamp( 16px, 1.6vw, 24px );
	color: #fff;
}

/* Prev/next arrows: the look is the shared `.kbeu-nav-arrow` component
   (assets/css/kbeu-nav-arrow.css); this only lays out the control row, which sits
   in the header here instead of below the cards (no shared control margin). */
.kbeu-news__control {
	display: flex;
	flex: none;
	gap: 14px;
	margin-top: 0;
	padding-bottom: 6px;
}

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

/* Three cards per view on desktop (the shared carousel sizes the items from this
   token; the breakpoints below mirror the root's `data-kbeu-bp-*`). */
.kbeu-carousel.kbeu-news {
	--kbeu-carousel-per-view: 3;
}

/* Card: rounded, full-bleed image with the overlay content on top. */
.kbeu-news__card {
	position: relative;
	flex: 1 1 auto;
	display: block;
	aspect-ratio: var( --kbeu-news-ratio );
	border-radius: var( --kbeu-news-radius );
	overflow: hidden;
	background: var( --kbeu-color-near-black );
	text-decoration: none;
	color: inherit;
}

.kbeu-news__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.kbeu-news__img--empty {
	background: linear-gradient( 135deg, #2a2a2a, #141414 );
}

/* Publish date, pinned to the top-right with a small bullet marker. */
.kbeu-news__date {
	position: absolute;
    top: clamp(14px, 1.8vw, 32px);
    right: clamp(16px, 1.8vw, 34px);	
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var( --kbeu-font-principal );
	font-weight: 700;
	font-size: clamp( 14px, 1.1vw, 18px );
	line-height: 1.2;
	color: #fff;
	text-shadow: 0 1px 4px rgba( 0, 0, 0, 0.45 );
}

.kbeu-news__date::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

/* Frosted "glass" box pinned to the bottom-left. */
.kbeu-news__overlay {
	position: absolute;
	left: clamp( 16px, 1.6vw, 26px );
	right: clamp( 16px, 1.6vw, 26px );
	bottom: clamp( 16px, 1.6vw, 26px );
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp( 14px, 1.4vw, 22px );
	padding: clamp( 18px, 1.8vw, 28px );
	border-radius: 29px;
	background: rgba( 0, 0, 0, 0.27 );
	-webkit-backdrop-filter: blur( 3.475px );
	backdrop-filter: blur( 3.475px );
}

.kbeu-news__card-title {
	margin: 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 700;
	line-height: 1.37;
	font-size: clamp( 20px, 1.9vw, 32px );
	color: #fff;
	/* Keep long headlines to three lines. */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* "Read More" button (design node I4595:1779;3076:200). Look comes from the shared
   `.kbeu-btn .kbeu-btn--transparent`; this only tweaks the spacing and font. */
.kbeu-news__btn {
	padding: 12px 26px;
}
 

/* The whole card is the link, so mirror the button's white hover fill on card
   hover/focus (matches `.kbeu-btn--transparent:hover`). */
.kbeu-news__card:hover .kbeu-news__btn,
.kbeu-news__card:focus-visible .kbeu-news__btn {
	background-color: #fff;
	border-color: #fff;
	color: var( --kbeu-color-near-black );
}

.kbeu-news__card:focus-visible {
	outline: 3px solid var( --kbeu-news-teal );
	outline-offset: 3px;
}

/* Centered "Discover more" button below the list (design node 4595:1803). Look comes
   from the shared `.kbeu-btn .kbeu-btn--transparent`; this only tweaks size/font. */
.kbeu-news__more {
	display: flex;
	justify-content: center;
	margin-top: clamp( 32px, 3.4vw, 56px );
}

.kbeu-news__more-btn {
	font-family: var( --kbeu-font-principal );
	font-weight: 400;
}

/* Tablet: two cards per view. */
@media ( max-width: 1100px ) {
	.kbeu-carousel.kbeu-news {
		--kbeu-carousel-per-view: 2;
	}
}

/* Mobile: one card per view; stack the header and move the arrows below the intro. */
@media ( max-width: 720px ) {
	.kbeu-carousel.kbeu-news {
		--kbeu-carousel-per-view: 1;
	}

	.kbeu-news__head {
		flex-direction: column;
		align-items: flex-start;
	}

	.kbeu-news__control {
		padding-bottom: 0;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.kbeu-news__btn,
	.kbeu-news__more-btn {
		transition: none;
	}
}
