/* Xeemax Video Testimonials
 * Scoped to .xvt so nothing leaks into the theme.
 * Restyle by overriding the custom properties below.
 */

.xvt {
	--xvt-gap: 24px;
	--xvt-radius: 16px;
	--xvt-accent: #53a697;
	--xvt-accent-contrast: #fff;
	--xvt-surface: rgba(127, 127, 127, .08);
	--xvt-border: rgba(127, 127, 127, .22);
	--xvt-muted: rgba(127, 127, 127, 1);
	--xvt-nav-size: 46px;
	/* Arrows sit over the video at one-per-view, so they need their own
	   backing to stay legible against a bright frame. */
	--xvt-nav-bg: rgba(255, 255, 255, .88);

	position: relative;
	box-sizing: border-box;
}

.xvt *,
.xvt *::before,
.xvt *::after {
	box-sizing: inherit;
}

/* --------------------------------------------------- theme interference
 * WordPress themes style every <button>, and an element+pseudo-class rule
 * outranks a single class - so those styles land on our controls.
 * Agenzio's `button:hover` adds `padding: 0 44px 0 45px`, which stretched
 * these circles into ellipses, and Elementor's
 * `.elementor-element svg { width: 1em; fill: currentColor }` shrank the
 * icons and flooded the stroked arrows with fill. Undone inside .xvt only.
 */
.xvt button,
.xvt button:hover,
.xvt button:focus,
.xvt button:active {
	padding: 0;
	margin: 0;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
}

.xvt svg {
	flex: 0 0 auto;
	max-width: none;
}

.xvt .xvt__nav svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
}

.xvt .xvt__play svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
	stroke: none;
}

/* The play overlay covers the whole frame - a themed hover background here
   would paint over the video itself. */
.xvt .xvt__trigger,
.xvt .xvt__trigger:hover,
.xvt .xvt__trigger:focus,
.xvt .xvt__trigger:active {
	background: transparent;
}

.xvt__heading {
	margin: 0 0 28px;
	text-align: center;
}

/* The arrows live here, so they can be centred on the video rather than
 * on the whole card. Also the query container the calc() below reads. */
.xvt__stage {
	position: relative;
	container-type: inline-size;
}

/* ---------------------------------------------------------------- track */

.xvt__viewport {
	overflow: hidden;
	margin-inline: calc(var(--xvt-gap) / -2);
}

.xvt__track {
	display: flex;
	align-items: stretch;
	transition: transform .55s cubic-bezier(.4, .1, .2, 1);
	will-change: transform;
}

.xvt__slide {
	flex: 0 0 100%;
	max-width: 100%;
	padding-inline: calc(var(--xvt-gap) / 2);
	min-width: 0;
}

.xvt__card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* ---------------------------------------------------------------- media */

.xvt__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0 0 18px;
	border-radius: var(--xvt-radius);
	overflow: hidden;
	background: var(--xvt-surface);
}

/* Transparent overlay button - the player replaces it on click. */
.xvt__trigger {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

/* Fallback for browsers without aspect-ratio. */
@supports not (aspect-ratio: 16 / 9) {
	.xvt__media {
		height: 0;
		padding-bottom: 56.25%;
	}
}

.xvt__poster {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease, filter .4s ease;
}

.xvt__poster--blank {
	background: linear-gradient(135deg, rgba(127, 127, 127, .18), rgba(127, 127, 127, .06));
}

.xvt__media:hover .xvt__poster,
.xvt__trigger:focus-visible ~ .xvt__poster,
.xvt__media:has(.xvt__trigger:focus-visible) .xvt__poster {
	transform: scale(1.045);
	filter: brightness(.86);
}

.xvt__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	padding-left: 4px;
	border-radius: 50%;
	background: var(--xvt-accent);
	color: var(--xvt-accent-contrast);
	box-shadow: 0 6px 26px rgba(0, 0, 0, .28);
	transition: transform .3s ease;
}

.xvt__media:hover .xvt__play,
.xvt__trigger:focus-visible .xvt__play {
	transform: translate(-50%, -50%) scale(1.1);
}

.xvt__trigger:focus-visible {
	outline: 3px solid var(--xvt-accent);
	outline-offset: -3px;
}

/* Browsers refuse sound-on autoplay until the visitor interacts with the
   page, so a muted start gets this way back to the audio. */
.xvt__unmute {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 7px;
	border: 0;
	border-radius: 999px;
	font-size: .82em;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

.xvt .xvt__unmute,
.xvt .xvt__unmute:hover,
.xvt .xvt__unmute:focus {
	padding: 9px 15px;
	background: var(--xvt-accent);
	color: var(--xvt-accent-contrast);
}

.xvt .xvt__unmute svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

.xvt .xvt__unmute svg path[stroke] {
	fill: none;
}

/* Once the player is live, poster and trigger step aside. */
.xvt__media.is-playing .xvt__poster,
.xvt__media.is-playing .xvt__trigger {
	display: none;
}

.xvt__media iframe,
.xvt__media video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	object-fit: cover;
}

/* ----------------------------------------------------------------- text */

.xvt__quote {
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	font-size: 1.02em;
	line-height: 1.6;
	quotes: none;
}

.xvt__quote::before {
	content: "\201C";
	margin-right: 2px;
}

.xvt__quote::after {
	content: "\201D";
	margin-left: 2px;
}

.xvt__meta {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.xvt__name {
	font-weight: 700;
	line-height: 1.3;
}

.xvt__role {
	font-size: .88em;
	color: var(--xvt-muted);
	opacity: .85;
}

/* ------------------------------------------------------------------ nav */

.xvt__nav {
	position: absolute;
	top: 31%; /* fallback; the @supports block below places it exactly */
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--xvt-nav-size);
	height: var(--xvt-nav-size);
	padding: 0;
	border: 1px solid var(--xvt-border);
	border-radius: 50%;
	background: var(--xvt-nav-bg);
	color: inherit;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
	backdrop-filter: blur(6px);
	transition: background .25s ease, color .25s ease, opacity .25s ease;
}

.xvt__nav:hover:not(:disabled) {
	background: var(--xvt-accent);
	color: var(--xvt-accent-contrast);
	border-color: var(--xvt-accent);
}

.xvt__nav:disabled {
	opacity: .3;
	cursor: default;
}

.xvt__nav--prev {
	left: 0;
	transform: translate(-50%, -50%);
}

.xvt__nav--next {
	right: 0;
	transform: translate(50%, -50%);
}

/* Keep arrows on-canvas where there is no room outside it. */
@media (max-width: 1400px) {
	.xvt__nav--prev {
		left: 8px;
		transform: translateY(-50%);
	}

	.xvt__nav--next {
		right: 8px;
		transform: translateY(-50%);
	}
}

/* Sit the arrows dead-centre on the video.
 * The media is 16/9 of one slide, so half its height is
 * (stage width + gap) / slides-in-view - gap, times 0.28125 - derived from
 * the layout rather than guessed, so it holds at every width.
 */
@supports (container-type: inline-size) {

	.xvt__nav {
		top: calc(100cqw * 0.28125);
	}

	@media (min-width: 768px) {
		.xvt[data-per-view="2"] .xvt__nav,
		.xvt[data-per-view="3"] .xvt__nav,
		.xvt[data-per-view="4"] .xvt__nav {
			top: calc(((100cqw + var(--xvt-gap)) / 2 - var(--xvt-gap)) * 0.28125);
		}
	}

	@media (min-width: 1025px) {
		.xvt[data-per-view="3"] .xvt__nav {
			top: calc(((100cqw + var(--xvt-gap)) / 3 - var(--xvt-gap)) * 0.28125);
		}

		.xvt[data-per-view="4"] .xvt__nav {
			top: calc(((100cqw + var(--xvt-gap)) / 4 - var(--xvt-gap)) * 0.28125);
		}
	}
}

/* ----------------------------------------------------------------- dots */

.xvt__dots {
	display: flex;
	justify-content: center;
	gap: 9px;
	margin-top: 30px;
}

.xvt__dots:empty {
	display: none;
}

.xvt__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--xvt-border);
	cursor: pointer;
	transition: width .3s ease, background .3s ease;
}

.xvt__dot.is-active {
	width: 28px;
	border-radius: 5px;
	background: var(--xvt-accent);
}

/* ----------------------------------------------------------- responsive */

@media (min-width: 768px) {
	.xvt[data-per-view="2"] .xvt__slide,
	.xvt[data-per-view="3"] .xvt__slide,
	.xvt[data-per-view="4"] .xvt__slide {
		flex-basis: 50%;
		max-width: 50%;
	}
}

@media (min-width: 1025px) {
	.xvt[data-per-view="3"] .xvt__slide {
		flex-basis: 33.3333%;
		max-width: 33.3333%;
	}

	.xvt[data-per-view="4"] .xvt__slide {
		flex-basis: 25%;
		max-width: 25%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.xvt__track,
	.xvt__poster,
	.xvt__play,
	.xvt__dot {
		transition: none;
	}
}
