/* =====================================================================
   Video Carousel Widget
   ===================================================================== */

.vcr-wrap {
	--vcr-gap: 16px;
	--vcr-spv: 3;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.vcr-viewport {
	overflow: hidden;
	width: 100%;
}

.vcr-track {
	display: flex;
	gap: var(--vcr-gap);
	transition: transform 0.4s ease;
	will-change: transform;
}

.vcr-slide {
	flex: 0 0 calc((100% - (var(--vcr-spv) - 1) * var(--vcr-gap)) / var(--vcr-spv));
	min-width: 0;
	box-sizing: border-box;
}

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

.vcr-poster {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: #1a1a1a;
	cursor: pointer;
	transition: transform 0.4s ease;
}

.vcr-poster::after {
	content: '';
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.15);
	transition: background-color 0.2s ease;
}

.vcr-card:hover .vcr-poster::after {
	background-color: rgba(0, 0, 0, 0.05);
}

.vcr-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.92);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease, background-color 0.2s ease;
	padding: 0;
}

.vcr-play svg {
	width: 40%;
	height: 40%;
	margin-left: 4px;
	fill: #222;
}

.vcr-card:hover .vcr-play {
	transform: translate(-50%, -50%) scale(1.08);
}

.vcr-player {
	position: absolute;
	inset: 0;
	display: none;
}

.vcr-player.is-active {
	display: block;
}

.vcr-player video,
.vcr-player iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

.vcr-card.is-playing .vcr-poster,
.vcr-card.is-playing .vcr-play {
	display: none;
}

.vcr-title {
	margin-top: 12px;
	font-size: 14px;
	font-weight: 500;
	color: #222;
	text-align: center;
	line-height: 1.4;
}

/* Arrows */
.vcr-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
	z-index: 3;
	transition: opacity 0.2s ease, transform 0.2s ease;
	padding: 0;
}

.vcr-nav svg {
	stroke: #222;
}

.vcr-nav:hover {
	transform: translateY(-50%) scale(1.05);
}

.vcr-nav:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.vcr-prev {
	left: -12px;
}

.vcr-next {
	right: -12px;
}

@media (min-width: 1100px) {
	.vcr-prev {
		left: -22px;
	}
	.vcr-next {
		right: -22px;
	}
}

/* Dots */
.vcr-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.vcr-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #ccc;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.vcr-dot.is-active {
	background-color: #a89d87;
	transform: scale(1.25);
}

/* Responsive: slides per view via inline data-attribute -> CSS variable in JS */
@media (max-width: 1024px) {
	.vcr-prev {
		left: 6px;
	}
	.vcr-next {
		right: 6px;
	}
}
