@charset "utf-8";

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    overflow-x: hidden;
}

/* 모든 페이지에 적용되는 공통 body 스타일 */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 랜딩 컨테이너 스타일 (전체 화면 배경 이미지 및 정렬 담당) */
.landing-container {
    /* css 폴더에서 상위 폴더로 나간 뒤 image 폴더의 landing.png를 가리킵니다 */
    background-image: url('../image/landing.webp');
    background-size: cover;
    /* 이미지가 화면 비율에 맞게 꽉 차도록 설정 */
    background-position: center;
    /* 이미지가 화면 중앙에 위치하도록 설정 */
    background-repeat: no-repeat;
    /* 이미지가 바둑판식으로 반복되지 않도록 설정 */
    background-attachment: fixed;
    /* 스크롤을 내려도 배경 이미지는 고정되도록 설정 */

    /* 화면 전체를 가득 채우도록 설정 */
    width: 100%;
    min-height: 100vh;
    /* check */
    box-sizing: border-box;

    /* 가운데 정렬 레이아웃 설정 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
    /* check : 로고와 버튼 사이의 세로 여백 */

    /* 세로 위치를 조금만 위로 이동시키기 위해 하단에 여백(Padding)을 더 높게 부여 */
    padding: 20px 20px 100px 20px;
    text-align: center;
}

/* 로고 이미지 스타일 */
.landing-logo {
    width: 85%;
    /* 모바일 등 좁은 화면에서의 비율 */
    max-width: 600px;
    /* 데스크톱 등 넓은 화면에서 비정상적으로 커지지 않도록 상한선 제한 */
    height: auto;
    /* 진입 후 부드럽게 위아래로 부유하는 루프 애니메이션 */
    animation: fadeInDown 1.2s cubic-bezier(0.25, 1, 0.5, 1) both,
               logoFloat   3.5s ease-in-out               1.2s infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px);   }
    50%       { transform: translateY(-12px); }
}

/* 버튼 이미지 감싸는 링크 스타일 */
.landing-btn-link {
    display: inline-block;
    cursor: pointer;
    width: 55%;
    /* 모바일 등 좁은 화면에서의 비율 */
    max-width: 300px;
    /* 데스크톱 등 넓은 화면에서 비정상적으로 커지지 않도록 상한선 제한 */
    /* 화면 진입 시 위로 솟아오르는 부드러운 애니메이션 */
    animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) both;
    animation-delay: 0.3s;
    /* 로고가 먼저 나오고 버튼이 살짝 늦 나오게도록 딜레이 */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease;
}

/* 버튼에 마우스 올렸을 때의 프리미엄 반응 효과 */
.landing-btn-link:hover {
    transform: translateY(-5px) scale(1.04);
    /* 살짝 위로 올라가면서 커짐 */
    filter: brightness(1.08) drop-shadow(0 8px 15px rgba(0, 0, 0, 0.3));
}

.landing-btn-link:active {
    transform: translateY(-2px) scale(0.98);
    /* 클릭 시 살짝 눌리는 물리적 느낌 */
}

/* 버튼 이미지 스타일 */
.landing-btn {
    max-width: 100%;
    height: auto;
    display: block;
    /* 진입 후 살짝 커졌다 작아지는 호흡 애니메이션 */
    animation: btnBreath 2.8s ease-in-out 1.5s infinite;
}

/* 호버·클릭 시 호흡 중단 — 부모의 hover 효과가 명확하게 살아남도록 */
.landing-btn-link:hover .landing-btn,
.landing-btn-link:active .landing-btn {
    animation: none;
}

@keyframes btnBreath {
    0%, 100% { transform: scale(1);    }
    50%       { transform: scale(1.05); }
}

/* 애니메이션 정의 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 메인 페이지 상단 비주얼 영역 스타일 */
.main-top-box {
    width: 100%;
    height: auto;
    aspect-ratio: 3000 / 1565;
    min-height: 420px;
    max-height: 860px;
    box-sizing: border-box;

    background-image: url('../image/main_top_bg.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 이야기(story) 페이지 전용 상단 배경 이미지 */
.main-top-box.story-bg {
    background-image: url('../image/story_top_bg.webp');
}

/* 출판 언어(lang) 페이지 전용 상단 배경 이미지 */
.main-top-box.lang-bg {
    background-image: url('../image/lang_top_bg.webp');
}

/* 선교 후원(support) 페이지 전용 상단 배경 이미지 */
.main-top-box.support-bg {
    background-image: url('../image/support_top_bg.webp');
}

/* 유튜브(video) 페이지 전용 상단 배경 이미지 */
.main-top-box.video-bg {
    background-color: var(--primary-color);
    background-image: url('../image/video_top_bg.webp');
}

/* ==========================================
   메인 페이지 상단 헤더 영역 스타일 (GNB)
   ========================================== */

/* 헤더 바깥 레이어 (배경 박스 위에 자연스럽게 얹어짐) */
.main-header {
    width: 100%;
    position: absolute;
    /* 메인 탑 박스 이미지 위에 투명하게 오버레이 */
    top: 0;
    left: 0;
    z-index: 100;
}

/* 헤더 내부 컨테이너 (좌우 정렬 및 최대 가로폭 제어) */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    /* 로고는 왼쪽, 메뉴는 오른쪽 배치 */
    align-items: center;
}

/* 로고 이미지 스타일 */
.header-logo {
    width: 200px;
    /* 요청사항: 넓이 300px 정도 */
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-link:hover .header-logo {
    transform: scale(1.02);
    /* 마우스 오버 시 로고 미세 반응형 확대 */
}

/* 메뉴 리스트 (ul) 스타일 */
.nav-list {
    display: flex;
    list-style: none;
    gap: 50px;
    /* 메뉴 항목 간의 간격 */
    margin: 0;
    padding: 0;
}

/* 개별 메뉴 항목 (a) 기본 스타일 */
.nav-item {
    display: inline-block;
    padding: 5px 24px;
    background-color: #EDF7ED;
    /* 요청사항: 배경색 #EDF7ED */
    color: #247D24;
    /* 요청사항: 텍스트 색상 #247D24 */
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 50px;
    /* 완벽하게 둥근 원형(캡슐형) 모서리 적용 */
    border: 2px solid #EDF7ED;
    /* 호버 시 흔들림 방지용 보더 미리 지정 */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* 색상 반전 및 효과 부드럽게 지정 */
}

/* 마우스 오버 시 색상 반전 효과 */
.nav-item:hover {
    background-color: #247D24;
    /* 요청사항: 호버 시 배경색 반전 (#247D24) */
    color: #EDF7ED;
    /* 요청사항: 호버 시 텍스트 색상 반전 (#EDF7ED) */
    border-color: #247D24;
    transform: translateY(-2px);
    /* 부드럽게 위로 들리는 프리미엄 효과 */
    box-shadow: 0 6px 12px rgba(36, 125, 36, 0.25);
    /* 매끄러운 섀도우 효과 */
}

/* 마우스 클릭 시 */
.nav-item:active {
    transform: translateY(0);
}

/* 현재 페이지에 해당하는 메뉴 버튼에 적용되는 활성화(Active) 상태 스타일 */
.nav-item.active {
    background-color: #247D24; /* 배경색 반전 */
    color: #EDF7ED;            /* 글자색 반전 */
    border-color: #247D24;
    cursor: default;           /* 현재 페이지이므로 클릭 커서 해제 */
}

/* ==========================================
   메인 소개 페이지 하단 본문 콘텐츠 영역
   ========================================== */

/* 하단 전체 영역 (이미지들이 세로 방향으로 나열되도록 설정) */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 200px;
    /* 차례대로 배치된 이미지들 사이의 적당하고 시원한 세로 여백 */
    padding: 180px 20px 140px 20px;
    /* 위아래 및 좌우 안쪽 여백 */
    background-color: #ffffff;
    /* 깔끔하고 선명한 흰색 배경 지정 */
    width: 100%;
    box-sizing: border-box;
}

/* 개별 이미지 아이템을 감싸는 박스 */
.content-item {
    width: 100%;
    max-width: 1000px;
    /* 넓은 모니터에서도 이미지가 너무 늘어나 깨지지 않도록 제한 */
    display: flex;
    justify-content: center;
}

/* 소개 이미지 스타일 */
.content-img {
    max-width: 100%;
    /* 반응형 동작을 위해 100% 너비 */
    height: auto;
    display: block;
    border-radius: 16px;
    /* 부드러운 인상을 주는 둥근 모서리 */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 마우스 호버 시 자연스럽게 떠오르는 미크로 인터랙션 */
.content-img:hover {
    transform: translateY(-8px);
    /* 살짝 위로 들어 올려짐 */
}

/* ==========================================
   첫 번째 소개 콘텐츠 전용 타이틀 & 텍스트 스타일
   ========================================== */

/* 텍스트 문구가 함께 포함되는 콘텐츠 아이템 스타일 */
.content-item.with-text {
    flex-direction: column;
    align-items: center;
    gap: 48px;
    /* 문구 상자와 이미지 사이의 적당한 세로 여백 */
}

/* 타이틀과 서브텍스트를 감싸는 텍스트 박스 */
.content-header-text {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

/* H1 메인 타이틀 스타일 */
.main-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 48px;
    font-weight: 700;
    /* Bold */
    color: #3EB23E;
    /* 요청사항: 색상 #3EB23E */
    margin: 0 0 24px 0;
    line-height: 1.3;
    letter-spacing: -1px;
}

/* 본문 서브 텍스트 스타일 */
.main-sub-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 400;
    /* Regular */
    color: #333333;
    /* 요청사항: 색상 #333333 */
    line-height: 1.7;
    margin: 0;
}

/* ==========================================
   두 번째 콘텐츠 전용 스택(Overlay) 레이아웃 스타일
   ========================================== */

/* 이미지 위에 텍스트 박스를 3D Layer(Stack) 형태로 포개어 얹는 설정 */
.content-item.stacked {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* 이미지의 세로/가로 정중앙 배치 */
    overflow: hidden;
    /* 이미지 확대 시 테두리 밖 탈출 방지 */
    border-radius: 16px;
    /* 이미지 모서리와 동일한 라운딩 지정 */
}

/* 스택 레이아웃 하에서의 이미지 기본 설정 */
.content-item.stacked .content-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    /* 호버 시 시네마틱 줌 효과를 위한 부드러운 전환 */
}

/* 스택 레이아웃 하에서 텍스트 박스를 이미지 정가운데 위로 띄움 (오버레이) */
.content-item.stacked .content-header-text {
    position: absolute;
    z-index: 10;

    /* 텍스트 배경을 완전히 투명하게 설정 */
    background: transparent;
    padding: 0;

    /* 배치 규격 조절: 이미지 오른쪽 끝선에 맞추되, 안전 여백 40px 부여 */
    right: 40px;

    /* [반응형 짤림 방지 핵심] 화면이 좁아지면 가로 가득 채우며 좌우 40px씩 여백 확보, 넓을 땐 620px 상한선 작동 */
    width: calc(100% - 80px);
    max-width: 620px;

    /* 글자 정렬을 오른쪽 끝으로 지정하여 끝선을 일치시킴 */
    text-align: right;
    box-sizing: border-box;

    /* 오버 시의 부유 모션 전환 효과 */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 마우스 오버 시 입체 텍스트가 더욱 부드럽게 위로 솟아오르는 효과 */
.content-item.stacked:hover .content-header-text {
    transform: translateY(-8px) scale(1.02);
    /* 가볍게 수직 상승 및 2% 스케일업 */
}

/* 마우스 오버 시 배경 이미지가 부드럽게 줌인(Zoom-in)되는 시네마틱 효과 */
.content-item.stacked:hover .content-img {
    transform: scale(1.03);
    /* 이미지를 3% 확대 */
}

/* ==========================================
   세 번째 콘텐츠 전용 왼쪽 스택(Overlay) 레이아웃 스타일
   ========================================== */
.content-item.stacked.left-stacked .content-header-text {
    right: auto;
    /* 기존의 우측 정렬 속성 초기화 */
    left: 40px;
    /* 이미지 왼쪽 끝선에 배치하며 안전 여백 40px 부여 */
    text-align: left;
    /* 글자 정렬을 왼쪽 정렬로 전환하여 끝선 일치 */
    margin-top: -50px;
    /* 요청사항: 문구 1, 2의 세로 위치를 살짝 위로 이동 */
}

/* ==========================================
   에피소드 소개 아티클 영역 (4단 그리드 배너)
   ========================================== */

.episode-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 40px 160px 40px;
    /* 시원하고 정돈된 여백 */
    box-sizing: border-box;
}

/* 섹션 헤더 스타일 */
.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 38px;
    font-weight: 700;
    /* Bold */
    color: #222222;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: #3EB23E;
    /* 브랜드 메인 연두색 계열과 통일 */
    margin: 0;
    letter-spacing: 0.5px;
}

/* 배너 그리드 레이아웃 (가로 4단 구성) */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4열 배치 */
    gap: 30px;
    /* 카드 사이 간격 */
}

/* 개별 배너 카드 */
.banner-card {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    /* 링크로 쓰일 경우 대비 */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 세로형 배너 이미지 랩퍼 */
.banner-img-wrap {
    width: 100%;
    max-width: 340px;
    /* 요청사항: 가로 340px 기준 지정 */
    height: 350px;
    /* 요청사항: 세로 467px 기준 지정 */
    margin: 0 auto;
    /* 카드 너비가 340px보다 좁아질 때 가로 중앙 정렬 확보 */
    overflow: hidden;
    border-radius: 20px;
    /* 이미지 랩에만 동글동글 라운드 처리 */
    background-color: #f7f7f7;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    /* 아주 투명하고 자연스러운 섀도우 */
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 세로비 왜곡 없이 꽉 차게 */
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 카드 정보 텍스트 */
.banner-info {
    padding: 24px 8px 10px 8px;
    /* 이미지 아래 텍스트 정돈 여백 */
    text-align: center;
}

.banner-title {
    color: var(--second-color);
    /* second color (#3EB23E) 연동 */
    margin: 0 0 12px 0;
}

.banner-desc {
    color: var(--text-color);
    /* --text-color (#333333) 연동 */
    margin: 0;
}

/* 마우스 호버 시의 세련된 다차원 인터랙션 */
.banner-card:hover {
    transform: translateY(-8px);
    /* 카드가 사뿐히 위로 부유 */
}

.banner-card:hover .banner-img-wrap {
    /* 오버 시 브랜드 메인 색상(#3EB23E) 계열의 미세한 오라 섀도우 연출 */
    box-shadow: 0 20px 40px rgba(62, 178, 62, 0.14);
}

.banner-card:hover .banner-img {
    transform: scale(1.04);
    /* 이미지가 미세 줌인 */
}

.mobile-br { display: none; }

/* 반응형 미디어 쿼리 (태블릿 및 모바일 완벽 대응) */
@media (max-width: 1024px) {
    .banner-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 태블릿 등 중형 뷰포트에서는 2열 배치 */
        gap: 24px;
    }

    .section-title {
        font-size: 32px;
    }

    .episode-section {
        padding: 100px 30px 120px 30px;
    }

    .banner-img-wrap {
        height: auto;
        /* 태블릿 뷰포트에서 고정 높이 467px 해제 */
        aspect-ratio: 340 / 467;
        /* 340:467 비율 그대로 자동 유연 스케일 */
    }
}

@media (max-width: 580px) {
    .banner-grid {
        grid-template-columns: 1fr;
        /* 스마트폰 등 모바일 뷰포트에서는 1열 배치 */
        gap: 36px;
    }

    .episode-section {
        padding: 80px 20px 100px 20px;
    }

    .section-title {
        font-size: 28px;
    }

    .banner-info {
        padding: 16px 8px 0 8px;
    }

    .banner-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .banner-img-wrap {
        height: auto;
        /* 모바일 뷰포트에서 고정 높이 467px 해제 */
        aspect-ratio: 340 / 467;
        /* 340:467 비율 그대로 자동 유연 스케일 */
    }
}

/* ==========================================
   글로벌 푸터 영역 스타일 (이미지 짤림 방지 및 풀스크린 렌더링)
   ========================================== */

/* index.html을 제외한 다른 페이지의 맨 하단에 꽉 차게 렌더링 */
.main-footer {
    width: 100%;
    overflow: hidden; /* 영역 밖으로 튀어나오는 것을 미연에 방지 */
}

/* 푸터 이미지 본래 종횡비를 유지하며 화면 가로폭에 맞게 채움 */
.footer-img {
    width: 100%;
    height: auto;
    display: block; /* 하단 미세 여백 제거 */
}


/* ==========================================
   상단으로 이동 버튼 (공통)
   ========================================== */

.scroll-top-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid rgba(36, 125, 36, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease,
                transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    box-shadow: 0 8px 24px rgba(36, 125, 36, 0.22);
    transform: translateY(-3px);
}

.scroll-top-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 플로팅 햄버거 메뉴 버튼 (모바일 전용) */
.floating-menu-btn {
    display: none;
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid rgba(36, 125, 36, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease,
                transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-menu-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-menu-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.floating-menu-btn .icon-close {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
}
.floating-menu-btn .icon-hamburger {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}
.floating-menu-btn.open .icon-hamburger {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.5);
}
.floating-menu-btn.open .icon-close {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.floating-menu-btn:hover {
    box-shadow: 0 8px 24px rgba(36, 125, 36, 0.22);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .scroll-top-btn {
        display: none !important;
    }

    .floating-menu-btn {
        display: flex;
    }
}


/* ==========================================
   모바일 최적화
   ========================================== */

/* 햄버거 버튼 (데스크톱에서는 숨김) */
.header-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 38px;
    height: 38px;
    position: relative;
    z-index: 200;
}

.header-menu-toggle svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    stroke: var(--primary-color);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.header-menu-toggle .icon-close {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
}
.header-menu-toggle .icon-hamburger {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}
.header-menu-toggle.open .icon-hamburger {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.5);
}
.header-menu-toggle.open .icon-close {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

@media (max-width: 768px) {
    .mobile-br { display: inline; }

    /* GNB */
    .header-container {
        padding: 18px 24px;
    }

    .header-logo {
        width: 140px;
    }

    /* 헤더 바가 오버레이 위에 보이도록 z-index 상향 */
    .main-header {
        z-index: 160;
    }

    .header-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 풀스크린 오버레이 */
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(237, 247, 237, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        z-index: 150;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .header-nav.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0;
        align-items: center;
    }

    .nav-list li {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .header-nav.open .nav-list li:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
    .header-nav.open .nav-list li:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.10s; }
    .header-nav.open .nav-list li:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
    .header-nav.open .nav-list li:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.20s; }
    .header-nav.open .nav-list li:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }

    .nav-item {
        display: block;
        background: none;
        border: none;
        border-radius: 0;
        padding: 18px 0;
        font-size: 26px;
        font-weight: 700;
        color: var(--primary-color);
        text-align: center;
        letter-spacing: -0.5px;
        box-shadow: none;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .nav-item:hover {
        background: none;
        border: none;
        color: var(--second-color);
        box-shadow: none;
        transform: translateY(-2px);
    }

    .nav-item.active {
        color: var(--second-color);
        background: none;
        border: none;
        cursor: default;
    }

    /* 히어로 배경 → 모바일 전용 이미지로 교체 */
    .main-top-box {
        height: auto;
        aspect-ratio: 750 / 880;
        background-image: url('../image/main_top_bg_mobile.webp');
    }

    .main-top-box.story-bg {
        background-image: url('../image/story_top_bg_mobile.webp');
        aspect-ratio: 750 / 880;
    }

    .main-top-box.lang-bg {
        background-image: url('../image/lang_top_bg_mobile.webp');
        aspect-ratio: 750 / 880;
    }

    .main-top-box.support-bg {
        background-image: url('../image/support_top_bg_mobile.webp');
        aspect-ratio: 750 / 880;
    }

    .main-top-box.video-bg {
        background-image: url('../image/video_top_bg_mobile.webp');
        aspect-ratio: 750 / 880;
    }

    /* 랜딩 배경 → 모바일 전용 이미지 + fixed 제거 */
    .landing-container {
        background-image: url('../image/landing_mobile.webp');
        background-attachment: scroll;
    }

    /* 히어로 타이틀 */
    .page-hero-title {
        font-size: 52px;
        -webkit-text-stroke: 5px #ffffff;
    }

    /* main.html 콘텐츠 */
    .main-content {
        gap: 80px;
        padding: 80px 20px;
    }

    /* stacked 오버레이 → 세로 스택 전환 */
    .content-item.stacked {
        flex-direction: column;
        overflow: visible;
    }

    .content-item.stacked .content-header-text {
        position: static;
        width: 100%;
        max-width: 100%;
        text-align: center;
        right: auto;
        left: auto;
        margin-top: 0;
    }

    .content-item.stacked.left-stacked .content-header-text {
        left: auto;
        text-align: center;
        margin-top: 0;
    }

    .content-item.stacked:hover .content-header-text {
        transform: none;
    }
}

@media (max-width: 480px) {
    /* 히어로 타이틀 */
    .page-hero-title {
        font-size: 52px;
        -webkit-text-stroke: 4px #ffffff;
    }

    .page-hero-sub {
        font-size: 15px;
    }
}


/* ==========================================
   서브 페이지 공통 스타일
   ========================================== */

/* 상단 히어로 비주얼 영역 오버레이 텍스트 */
.page-hero-text {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 10;
}

.page-hero-title {
    color: var(--primary-color);
    -webkit-text-stroke: 8px #ffffff;
    paint-order: stroke fill;
    margin: 0 0 14px 0;
}

.page-hero-sub {
    color: var(--text-color);
    margin: 0;
}

/* 서브 페이지 메인 컨테이너 */
.sub-main {
    background-color: #ffffff;
    width: 100%;
}

/* 공통 인트로 소개 텍스트 섹션 */
.sub-intro-section {
    padding: 100px 40px 80px 40px;
    text-align: center;
    background-color: #ffffff;
}

.sub-intro-inner {
    max-width: 760px;
    margin: 0 auto;
}

.sub-intro-title {
    color: var(--primary-color);
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.sub-intro-desc {
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
}


/* ==========================================
   공통 CTA 섹션 (story, lang, support 공통)
   ========================================== */

.page-cta-inner {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 72px;
}

.page-cta-book {
    width: 200px;
    flex-shrink: 0;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.18));
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease;
}

.page-cta-book:hover {
    transform: translateY(-10px) rotate(-2deg);
    filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.22));
}

.page-cta-body {
    flex: 1;
}

.page-cta-label {
    color: #888888;
    margin: 0 0 6px;
}

.page-cta-price {
    color: var(--primary-color);
    margin: 0 0 8px;
    line-height: 1.1;
}

.page-cta-detail {
    color: #999999;
    margin: 0 0 36px;
}

.page-cta-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.page-cta-btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.page-cta-btn--primary {
    background-color: var(--second-color);
    color: #ffffff;
    border: 2px solid var(--second-color);
}

.page-cta-btn--primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(36, 125, 36, 0.28);
}

.page-cta-btn--outline {
    background-color: transparent;
    color: var(--second-color);
    border: 2px solid var(--second-color);
}

.page-cta-btn--outline:hover {
    background-color: var(--second-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62, 178, 62, 0.22);
}

@media (max-width: 860px) {
    .page-cta-inner {
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .page-cta-inner {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .page-cta-btns {
        justify-content: center;
    }

    .page-cta-book {
        width: 160px;
    }
}

@media (max-width: 480px) {
    .page-cta-btns {
        flex-direction: column;
        align-items: center;
    }

    .page-cta-btn {
        width: 100%;
        text-align: center;
        max-width: 280px;
    }
}

/* ==========================================
   스크롤 애니메이션 (Scroll Reveal)
   ========================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 순차적 등장을 위한 딜레이 유틸리티 */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
