/**
 * Video Testimonial Slider – matches live Elementor section UI.
 * Pre-JS layout locks slide widths to avoid full-width flash.
 */

.rul-vts {
	--rul-vts-radius: 24px;
	--rul-vts-arrow: #ea5400;
	--rul-vts-spv: 4.4;
	--rul-vts-gap: 30px;
	/* Half of fractional slidesPerView (4.4 → 0.2). Left/right peek amount. */
	--rul-vts-peek: 0.2;
	/* How far to pull the track so only the peek of slide 1 stays visible. */
	--rul-vts-start-shift: 0.8;
	--rul-vts-slide-w: calc((100% - ((var(--rul-vts-spv) - 1) * var(--rul-vts-gap))) / var(--rul-vts-spv));
	position: relative;
	width: 100%;
	overflow: hidden;
}

.rul-vts__swiper {
	overflow: hidden;
	width: 100%;
}

/* Smooth easing (Elementor Swiper has no custom ease option) */
.rul-vts.is-ready .swiper-wrapper {
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/*
 * Pre-init: match live screenshot —
 * small peek of card 1 on the left, then 4 full cards, small peek on the right.
 */
.rul-vts:not(.is-ready) .swiper-wrapper {
	display: flex;
	align-items: stretch;
	transform: translate3d(
		calc((var(--rul-vts-slide-w) + var(--rul-vts-gap)) * var(--rul-vts-start-shift) * -1),
		0,
		0
	);
	will-change: transform;
}

.rul-vts:not(.is-ready) .swiper-slide {
	box-sizing: border-box;
	width: var(--rul-vts-slide-w) !important;
	max-width: var(--rul-vts-slide-w);
	margin-right: var(--rul-vts-gap) !important;
	flex-shrink: 0;
}

/* Clip rounded corners — Swiper transforms + backdrop-filter break overflow alone */
.rul-vts .swiper-slide {
	border-radius: var(--rul-vts-radius);
	overflow: hidden;
	height: auto;
}

.rul-vts__card {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 600px;
	border-radius: var(--rul-vts-radius);
	overflow: hidden;
	background: #1a1a1a;
	cursor: default;
	transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-mask-image: -webkit-radial-gradient(white, black);
	mask-image: radial-gradient(white, black);
}

.rul-vts__card.is-video {
	cursor: pointer;
}

.rul-vts__card.is-video:focus-visible {
	outline: 2px solid #ea5400;
	outline-offset: 3px;
}

.rul-vts__image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	min-width: 100%;
	min-height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	/* Parent .rul-vts__card clips corners — radius on <img> looks like a floating photo when theme sets height:auto */
	border-radius: 0 !important;
}

/* Beat common theme/Elementor img resets in the 1000–1400 range */
.rul-vts .swiper-slide img.rul-vts__image {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
}

.rul-vts__play {
	position: absolute;
	top: 41.7%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background-color: #ffffffc1;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.rul-vts__card.is-video:hover .rul-vts__play {
	transform: translate(-50%, -50%) scale(1.06);
}

.rul-vts__play svg {
	width: auto;
	height: 36px;
	fill: #000;
	margin-left: 3px;
}

.rul-vts__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	min-height: 150px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	text-align: left;
	/* No own radius — parent card clips corners so image can't peek through */
	border-radius: 0;
	background: rgba(0, 0, 0, 0.5);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	pointer-events: none;
}

.rul-vts__quote,
.rul-vts__name,
.rul-vts__role {
	margin: 0;
	color: #fff;
	text-shadow: 15px 16px 59px rgba(0, 0, 0, 0.78);
}

.rul-vts__quote {
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	margin-bottom: 10px;
}

.rul-vts__name {
	font-family: "DM Sans", sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	margin-bottom: 5px;
}

.rul-vts__role {
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2em;
}

.rul-vts__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 50;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px;
	margin: 0;
	border: 0;
	border-radius: 24px;
	background: transparent;
	color: var(--rul-vts-arrow);
	cursor: pointer;
	line-height: 0;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
	outline: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: none;
	appearance: none;
}

.rul-vts__nav:hover,
.rul-vts__nav:focus,
.rul-vts__nav:focus-visible,
.rul-vts__nav:active {
	outline: none;
	border: 0;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
	opacity: 1;
	background: transparent;
	color: var(--rul-vts-arrow);
}

.rul-vts__nav svg {
	width: 35px;
	height: 35px;
	fill: currentColor;
	display: block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.rul-vts__nav--prev {
	left: 20px;
}

.rul-vts__nav--next {
	right: 20px;
}

/* Lightweight video lightbox (shared singleton) */
.rul-vts-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.8);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.rul-vts-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.rul-vts-lightbox__dialog {
	position: relative;
	width: min(900px, 100%);
	background: transparent;
}

.rul-vts-lightbox__frame {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background: #000;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
}

.rul-vts-lightbox__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.rul-vts-lightbox__close {
	position: absolute;
	top: -44px;
	right: 0;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #ea5400;
	cursor: pointer;
	line-height: 0;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.rul-vts-lightbox__close svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	display: block;
	pointer-events: none;
}

.rul-vts-lightbox__close:hover,
.rul-vts-lightbox__close:focus,
.rul-vts-lightbox__close:focus-visible,
.rul-vts-lightbox__close:active {
	outline: none;
	border: 0;
	box-shadow: none;
	background: transparent;
	color: #ea5400;
	opacity: 0.85;
}

@media (max-width: 1024px) {
	.rul-vts {
		--rul-vts-spv: 3.25;
	}

	.rul-vts__card {
		min-height: 500px;
	}
}

@media (max-width: 767px) {
	.rul-vts {
		--rul-vts-spv: 1.25;
	}

	.rul-vts__nav--prev {
		top: 125px;
		transform: none;
	}

	.rul-vts__nav--next {
		top: 120px;
		transform: none;
	}

	.rul-vts__play {
		width: 64px;
		height: 64px;
	}

	.rul-vts__play svg {
		width: auto;
		height: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rul-vts__play,
	.rul-vts__nav,
	.rul-vts-lightbox,
	.rul-vts.is-ready .swiper-wrapper {
		transition: none !important;
	}
}
