/* PXL Video Hero Slider */

.pxl-vhs-section {
	position: relative;
	width: 100%;
	overflow: hidden;
	display: flex;
	align-items: stretch;
	min-height: 85vh;
}

/* ---------- Background / Video ---------- */
.pxl-vhs-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	overflow: hidden;
	background: #111;
}

.pxl-vhs-video {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate(-50%, -50%);
}

.pxl-vhs-yt-wrap {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	overflow: hidden;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.pxl-vhs-yt {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw; /* 16:9 */
	min-height: 100%;
	min-width: 177.77vh; /* 16:9 */
	transform: translate(-50%, -50%);
	border: 0;
}

.pxl-vhs-fallback-img {
	display: none;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pxl-vhs-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background-color: rgba(0, 0, 0, 0.45);
}

/* Hide video on mobile & show fallback image if enabled */
@media (max-width: 767px) {
	.pxl-vhs-hide-video-mobile .pxl-vhs-video,
	.pxl-vhs-hide-video-mobile .pxl-vhs-yt-wrap {
		display: none;
	}
	.pxl-vhs-hide-video-mobile .pxl-vhs-fallback-img {
		display: block;
	}
}

/* ---------- Inner Layout ---------- */
.pxl-vhs-inner {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 40px;
	padding: 60px 40px;
}

/* ---------- Left Content ---------- */
.pxl-vhs-content {
	width: 45%;
	color: #fff;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* No slider (disabled or no images) -> content takes the full row instead of
   staying locked at the configured width with dead space on the right. */
.pxl-vhs-full .pxl-vhs-content {
	width: 100% !important;
	max-width: 900px;
}

.pxl-vhs-editor-warning {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 100%;
	min-height: 200px;
	padding: 20px;
	border: 2px dashed rgba(255, 255, 255, 0.4);
	border-radius: 8px;
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
}

.pxl-vhs-subheading {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #f5c451;
	margin: 0 0 14px;
}

.pxl-vhs-heading {
	font-size: 48px;
	line-height: 1.2;
	font-weight: 700;
	margin: 0 0 20px;
	color: #fff;
}

.pxl-vhs-desc {
	font-size: 17px;
	line-height: 1.6;
	color: #e5e5e5;
	margin: 0 0 30px;
	max-width: 520px;
}

.pxl-vhs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 36px;
	background-color: #f5c451;
	color: #111;
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
	border-radius: 6px;
	transition: all 0.3s ease;
	line-height: 1;
	box-sizing: border-box;
}

.pxl-vhs-btn:hover {
	background-color: #fff;
	color: #111;
	transform: translateY(-2px);
}

.pxl-vhs-btn svg,
.pxl-vhs-btn i {
	line-height: 1;
}

/* ---------- Right Slider ---------- */
.pxl-vhs-slider-wrap {
	width: 55%;
	box-sizing: border-box;
}

.pxl-vhs-slider {
	position: relative;
	width: 100%;
	height: 500px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.pxl-vhs-slides {
	position: relative;
	width: 100%;
	height: 100%;
}

/* Prevent theme/page-builder scroll-entrance animation engines (e.g. Kimono's
   WCF animations, AOS, WOW.js, etc.) from applying their own opacity/transform
   keyframe animations to elements inside this widget. Those engines commonly
   set opacity:0 on load and animate to 1 on "in view", and can race with or
   override our own is-active state right after paint, causing the slide to
   flash in then get hidden again. `animation` (keyframes) is blocked here;
   our own `transition` based crossfade below is untouched. */
.pxl-vhs-section,
.pxl-vhs-section * {
	animation: none !important;
}

.pxl-vhs-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease;
	z-index: 1;
}

.pxl-vhs-slide.is-active {
	opacity: 1 !important;
	visibility: visible !important;
	z-index: 2;
}

/* Slide effect variant */
.pxl-vhs-slider[data-effect="slide"] .pxl-vhs-slide {
	transform: translateX(100%);
	transition: transform 0.6s ease, opacity 0.6s ease;
	opacity: 0;
	visibility: visible;
}
.pxl-vhs-slider[data-effect="slide"] .pxl-vhs-slide.is-active {
	transform: translateX(0) !important;
	opacity: 1 !important;
}
.pxl-vhs-slider[data-effect="slide"] .pxl-vhs-slide.is-prev {
	transform: translateX(-100%);
}

.pxl-vhs-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

/* Arrows */
.pxl-vhs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.35);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.pxl-vhs-arrow:hover {
	background-color: rgba(0, 0, 0, 0.6);
}

.pxl-vhs-arrow-prev {
	left: 16px;
}

.pxl-vhs-arrow-next {
	right: 16px;
}

/* Dots */
.pxl-vhs-dots {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	display: flex;
	gap: 8px;
}

.pxl-vhs-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	padding: 0;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.pxl-vhs-dot.is-active {
	background-color: #f5c451;
	transform: scale(1.2);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablets */
@media (max-width: 1024px) {
	.pxl-vhs-inner {
		gap: 30px;
		padding: 50px 30px;
	}
	.pxl-vhs-heading {
		font-size: 36px;
	}
	.pxl-vhs-slider {
		height: 420px;
	}
}

/* Mobile: stack content above slider, full width */
@media (max-width: 767px) {
	.pxl-vhs-section {
		min-height: auto !important;
	}
	.pxl-vhs-inner {
		flex-direction: column;
		padding: 40px 20px;
		gap: 30px;
	}
	.pxl-vhs-content,
	.pxl-vhs-slider-wrap {
		width: 100% !important;
	}
	.pxl-vhs-heading {
		font-size: 30px;
	}
	.pxl-vhs-desc {
		font-size: 15px;
		max-width: 100%;
	}
	.pxl-vhs-btn {
		padding: 14px 24px;
	}
	.pxl-vhs-slider {
		height: 320px;
	}
}

/* Small mobile */
@media (max-width: 480px) {
	.pxl-vhs-heading {
		font-size: 26px;
	}
	.pxl-vhs-slider {
		height: 260px;
	}
	.pxl-vhs-arrow {
		width: 36px;
		height: 36px;
	}
}
