/**
 * K Slider - 공통 기본 스타일
 * 
 * @package    KthemeElementorWidgets
 * @since      2.0.0
 */

/* ========================================
   기본 컨테이너 스타일
   ======================================== */
.k-slider-wrapper {
	position: relative;
	width: 100%;
	height: 100vh;
	min-height: 600px;
	overflow: hidden;
	max-height: 80vh;
}

.k-slider-swiper {
	width: 100%;
	height: 100%;
	position: relative;
	
}

.swiper-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
}

/* ========================================
   슬라이드 기본 구조
   ======================================== */
.swiper-slide {
	flex-shrink: 0;
	width: 100%;
	height: 100%;
}

.k-slide {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ========================================
   배경 레이어
   ======================================== */
.k-slide-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.k-slide-image-bg,
.k-slide-youtube-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.k-slide-image-bg {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}


.k-slide-youtube-bg{

}

.k-slide-youtube-bg iframe,
.k-slide-youtube-bg video {
    position: absolute;
    top: 70%;
    left: 50%;
    
    /* * [수정] 이 부분을 수정합니다.
     * 기존: transform: translate(-50%, -50%);
     */
    transform: translate(-50%, calc(-80% )); 
    
    pointer-events: none;
    
     min-width: 100%;
     min-height: 100%;

     
     width: 177.78vh; /* 100vh * (16/9) */
     height: 56.25vw; /* 100vw * (9/16) */

     max-width: none !important;
}



.k-slide-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3);
	z-index: 2;
}

/* ========================================
   콘텐츠 레이어
   ======================================== */
.k-slide-content {
	position: relative;
	width: 100%;
	height: 100%;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
}

.k-slide-content-inner {
	position: relative;
	width: 100%;
	max-width: 1200px;
	padding: 0 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 60px;
}

/* ========================================
   텍스트 영역
   ======================================== */
.k-slide-text {
	flex: 1;
	max-width: 600px;
}

.k-slide-label {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-bottom: 20px;
	color: #ffffff;
	opacity: 0.9;
}

.k-slide-title {
	font-size: 56px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 24px 0;
	color: #ffffff;
}

.k-slide-description {
	font-size: 18px;
	line-height: 1.6;
	margin-bottom: 32px;
	color: #ffffff;
	opacity: 0.9;
}

/* ========================================
   보조 이미지 영역
   ======================================== */
.k-slide-images {
	position: relative;
	flex: 1;
	max-width: 500px;
	height: 500px;
}

.k-slide-support-image {
	position: absolute;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
}

.k-slide-support-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.k-slide-support-image-1 {
	top: 0;
	right: 0;
	z-index: 2;
}

.k-slide-support-image-2 {
	bottom: 0;
	left: 0;
	z-index: 1;
}

/* ========================================
   네비게이션 버튼
   ======================================== */
.k-slider-navigation {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	z-index: 20;
	pointer-events: none;
}
.k-slide-buttons{
	    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.k-slider-button-prev,
.k-slider-button-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 20;
	backdrop-filter: blur(10px);
	pointer-events: auto;
}

.k-slider-button-prev:hover,
.k-slider-button-next:hover {
	background-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-50%) scale(1.1);
}

.k-slider-button-prev {
	left: 40px;
}

.k-slider-button-next {
	right: 40px;
}

.k-slider-button-prev.swiper-button-disabled,
.k-slider-button-next.swiper-button-disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

/* 화살표 호버 시에만 표시 */
.k-slider-wrapper.arrows-hover-only .k-slider-navigation {
	opacity: 0;
	transition: opacity 0.3s ease;
}

.k-slider-wrapper.arrows-hover-only:hover .k-slider-navigation {
	opacity: 1;
}

/* ========================================
   페이지네이션
   ======================================== */
.k-slider-pagination {
	position: absolute;
	bottom: 100px !important;
	
	z-index: 20;
	display: flex !important;
	gap: 10px;
	opacity: 1 !important;
	visibility: visible !important;
	justify-content: center;
}

/* Bullets 타입 */
.k-slider-pagination .swiper-pagination-bullet {
	width: 12px;
	height: 12px;
	background-color: rgba(255, 255, 255, 0.5);
	opacity: 1;
	transition: all 0.3s ease;
	cursor: pointer;
}

.k-slider-pagination .swiper-pagination-bullet:hover {
	background-color: rgba(255, 255, 255, 0.7);
}

.k-slider-pagination .swiper-pagination-bullet-active {
	background-color: #ffffff;
	width: 30px;
	border-radius: 6px;
}

/* Fraction 타입 */
.k-slider-pagination.swiper-pagination-fraction {
	width: auto;
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
}

/* Progress Bar 타입 */
.k-slider-pagination.swiper-pagination-progressbar {
	width: 200px;
	height: 4px;
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 2px;
}

.k-slider-pagination.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
	background-color: #ffffff;
}

/* ========================================
   반응형 - 태블릿
   ======================================== */
@media (max-width: 1024px) {
	.k-slider-wrapper {
		min-height: 500px;
	}

	.k-slide-content-inner {
		padding: 0 30px;
		gap: 40px;
	}

	.k-slide-title {
		font-size: 42px;
	}

	.k-slide-description {
		font-size: 16px;
	}

	.k-slide-images {
		max-width: 400px;
		height: 400px;
	}

	.k-slider-button-prev {
		left: 20px;
	}

	.k-slider-button-next {
		right: 20px;
	}

	.k-slider-pagination {
		bottom: 30px;
	}
}

/* ========================================
   반응형 - 모바일
   ======================================== */
@media (max-width: 767px) {
	.k-slider-wrapper {
		min-height: 600px;
		height: auto;
	}

	.k-slide-content-inner {
		flex-direction: column;
		padding: 60px 20px;
		gap: 30px;
	}

	.k-slide-text {
		max-width: 100%;
		text-align: center;
	}

	.k-slide-title {
		font-size: 32px;
		margin-bottom: 16px;
	}

	.k-slide-description {
		font-size: 14px;
		margin-bottom: 24px;
	}

	.k-slide-label {
		font-size: 12px;
		margin-bottom: 12px;
	}

	.k-slide-images {
		max-width: 100%;
		height: 300px;
	}

	.k-slider-button-prev,
	.k-slider-button-next {
		width: 40px;
		height: 40px;
	}

	.k-slider-button-prev {
		left: 10px;
	}

	.k-slider-button-next {
		right: 10px;
	}

	.k-slider-pagination {
		bottom: 20px;
	}

	/* 모바일에서 화살표 숨김 옵션 */
	.k-slider-wrapper[data-mobile-hide-arrows="true"] .k-slider-navigation {
		display: none;
	}
}

/* ========================================
   로딩 및 에러 상태
   ======================================== */
.k-slider-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-size: 18px;
	z-index: 100;
}

.k-slider-error {
	padding: 40px;
	text-align: center;
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
}

/* ========================================
   접근성
   ======================================== */
.k-slider-wrapper [aria-hidden="true"] {
	pointer-events: none;
}

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

/* ========================================
   커서 효과
   ======================================== */
.k-slider-wrapper.grab-cursor .swiper {
	cursor: grab;
}

.k-slider-wrapper.grab-cursor .swiper.swiper-grabbing {
	cursor: grabbing;
}

/* ========================================
   애니메이션 효과
   ======================================== */
.k-slide-text > * {
	opacity: 0;
	transform: translateY(30px);
}

.swiper-slide-active .k-slide-text > * {
	animation: slideUpFadeIn 0.8s ease forwards;
}

.swiper-slide-active .k-slide-label {
	animation-delay: 0.1s;
}

.swiper-slide-active .k-slide-title {
	animation-delay: 0.2s;
}

.swiper-slide-active .k-slide-description {
	animation-delay: 0.3s;
}

@keyframes slideUpFadeIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   Swiper 효과별 스타일
   ======================================== */

/* Fade 효과 */
.k-slider-wrapper.effect-fade .swiper-slide {
	opacity: 0;
	transition: opacity 0.8s ease;
}

.k-slider-wrapper.effect-fade .swiper-slide-active {
	opacity: 1;
}

/* Cube 효과 */
.k-slider-wrapper.effect-cube .swiper-slide {
	backface-visibility: hidden;
}

