/* 5V Video Slider
   Centered active video; neighbours bleed off both page edges.
   ------------------------------------------------------------ */

.fvvs {
	/* Tune these two to taste (or override in your theme). */
	--fvvs-slide-width: 60vw;      /* width of each video card on desktop */
	--fvvs-gap: 32px;              /* space between cards */
	--fvvs-accent: var(--brand-accent, #623CE5); /* play button / arrow colour */

	width: 100%;
	overflow: hidden;              /* the bleed is clipped here, not by the page */
	padding: 40px 0 64px;
}

.fvvs__title {
	text-align: center;
	margin: 0 0 32px;
}

/* The slider spans the full width of its container so slides can
   run off both edges. overflow must stay visible on the swiper
   itself for the bleed effect — .fvvs above does the clipping. */
.fvvs__slider.swiper {
	overflow: visible;
	position: relative;
}

.fvvs__slide {
	width: var(--fvvs-slide-width);
	max-width: 960px;
	margin-right: var(--fvvs-gap);
	transition: transform 0.4s ease, opacity 0.4s ease;
	transform: scale(0.85);
	opacity: 0.45;
}

.fvvs__slide.swiper-slide-active {
	transform: scale(1);
	opacity: 1;
}

/* Side slides act as buttons that bring themselves to the centre. */
.fvvs__slide:not(.swiper-slide-active) {
	cursor: pointer;
}

.fvvs__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 0px 52px 0px 52px;
	overflow: hidden;
	background: #000;
}

.fvvs__thumb,
.fvvs__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	display: block;
}

/* Play button — only interactive on the centred slide. */
.fvvs__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 72px;
	border: 0;
	border-radius: 50%;
	background: var(--fvvs-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
	padding: 0;
}

.fvvs__play svg {
	width: 32px;
	height: 32px;
	margin-left: 3px; /* optically centre the triangle */
}

.fvvs__slide.swiper-slide-active .fvvs__play:hover,
.fvvs__slide.swiper-slide-active .fvvs__play:focus-visible {
	transform: translate(-50%, -50%) scale(1.1);
}

.fvvs__play:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* Hide play buttons on non-active slides from keyboard/screen readers;
   they're decorative there since the whole slide is the control. */
.fvvs__slide:not(.swiper-slide-active) .fvvs__play {
	pointer-events: none;
}

/* Once a video is playing, the thumb/button are removed by JS,
   but keep a guard in case of race conditions. */
.fvvs__slide.is-playing .fvvs__thumb,
.fvvs__slide.is-playing .fvvs__play {
	display: none;
}

/* Prev / next arrows — centered row below the slider,
   matching the values slider above (outlined circles). */
.fvvs__nav-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 18px;
	margin-top: 28px;
}

.fvvs__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid color-mix(in srgb, var(--fvvs-accent) 35%, #fff);
	color: var(--fvvs-accent);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	padding: 0;
}

.fvvs__nav svg {
	width: 22px;
	height: 22px;
}

.fvvs__nav:hover,
.fvvs__nav:focus-visible {
	background: var(--fvvs-accent);
	border-color: var(--fvvs-accent);
	color: #fff;
}

.fvvs__nav:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--fvvs-accent) 35%, #fff);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.fvvs__slide,
	.fvvs__play,
	.fvvs__nav {
		transition: none;
	}
}

@media (max-width: 1200px) {
	.fvvs {
		--fvvs-slide-width: 70vw;
	}
}

@media (max-width: 767px) {
	.fvvs {
		--fvvs-slide-width: 88vw;
		--fvvs-gap: 16px;
	}

	.fvvs__play {
		width: 56px;
		height: 56px;
	}

	.fvvs__play svg {
		width: 24px;
		height: 24px;
	}

	.fvvs__nav {
		width: 50px;
		height: 50px;
	}

	.fvvs__nav-wrap {
		margin-top: 20px;
	}
}
