/* YepX video carousel. Snap. No third-party slider. */

.yepx-vc {
	--yepx-vc-desk: 3.5;
	--yepx-vc-tab: 2;
	--yepx-vc-mob: 1.5;
	--yepx-vc-gap: 16px;
	--yepx-vc-visible: var(--yepx-vc-desk);
	position: relative;
	overflow: hidden;
	overflow-x: clip;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding-block: 1.5rem;
	contain: inline-size;
}

/* Section fill must show through; CPT default bg is #fff and covers .yepx-sec. */
.yepx-sec .yepx-vc,
.yepx-sec .yepx-vc.yepx-section {
	background-color: transparent !important;
}

/* full = slider-like breakout. container = YepX token, no 100vw. :not prevents dual-class leak. */
.yepx-vc--full:not(.yepx-vc--container),
.yepx-home-v2 .yepx-vc--full:not(.yepx-vc--container),
.yepx-preview .yepx-vc--full:not(.yepx-vc--container),
.yepx-sec .yepx-vc--full:not(.yepx-vc--container) {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	contain: none;
}

.yepx-vc--container:not(.yepx-vc--full) {
	width: 100%;
	max-width: var(--yepx-container, 77.5rem);
	margin-left: auto;
	margin-right: auto;
	contain: inline-size;
}

.yepx-vc--full .yepx-vc__heading,
.yepx-vc--full .yepx-vc__toolbar,
.yepx-vc--full .yepx-vc__dots {
	max-width: var(--yepx-container, 77.5rem);
	margin-inline: auto;
	padding-inline: 1rem;
	box-sizing: border-box;
}

.yepx-vc--full .yepx-vc__viewport {
	max-width: none;
	padding-inline: 1rem;
	box-sizing: border-box;
}

.yepx-vc--container .yepx-vc__viewport,
.yepx-vc--container .yepx-vc__heading,
.yepx-vc--container .yepx-vc__toolbar,
.yepx-vc--container .yepx-vc__dots {
	max-width: var(--yepx-container, 77.5rem);
	margin-inline: auto;
	padding-inline: 1rem;
	box-sizing: border-box;
}

.yepx-vc__heading {
	margin: 0 0 0.85rem;
	text-align: inherit;
}

.yepx-vc--align-left { text-align: left; }
.yepx-vc--align-center { text-align: center; }
.yepx-vc--align-right { text-align: right; }

.yepx-vc__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: inherit;
	margin-bottom: 0.65rem;
}

.yepx-vc--align-center .yepx-vc__toolbar { justify-content: center; }
.yepx-vc--align-right .yepx-vc__toolbar { justify-content: flex-end; }

.yepx-vc__prev,
.yepx-vc__next,
.yepx-vc__toggle {
	min-height: 44px;
	min-width: 44px;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--yepx-border, #d7e1e8);
	background: #fff;
	border-radius: 9999px;
	cursor: pointer;
	font: inherit;
}

.yepx-vc__dots {
	display: flex;
	gap: 0.4rem;
	justify-content: center;
	margin-top: 0.6rem;
}

.yepx-vc__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	background: #c5d0d8;
	cursor: pointer;
}

.yepx-vc__dot.is-active {
	background: var(--yepx-accent, #06baf3);
}

.yepx-vc__prev:focus-visible,
.yepx-vc__next:focus-visible,
.yepx-vc__toggle:focus-visible,
.yepx-vc__dot:focus-visible,
.yepx-vc__card:focus-visible {
	outline: 2px solid var(--yepx-accent, #06baf3);
	outline-offset: 2px;
}

.yepx-vc__viewport {
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	container-type: inline-size;
	container-name: yepx-vc;
}

.yepx-vc__track {
	display: flex;
	align-items: flex-start;
	gap: var(--yepx-vc-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.yepx-vc__track::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.yepx-vc__item {
	--yepx-vc-item-w: calc((100% - (var(--yepx-vc-visible) - 1) * var(--yepx-vc-gap)) / var(--yepx-vc-visible));
	position: relative;
	flex: 0 0 var(--yepx-vc-item-w);
	width: var(--yepx-vc-item-w);
	min-width: 0;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	box-sizing: border-box;
}

.yepx-vc__card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 16px;
	background: #0b2c3d;
	color: #fff;
	text-decoration: none;
}

.yepx-vc__item[data-orient="portrait"] .yepx-vc__card {
	aspect-ratio: 9 / 16;
	max-height: 28rem;
}

.yepx-vc__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.yepx-vc__play {
	--yepx-vc-play-bg: rgba(6, 186, 243, 0.92);
	--yepx-vc-play-icon: #0b2c3d;
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--yepx-vc-play-bg);
	color: var(--yepx-vc-play-icon);
	pointer-events: none;
	box-shadow: 0 8px 24px rgba(11, 44, 61, 0.28);
	transition: transform 240ms ease, box-shadow 240ms ease, opacity 240ms ease;
}

.yepx-vc__play::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background-color: currentColor;
	opacity: 0;
	transform: scale(0.72);
	pointer-events: none;
	transition: opacity 240ms ease, transform 240ms ease;
}

.yepx-vc__card:hover .yepx-vc__play,
.yepx-vc__card:focus-visible .yepx-vc__play {
	transform: translate(-50%, -50%) scale(1.08);
	box-shadow: 0 10px 28px rgba(11, 44, 61, 0.34);
}

.yepx-vc__card:hover .yepx-vc__play::after,
.yepx-vc__card:focus-visible .yepx-vc__play::after {
	opacity: 0.18;
	transform: scale(1.12);
}

.yepx-vc__play-icon {
	width: 28px;
	height: 28px;
	margin-left: 2px;
}

.yepx-vc__title {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1.6rem 0.85rem 0.7rem;
	background: linear-gradient(180deg, transparent, rgba(11, 44, 61, 0.72));
	font-size: 0.92rem;
	line-height: 1.3;
}

.yepx-vc .yepx-skeleton--video-card {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 16px;
}

.yepx-vc.is-ready .yepx-skeleton--video-card,
.no-js .yepx-vc .yepx-skeleton--video-card {
	display: none;
	animation: none;
}

.yepx-vc.is-paused .yepx-vc__track,
.yepx-vc.is-io-paused .yepx-vc__track,
.yepx-vc.is-rotating .yepx-vc__track,
.yepx-vc.is-dragging .yepx-vc__track {
	scroll-behavior: auto;
}

.yepx-vc.is-dragging {
	user-select: none;
}

.yepx-vc.is-static .yepx-vc__toolbar,
.yepx-vc.is-static .yepx-vc__dots {
	display: none;
}

.yepx-vc.is-static .yepx-vc__track {
	overflow-x: hidden;
	scroll-snap-type: none;
}

.yepx-vc__item.is-active .yepx-vc__card,
.yepx-vc__card.is-active {
	outline: 3px solid var(--yepx-accent, #06baf3);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.yepx-vc__viewport {
		cursor: grab;
	}
	.yepx-vc.is-dragging .yepx-vc__viewport {
		cursor: grabbing;
	}
}

@media (max-width: 1024px) {
	.yepx-vc { --yepx-vc-visible: var(--yepx-vc-tab); }
}

@media (max-width: 767px) {
	.yepx-vc { --yepx-vc-visible: var(--yepx-vc-mob); }
}

@media (prefers-reduced-motion: reduce) {
	.yepx-vc__track {
		scroll-behavior: auto;
	}
	.yepx-vc .yepx-skeleton--video-card {
		animation: none;
		background: #eef1f3;
	}
	.yepx-vc__play,
	.yepx-vc__play::after {
		transition: none;
	}
	.yepx-vc__card:hover .yepx-vc__play,
	.yepx-vc__card:focus-visible .yepx-vc__play {
		transform: translate(-50%, -50%);
		box-shadow: 0 8px 24px rgba(11, 44, 61, 0.28);
	}
	.yepx-vc__card:hover .yepx-vc__play::after,
	.yepx-vc__card:focus-visible .yepx-vc__play::after {
		opacity: 0;
		transform: scale(0.72);
	}
}
