/* ==========================================================================
   Hero Slider — CSS (Swiper + GSAP)
   ========================================================================== */

/* ---------- Base: FOUC 방지 ---------- */
.hero-slider {
    position: relative;
    width: 100%;
    height: var(--slider-height, 100vh);
    min-height: 400px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-slider--ready {
    opacity: 1;
}

/* ---------- Swiper overrides ---------- */
.hero-slider .swiper-wrapper {
    height: 100%;
}

.hero-slider .swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* ---------- Background ---------- */
.hero-slider__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-slider__bg-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    display: block;
    min-height: 100%;
}

.hero-slider__bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.hero-slider__bg-youtube {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    overflow: hidden;
}

.hero-slider__bg-youtube iframe,
.hero-slider__yt-player {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.78vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ---------- Gradient overlay ---------- */
.hero-slider__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.15) 100%
    );
}

/* ---------- Content ---------- */
.hero-slider__content {
    position: relative;
    z-index: 3;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
    color: #fff;
}

/* 텍스트 요소 — CSS에서 숨김, GSAP가 애니메이션으로 표시 */
.hero-slider__subtitle,
.hero-slider__title,
.hero-slider__desc,
.hero-slider__btn {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

/* GSAP 로드 실패 시 텍스트 즉시 표시 */
.hero-slider--no-gsap .hero-slider__subtitle,
.hero-slider--no-gsap .hero-slider__title,
.hero-slider--no-gsap .hero-slider__desc,
.hero-slider--no-gsap .hero-slider__btn {
    opacity: 1;
    transform: none;
}

.hero-slider__title .word {
    display: inline-block;
}

.hero-slider__title .line {
    overflow: hidden;
}

/* ---------- Typography ---------- */
.hero-slider__subtitle {
    margin: 0 0 4px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.4;
    color: #fff;
}

.hero-slider__title {
    margin: 0 0 40px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #fff;
}

.hero-slider__desc {
    margin: 0 0 32px;
    font-weight: 300;
    line-height: 1.6;
    max-width: 600px;
    color: #fff;
}

/* ---------- CTA Button ---------- */
.hero-slider__btn {
    display: inline-block;
    padding: 14px 36px;
    background: #fff;
    color: #111;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    letter-spacing: 0.5px;
}

.hero-slider__btn:hover {
    background: #111;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- Navigation arrows ---------- */
.hero-slider__nav-wrap {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-start;
    gap: 24px;
    max-width: var(--slider-container-width, 1200px);
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
}

.hero-slider--ready .hero-slider__nav-wrap {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

.hero-slider__nav {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    padding: 0;
}

.hero-slider__nav:hover {
    color: #fff;
}

/* ---------- Pagination dots ---------- */
.hero-slider__dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
}

.hero-slider--ready .hero-slider__dots {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

.hero-slider__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
    padding: 0;
}

.hero-slider__dot:hover,
.hero-slider__dot.is-active {
    background: #fff;
    border-color: #fff;
}

/* ---------- Responsive — Tablet ---------- */
@media (max-width: 1199px) {
    .hero-slider {
        min-height: 350px;
    }

    .hero-slider__content {
        padding: 0 30px;
    }

    .hero-slider__nav-wrap {
        bottom: 50px;
        padding: 0 30px;
    }
}

/* ---------- Responsive — Mobile ---------- */
@media (max-width: 767px) {
    .hero-slider {
        min-height: 300px;
    }

    .hero-slider__content {
        padding: 0 20px;
    }

    .hero-slider__subtitle {
        font-size: 13px !important;
        margin-bottom: 2px;
    }

    .hero-slider__title {
        font-size: 28px !important;
        margin-bottom: 28px;
    }

    .hero-slider__desc {
        font-size: 14px !important;
        margin-bottom: 24px;
    }

    .hero-slider__btn {
        padding: 12px 28px;
        font-size: 14px;
    }

    .hero-slider__nav-wrap {
        bottom: 40px;
        gap: 16px;
        padding: 0 20px;
    }

    .hero-slider__nav {
        width: 36px;
        height: 36px;
    }

    .hero-slider__nav svg {
        width: 16px;
        height: 16px;
    }

    .hero-slider__dots {
        bottom: 16px;
    }

    .hero-slider__dot {
        width: 10px;
        height: 10px;
    }
}
