/**
 * 프리미엄 섹션 슬라이더 스타일
 * 범어자이르네 테마 전용
 */

/* 프리미엄 섹션 기본 스타일 */
.premium-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.premium-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    padding: 0 50px;
}

.premium-text {
    flex: 1;
    color: #fff;
    text-align: left;
}

.premium-title {
    font-size: 4.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 8px;
    font-family: "DM Serif Text", serif;
}

.premium-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.premium-card-container {
    flex: 1;
    display: flex;
    justify-content: center;
    flex-shrink: 0; /* 크기 고정 */
    min-width: 400px; /* 최소 너비 고정 */
    max-width: 400px; /* 최대 너비 고정 */
}

/* 포토 카드 스타일 */
.photo-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 470px;
    width: 120%;
    height: 600px; /* 세로가 긴 직사각형 - 고정 높이 */
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* 크기 고정 */
}

.card-slider {
    position: relative;
    height: 450px; /* 이미지 영역 높이 - 더 길게 수정 */
    overflow: hidden;
    background: transparent; /* 배경을 투명하게 변경 */
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0; /* 크기 고정 */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px; /* 균등한 여백 설정 */
    box-sizing: border-box;
    z-index: 1;
    pointer-events: none; /* 비활성 슬라이드는 클릭 이벤트 차단 */
}

.slide.active {
    opacity: 1 !important;
    z-index: 2 !important;
    pointer-events: auto; /* 활성 슬라이드는 클릭 이벤트 허용 */
}

/* 모든 슬라이드는 JavaScript에서 제어 */

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px; /* 이미지 모서리 둥글게 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    max-height: 100%;
    display: block;
    background-color: transparent;
}

/* 슬라이더 네비게이션 */
.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #007bff;
    transform: scale(1.2);
}

.slider-dot:hover {
    background: #adb5bd;
}

.slide-counter {
    color: #495057;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 12px;
}

/* 스크롤 네비게이션 스타일 */
.scroll-nav {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.scroll-indicator {
    width: 4px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator.active {
    background: rgba(255, 255, 255, 0.8);
}

.scroll-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: height 0.3s ease;
}

/* 스크롤 힌트 */
.scroll-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.card-slider:hover .scroll-hint {
    opacity: 1;
}

/* 스크롤 방지 클래스 */
.scroll-locked {
    overflow: hidden;
}

/* 스크롤 가능한 상태 표시 */
.scroll-enabled {
    cursor: ns-resize;
}

/* 프리미엄 섹션에 스크롤 커서 표시 */
.premium-section {
    cursor: ns-resize;
}

/* 섹션 고정 상태 스타일 */
.section-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.9);
    transition: all 0.3s ease;
}

/* 섹션 고정 시 텍스트 영역 보장 */
.section-fixed .premium-text {
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s ease;
}

.section-fixed .premium-title {
    opacity: 1 !important;
    visibility: visible !important;
}

.section-fixed .premium-subtitle {
    opacity: 1 !important;
    visibility: visible !important;
}

.section-fixed .premium-content {
    animation: fadeIn 0.5s ease;
}

/* 부드러운 스크롤 동작 */
html {
    scroll-behavior: smooth;
}

/* 섹션 전환 시 부드러운 애니메이션 */
.section-transition {
    transition: all 0.5s ease;
}

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

/* 모바일에서 스크롤 네비게이션 숨김 */
@media (max-width: 768px) {
    .scroll-nav {
        display: none;
    }
    
    .scroll-hint {
        display: none;
    }
    
    /* 모바일에서 섹션 고정 비활성화 */
    .section-fixed {
        position: relative !important;
        height: auto !important;
        z-index: auto !important;
    }
    
    /* 모바일 스와이프 네비게이션 */
    .mobile-swipe-nav {
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 15px;
        background: rgba(255, 255, 255, 0.95);
        padding: 12px 20px;
        border-radius: 25px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        z-index: 10;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .mobile-swipe-nav.show {
        opacity: 1;
        pointer-events: auto;
    }
    
    .mobile-swipe-nav .swipe-icon {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #007bff;
        font-size: 16px;
    }
    
    .mobile-swipe-nav .swipe-text {
        color: #495057;
        font-size: 0.9rem;
        font-weight: 500;
        white-space: nowrap;
    }
    
    .mobile-swipe-nav .swipe-arrow {
        width: 16px;
        height: 16px;
        border: 2px solid #007bff;
        border-top: none;
        border-right: none;
        transform: rotate(45deg);
        animation: swipeArrow 2s infinite;
    }
    
    .mobile-swipe-nav .swipe-arrow.left {
        transform: rotate(225deg);
    }
    
    .mobile-swipe-nav .swipe-arrow.right {
        transform: rotate(45deg);
    }
    
    @keyframes swipeArrow {
        0%, 100% {
            opacity: 0.3;
            transform: translateX(0) rotate(45deg);
        }
        50% {
            opacity: 1;
            transform: translateX(5px) rotate(45deg);
        }
    }
    
    .mobile-swipe-nav .swipe-arrow.left {
        animation: swipeArrowLeft 2s infinite;
    }
    
    .mobile-swipe-nav .swipe-arrow.right {
        animation: swipeArrowRight 2s infinite;
    }
    
    @keyframes swipeArrowLeft {
        0%, 100% {
            opacity: 0.3;
            transform: translateX(0) rotate(225deg);
        }
        50% {
            opacity: 1;
            transform: translateX(-5px) rotate(225deg);
        }
    }
    
    @keyframes swipeArrowRight {
        0%, 100% {
            opacity: 0.3;
            transform: translateX(0) rotate(45deg);
        }
        50% {
            opacity: 1;
            transform: translateX(5px) rotate(45deg);
        }
    }
}

/* 카드 텍스트 */
.card-text {
    padding: 25px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    min-height: 150px; /* 최소 높이 조정 */
    max-height: 150px; /* 최대 높이 조정 */
    overflow: hidden; /* 내용이 넘치면 숨김 */
    position: relative;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    transition: all 0.5s ease-in-out;
    line-height: 1.2; /* 줄 간격 고정 */
    text-align: center;
    width: 100%;
    flex-shrink: 0;
}

.card-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
    transition: all 0.5s ease-in-out;
    text-align: center;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* 텍스트 오버플로우 처리 */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 최대 3줄로 제한 */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* 프리미엄 배경 */
.premium-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('../img/premium01.jpg'); /* 기본 배경 이미지 */
    transition: background-image 0.8s ease-in-out;
    z-index: 1;
}

.premium-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .premium-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .premium-text {
        text-align: center;
    }
    
    .premium-title {
        font-size: 2.5rem;
    }
    
    .premium-subtitle {
        font-size: 1.2rem;
    }
    
    .premium-card-container {
        min-width: 100%; /* 태블릿에서는 전체 너비 사용 */
        max-width: 400px; /* 최대 너비는 유지 */
    }
}

@media (max-width: 768px) {
    .premium-content {
        padding: 0 20px;
    }
    
    .premium-title {
        font-size: 2rem;
    }
    
    .premium-subtitle {
        font-size: 1rem;
    }
    
    .premium-card-container {
        min-width: 100%; /* 모바일에서는 전체 너비 사용 */
        max-width: 100%; /* 최대 너비도 전체로 설정 */
    }
    
    .photo-card {
        max-width: 100%;
        height: 500px; /* 모바일에서 고정 높이 */
        flex-shrink: 0; /* 크기 고정 */
    }
    
    .card-slider {
        height: 350px; /* 모바일에서 이미지 영역 높이 - 더 길게 수정 */
        flex-shrink: 0; /* 크기 고정 */
    }
    
    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        background-color: transparent;
    }
    
    .card-text {
        padding: 20px;
        min-height: 150px; /* 최소 높이 조정 */
        max-height: 150px; /* 최대 높이 조정 */
        overflow: hidden; /* 내용이 넘치면 숨김 */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    
    .card-title {
        font-size: 1.3rem;
        line-height: 1.2; /* 줄 간격 고정 */
        text-align: center;
        width: 100%;
        flex-shrink: 0;
    }
    
    .card-description {
        font-size: 0.85rem;
        text-align: center;
        width: 100%;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden; /* 텍스트 오버플로우 처리 */
        display: -webkit-box;
        -webkit-line-clamp: 3; /* 최대 3줄로 제한 */
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .premium-title {
        font-size: 1.8rem;
    }
    
    .premium-card-container {
        min-width: 100%; /* 작은 화면에서도 전체 너비 사용 */
        max-width: 100%; /* 최대 너비도 전체로 설정 */
    }
    
    .photo-card {
        height: 450px; /* 작은 화면에서 고정 높이 */
        flex-shrink: 0; /* 크기 고정 */
    }
    
    .card-slider {
        height: 300px; /* 작은 화면에서 이미지 영역 높이 - 더 길게 수정 */
        flex-shrink: 0; /* 크기 고정 */
    }
    
    .slider-nav {
        padding: 6px 12px;
    }
    
    .slider-dot {
        width: 8px;
        height: 8px;
    }
    
    .slide-counter {
        font-size: 0.7rem;
    }
    
    .card-text {
        padding: 15px;
        min-height: 150px; /* 최소 높이 조정 */
        max-height: 150px; /* 최대 높이 조정 */
        overflow: hidden; /* 내용이 넘치면 숨김 */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    
    .card-title {
        font-size: 1.2rem;
        line-height: 1.2; /* 줄 간격 고정 */
        text-align: center;
        width: 100%;
        flex-shrink: 0;
    }
    
    .card-description {
        font-size: 0.85rem;
        text-align: center;
        width: 100%;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden; /* 텍스트 오버플로우 처리 */
        display: -webkit-box;
        -webkit-line-clamp: 3; /* 최대 3줄로 제한 */
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }
}

/* 애니메이션 효과 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-text[data-aos="fade-right"] {
    animation: fadeInUp 1s ease-out;
}

.premium-card-container[data-aos="fade-left"] {
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* 호버 효과 */
.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.slider-dot:hover {
    transform: scale(1.3);
}

/* 로딩 상태 */
.slide.loading {
    opacity: 0.5;
}

/* 접근성 개선 */
.slider-dot:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .photo-card {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .card-title {
        color: #fff;
    }
    
    .card-description {
        color: #ccc;
    }
}