/**
 * home.css - 홈 히어로 슬라이더 및 홈 전용 스타일
 */

/* =============================================
   Hero Slider
   ============================================= */
.hero-slider {
    position: relative;
    width: 100%;
    /*height: calc(100vh - var(--header-height));
    min-height: 580px;
    max-height: 900px;*/
    height: 100vh;
    overflow: hidden;
    background: #0d1b33;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

/* 페이드 효과 - 비활성 슬라이드 완전 투명 처리 */
.hero-swiper.swiper-fade .swiper-slide {
    pointer-events: none;
    opacity: 0 !important;
}
.hero-swiper.swiper-fade .swiper-slide-active {
    pointer-events: auto;
    opacity: 1 !important;
}

/* 슬라이드 배경 */
.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background-color: #0d1b33;
    overflow: hidden;
}

/* 배경 이미지 레이어 (줌 애니메이션 적용 대상) */
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--hero-bg, none);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.0);
    will-change: transform;
}

/* 대기 중인 슬라이드는 미리 1.08로 준비 */
.swiper-slide-next.hero-slide::before {
    transform: scale(1.08);
}

/* 활성 슬라이드에서 줌아웃 시작 */
.swiper-slide-active.hero-slide::before {
    animation: hero-zoom-out 6s ease-out both;
}

@keyframes hero-zoom-out {
    from { transform: scale(1.08); }
    to   { transform: scale(1.0); }
}

/* 어두운 그라디언트 오버레이 */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.18) 100%),
        linear-gradient(to top, rgba(0,0,0,.4) 0%, transparent 50%);
    z-index: 2;
}

/* 슬라이드 텍스트 콘텐츠 */
.hero-content {
    position: relative;
    z-index: 3;
    padding-top: 0;
    padding-bottom: 140px;
}

.hero-eyebrow {
    display: block;
    margin-bottom: 20px;
    font-size: .72rem;
    font-weight: 400;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .52);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease .3s, transform 1.2s ease .3s;
}

.hero-title {
    margin: 0 0 30px;
    font-size: clamp(2rem, 3.8vw, 3.8rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.04em;
    color: #fff;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1.3s ease .6s, transform 1.3s ease .6s;
}

.hero-sub {
    margin: 0;
    padding-left: 18px;
    border-left: 2px solid rgba(255, 255, 255, .38);
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, .66);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease 1s, transform 1.2s ease 1s;
}

/* 활성 슬라이드 텍스트 등장 */
.swiper-slide-active .hero-eyebrow,
.swiper-slide-active .hero-title,
.swiper-slide-active .hero-sub {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   하단 좌측 컨트롤
   ============================================= */
.hero-ctrl-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(8px);
    transition: background .2s, border-color .2s, color .2s;
}

.hero-ctrl-prev { left: 28px; }
.hero-ctrl-next { right: 28px; }

.hero-ctrl-btn:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}

/* =============================================
   우측 스크롤 인디케이터
   ============================================= */
.hero-scroll {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 36px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-scroll-mouse {
    width: 22px;
    height: 36px;
    border: 1.5px solid rgba(255, 255, 255, .5);
    border-radius: 11px;
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-scroll-wheel {
    position: absolute;
    top: 6px;
    width: 3px;
    height: 6px;
    background: rgba(255, 255, 255, .85);
    border-radius: 2px;
    animation: hero-scroll-wheel 1.8s ease-in-out infinite;
}

@keyframes hero-scroll-wheel {
    0%   { top: 6px;  opacity: 1; }
    60%  { top: 18px; opacity: .3; }
    61%  { top: 6px;  opacity: 0; }
    100% { top: 6px;  opacity: 1; }
}

.hero-scroll-touch {
    display: none;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, .72);
    animation: hero-touch-swipe 2s ease-in-out infinite;
}

@keyframes hero-touch-swipe {
    0%   { transform: translateY(0);    opacity: .75; }
    45%  { transform: translateY(-14px); opacity: 1;   }
    60%  { transform: translateY(-14px); opacity: 0;   }
    61%  { transform: translateY(0);    opacity: 0;   }
    85%  { transform: translateY(0);    opacity: .75; }
    100% { transform: translateY(0);    opacity: .75; }
}

.hero-scroll-text {
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
}




/* =============================================
   교육 과정 섹션
   ============================================= */
.home-education-section {
    padding: 100px 0;
    background: #f8f9fb;
}

.home-section-eyebrow {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--primary, #2563eb);
    margin: 0 0 14px;
}

.home-section-head {
    text-align: center;
    margin-bottom: 56px;
}

.home-section-head h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0 0 14px;
    color: #111;
}

.home-section-head > p:last-child {
    font-size: .95rem;
    color: #666;
    margin: 0;
}

.home-edu-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 카드 */
.edu-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

/* 배경 이미지 */
.edu-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: #1a2a4a;
    transition: transform .65s cubic-bezier(.25,.46,.45,.94);
}

.edu-card:hover .edu-card-bg {
    transform: scale(1.07);
}

/* 그라디언트 오버레이 */
.edu-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .82) 0%,
        rgba(0, 0, 0, .45) 45%,
        rgba(0, 0, 0, .12) 100%
    );
    transition: background .4s ease;
}

.edu-card:hover .edu-card-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .88) 0%,
        rgba(0, 0, 0, .55) 55%,
        rgba(0, 0, 0, .18) 100%
    );
}

/* 텍스트 콘텐츠 */
.edu-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 28px 32px;
}

/* reveal: 기본 height 0 → tag/title 위치에 영향 없음 */
.edu-card-reveal {
    overflow: hidden;
    max-height: 0;
    transition: max-height .5s cubic-bezier(.4, 0, .2, 1);
}

.edu-card:hover .edu-card-reveal {
    max-height: 130px;
}

/* 내부 콘텐츠: 아래에서 위로 부드럽게 슬라이드 */
.edu-card-reveal > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .4s ease, transform .4s ease;
}

.edu-card:hover .edu-card-reveal > * {
    opacity: 1;
    transform: translateY(0);
}

/* desc가 more보다 약간 늦게 등장 */
.edu-card:hover .edu-card-reveal .edu-card-desc {
    transition-delay: .08s;
}

.edu-card-tag {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    padding: 4px 11px;
    border-radius: 20px;
    margin-top: 14px;
    margin-bottom: 10px;
    backdrop-filter: blur(4px);
}

.edu-card-title {
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -.02em;
}

.edu-card-desc {
    font-size: .85rem;
    color: rgba(255, 255, 255, .78);
    line-height: 1.7;
    margin: 20px 0 16px 0;
}

.edu-card-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .45);
    padding-bottom: 2px;
    transition: gap .3s ease, border-color .3s ease;
    margin-bottom: 4px;
}

.edu-card:hover .edu-card-more {
    gap: 12px;
    border-color: #fff;
}

/* =============================================
   유튜브 섹션
   ============================================= */
.home-youtube-section {
    padding: 100px 0;
    background: #f8f9fb url('../../images/home/youtube_bg.jpg') center / cover no-repeat;
}

.home-yt-inner {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 60px;
    align-items: center;
}

/* 좌측 정보 */
.home-yt-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.home-yt-brand-logo {
    display: block;
    height: 100px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    object-position: left center;
}

.home-yt-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-yt-logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ff0000;
    letter-spacing: -.01em;
}

.home-yt-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 12px;
    letter-spacing: -.02em;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-yt-desc {
    display: block;
    font-size: .9rem;
    color: #666;
    line-height: 1.75;
    margin: 0 0 32px;
    text-decoration: none;
}

.home-yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: #fff;
    background: #1a2a4a;
    border-radius: 4px;
    text-decoration: none;
    transition: background .25s, gap .25s,
                opacity .8s ease-out var(--anim-delay, 0s),
                transform .8s ease-out var(--anim-delay, 0s);
}

.home-yt-btn:hover {
    background: #1a3a8f;
    color: #fff;
    gap: 16px;
}

/* 우측 플레이어 */
.home-yt-player {
    position: relative;
}

.home-yt-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.home-yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease, opacity .4s ease;
}

.home-yt-thumb:hover img {
    transform: scale(1.03);
    opacity: .85;
}

.home-yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
    transition: transform .2s ease;
}

.home-yt-thumb:hover .home-yt-play {
    transform: translate(-50%, -50%) scale(1.12);
}

.home-yt-iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    border: none;
}

.home-yt-placeholder {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #e8e8e8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #aaa;
}

.home-yt-placeholder i {
    font-size: 3rem;
    color: #ff0000;
    opacity: .4;
}

.home-yt-placeholder p {
    font-size: .85rem;
    margin: 0;
}

/* =============================================
   교육신청 CTA 섹션
   ============================================= */
.home-cta-section {
    position: relative;
    padding: 130px 0;
    background-color: #0d1b33;
    background-image: var(--cta-bg, none);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.home-cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(10, 22, 50, .88) 0%,
        rgba(10, 22, 50, .70) 55%,
        rgba(10, 22, 50, .45) 100%
    );
}

.home-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.home-cta-text {
    flex: 1;
}

.home-cta-eyebrow {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 18px;
}

.home-cta-title {
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.03em;
    color: #fff;
    margin: 0;
}

.home-cta-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 34px;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary, #1a3a8f);
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    transition: background .25s, border-color .25s, gap .25s,
                opacity .8s ease-out var(--anim-delay, 0s),
                transform .8s ease-out var(--anim-delay, 0s);
    white-space: nowrap;
}

.home-cta-btn:hover {
    background: transparent;
    border-color: #fff;
    color: #fff;
    gap: 16px;
}

/* =============================================
   장점 섹션
   ============================================= */
.home-advantage-section {
    padding: 110px 0;
    background: #08183a;
    position: relative;
    overflow: hidden;
}

.home-advantage-section .home-section-head p:not(.home-section-eyebrow) {
    color: rgba(255, 255, 255, .55);
}

.home-advantage-section h2 {
    color: #fff;
}

.advantage-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.advantage-card {
    position: relative;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    padding: 44px 36px 40px;
    overflow: hidden;
    transition: background .3s, border-color .3s, transform .3s;
}

.advantage-card::before {
    content: attr(data-num);
    position: absolute;
    top: -8px;
    right: 20px;
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    color: rgba(255, 255, 255, .04);
    pointer-events: none;
    transition: color .3s;
}

.advantage-card:hover {
    background: rgba(255, 255, 255, .08);
    transform: translateY(-4px);
}

.advantage-card:hover::before {
    color: rgba(59, 130, 246, .12);
}

.advantage-card-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.advantage-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #fff;
    color: var(--primary);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(59, 125, 248, .35);
    flex-shrink: 0;
}

.advantage-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.advantage-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -.02em;
    line-height: 1.4;
}

.advantage-desc {
    font-size: .9rem;
    color: rgba(255, 255, 255, .55);
    line-height: 1.85;
    margin: 0;
}

/* =============================================
   둘러보기 갤러리 섹션
   ============================================= */
.home-gallery-section {
    padding: 100px 0;
    background: #fff;
}

/* 탭 네비게이션 */
.gallery-tabs-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.gallery-tab-arrow {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    color: #888;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.gallery-tab-arrow:hover {
    background: #e0e0e0;
    color: #333;
}

.gallery-tabs {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    background: #f0f0f0;
    border-radius: 999px;
}

.gallery-tabs::-webkit-scrollbar { display: none; }

.gallery-tab {
    flex-shrink: 0;
    padding: 15px 25px;
    font-size: .88rem;
    font-weight: 500;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.gallery-tab:hover {
    background: rgba(0,0,0,.0);
    color: #000;
}

.gallery-tab.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

/* 이미지 슬라이드 */
.gallery-slide-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    background: #111;
    overflow: hidden;
    border-radius: 10px;
    margin-top: 0;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: none;
}

.gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 20px;
    text-align: center;
    font-size: .88rem;
    color: rgba(255, 255, 255, .85);
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.65) 40%, rgba(0,0,0,0) 100%);
    margin: 0;
}

/* =============================================
   반응형
   ============================================= */
@media (min-width: 600px) and (max-width: 1024px) {
    .home-edu-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 599px) {
    .home-edu-cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .pv {display: none;}

    .hero-slider {
        height: calc(100svh - var(--header-height));
        min-height: 480px;
        max-height: none;
    }

    .hero-content {
        padding-bottom: 110px;
    }

    .hero-title {
        font-size: clamp(1.5rem, 6vw, 2.4rem);
    }

    .hero-sub {
        font-size: .82rem;
    }

    .hero-ctrl-btn {
        width: 36px;
        height: 36px;
    }

    .hero-ctrl-prev { left: 14px; }
    .hero-ctrl-next { right: 14px; }

    .hero-scroll-mouse { display: none; }
    .hero-scroll-touch { display: block; }

    .hero-slide::before {
        background-image: var(--hero-bg-m, var(--hero-bg));
    }

    /* 유튜브 섹션 모바일 */
    .home-youtube-section {
        padding: 64px 0;
    }

    .home-yt-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* CTA 섹션 모바일 */
    .home-cta-section {
        padding: 72px 0;
    }

    .home-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }

    /* 장점 섹션 모바일 */
    .home-advantage-section {
        padding: 72px 0;
    }

    .advantage-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 40px;
    }

    .advantage-card {
        padding: 32px 28px;
    }

    .advantage-card::before {
        font-size: 5rem;
    }

    .advantage-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        border-radius: 12px;
    }

    /* 교육 카드 모바일 */
    .home-education-section {
        padding: 64px 0;
    }

    /* 모바일: reveal 항상 펼침 */
    .edu-card-reveal {
        max-height: 130px;
    }

    .edu-card-body {
        padding: 0 22px 24px;
    }

    .edu-card-tag {
        margin-top: 10px;
        margin-bottom: 8px;
    }

    .edu-card-title {
        font-size: 1.3rem;
    }

    .edu-card-desc {
        font-size: .85rem;
    }

}

@media (max-width: 480px) {
    .hero-ctrl-btn {
        display: none;
    }

    .home-gallery-section {
        padding-top: 64px;
    }

    .gallery-slide-wrap {
        aspect-ratio: 16 / 8;
    }

    .gallery-tab {
        font-size: .75rem;
    }

    .gallery-tab-arrow {
        width: 36px;
    }

    .gallery-caption {
        font-size: .8rem;
        line-height: 1.2;
    }

    .home-yt-brand-logo {
        height: 80px;
    }

    .home-yt-desc {
        font-size: .8rem;
    }
}
