:root {
    --primary: #1F2A44; /* Deep Navy */
    --gold: #D6A85F;    /* Premium Gold */
    --gold-hover: #c4964f;
    --white: #FFFFFF;
    --text-slate: #64748B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

body {
    background: #FFFFFF;
    color: #1E293B;
    line-height: 1.5;
}

/* Typography Details */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.5 !important;
    letter-spacing: -0.02em;
}

.hero-title {
    line-height: 1.4 !important;
    font-weight: 800;
}

/* Glass Nav */
.glass-nav {
    background: rgba(31, 42, 68, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    width: 100%;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gold);
}

/* Buttons */
.btn-gold {
    background: var(--gold) !important;
    color: #FFFFFF !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 1rem !important; /* Unified larger size */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: none !important;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-family: 'Pretendard', sans-serif !important;
    -webkit-appearance: none;
    appearance: none;
}

.btn-gold:hover {
    background: var(--gold-hover);
    transform: scale(1.02);
}

.btn-hero-solid {
    background: var(--gold);
    color: white;
    padding: 1.25rem 3rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s;
}

.btn-hero-solid:hover {
    background: var(--gold-hover);
}

.btn-hero-outline {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1.25rem 3rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--primary);
    text-align: center;
    color: #FFFFFF;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(31, 42, 68, 0.6), rgba(31, 42, 68, 0.85));
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-top: 5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(214, 168, 95, 0.5);
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Wave Divider (Exact Dallant Path) */
.shape-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.shape-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.shape-divider .shape-fill {
    fill: var(--white);
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid #f1f5f9;
    transition: all 0.5s ease;
    text-align: left;
}

.service-card:hover {
    transform: translateY(-15px);
    border-color: var(--gold);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.icon-box {
    background: rgba(31, 42, 68, 0.05);
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: background-color 0.3s;
}

.service-card:hover .icon-box {
    background-color: rgba(214, 168, 95, 0.1);
}

.service-card i {
    color: var(--primary);
    font-size: 2rem;
    transition: color 0.3s;
}

.service-card:hover i {
    color: var(--gold);
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.25rem; }
    .nav-links { display: none; }
    .nav-container { padding: 0 1.5rem; }
}

/* Mobile Menu Styles */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: var(--primary);
    z-index: 2001;
    padding: 2rem 2rem calc(4rem + env(safe-area-inset-bottom)) 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    display: block; /* Changed from flex to block to ensure natural scroll */
    -webkit-overflow-scrolling: touch;
}
.mobile-menu-overlay.active {
    right: 0;
}

.mobile-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    cursor: pointer;
}

.mobile-link {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s;
    display: block; /* Ensure full width */
}
.mobile-link:hover {
    color: var(--gold);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
}

/* =========================================================
   관리자 페이지 모바일 반응형 공통 규칙
   (style.css - Phase 1~2 적용)
   ========================================================= */

/* Phase 1: 모바일 타이포그래피 스케일 (768px 이하) */
@media (max-width: 768px) {
    /* h1: 메인 타이틀 */
    h1 { font-size: 1.375rem !important; }          /* 22px */
    /* h2, h3: 섹션/카드 타이틀 */
    h2 { font-size: 1.125rem !important; }          /* 18px */
    h3 { font-size: 1.0625rem !important; }         /* 17px */
    /* h4, h5: 소제목 */
    h4 { font-size: 0.9375rem !important; }         /* 15px */
    h5 { font-size: 0.875rem !important; }          /* 14px */
    /* body, p: 본문 가독성 최적화 */
    body, p, td, th, li { font-size: 0.875rem; }   /* 14px */
    /* 극소 텍스트 최소 보장 */
    small, .text-xs { font-size: 0.75rem !important; } /* 12px */
}

/* Phase 2: 모달 z-index 최상위 격상
   - 관리자 페이지의 모든 .modal, 팝업 컨테이너가
     상단 GNB(z-index: 9999)보다 반드시 위에 오도록 강제 지정
*/
.modal,
[id$="Modal"],
[id$="-modal"],
[id*="modal"]:not(.modal-overlay) {
    z-index: 99999 !important;
}

/* 모달 딤드 배경 레이어 */
.modal-overlay,
[id$="Overlay"],
[id*="overlay"] {
    z-index: 99998 !important;
}

/* Phase 2: 관리자 main 영역 하단 safe-area 여백
   - 아이폰/안드로이드 하단 바(URL바·홈 인디케이터)에
     마지막 컨텐츠가 가려지는 현상 방지
*/
@media (max-width: 1024px) {
    body.admin-body main,
    main.flex-grow {
        padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }
}
