﻿@charset "utf-8";

/* ============================================================================
   2025 감사특밤 - 살아나리라  /  메인 페이지
   1. Hero Slider  2. 퀵메뉴(네이비)  3. 강사 카드 그리드(라운드 패널)
   ========================================================================== */

/* ------------------------- 1. Hero Slider ------------------------- */
.cms-hero-section {
    position: relative;
    width: 100%;
    background: var(--gt-navy);
    overflow: hidden;
}
.hero-swiper {
    width: 100%;
    height: auto;
    --swiper-pagination-bullet-width: 1.625rem;
    --swiper-pagination-bullet-height: 1.625rem;
    --swiper-pagination-bullet-horizontal-gap: 0.375rem;
}

.slide-content-wrap { position: relative; display: block; width: 100%; }
.slide-content-wrap p { margin: 0; padding: 0; }
.slide-content-wrap a { display: block; width: 100%; }
.slide-content-wrap img,
.slide-content-wrap video,
.slide-content-wrap iframe { display: block; width: 100%; height: auto; }

/* 슬라이드 문구 (확장변수 slideText 가 있을 때만 출력)
   - 이미지 아래쪽 가운데, 클릭은 뒤의 링크로 통과 */
.cms-hero-text {
    position: absolute;
    left: 0; right: 0; bottom: 14%;
    z-index: 2;
    padding: 0 6%;
    text-align: center;
    pointer-events: none;
}
.cms-hero-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.375rem, 3.2vw, 3rem);
    font-weight: 800;
    line-height: 1.35;
    word-break: keep-all;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

/* 슬라이드가 1장이면 화살표·점·재생버튼 숨김 */
.cms-hero-section.is-single .cms-hero-arrow,
.cms-hero-section.is-single .cms-hero-dots,
.cms-hero-section.is-single .cms-hero-play { display: none !important; }

/* 좌우 화살표 : 시안의 원형 아웃라인 */
.cms-hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    width: 3.25rem; height: 3.25rem;
    color: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.cms-hero-arrow:hover { background: rgba(255, 255, 255, 0.9); border-color: #fff; color: var(--gt-navy); }
.cms-hero-arrow svg { width: 1.5rem; height: 1.5rem; }
.cms-hero-arrow-prev { left: 1.5rem; }
.cms-hero-arrow-next { right: 1.5rem; }

/* 페이지네이션 : 시안은 우측 하단 원형 도트 */
.cms-hero-section .cms-hero-dots,
.cms-hero-section .swiper-horizontal > .cms-hero-dots,
.cms-hero-section .cms-hero-dots.swiper-pagination-horizontal {
    position: absolute;
    left: auto !important;
    right: 2rem;
    bottom: 2rem;
    z-index: 10;
    display: flex; align-items: center; justify-content: flex-end;
    gap: 0.75rem;
    width: auto !important;
    transform: none;
}
.cms-hero-dots .swiper-pagination-bullet {
    width: 1.625rem; height: 1.625rem;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.38) !important;
    border: 3px solid transparent;
    border-radius: 50%;
    opacity: 1 !important;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.cms-hero-dots .swiper-pagination-bullet-active {
    background: rgba(4, 23, 57, 0.55) !important;
    border-color: #fff;
}

/* 슬라이드 자동재생 일시정지 버튼 (고령층-접근성) */
.cms-hero-play {
    position: absolute;
    left: 1.5rem; bottom: 2rem;
    z-index: 11;
    display: flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem;
    color: #fff;
    background: rgba(4, 23, 57, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    transition: background 0.2s ease;
}
.cms-hero-play:hover { background: rgba(4, 23, 57, 0.8); }
.cms-hero-play svg { width: 1.125rem; height: 1.125rem; }

/* ------------------------- 2. 퀵메뉴 ------------------------- */
.cms-quick-section {
    position: relative;
    background: var(--gt-navy);
    padding: 0.875rem 0 3.6875rem;   /* 시안 실측 : 네이비 밴드 높이 234px */
}
.cms-quick-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0;                          /* 시안 : 컨테이너 1350 / 8칸 = 168.75px */
}
.cms-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.25rem;
    border-radius: 1rem;
    transition: background 0.25s ease, transform 0.25s ease;
}
/* hover 는 마우스가 있는 기기에서만 - 터치기기에서 탭 후 스타일이 남는 현상 방지 */
@media (hover: hover) {
    .cms-quick-link:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-0.25rem); }
    .cms-quick-link:hover .cms-quick-icon { transform: scale(1.08); }
}
/* :focus-visible 은 별도 규칙으로 분리 - 미지원 브라우저에서 위 hover 까지 무효가 되지 않도록 */
.cms-quick-link:focus-visible { background: rgba(255, 255, 255, 0.09); transform: translateY(-0.25rem); }

.cms-quick-icon {
    width: 5.875rem;   /* 94px : 시안 실측 */
    height: 5.875rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.cms-quick-label {
    color: #fff;
    font-size: var(--f-quick);
    font-weight: 600;
    letter-spacing: -0.035em;
    text-align: center;
    line-height: 1.3;
}

/* ------------------------- 3. 강사 카드 그리드 ------------------------- */
/* 네이비 밴드 위로 30px 올라타는 흰색 라운드 패널 (시안 실측) */
.cms-speaker-section {
    position: relative;
    z-index: 2;
    margin-top: -1.875rem;   /* 네이비 위로 30px */
    background: transparent;
}
.cms-speaker-panel {
    width: 100%;
    max-width: calc(var(--container) + 4rem);   /* 1350 + 좌우 32px */
    margin: 0 auto;
    padding: 1.75rem 2rem 4.8125rem;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
}
.cms-speaker-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 0.625rem;   /* 10px */
    row-gap: 1.125rem;      /* 18px */
}
.cms-speaker-card {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 0.375rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cms-speaker-card img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.45s ease;
}
@media (hover: hover) {
    .cms-speaker-card:hover {
        transform: translateY(-0.375rem);
        box-shadow: 0 14px 30px rgba(4, 23, 57, 0.22);
    }
    .cms-speaker-card:hover img { transform: scale(1.03); }
}
.cms-speaker-card:focus-visible {
    transform: translateY(-0.375rem);
    box-shadow: 0 14px 30px rgba(4, 23, 57, 0.22);
}

/* ------------------------- Fade Up ------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1440px) {
    .cms-hero-dots { right: 3.5rem; }
}

@media (max-width: 1280px) {
    :root { --f-quick: 1.125rem; }
    .cms-quick-icon { width: 4.75rem; height: 4.75rem; }
}

/* 태블릿 */
@media (max-width: 1024px) {
    .cms-quick-section { padding: 1.5rem 0 3.5rem; }
    .cms-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem 0.5rem; }
    .cms-quick-icon { width: 4.5rem; height: 4.5rem; }

    .cms-speaker-panel { padding: 1.5rem 1.25rem 3rem; border-radius: 1rem 1rem 0 0; }
    .cms-speaker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0.75rem; row-gap: 1rem; }

    .cms-hero-arrow { width: 2.75rem; height: 2.75rem; }
    .cms-hero-section .cms-hero-dots,
    .cms-hero-section .cms-hero-dots.swiper-pagination-horizontal { right: 1.25rem; bottom: 1.25rem; gap: 0.5rem; }
    .cms-hero-dots .swiper-pagination-bullet { width: 1.25rem; height: 1.25rem; }
    .cms-hero-play { left: 1.25rem; bottom: 1.25rem; }
}

/* 모바일 */
@media (max-width: 767px) {
    .cms-quick-section { padding: 1.25rem 0 2.75rem; }
    .cms-quick-link { gap: 0.5rem; padding: 0.625rem 0.125rem; }
    .cms-quick-icon { width: 3.75rem; height: 3.75rem; }
    .cms-quick-label { letter-spacing: -0.05em; }

    .cms-speaker-section { margin-top: -1.25rem; }
    .cms-speaker-panel { padding: 1rem 1rem 2.5rem; }
    .cms-speaker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.625rem; row-gap: 0.75rem; }

    .cms-hero-arrow { display: none; }   /* 모바일은 스와이프 사용 */
    .cms-hero-section .cms-hero-dots,
    .cms-hero-section .cms-hero-dots.swiper-pagination-horizontal { right: 0.875rem; bottom: 0.875rem; gap: 0.4375rem; }
    .cms-hero-dots .swiper-pagination-bullet { width: 1rem; height: 1rem; border-width: 2px; }
    .cms-hero-play { left: 0.875rem; bottom: 0.75rem; width: 2.5rem; height: 2.5rem; }

}

/* 초소형(스마트폰) : 퀵메뉴를 2열 가로형 큰 버튼으로 - 고령층 터치 편의 */
@media (max-width: 480px) {
    .cms-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .cms-quick-link {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.625rem;
        min-height: 4.5rem;
        padding: 0.625rem 0.5rem;
        background: rgba(255, 255, 255, 0.06);
    }
    .cms-quick-icon { width: 2.875rem; height: 2.875rem; flex-shrink: 0; }
    .cms-quick-label {
        min-width: 0;
        text-align: left;
        font-size: var(--p3);
        line-height: 1.25;
        /* 긴 라벨(특밤차량시간표)이 밖으로 삐져나가지 않도록.
           구형 iOS 사파리(<15.4)는 anywhere 를 몰라서 break-word 로 폴백됩니다. */
        overflow-wrap: break-word;
        overflow-wrap: anywhere;
        word-break: break-all;
    }
}

@media (max-width: 359px) {
    .cms-quick-icon { width: 2.5rem; height: 2.5rem; }
    .cms-quick-label { font-size: var(--p4); }
}
