/* ==========================================
   1. 보안 및 포털 모드 기본 스타일 (유지)
   ========================================== */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #F8F4EC;
    font-family: 'Noto Sans KR', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.iframe-container {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: calc(100% + 50px);
    border: none;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F8F4EC;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #0A1628;
    border-top: 5px solid #C9A84C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ==========================================
   2. 파텍 필립 스타일 모바일 중심 랜딩 페이지 디자인 시스템
   ========================================== */
:root {
    --pt-navy: #0A1628;      /* Primary */
    --pt-gold: #C9A84C;      /* Accent */
    --pt-cream: #F8F4EC;     /* Background */
    --pt-white: #FFFFFF;     
    --pt-muted: #64748B;
    --pt-border: rgba(201, 168, 76, 0.25);
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 홈페이지 스냅 컨테이너 */
#homepageView {
    display: none;
    width: 100%;
    height: 100dvh; /* 100vh → 100dvh: 모바일 주소창/하단바 제외한 실제 뷰포트 높이 */
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    background-color: var(--pt-cream);
    color: var(--pt-navy);
    position: relative;
    scrollbar-width: none;
}
#homepageView::-webkit-scrollbar {
    display: none;
}

/* 개별 스냅 섹션 */
.homepage-section {
    width: 100%;
    height: 100dvh; /* 100vh → 100dvh: 모바일 실제 뷰포트 높이 추종 */
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    box-sizing: border-box;
}

/* 백그라운드 영상 스타일 */
.section-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* 좌측 영역에 글자 가독성을 보장하기 위한 30-40% 폭의 미세 비네팅 그라데이션 */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 22, 40, 0.6) 0%, rgba(10, 22, 40, 0.3) 35%, rgba(10, 22, 40, 0) 75%);
    z-index: 2;
    pointer-events: none;
}

/* 2-3줄 카드형 요약문 컴포넌트 (박스 스타일 전면 투명화) */
.editorial-card {
    position: absolute;
    bottom: 60px;
    left: 80px;
    z-index: 10;
    max-width: 440px;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: var(--transition-smooth);
    text-align: left;
    transform: translateY(0);
}
.editorial-card:hover {
    transform: translateY(-2px);
}

.card-badge {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--pt-gold);
    text-transform: uppercase;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--pt-gold);
    padding-bottom: 2px;
}

.card-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--pt-cream);
    margin: 0 0 12px 0;
    word-break: keep-all;
    text-shadow: 0 2px 10px rgba(10, 22, 40, 0.85), 0 1px 3px rgba(10, 22, 40, 0.95);
}

.card-text {
    font-family: 'Noto Serif KR', serif;
    font-size: 14px;
    line-height: 1.85;
    color: rgba(248, 244, 236, 0.9);
    margin: 0 0 22px 0;
    word-break: keep-all;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 10px rgba(10, 22, 40, 0.85), 0 1px 3px rgba(10, 22, 40, 0.95);
}

/* 더 알아보기 링크 버튼 (고급 크림/골드 캡슐형 단독 버튼 박스) */
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Serif KR', serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--pt-navy);
    background-color: var(--pt-cream);
    border: 1px solid var(--pt-gold);
    border-radius: 30px;
    padding: 10px 22px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(10, 22, 40, 0.25);
    transition: var(--transition-smooth);
    text-transform: uppercase;
}
.btn-more i {
    transition: transform 0.3s ease;
    color: var(--pt-gold);
}
.btn-more:hover {
    background-color: var(--pt-gold);
    color: var(--pt-navy);
    border-color: var(--pt-navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
}
.btn-more:hover i {
    transform: translateX(4px);
    color: var(--pt-navy);
}

/* ==========================================
   3. 상시 고정 UI 컴포넌트 (네비게이터 & CTA)
   ========================================== */
/* 좌측 세로 네비게이터 */
.fixed-left-nav {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(248, 244, 236, 0.85);
    border: 1px solid var(--pt-border);
    padding: 24px 14px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(10, 22, 40, 0.05);
    list-style: none;
    margin: 0;
}
.nav-item {
    font-family: 'Noto Serif KR', serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--pt-navy);
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.1em;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}
.nav-item::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--pt-gold);
    border-radius: 50%;
    opacity: 0.3;
    transition: var(--transition-smooth);
}
.nav-item:hover, .nav-item.active {
    color: var(--pt-gold);
}
.nav-item.active::after {
    opacity: 1;
    transform: scale(1.5);
}

/* 우측 세로 CTA 배너 */
.fixed-right-cta {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cta-btn {
    background: var(--pt-navy);
    color: var(--pt-cream);
    border: 1px solid var(--pt-gold);
    padding: 18px 10px;
    border-radius: 20px;
    font-family: 'Noto Serif KR', serif;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.1em;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(10, 22, 40, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cta-btn:hover {
    background: var(--pt-gold);
    color: var(--pt-navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.3);
}
.cta-btn.highlight {
    background: var(--pt-gold);
    color: var(--pt-navy);
    border-color: var(--pt-navy);
}
.cta-btn.highlight:hover {
    background: var(--pt-navy);
    color: var(--pt-gold);
    border-color: var(--pt-gold);
}

/* 헤더 브랜드 로고 */
.fixed-brand-header {
    position: fixed;
    top: 24px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}
.brand-logo {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--pt-cream);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(10, 22, 40, 0.4);
    pointer-events: auto;
    cursor: pointer;
}
.brand-logo span {
    color: var(--pt-gold);
}

/* ==========================================
   4. 특정 섹션 개별 디자인
   ========================================== */
/* Section 1 Hero */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 90%;
    max-width: 600px;
}
.hero-crest {
    font-size: 14px;
    color: var(--pt-gold);
    margin-bottom: 20px;
    letter-spacing: 5px;
    opacity: 0.8;
}
.hero-title-main {
    font-family: 'Noto Serif KR', serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--pt-cream);
    margin: 0;
    word-break: keep-all;
    text-shadow: 0 2px 20px rgba(10, 22, 40, 0.6);
    letter-spacing: -0.02em;
}
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--pt-cream);
    font-size: 12px;
    font-family: 'Playfair Display', serif;
    letter-spacing: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
}
.hero-scroll-indicator i {
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* Section 5 Reviews (카카오톡 말풍선) */
.reviews-container {
    width: 85%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 60px;
    z-index: 10;
}
.review-bubble-card {
    background: rgba(248, 244, 236, 0.96);
    border: 1px solid var(--pt-border);
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(10, 22, 40, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    transform: translateY(0);
    transition: var(--transition-smooth);
}
.review-bubble-card:hover {
    transform: translateY(-2px);
    border-color: var(--pt-gold);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pt-navy);
    color: var(--pt-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.chat-sender {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pt-navy);
}

.chat-bubble {
    background: var(--pt-white);
    border: 1px solid rgba(201, 168, 76, 0.2);
    color: var(--pt-navy);
    padding: 10px 14px;
    border-radius: 0 14px 14px 14px;
    font-size: 12.5px;
    line-height: 1.6;
    max-width: 90%;
    align-self: flex-start;
    position: relative;
    text-align: left;
    font-family: 'Noto Serif KR', serif;
    box-shadow: 0 2px 8px rgba(10, 22, 40, 0.03);
}
.chat-bubble::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 6px solid rgba(201, 168, 76, 0.2);
    border-left: 6px solid transparent;
}
.chat-bubble::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 6px solid var(--pt-white);
    border-left: 6px solid transparent;
}

.chat-summary {
    font-family: 'Noto Serif KR', serif;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--pt-muted);
    text-align: left;
    border-left: 2px solid var(--pt-gold);
    padding-left: 10px;
    margin: 4px 0 0 0;
}

/* ==========================================
   5. "오시는 길" 팝업 모달
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.location-modal {
    background: var(--pt-cream);
    border: 1px solid var(--pt-gold);
    border-radius: 24px;
    width: 90%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(10, 22, 40, 0.15);
    position: relative;
    transform: translateY(30px);
    transition: var(--transition-smooth);
    box-sizing: border-box;
}
.modal-overlay.active .location-modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--pt-navy);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.modal-close:hover {
    color: var(--pt-gold);
    transform: rotate(90deg);
}

.modal-crest {
    font-size: 11px;
    color: var(--pt-gold);
    letter-spacing: 3px;
    margin-bottom: 12px;
    text-align: center;
}
.modal-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--pt-navy);
    margin: 0 0 24px 0;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.map-placeholder {
    width: 100%;
    height: 180px;
    background: #EAE6DF;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif KR', serif;
    font-size: 12.5px;
    color: var(--pt-muted);
    overflow: hidden;
    position: relative;
}
.map-placeholder iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.info-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.info-row i {
    color: var(--pt-gold);
    font-size: 14px;
    margin-top: 4px;
}
.info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--pt-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.info-value {
    font-family: 'Noto Serif KR', serif;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--pt-navy);
}
.info-value strong {
    font-weight: 700;
}
.info-note {
    font-size: 11px;
    color: var(--pt-muted);
    margin-top: 2px;
}

.modal-footer {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-modal-action {
    background: var(--pt-navy);
    color: var(--pt-cream);
    border: 1px solid var(--pt-gold);
    padding: 12px;
    border-radius: 12px;
    font-family: 'Noto Serif KR', serif;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}
.btn-modal-action:hover {
    background: var(--pt-gold);
    color: var(--pt-navy);
}

/* Hero Online Class Button Styling */
.hero-online-class-btn {
    display: inline-block;
    padding: 16px 36px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #0A1628;
    background: linear-gradient(135deg, #F3E7C4, #C9A84C);
    border: 1px solid #C9A84C;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
    transition: all 0.3s ease;
    pointer-events: auto;
}
.hero-online-class-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.6);
    background: linear-gradient(135deg, #C9A84C, #F3E7C4);
    color: #0A1628;
}

/* ==========================================
   6. 반응형 및 뷰포트 최적화
   ========================================== */
@media (max-width: 768px) {
    .hero-online-class-btn-container {
        top: 75px !important;
    }
    .hero-online-class-btn {
        padding: 12px 24px;
        font-size: 13px;
    }
    .fixed-left-nav {
        left: 12px;
        padding: 16px 8px;
    }
    .fixed-right-cta {
        right: 12px;
    }
    .nav-item {
        font-size: 10px;
        padding: 6px 0;
    }
    .cta-btn {
        padding: 14px 8px;
        font-size: 10px;
    }
    .editorial-card {
        left: 64px;
        right: 64px;
        bottom: max(60px, calc(env(safe-area-inset-bottom) + 20px)); /* safe area 반영 */
        max-width: none;
        padding: 0;
    }
    .card-title {
        font-size: 18px;
    }
    .card-text {
        font-size: 13px;
        line-height: 1.75;
    }
    .hero-title-main {
        font-size: 24px;
        line-height: 1.6;
    }
    .reviews-container {
        width: 70%;
        margin-left: 64px;
        margin-right: 64px;
        margin-bottom: 60px;
    }
    .review-bubble-card {
        padding: 14px;
    }
    .chat-bubble {
        font-size: 11.5px;
        padding: 8px 12px;
    }
    .chat-summary {
        font-size: 11.5px;
    }
}
