/**
 * Video Carousel Elementor - Styles
 *
 * @package Video_Carousel_Elementor
 * @version 2.1.5
 */

/* ==========================================
   Carousel Wrapper
   ========================================== */

/* Force overflow visible on Elementor containers */
.elementor-widget-video-carousel {
	overflow: visible !important;
}

.elementor-widget-video-carousel .elementor-widget-container {
	overflow: visible !important;
}

.video-carousel-wrapper {
	position: relative;
	width: 100%;
	overflow: visible !important;
	padding: 40px 0;
	margin: 0 auto;
}

.video-carousel-wrapper .splide {
	width: 100%;
	height: 100%;
	padding: 20px 0;
	overflow: visible !important;
}

.video-carousel-wrapper .splide__track {
	overflow: visible !important;
}

.video-carousel-wrapper .splide__list {
	display: flex;
	align-items: center;
}

/* ==========================================
   Slides
   ========================================== */

.video-carousel-slide {
	position: relative;
	width: 100%;
	height: 500px;
	overflow: hidden;
	border-radius: 12px;
	cursor: pointer;
}

/* Image Background - WebGL Canvas Container */
.video-carousel-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 1;
}

/* WebGL Canvas for hover effect */
.video-carousel-image canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: auto;
}

/* ==========================================
   Bottom Gradient Overlay (Always Visible)
   ========================================== */

.video-carousel-gradient {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 50%;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.85) 0%,
		rgba(0, 0, 0, 0.3) 40%,
		transparent 100%
	);
	pointer-events: none;
	z-index: 0;
}

/* ==========================================
   Text Content (Always Visible)
   ========================================== */

.video-carousel-content {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 30px;
	z-index: 2;
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.video-carousel-title {
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 8px 0;
	line-height: 1.3;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-carousel-description {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
	line-height: 1.5;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   Play Icon (Hidden, Appears on Hover)
   ========================================== */

.video-carousel-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.8);
	width: 80px;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	z-index: 3;
	transition: opacity 0.4s ease, transform 0.4s ease;
	pointer-events: none; /* Don't block hover on canvas */
}

.video-carousel-play-icon svg {
	width: 100%;
	height: 100%;
	color: #ffffff;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

/* ==========================================
   Hover Effects
   ========================================== */

.video-carousel-slide:hover .video-carousel-play-icon {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* ==========================================
   Splide Navigation (Arrows)
   ========================================== */

.video-carousel-wrapper .splide__arrow {
	background: rgba(0, 0, 0, 0.5);
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: none;
	opacity: 1;
	transition: all 0.3s ease;
}

.video-carousel-wrapper .splide__arrow svg {
	fill: #ffffff;
	width: 20px;
	height: 20px;
}

.video-carousel-wrapper .splide__arrow:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.1);
}

.video-carousel-wrapper .splide__arrow:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* ==========================================
   Splide Pagination (Dots)
   ========================================== */

.video-carousel-wrapper .splide__pagination {
	position: relative;
	margin-top: 30px;
	padding: 0;
	bottom: auto;
}

.video-carousel-wrapper .splide__pagination__page {
	width: 12px;
	height: 12px;
	background-color: #ffffff;
	opacity: 0.5;
	transition: all 0.3s ease;
	border: none;
	margin: 0 5px;
}

.video-carousel-wrapper .splide__pagination__page.is-active {
	opacity: 1;
	background-color: #ffffff;
	transform: scale(1.2);
}

/* ==========================================
   Centered Effect - Side Slides Clean (No opacity effects)
   ========================================== */

.video-carousel-wrapper .splide {
	overflow: visible;
}

.video-carousel-wrapper .splide__slide {
	opacity: 1;
	transition: opacity 0.3s ease, transform 0.3s ease;
	transform: scale(1);
}

.video-carousel-wrapper .splide__slide.is-active {
	opacity: 1;
	transform: scale(1);
	z-index: 10;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1024px) {
	.video-carousel-slide {
		height: 400px;
	}

	.video-carousel-content {
		padding: 25px;
	}

	.video-carousel-title {
		font-size: 20px;
	}

	.video-carousel-description {
		font-size: 13px;
	}

	.video-carousel-play-icon {
		width: 70px;
		height: 70px;
	}

	.video-carousel-wrapper .splide__arrow {
		width: 40px;
		height: 40px;
	}

	.video-carousel-wrapper .splide__arrow svg {
		width: 16px;
		height: 16px;
	}
}

@media (max-width: 768px) {
	.video-carousel-slide {
		height: 350px;
	}

	.video-carousel-wrapper {
		padding: 30px 0;
	}

	.video-carousel-content {
		padding: 20px;
	}

	.video-carousel-title {
		font-size: 18px;
	}

	.video-carousel-description {
		font-size: 12px;
	}

	.video-carousel-play-icon {
		width: 60px;
		height: 60px;
	}

	.video-carousel-wrapper .splide__arrow {
		width: 35px;
		height: 35px;
	}

	.video-carousel-wrapper .splide__arrow svg {
		width: 14px;
		height: 14px;
	}

	.video-carousel-wrapper .splide__pagination__page {
		width: 10px;
		height: 10px;
	}
}

@media (max-width: 480px) {
	.video-carousel-slide {
		height: 300px;
	}

	.video-carousel-wrapper {
		padding: 20px 0;
	}

	.video-carousel-content {
		padding: 15px;
	}

	.video-carousel-title {
		font-size: 16px;
		margin-bottom: 5px;
	}

	.video-carousel-description {
		font-size: 11px;
	}

	.video-carousel-play-icon {
		width: 50px;
		height: 50px;
	}
}

/* ==========================================
   Loading State
   ========================================== */

.video-carousel-wrapper .splide:not(.is-initialized) .splide__slide {
	opacity: 0;
}

.video-carousel-wrapper .splide.is-initialized .splide__slide {
	animation: fadeInSlide 0.5s ease forwards;
}

@keyframes fadeInSlide {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================
   Accessibility
   ========================================== */

.video-carousel-slide:focus {
	outline: 2px solid #ffffff;
	outline-offset: 4px;
}

.video-carousel-wrapper .splide__arrow:focus {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* ==========================================
   Custom Video Modal
   ========================================== */

.video-carousel-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 999999;
	align-items: center;
	justify-content: center;
	animation: fadeIn 0.3s ease;
}

.video-carousel-modal.active {
	display: flex;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.video-carousel-modal-content {
	position: relative;
	width: 90%;
	max-width: 1200px;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.video-carousel-modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	color: #ffffff;
	font-size: 28px;
	font-weight: 300;
	font-family: Arial, sans-serif;
	cursor: pointer;
	width: 44px;
	height: 44px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	z-index: 1000001;
	line-height: 44px;
}

.video-carousel-modal-close:hover {
	transform: scale(1.1);
	background: rgba(255, 255, 255, 0.35);
	border-color: rgba(255, 255, 255, 0.7);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.video-carousel-modal-video {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
}

.video-carousel-modal-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

@media (max-width: 768px) {
	.video-carousel-modal-content {
		width: 95%;
	}

	.video-carousel-modal-close {
		top: 15px;
		right: 15px;
		font-size: 26px;
		width: 40px;
		height: 40px;
		line-height: 40px;
	}
}

@media (max-width: 480px) {
	.video-carousel-modal-close {
		top: 10px;
		right: 10px;
		font-size: 24px;
		width: 36px;
		height: 36px;
		line-height: 36px;
	}
}
