/**
 * Video Testimonials Slider - frontend styles.
 * All rules are scoped under .gzvt / .gzvt-modal to avoid clashing with Divi or other themes.
 */

.gzvt {
	--gzvt-accent: #e8572a;
	--gzvt-per-view: 3;
	--gzvt-per-view-tab: 2;
	--gzvt-gap: clamp(16px, 2vw, 28px);
	--gzvt-radius: 20px;
	--gzvt-ink: #14161a;
	--gzvt-muted: #5b616e;
	--gzvt-card-bg: #fff;
	--gzvt-line: rgba(20, 22, 26, 0.08);
	--gzvt-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -12px rgba(16, 24, 40, 0.18);
	--gzvt-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 24px 48px -16px rgba(16, 24, 40, 0.28);
	--gzvt-ratio: 16 / 9;
	--gzvt-ease: cubic-bezier(0.22, 1, 0.36, 1);

	position: relative;
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto;
	/* Respond to the space the slider actually has (e.g. a Divi column), not just the screen. */
	container-type: inline-size;
	container-name: gzvt;
	color: var(--gzvt-ink);
	font: inherit;
	line-height: 1.5;
	-webkit-tap-highlight-color: transparent;
}

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

.gzvt--portrait {
	--gzvt-ratio: 9 / 16;
}

.gzvt--square {
	--gzvt-ratio: 1 / 1;
}

/* ---------- Track ---------- */

.gzvt__viewport {
	position: relative;
	/* Room for card shadows without clipping. */
	margin: -12px -12px 0;
}

.gzvt__track {
	display: flex;
	gap: var(--gzvt-gap);
	margin: 0;
	padding: 12px 12px 28px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 12px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	outline: none;
}

.gzvt__track::-webkit-scrollbar {
	display: none;
}

.gzvt__slide {
	flex: 0 0 calc((100% - (var(--gzvt-per-view) - 1) * var(--gzvt-gap)) / var(--gzvt-per-view));
	min-width: 0;
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
	list-style: none;
}

/* Medium width (tablets, or narrow page columns). */
@container gzvt (max-width: 900px) {
	.gzvt__slide {
		flex-basis: calc((100% - (var(--gzvt-per-view-tab) - 1) * var(--gzvt-gap)) / var(--gzvt-per-view-tab));
	}
}

/* Phones: one card at a time. */
@container gzvt (max-width: 560px) {
	.gzvt__slide {
		flex-basis: 100%;
		scroll-snap-stop: always;
	}
}

/* Portrait cards are tall: fit more across on wide layouts, two on medium. */
@container gzvt (max-width: 900px) {
	.gzvt--portrait .gzvt__slide {
		flex-basis: calc((100% - var(--gzvt-gap)) / 2);
	}
}

@container gzvt (max-width: 480px) {
	.gzvt--portrait .gzvt__slide {
		flex-basis: 100%;
	}
}

/* ---------- Grid layout ---------- */

/* All cards visible in rows; an incomplete last row is centred. */
.gzvt--grid .gzvt__track {
	flex-wrap: wrap;
	justify-content: center;
	overflow: visible;
	scroll-snap-type: none;
}

.gzvt--grid .gzvt__viewport {
	margin-bottom: -16px;
}

/* Phones: the grid becomes a swipe slider so visitors don't scroll past a long stack. */
@container gzvt (max-width: 560px) {
	.gzvt--grid .gzvt__track {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.gzvt--grid .gzvt__viewport {
		margin-bottom: 0;
	}
}

/* ---------- Card ---------- */

.gzvt .gzvt-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: var(--gzvt-card-bg);
	border: 1px solid var(--gzvt-line);
	border-radius: var(--gzvt-radius);
	box-shadow: var(--gzvt-shadow);
	transition: transform 0.45s var(--gzvt-ease), box-shadow 0.45s var(--gzvt-ease);
}

@media (hover: hover) {
	.gzvt .gzvt-card:hover {
		transform: translateY(-4px);
		box-shadow: var(--gzvt-shadow-hover);
	}
}

.gzvt .gzvt-card__media {
	position: relative;
	aspect-ratio: var(--gzvt-ratio);
	overflow: hidden;
	background: #0d0f12;
}

.gzvt .gzvt-card__play {
	all: unset;
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.gzvt .gzvt-card__play:focus-visible {
	outline: 3px solid var(--gzvt-accent);
	outline-offset: -3px;
	border-radius: var(--gzvt-radius) var(--gzvt-radius) 0 0;
}

.gzvt .gzvt-card__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.8s var(--gzvt-ease);
}

.gzvt .gzvt-card__placeholder {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--gzvt-accent) 75%, transparent) 0%, transparent 60%),
		linear-gradient(135deg, #1b1e24 0%, #2c313a 100%);
}

.gzvt .gzvt-card__img.is-broken {
	display: none;
}

.gzvt .gzvt-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.45) 100%), rgba(0, 0, 0, 0.08);
	transition: background-color 0.4s var(--gzvt-ease);
}

.gzvt .gzvt-card__btn {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: clamp(60px, 7vw, 76px);
	height: clamp(60px, 7vw, 76px);
	color: var(--gzvt-accent);
	background: rgba(255, 255, 255, 0.96);
	border-radius: 50%;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	transform: translate(-50%, -50%);
	transition: transform 0.4s var(--gzvt-ease), background-color 0.3s, color 0.3s;
}

.gzvt .gzvt-card__btn::before {
	content: "";
	position: absolute;
	inset: -8px;
	border: 2px solid rgba(255, 255, 255, 0.55);
	border-radius: 50%;
	transition: transform 0.5s var(--gzvt-ease), opacity 0.5s;
}

.gzvt .gzvt-card__btn svg {
	width: 42%;
	height: 42%;
	margin-left: 8%;
}

.gzvt .gzvt-card__play:hover .gzvt-card__img,
.gzvt .gzvt-card__play:focus-visible .gzvt-card__img {
	transform: scale(1.05);
}

.gzvt .gzvt-card__play:hover .gzvt-card__btn,
.gzvt .gzvt-card__play:focus-visible .gzvt-card__btn {
	color: #fff;
	background: var(--gzvt-accent);
	transform: translate(-50%, -50%) scale(1.08);
}

.gzvt .gzvt-card__play:hover .gzvt-card__btn::before,
.gzvt .gzvt-card__play:focus-visible .gzvt-card__btn::before {
	opacity: 0;
	transform: scale(1.35);
}

/* Inline playback */
.gzvt .gzvt-card__media.is-playing .gzvt-card__play {
	display: none;
}

.gzvt .gzvt-card__player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

.gzvt video.gzvt-card__player {
	object-fit: contain;
}

/* Card text */
.gzvt .gzvt-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: clamp(18px, 2vw, 26px);
}

.gzvt .gzvt-card .gzvt-card__title {
	margin: 0;
	padding: 0;
	color: var(--gzvt-ink);
	font-size: clamp(17px, 1.3vw, 20px);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	text-transform: none;
}

.gzvt .gzvt-card .gzvt-card__desc {
	margin: 0;
	padding: 0;
	color: var(--gzvt-muted);
	font-size: 15px;
	line-height: 1.6;
}

.gzvt .gzvt-card .gzvt-card__person {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: auto 0 0;
	padding: 14px 0 0 14px;
	border-top: 1px solid var(--gzvt-line);
	position: relative;
	font-size: 14px;
	line-height: 1.35;
}

.gzvt .gzvt-card .gzvt-card__person::before {
	content: "";
	position: absolute;
	left: 0;
	top: 16px;
	bottom: 2px;
	width: 3px;
	border-radius: 3px;
	background: var(--gzvt-accent);
}

.gzvt .gzvt-card__name {
	color: var(--gzvt-ink);
	font-weight: 700;
}

.gzvt .gzvt-card__company {
	color: var(--gzvt-muted);
}

/* ---------- Controls ---------- */

.gzvt__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-top: 4px;
}

.gzvt .gzvt__arrow {
	all: unset;
	display: grid;
	place-items: center;
	flex: none;
	width: 48px;
	height: 48px;
	color: var(--gzvt-ink);
	background: #fff;
	border: 1px solid var(--gzvt-line);
	border-radius: 50%;
	box-shadow: 0 4px 14px -6px rgba(16, 24, 40, 0.25);
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, border-color 0.25s, opacity 0.25s, transform 0.25s var(--gzvt-ease);
}

.gzvt .gzvt__arrow:hover:not(:disabled) {
	color: #fff;
	background: var(--gzvt-accent);
	border-color: var(--gzvt-accent);
}

.gzvt .gzvt__arrow:active:not(:disabled) {
	transform: scale(0.94);
}

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

.gzvt .gzvt__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.gzvt .gzvt__arrow svg {
	width: 26px;
	height: 26px;
}

.gzvt__dots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.gzvt .gzvt__dot {
	all: unset;
	position: relative;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	cursor: pointer;
	transition: width 0.4s var(--gzvt-ease);
}

.gzvt .gzvt__dot::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 8px;
	background: rgba(20, 22, 26, 0.22);
	transition: width 0.4s var(--gzvt-ease), background-color 0.3s;
}

.gzvt .gzvt__dot:hover::before {
	background: rgba(20, 22, 26, 0.45);
}

.gzvt .gzvt__dot[aria-current="true"] {
	width: 36px;
}

.gzvt .gzvt__dot[aria-current="true"]::before {
	width: 28px;
	background: var(--gzvt-accent);
}

.gzvt .gzvt__dot:focus-visible {
	outline: 3px solid var(--gzvt-accent);
	outline-offset: 0;
	border-radius: 12px;
}

/* Hide controls when every card already fits. */
.gzvt.is-static .gzvt__controls {
	display: none;
}

/* Before JS loads, dots have no content; keep layout stable. */
.gzvt:not(.is-ready) .gzvt__dots {
	min-height: 24px;
}

.gzvt .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gzvt-empty {
	padding: 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	color: #50575e;
	font-size: 14px;
}

/* ---------- Lightbox ---------- */

.gzvt-modal {
	--gzvt-accent: #e8572a;
	box-sizing: border-box;
	width: min(1120px, 92vw);
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	overflow: visible;
	color: #fff;
	background: transparent;
	border: 0;
}

.gzvt-modal::backdrop {
	background: rgba(8, 10, 14, 0.82);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.gzvt-modal[open] {
	animation: gzvt-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.gzvt-modal[open]::backdrop {
	animation: gzvt-fade 0.3s ease;
}

.gzvt-modal.is-vertical {
	width: auto;
}

.gzvt-modal__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 86vh;
	overflow: hidden;
	background: #000;
	border-radius: 16px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.gzvt-modal.is-vertical .gzvt-modal__frame {
	width: auto;
	height: min(86vh, 900px);
	aspect-ratio: 9 / 16;
	max-width: 92vw;
}

/* Uploaded files: the frame hugs the video's own shape (landscape or portrait). */
.gzvt-modal.is-file {
	width: fit-content;
	max-width: 92vw;
}

.gzvt-modal.is-file .gzvt-modal__frame,
.gzvt-modal.is-file.is-vertical .gzvt-modal__frame {
	width: auto;
	height: auto;
	aspect-ratio: auto;
	max-width: 92vw;
}

.gzvt-modal__frame iframe,
.gzvt-modal__frame video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.gzvt-modal.is-file .gzvt-modal__frame video {
	width: auto;
	max-width: 92vw;
	height: auto;
	max-height: 86vh;
	min-width: 280px;
}

.gzvt-modal.is-file:not(.is-vertical) .gzvt-modal__frame video {
	width: min(1120px, 92vw, 86vh * 16 / 9);
}

.gzvt-modal.is-file.is-vertical .gzvt-modal__frame video {
	height: min(86vh, 900px);
}

.gzvt-modal__close {
	all: unset;
	position: absolute;
	top: -52px;
	right: 0;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.2s;
}

.gzvt-modal__close:hover {
	background: rgba(255, 255, 255, 0.24);
	transform: rotate(90deg);
}

.gzvt-modal__close:focus-visible {
	outline: 3px solid var(--gzvt-accent);
	outline-offset: 2px;
}

.gzvt-modal__close svg {
	width: 22px;
	height: 22px;
}

.gzvt-modal__error {
	padding: 40px;
	text-align: center;
}

@media (max-width: 640px) {
	.gzvt-modal {
		width: 100vw;
	}

	.gzvt-modal__frame {
		border-radius: 0;
	}

	.gzvt-modal__close {
		top: -52px;
		right: 12px;
	}

	.gzvt-modal.is-vertical .gzvt-modal__frame {
		height: min(80vh, 100vw * 16 / 9);
	}
}

html.gzvt-lock {
	overflow: hidden;
}

@keyframes gzvt-pop {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes gzvt-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gzvt *,
	.gzvt-modal,
	.gzvt-modal::backdrop {
		animation: none !important;
		transition: none !important;
	}
}
