/**
 * Kubota Europe sliders hero (WPBakery element `vc_kbeu_sliders`).
 *
 * Based on the Figma design 4166-6603: full-screen media background with a
 * dark overlay. Each slide shows an upper central block (title +
 * subtitle + up to 2 CTA buttons) and, in the bottom bar, up to 3 slide-specific
 * "sections" (title + subtitle + URL) as links. A segment pager indicates
 * position and autoplay progress; a play/pause button and arrows complete the control.
 * Typography inherited from the theme (the child theme provides "Helvetica Neue LT Pro/Std").
 */

.kbeu-sliders {
	--kbeu-teal: #03a8a9;
	--kbeu-orange: #d85324;
	--kbeu-overlay: rgba( 0, 0, 0, 0.56 );

	position: relative;
	width: 100%;
	height: 100vh;
	min-height: 640px;
	overflow: hidden;
	color: #fff;
	background: #1a1a1a;
}

/* --- Media stack ------------------------------------------------------ */

.kbeu-sliders__stack {
	position: absolute;
	inset: 0;
}

.kbeu-sliders__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease;
}

.kbeu-sliders__slide.is-active {
	opacity: 1;
	visibility: visible;
}

.kbeu-sliders__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

.kbeu-sliders__yt {
	background-size: cover;
	background-position: center;
	pointer-events: none;
}

/* The YouTube iframe is scaled to cover while keeping the 16:9 aspect ratio. */
.kbeu-sliders__yt iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw; /* 16:9 */
	min-height: 100%;
	min-width: 177.78vh; /* 16:9 */
	transform: translate( -50%, -50% );
}

.kbeu-sliders__overlay {
	position: absolute;
	inset: 0;
	background: var( --kbeu-overlay );
}

/* --- Content panels (one per slide) ----------------------------------- */

.kbeu-sliders__panels {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.kbeu-sliders__panel {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease;
}

.kbeu-sliders__panel.is-active {
	opacity: 1;
	visibility: visible;
}

/* Upper central block: title + subtitle + buttons. */

.kbeu-sliders__top {
	position: absolute;
	left: 50%;
	top: 44%;
	transform: translate( -50%, -50% );
	width: 90%;
	max-width: 780px;
	text-align: center;
}

.kbeu-sliders__title {
	margin: 0;
	font-size: 56px;
	font-weight: 300;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: #FFF;
}

.kbeu-sliders__subtitle {
	margin: 18px 0 0;
	font-size: 24px;
	font-weight: 300;
	line-height: 1.4;
	color: rgba( 255, 255, 255, 0.92 );
}

.kbeu-sliders__buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 34px;
	pointer-events: auto;
}

.kbeu-sliders__btn {
	display: inline-flex;
	align-items: center;
	padding: 14px 72px;
	border-radius: 15px;
	border: 2px solid transparent;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.kbeu-sliders__btn--primary {
	background: var( --kbeu-teal );
	border-color: var( --kbeu-teal );
	color: #fff;
}

.kbeu-sliders__btn--primary:hover {
	background: #c2461b;
	border-color: #c2461b;
	color: #fff;
}

.kbeu-sliders__btn--secondary {
	background: transparent;
	border-color: rgba( 255, 255, 255, 0.8 );
	color: #fff;
}

.kbeu-sliders__btn--secondary:hover {
	background: #fff;
	border-color: #fff;
	color: #1a1a1a;
}

/* Bottom sections: up to 3 slide-specific links. */

.kbeu-sliders__links {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 118px;
	display: flex;
	justify-content: center;
	gap: 88px;
	padding: 0 140px;
	box-sizing: border-box;
}

.kbeu-sliders__link {
	position: relative;
	flex: 0 1 344px;
	max-width: 344px;
	padding-top: 20px;
	color: #fff;
	text-align: left;
	text-decoration: none;
	opacity: 0.78;
	pointer-events: auto;
	transition: opacity 0.25s ease;
}

.kbeu-sliders__link::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	border-radius: 1px;
	background: rgba( 255, 255, 255, 0.35 );
	transition: background 0.25s ease;
}


.kbeu-sliders__link:first-child::before {
	background: var( --kbeu-teal );
}

a.kbeu-sliders__link:hover,
a.kbeu-sliders__link:focus-visible {
	opacity: 1;
	outline: none;
}

a.kbeu-sliders__link:hover::before,
a.kbeu-sliders__link:focus-visible::before {
	background: var( --kbeu-teal );
}

.kbeu-sliders__link-title {
	display: block;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3;
}

.kbeu-sliders__link-subtitle {
	display: block;
	margin-top: 6px;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.35;
	color: rgba( 255, 255, 255, 0.82 );
}

/* --- Controls bar (global) -------------------------------------------- */

.kbeu-sliders__controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 0 42px 40px;
	box-sizing: border-box;
	pointer-events: none;
}

.kbeu-sliders__controls > * {
	pointer-events: auto;
}

.kbeu-sliders__controls-spacer {
	width: 56px;
	pointer-events: none;
}

/* Play / pause */

.kbeu-sliders__play {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 2px solid rgba( 255, 255, 255, 0.7 );
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	position: relative;
}

.kbeu-sliders__play:hover {
	border-color: #fff;
}

.kbeu-sliders__icon-pause,
.kbeu-sliders__icon-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
}

/* Pause icon: two bars */
.kbeu-sliders__icon-pause {
	width: 14px;
	height: 16px;
	border-left: 4px solid #fff;
	border-right: 4px solid #fff;
	box-sizing: border-box;
}

/* Play icon: triangle */
.kbeu-sliders__icon-play {
	width: 0;
	height: 0;
	border-left: 14px solid #fff;
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	margin-left: 2px;
	display: none;
}

.kbeu-sliders__play:not( .is-playing ) .kbeu-sliders__icon-pause {
	display: none;
}

.kbeu-sliders__play:not( .is-playing ) .kbeu-sliders__icon-play {
	display: block;
}

/* Pager: one segment per slide (position + autoplay progress). */

.kbeu-sliders__pager {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	gap: 14px;
}

.kbeu-sliders__seg {
	width: 60px;
	max-width: 12vw;
	height: 3px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: rgba( 255, 255, 255, 0.35 );
	cursor: pointer;
	overflow: hidden;
	position: relative;
	/* Click area taller than the visible bar, without enlarging it. */
	box-shadow: 0 6px 0 -5px transparent, 0 -6px 0 -5px transparent;
}

.kbeu-sliders__seg.is-active {
	background: rgba( 255, 255, 255, 0.5 );
}

.kbeu-sliders__seg:focus-visible {
	outline: 2px solid rgba( 255, 255, 255, 0.6 );
	outline-offset: 4px;
}

.kbeu-sliders__seg-fill {
	display: block;
	width: 0;
	height: 100%;
	background: var( --kbeu-teal );
}

/* Without autoplay, the active segment stays completely filled (fixed indicator). */
.kbeu-sliders[ data-autoplay='no' ] .kbeu-sliders__seg.is-active .kbeu-sliders__seg-fill {
	width: 100%;
}

/* Arrows */

.kbeu-sliders__arrows {
	flex: 0 0 auto;
	display: flex;
	gap: 16px;
}

.kbeu-sliders__arrow {
	width: 48px;
	height: 48px;
	padding: 0;
	border: 2px solid rgba( 255, 255, 255, 0.7 );
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	position: relative;
}

.kbeu-sliders__arrow:hover {
	border-color: #fff;
}

.kbeu-sliders__arrow--next {
	background: var( --kbeu-teal );
	border-color: var( --kbeu-teal );
}

/* Chevron drawn with a border */
.kbeu-sliders__arrow::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 11px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
}

.kbeu-sliders__arrow--prev::before {
	transform: translate( -35%, -50% ) rotate( 225deg );
}

.kbeu-sliders__arrow--next::before {
	transform: translate( -65%, -50% ) rotate( 45deg );
}

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

@media ( max-width: 1024px ) {
	.kbeu-sliders {
		height: auto;
		min-height: 88vh;
	}

	.kbeu-sliders__title {
		font-size: 38px;
	}

	.kbeu-sliders__subtitle {
		font-size: 19px;
	}

	.kbeu-sliders__top {
		top: 38%;
	}

	.kbeu-sliders__links {
		flex-wrap: wrap;
		gap: 20px 32px;
		padding: 0 20px;
		bottom: 96px;
	}

	.kbeu-sliders__link {
		flex-basis: 240px;
		max-width: 240px;
	}

	.kbeu-sliders__controls {
		padding: 0 20px 24px;
	}
}

@media ( max-width: 640px ) {
	.kbeu-sliders__links {
		display: none; /* On mobile the upper block and the controls are enough. */
	}
}

/* Respects the reduced-motion preference. */
@media ( prefers-reduced-motion: reduce ) {
	.kbeu-sliders__slide,
	.kbeu-sliders__panel {
		transition: none;
	}
}
