/* ============================================
   송도경희탑한의원 - 서브페이지 공통 스타일
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  color: var(--neutral-800);
  background: #fff;
  line-height: var(--leading-normal);
  /* 한글이 어절 중간에 끊기지 않도록 — 단어 단위 줄바꿈 */
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6, p, li, a, span, div { word-break: keep-all; overflow-wrap: break-word; }
p, li, h1, h2, h3 { text-wrap: pretty; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* ── ONE-SECTION-PER-SCREEN ── 
   화면이 길어지지도, 짧아지지도 않게 모든 섹션을 정확히 한 화면 높이로 고정 */
html, body { height: 100%; }
body { overflow-x: hidden; }
body > section {
  height: calc(100vh - 84px) !important;
  min-height: calc(100vh - 84px) !important;
  max-height: calc(100vh - 84px) !important;
  overflow: hidden !important;
  box-sizing: border-box;
}
body > footer { box-sizing: border-box; }

/* ── NAV (same as homepage) ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-100);
  transition: box-shadow 250ms ease;
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav .container { max-width: none; padding: 0 56px; }
.nav-inner { display: flex; justify-content: center; align-items: center; height: 84px; gap: 4px; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 26px; display: block; }
.nav-links { display: flex; align-items: stretch; height: 100%; gap: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link { font-size: 17px; font-weight: 600; color: var(--neutral-800); transition: color 200ms; padding: 0 32px; height: 100%; display: flex; align-items: center; position: relative; cursor: pointer; letter-spacing: -.01em; }
.nav-link::after { content:''; position:absolute; bottom:22px; left:32px; right:32px; height:2px; background:var(--blue-700); transform:scaleX(0); transform-origin:left; transition:transform 220ms ease; }
.nav-link.active { color: var(--blue-700); }
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover { color: var(--blue-700); }
.nav-item:hover .nav-link { color: var(--blue-700); }
.nav-item:hover .nav-link::after { transform: scaleX(1); }
.nav-dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 160px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--neutral-100);
  padding: 10px 0;
  opacity: 0; visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 50;
}
.nav-item:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown a {
  display: block; padding: 10px 22px;
  font-size: 14px; font-weight: 500; color: var(--neutral-700);
  white-space: nowrap; transition: all 180ms;
  text-align: center;
}
.nav-dropdown a:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-dropdown a.active { color: var(--blue-700); background: var(--blue-50); font-weight: 600; }
.nav-cta { display: none; }

/* ── PAGE HERO ── */
.page-hero {
  min-height: calc(100vh - 84px);
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--marble-cool) 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(118deg, transparent, transparent 80px, rgba(0,80,160,0.03) 80px, rgba(0,80,160,0.03) 81px);
}
.page-hero .container { position: relative; z-index: 2; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--neutral-500); margin-bottom: 20px; }
.breadcrumb a { color: var(--neutral-500); transition: color 200ms; }
.breadcrumb a:hover { color: var(--blue-700); }
.breadcrumb .sep { color: var(--neutral-300); }
.breadcrumb .current { color: var(--blue-700); font-weight: 600; }
.page-kicker { font-family: var(--font-en); font-size: 12px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--blue-700); margin-bottom: 12px; }
.page-title { font-size: clamp(32px, 4vw, 48px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--neutral-900); margin-bottom: 14px; }
.page-subtitle { font-size: 17px; color: var(--neutral-600); line-height: 1.7; max-width: 640px; }

/* ── CONTENT SECTIONS ── */
.content-section { padding: 80px 0; min-height: calc(100vh - 84px); display: flex; flex-direction: column; justify-content: center; }
.content-section.alt { background: var(--marble-warm); }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.content-grid.reverse > :first-child { order: 2; }
.content-block h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.015em; color: var(--neutral-900); margin-bottom: 14px; line-height: 1.25; }
.content-block .kicker { font-family: var(--font-en); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-700); margin-bottom: 10px; display: block; }
.content-block p { font-size: 15px; color: var(--neutral-600); line-height: 1.85; margin-bottom: 14px; }
.content-block ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.content-block ul li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--neutral-700); line-height: 1.65; }
.content-block ul li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-700); margin-top: 9px; flex-shrink: 0; }
.content-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--blue-100) 0%, var(--marble-mid) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.content-visual-text { color: var(--blue-400); font-family: var(--font-en); font-size: 14px; font-weight: 500; }

/* Feature cards row */
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.feature-card { background: #fff; border-radius: var(--radius-xl); padding: 28px; border: 1px solid var(--neutral-100); }
.feature-num { font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--blue-700); margin-bottom: 10px; }
.feature-card h3 { font-size: 17px; font-weight: 700; color: var(--neutral-800); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--neutral-500); line-height: 1.65; }

/* CTA */
.page-cta { background: var(--blue-700); padding: 80px 0; text-align: center; color: #fff; min-height: calc(100vh - 84px); display: flex; flex-direction: column; justify-content: center; }
.page-cta h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; margin-bottom: 14px; letter-spacing: -0.015em; }
.page-cta p { font-size: 16px; color: rgba(255,255,255,0.8); margin-bottom: 32px; }
.cta-btn-row { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-white { background: #fff; color: var(--blue-700); font-size: 14px; font-weight: 700; padding: 14px 28px; border-radius: var(--radius-full); transition: all 220ms; }
.btn-white:hover { background: var(--blue-50); transform: translateY(-2px); }
.btn-outline-white { color: #fff; font-size: 14px; font-weight: 600; padding: 14px 28px; border-radius: var(--radius-full); border: 1.5px solid rgba(255,255,255,0.5); transition: all 200ms; }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* Footer (compact) */
.footer-compact { background: var(--neutral-900); padding: 32px 0; }
.footer-compact-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-compact-inner img { height: 28px; filter: brightness(0) invert(1); opacity: .9; }
.footer-compact-info { font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-compact-info a { color: rgba(255,255,255,0.7); }

/* ══════════ HAMBURGER (hidden on desktop) ══════════ */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px; margin-right: -8px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--neutral-800); border-radius: 2px; transition: transform 220ms ease, opacity 160ms ease; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════ MOBILE ══════════ */
@media (max-width: 900px) {
  /* Never allow horizontal overflow on phones */
  html, body { overflow-x: hidden; max-width: 100%; }

  /* Sections flow naturally instead of being clipped to one screen */
  body > section,
  html body > section.page-hero,
  html body > section.ta-hero,
  html body > section.page-cta {
    height: auto !important;
    min-height: calc(100vh - 60px) !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html body > section.page-hero,
  html body > section.ta-hero { min-height: 100vh !important; }
  .container { padding: 0 20px; }

  /* NAV → slide-down hamburger menu */
  .nav .container { max-width: none; padding: 0 16px; }
  .nav-inner { justify-content: space-between; height: 60px; gap: 0; }
  .nav-logo img { height: 24px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    height: auto; max-height: calc(100vh - 60px); overflow-y: auto;
    background: #fff; padding: 6px 0 22px; gap: 0;
    border-top: 1px solid var(--neutral-100);
    box-shadow: 0 18px 40px rgba(0,0,0,0.13);
    transform: translateY(-10px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease, visibility 220ms;
  }
  .nav.open .nav-links { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-item { flex-direction: column; align-items: stretch; }
  .nav-link { height: auto; padding: 13px 22px; font-size: 16px; border-bottom: 1px solid var(--neutral-50); }
  .nav-link::after { display: none; }
  .nav-dropdown {
    position: static; transform: none; opacity: 1; visibility: visible;
    min-width: 0; background: var(--marble-cool); border: none; border-radius: 0;
    box-shadow: none; padding: 4px 0 8px;
  }
  .nav-dropdown a { text-align: left; padding: 9px 38px; font-size: 13.5px; }

  /* Hero + generic content sections */
  .page-hero { min-height: calc(100vh - 60px); padding: 96px 0 48px; }
  .content-section { padding: 64px 0; min-height: 0; }
  .content-grid { grid-template-columns: 1fr; gap: 32px; }
  .content-grid.reverse > :first-child { order: 0; }
  .feature-row { grid-template-columns: 1fr; gap: 14px; }
  .page-cta { min-height: 0; padding: 60px 0; }
  .cta-btn-row { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; margin: 0 auto; }
  .cta-btn-row a { text-align: center; justify-content: center; }

  /* Floating quick menu → bottom icon bar (no overlap with content) */
  body { padding-bottom: 66px; }
  .quick-menu {
    top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
    transform: none !important;
    flex-direction: row !important; align-items: center !important; justify-content: space-around !important;
    gap: 0 !important;
    background: rgba(255,255,255,0.97) !important;
    border-top: 1px solid var(--neutral-100) !important;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08) !important;
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom)) !important;
    z-index: 95 !important;
  }
  .quick-menu .qm-circle {
    width: auto !important; height: auto !important; border-radius: 0 !important;
    background: none !important; box-shadow: none !important; gap: 3px !important; flex: 1 1 0 !important;
  }
  .quick-menu .qm-circle:hover { transform: none !important; }
  .quick-menu .qm-circle svg { width: 24px !important; height: 24px !important; }
  .quick-menu .qm-circle span { display: block !important; font-size: 10px !important; }
  .quick-menu .qm-close, .quick-menu .qm-top { display: none !important; }
}
