/* 고성능 슬라이더 CSS */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: #000;

    /* GPU 가속 및 성능 최적화 */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    contain: layout style paint;
    isolation: isolate;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    /* 성능 최적화 */
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);

    /* 초기 상태 */
    opacity: 0;
    visibility: hidden;

    /* 부드러운 전환 (JavaScript에서 동적으로 제어) */
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* 슬라이드별 배경 이미지 */
.slide-1 {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
    url('/assets/image/main_slider_img1.jpg');
}

.slide-2 {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
    url('/assets/image/main_slider_img2.jpg');
}

.slide-3 {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
    url('/assets/image/main_slider_img3.jpg');
}

/* 슬라이드 콘텐츠 최적화 */
.slide-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 3;

    /* 렌더링 최적화 */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);

    /* 텍스트 렌더링 최적화 */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.slide-content p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    opacity: 0.95;
}

.slide-content .btn {
    font-size: 1.1rem;
    padding: 12px 30px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid white;
    color: white;
    text-decoration: none;
    display: inline-block;

    /* 버튼 최적화 */
    will-change: transform, background-color, color;
    backface-visibility: hidden;
}

.slide-content .btn:hover {
    background-color: white;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* 프로그레스 바 개선 */
.progress-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
    z-index: 10;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #dedede);
    width: 0%;
    border-radius: 2px;

    /* 최적화 */
    will-change: width;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 인디케이터 개선 */
.slide-indicators {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* 최적화 */
    will-change: transform, background-color;
    backface-visibility: hidden;

    /* 터치 최적화 */
    touch-action: manipulation;
}

.indicator:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.2);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Substitute Section 유지 */
.substitute-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.substitute-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="5" fill="rgba(44,95,45,0.03)"/><circle cx="30" cy="25" r="3" fill="rgba(44,95,45,0.03)"/><circle cx="70" cy="15" r="4" fill="rgba(44,95,45,0.03)"/><circle cx="90" cy="30" r="6" fill="rgba(44,95,45,0.03)"/><circle cx="20" cy="60" r="5" fill="rgba(44,95,45,0.03)"/><circle cx="60" cy="70" r="3" fill="rgba(44,95,45,0.03)"/><circle cx="85" cy="80" r="4" fill="rgba(44,95,45,0.03)"/></svg>');
    opacity: 0.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.text-content {
    padding: 40px 0;
}

.section-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a90e2;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 30px;
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 18px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.view-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.4);
    color: white;
    text-decoration: none;
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.view-more-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.image-content {
    position: relative;
    height: 500px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: fadeInRight 1s ease 0.5s forwards;
    background-size: cover;
    background-position: center;
    background-image: url('/assets/image/main_img_2_2.jpg');
}

/* 애니메이션 키프레임 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 반응형 최적화 */
@media (max-width: 768px) {
    .slide-content h1 {
        font-size: 2.5rem;
    }

    .slide-content p {
        font-size: 1.1rem;
    }

    .progress-container {
        width: 200px;
        bottom: 20px;
    }

    .slide-indicators {
        bottom: 60px;
        gap: 12px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .substitute-section {
        padding: 60px 0;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .description {
        font-size: 1rem;
    }

    .image-content {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .slide-content h1 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .slide-content .btn {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .progress-container {
        width: 150px;
    }

    .slide-indicators {
        bottom: 50px;
        gap: 10px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .slide-content .btn:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    }

    .indicator:hover {
        transform: none;
        background: rgba(255,255,255,0.5);
    }

    .view-more-btn:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .slide-content h1,
    .slide-content p {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 성능 최적화를 위한 추가 설정 */
.hero-slider * {
    box-sizing: border-box;
}

/* 접근성 개선 */
.slide-indicators .indicator {
    position: relative;
}

.slide-indicators .indicator::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
}

/* 키보드 네비게이션 지원 */
.indicator:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* 모션 감소 설정 존중 */
@media (prefers-reduced-motion: reduce) {
    .slide,
    .indicator,
    .progress-fill,
    .slide-content .btn,
    .view-more-btn {
        transition: none;
        animation: none;
    }

    .slide-content h1,
    .section-label,
    .main-title,
    .description,
    .view-more-btn,
    .image-content {
        animation: none;
        opacity: 1;
        transform: none;
    }
}