/**
 * KS LP Carousel — Stylesheet (3D Perspective Gallery)
 */

.kslp-carousel-section {
	position: relative;
	width: 100%;
	padding: 80px 20px;
	overflow: hidden;
	box-sizing: border-box;
}

.kslp-carousel-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 1;
}

.kslp-carousel-inner {
	position: relative;
	z-index: 2;
	margin: 0 auto;
	box-sizing: border-box;
}

/* Header */
.kslp-carousel-header {
	margin-bottom: 40px;
}

.kslp-carousel-subtitle {
	display: inline-block;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.kslp-carousel-title {
	margin: 0 0 12px 0;
	line-height: 1.2;
	font-weight: 800;
}

.kslp-carousel-desc {
	margin: 0;
	line-height: 1.6;
}

/* 3D Carousel Stage */
.kslp-carousel-stage {
	position: relative;
	width: 100%;
	height: var(--kslp-slide-height, 420px);
	perspective: var(--kslp-perspective, 1000px);
	perspective-origin: 50% 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 20px 0 10px;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.kslp-carousel-track {
	position: relative;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Slide Cards */
.kslp-carousel-slide {
	position: absolute;
	width: var(--kslp-slide-width, calc(var(--kslp-slide-height, 420px) * var(--kslp-aspect-ratio, 1.333)));
	max-width: 82vw;
	height: 100%;
	top: 0;
	left: 50%;
	margin-left: var(--kslp-slide-margin-left, calc(-1 * (var(--kslp-slide-height, 420px) * var(--kslp-aspect-ratio, 1.333)) / 2));
	border-radius: var(--kslp-radius, 12px);
	overflow: hidden;
	background-color: #0f172a;
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
	transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, filter 0.5s ease, box-shadow 0.5s ease;
	cursor: pointer;
	will-change: transform, opacity;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	box-sizing: border-box;
}

.kslp-carousel-slide.is-active {
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.15);
	cursor: pointer;
}

.kslp-carousel-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

/* Video Play Button Overlay */
.kslp-carousel-video-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 2px solid rgba(255, 255, 255, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
	z-index: 5;
}

.kslp-carousel-slide:hover .kslp-carousel-video-btn {
	transform: translate(-50%, -50%) scale(1.12);
	background: rgba(255, 255, 255, 0.4);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.kslp-carousel-video-btn svg {
	width: 22px;
	height: 22px;
	fill: #ffffff;
	margin-left: 3px;
	display: block;
}

/* Caption Overlay */
.kslp-carousel-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 24px 18px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
	color: #ffffff;
	z-index: 4;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.kslp-carousel-slide.is-active .kslp-carousel-caption {
	opacity: 1;
}

.kslp-carousel-caption-subtitle {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.85;
	margin-bottom: 3px;
}

.kslp-carousel-caption-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

/* Navigation Arrows */
.kslp-carousel-arrow-prev,
.kslp-carousel-arrow-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	outline: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	z-index: 30;
	padding: 0;
	margin: 0;
	line-height: 1;
	font-size: 20px;
	text-indent: 0 !important;
	overflow: visible !important;
	box-sizing: border-box;
}

.kslp-carousel-arrow-prev {
	left: 8px;
}

.kslp-carousel-arrow-next {
	right: 8px;
}

.kslp-carousel-arrow-prev:hover,
.kslp-carousel-arrow-next:hover {
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.kslp-carousel-arrow-prev:active,
.kslp-carousel-arrow-next:active {
	transform: translateY(-50%) scale(0.95);
}

.kslp-carousel-arrow-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: inherit !important;
	font-style: normal;
	pointer-events: none;
}

.kslp-carousel-arrow-icon i.bi {
	font-size: 20px;
	line-height: 1;
	color: inherit !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Arrow Hover Only Option */
.kslp-carousel-section.has-arrow-hover .kslp-carousel-arrow-prev,
.kslp-carousel-section.has-arrow-hover .kslp-carousel-arrow-next {
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%) scale(0.85);
	transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.kslp-carousel-section.has-arrow-hover:hover .kslp-carousel-arrow-prev,
.kslp-carousel-section.has-arrow-hover:hover .kslp-carousel-arrow-next {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(-50%) scale(1);
}

.kslp-carousel-section.has-arrow-hover:hover .kslp-carousel-arrow-prev:hover,
.kslp-carousel-section.has-arrow-hover:hover .kslp-carousel-arrow-next:hover {
	transform: translateY(-50%) scale(1.1);
}

/* Dots Indicators */
.kslp-carousel-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 24px;
	position: relative;
	z-index: 10;
}

.kslp-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-radius 0.3s ease, background-color 0.3s ease;
}

.kslp-carousel-dot.is-active {
	width: 28px;
	border-radius: 6px;
}

/* Lightbox Modal */
.kslp-carousel-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.kslp-carousel-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.kslp-carousel-modal-content {
	position: relative;
	max-width: 90vw;
	max-height: 85vh;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
	border-radius: 12px;
	overflow: hidden;
	background: #000000;
}

.kslp-carousel-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	z-index: 100000;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.kslp-carousel-modal-close:hover {
	background: rgba(255, 255, 255, 0.4);
	transform: scale(1.08);
}

.kslp-carousel-modal img {
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 8px;
	display: block;
}

.kslp-carousel-modal iframe,
.kslp-carousel-modal video {
	width: 82vw;
	height: 46vw;
	max-width: 1000px;
	max-height: 562px;
	border: none;
	border-radius: 8px;
	display: block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.kslp-carousel-section {
		padding-top: 50px;
		padding-bottom: 50px;
	}

	.kslp-carousel-stage {
		height: calc(var(--kslp-slide-height, 420px) * 0.75);
		min-height: 250px;
	}

	.kslp-carousel-slide {
		width: calc(var(--kslp-slide-height, 420px) * 0.75 * var(--kslp-aspect-ratio, 1.333));
		max-width: 88vw;
	}

	.kslp-carousel-arrow-prev,
	.kslp-carousel-arrow-next {
		width: 38px;
		height: 38px;
	}

	.kslp-carousel-video-btn {
		width: 52px;
		height: 52px;
	}

	.kslp-carousel-video-btn svg {
		width: 18px;
		height: 18px;
	}

	.kslp-carousel-modal iframe,
	.kslp-carousel-modal video {
		width: 94vw;
		height: 53vw;
	}
}
