/* Shared base for all sub-pages */
html {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: #FDFBF6;
  color: #2A1F1A;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* 앵커 클릭 시 sticky nav 가림 방지 (메인 80 + 서브탭 56) */
  scroll-padding-top: 140px;
}
@media (max-width: 1023px) {
  html { scroll-padding-top: 120px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 100px; }
}
/* body overflow-x:hidden 사용 금지 - position:sticky 깨짐. 대신 가로 스크롤 방지는 각 요소에서. */
.font-display { font-family: 'Noto Serif KR', 'Gowun Batang', serif; font-weight: 500; letter-spacing: -0.02em; word-break: keep-all; }
.vline::before { content: ''; display: inline-block; width: 1px; height: 1em; background: currentColor; margin: 0 .8em; vertical-align: middle; opacity: .4; }
.num-eyebrow { font-family: 'Noto Serif KR', serif; font-feature-settings: "tnum"; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform .9s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }
.ornament { width: 40px; height: 1px; background: #B89968; display: inline-block; vertical-align: middle; }
.nav-blur { backdrop-filter: blur(12px); background: rgba(253,251,246,.92); }

/* Page header pattern */
.page-hero {
  position: relative;
  min-height: 360px;
  background: #1F3328;
  display: flex; align-items: center;
  overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(184,153,104,.18), transparent 60%);
}
.section-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1rem 0 2rem;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(184,153,104,.4);
}

/* 한국어 줄바꿈 자연스럽게 */
h1, h2, h3, h4, p, li, span { word-break: keep-all; line-break: strict; }

/* ===========================
   MOBILE OPTIMIZATION
   =========================== */

/* Tap targets - 모든 링크/버튼 최소 44px 확보 */
@media (max-width: 768px) {
  a, button { -webkit-tap-highlight-color: rgba(184,153,104,.15); }
  a[href^="tel:"], a[href^="https://m.booking"], a.cta-btn { min-height: 48px; }
}

/* 모바일 페이지 히어로 - 너무 큰 패딩 줄이기 */
@media (max-width: 640px) {
  .page-hero {
    min-height: 280px;
  }
  .page-hero > div {
    padding-top: 5rem !important;
    padding-bottom: 4rem !important;
  }
  .page-hero h1 {
    font-size: clamp(2rem, 9vw, 3rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 1rem !important;
  }
  .page-hero p {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }
  .page-hero .num-eyebrow {
    margin-bottom: 1rem !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.3em !important;
  }
}

/* 모바일 세션 패딩 보정 - py-24/28/32를 py-16으로 압축 */
@media (max-width: 640px) {
  section.py-24, section.py-28, section.py-32, section.py-36, section.py-40 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
  section.sm\:py-28, section.sm\:py-32, section.sm\:py-36, section.sm\:py-40 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

/* 디스플레이 폰트 모바일 사이즈 보정 */
@media (max-width: 640px) {
  h1.font-display { font-size: clamp(1.875rem, 7vw, 2.5rem); line-height: 1.2; }
  h2.font-display { font-size: clamp(1.625rem, 6.5vw, 2.25rem); line-height: 1.25; }
  h3.font-display { font-size: clamp(1.25rem, 5vw, 1.75rem); line-height: 1.3; }
  .font-display.text-5xl, .font-display.text-6xl { font-size: clamp(2rem, 7.5vw, 3rem) !important; }
  .font-display.text-7xl, .font-display.text-8xl { font-size: clamp(2.5rem, 9vw, 4rem) !important; }
}

/* 모바일 본문 가독성 */
@media (max-width: 640px) {
  p { font-size: 0.95rem; line-height: 1.85; }
  .text-\[15px\], .text-\[16px\] { font-size: 14.5px !important; line-height: 1.85 !important; }
}

/* 모바일 그리드 갭/패딩 정리 */
@media (max-width: 640px) {
  .gap-16, .gap-20, .lg\:gap-20 { gap: 2rem !important; }
  .p-10, .p-12, .p-14, .sm\:p-12, .sm\:p-14 { padding: 1.75rem !important; }
  .p-8 { padding: 1.5rem !important; }
}

/* 메인 페이지 hero (h-screen) 모바일 조정 */
@media (max-width: 640px) {
  section.h-screen {
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100svh !important;
  }
  section.h-screen.min-h-\[640px\] { min-height: 88vh !important; }
}

/* 모바일에서 마퀴 텍스트 약간 작게 */
@media (max-width: 640px) {
  .marquee { font-size: 1.1rem !important; }
}

/* 모바일 CTA 버튼 풀폭으로 */
@media (max-width: 480px) {
  section .flex.flex-wrap.justify-center.gap-4 > a {
    flex: 1 1 100%;
    text-align: center;
    padding: 1rem 1.5rem !important;
  }
}

/* 모바일 nav 보정 */
@media (max-width: 1023px) {
  header#nav .h-20 { height: 4rem !important; }
}

/* 모바일 utility bar 보정 */
@media (max-width: 640px) {
  .bg-herb-700.text-ivory-100.text-xs > div {
    padding-top: .35rem !important;
    padding-bottom: .35rem !important;
  }
  .bg-herb-700.text-ivory-100.text-xs span.hidden { display: none !important; }
}

/* fees.html 테이블 모바일 - 카드형 변환 */
@media (max-width: 640px) {
  .fee-table { font-size: 13px; }
  .fee-table thead { display: none; }
  .fee-table, .fee-table tbody, .fee-table tr, .fee-table td { display: block; width: 100%; }
  .fee-table tr {
    background: #FDFBF6 !important;
    border: 1px solid #E8DDC4;
    margin-bottom: .75rem;
    padding: 1rem;
    border-radius: 4px;
  }
  .fee-table td {
    border: none !important;
    padding: .35rem 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    text-align: right !important;
    font-size: 13.5px !important;
  }
  .fee-table td:before {
    content: attr(data-label);
    color: #7a6b5e;
    font-size: 12px;
    text-align: left;
    flex: 0 0 auto;
    font-family: 'Pretendard', sans-serif;
  }
  .fee-table td.cat {
    background: transparent !important;
    font-family: 'Noto Serif KR', serif;
    color: #1F3328;
    font-size: 15px !important;
    font-weight: 500;
    border-bottom: 1px solid #E8DDC4 !important;
    padding-bottom: .5rem !important;
    margin-bottom: .5rem !important;
    justify-content: flex-start;
  }
  .fee-table td.cat:before { display: none; }
  .fee-table td.price { font-weight: 600; }
}

/* 모바일 hover 처리 - touch device에서는 hover scale 안 함 */
@media (hover: none) {
  .group:hover img, .group:hover .scale-105 { transform: none !important; }
}

/* iframe (네이버 지도) 모바일 비율 */
@media (max-width: 640px) {
  iframe { min-height: 320px; }
}

/* 폼·인풋 모바일 폰트 16px (iOS 자동 줌 방지) */
input, select, textarea { font-size: 16px; }
