/* ============================================
   대대손손한의원 양산덕계 - Site CSS
   Palette: Warm Ivory + Camel/Brown
   ============================================ */

:root {
  --ivory: #FAF6EF;
  --ivory-2: #F3ECDF;
  --paper: #FFFDF8;
  --brown-900: #2A1F14;
  --brown-800: #3D2C1B;
  --brown-700: #5C3D22;
  --brown-600: #7A4E2C;
  --brown-500: #8B5E34;
  --camel: #B8895B;
  --gold: #C9A876;
  --line: #E5DBC8;
  --line-2: #EFE7D5;
  --muted: #6B5A46;
  --danger: #B44127;
  --success: #4C7A3D;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.06);
  --shadow: 0 6px 24px rgba(60, 40, 20, 0.08);
  --shadow-lg: 0 20px 50px rgba(60, 40, 20, 0.12);
  --container: 1200px;
  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, system-ui, "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--brown-900);
  background: var(--ivory);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  text-wrap: pretty;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Typography */
h1, h2, h3, h4 { margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.02em; color: var(--brown-900); line-height: 1.25; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: clamp(19px, 2vw, 22px); }
p { margin: 0 0 1em; color: var(--brown-800); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding: clamp(40px, 6vw, 64px) 0; }
.section--ivory { background: var(--ivory-2); }
.section--paper { background: var(--paper); }
.section--brown { background: var(--brown-800); color: #F3E9D6; }
.section--brown h1, .section--brown h2, .section--brown h3 { color: #FDF7EA; }
.section--brown p { color: rgba(253, 247, 234, 0.85); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--brown-600);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 10px;
  transform: translateY(-2px);
}
.section-title { max-width: 800px; }
.section-title p { color: var(--muted); font-size: 17px; }

/* Header — dark brown bar (matches user-provided swatch #544136) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #544136;
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FDF7EA;
  line-height: 1;
}
.logo-img {
  height: 52px;
  width: auto;
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}
/* Logo image already has its own dark brown background matching header/footer — no filter needed */
.logo:hover .logo-img {
  transform: scale(1.03);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* Footer variant */
.site-footer .logo-img { height: 54px; }
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(253, 247, 234, 0.88);
  transition: background 0.15s, color 0.15s;
}
.nav a:hover, .nav a.active { background: rgba(253, 247, 234, 0.12); color: #FDF7EA; }
.nav-cta { display: flex; align-items: center; gap: 8px; margin-left: 12px; }

/* Header CTAs — elevated visibility over dark brown header.
   The phone button keeps a golden ring + continuous pulse+wiggle to draw the eye. */
.site-header .nav-cta .btn-tel {
  background: linear-gradient(135deg, #3a2c22, #6b4a34);
  color: #FDF7EA;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--gold);
  animation: telAttention 2.4s ease-in-out infinite;
  transform-origin: center;
}
.site-header .nav-cta .btn-tel::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(201, 168, 118, 0.55);
  animation: telRing 2.4s ease-out infinite;
  pointer-events: none;
  z-index: -1;
}
.site-header .nav-cta .btn-tel:hover {
  background: linear-gradient(135deg, #1e1509, var(--brown-800));
  box-shadow: 0 14px 28px -6px rgba(60, 40, 20, 0.6), inset 0 0 0 1.5px var(--gold);
  animation-play-state: paused;
  transform: translateY(-2px);
}
@keyframes telAttention {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  15%      { transform: translateY(-2px) rotate(-2deg); }
  30%      { transform: translateY(0) rotate(2deg); }
  45%      { transform: translateY(-1px) rotate(-1deg); }
  60%      { transform: translateY(0) rotate(0deg); }
}
@keyframes telRing {
  0%   { box-shadow: 0 0 0 0 rgba(201, 168, 118, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(201, 168, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 168, 118, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .nav-cta .btn-tel { animation: none; }
  .site-header .nav-cta .btn-tel::before { animation: none; }
}
/* .btn-kakao removed — 카카오 상담 기능 제거됨 */
.mobile-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
}
.mobile-toggle svg { width: 26px; height: 26px; stroke: #FDF7EA; }

@media (max-width: 900px) {
  .nav { position: fixed; inset: 72px 0 auto 0; background: #544136; flex-direction: column; align-items: stretch; padding: 16px; border-bottom: 1px solid rgba(0,0,0,0.25); box-shadow: 0 8px 20px rgba(0,0,0,0.25); gap: 2px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; }
  .nav-cta { flex-direction: column; align-items: stretch; margin-left: 0; margin-top: 8px; }
  .mobile-toggle { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease, filter 0.2s ease;
  line-height: 1;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); transition-duration: 0.08s; }
.btn-tel { background: var(--brown-700); color: #FDF7EA !important; box-shadow: 0 4px 14px rgba(60, 40, 20, 0.18); }
.btn-tel:hover { background: var(--brown-800); box-shadow: 0 10px 24px rgba(60, 40, 20, 0.28); }

.btn-outline { border-color: var(--brown-700); color: var(--brown-800); background: transparent; }
.btn-outline:hover { background: var(--brown-700); color: #FDF7EA; }
.btn-ghost { background: transparent; color: var(--brown-800); }
.btn-ghost:hover { background: var(--ivory-2); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* Hero */
.hero {
  padding: clamp(56px, 8vw, 96px) 0 clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
  color: #FDF7EA;
  isolation: isolate;
  background: var(--ivory);
}
/* Background image layer — animated (Ken Burns: slow zoom + subtle pan) */
.hero::before {
  content: "";
  position: absolute;
  inset: -6%;                    /* extra bleed so scale never shows edges */
  background: url("../img/hero-clinic.webp") center right / cover no-repeat;
  z-index: -2;
  transform-origin: 65% 55%;
  animation: heroKenBurns 22s ease-in-out infinite alternate;
  will-change: transform;
}
/* Dark overlay layer — kept static above the moving image */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(30, 20, 12, 0.82) 0%, rgba(30, 20, 12, 0.55) 50%, rgba(30, 20, 12, 0.15) 100%),
    linear-gradient(180deg, rgba(60, 40, 24, 0.35) 0%, rgba(30, 20, 12, 0.45) 100%);
  z-index: -1;
  pointer-events: none;
}
@keyframes heroKenBurns {
  0%   { transform: scale(1)     translate3d(0, 0, 0); }
  50%  { transform: scale(1.08)  translate3d(-1.5%, -1%, 0); }
  100% { transform: scale(1.12)  translate3d(1%, 1.5%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; transform: scale(1.02); }
}
/* Ensure text on hero over the dark backdrop is bright */
.hero .hero-copy h1,
.hero .hero-copy h1 .accent { color: #FDF7EA; }
.hero .hero-copy .accent { color: var(--gold); }
.hero .hero-lead { color: rgba(253, 247, 234, 0.88); }
.hero .hero-meta { border-top-color: rgba(253, 247, 234, 0.2); }
.hero .hero-meta .item strong { color: #FDF7EA; }
.hero .hero-meta .item span { color: rgba(253, 247, 234, 0.72); }
.hero .badge {
  background: rgba(253, 247, 234, 0.14);
  color: #FDF7EA;
  border-color: rgba(201, 168, 118, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 640px);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  min-height: clamp(400px, 55vh, 560px);
}
/* Hero badge — pill with a subtle golden glow that gently pulses */
.hero-copy .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--gold);
  color: var(--brown-700); font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
  box-shadow: 0 0 0 0 rgba(201, 168, 118, 0.35);
  animation: badgeGlow 2.8s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 118, 0.25), 0 0 8px rgba(201, 168, 118, 0.15); }
  50%      { box-shadow: 0 0 0 4px rgba(201, 168, 118, 0), 0 0 14px rgba(201, 168, 118, 0.35); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy .badge { animation: none; }
}
/* 히어로 h1 — 아이보리 solid 텍스트. 광택은 별도 오버레이로 처리 */
.hero h1 {
  font-size: clamp(30px, 4.8vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: #FDF7EA;
  text-shadow: 0 1px 30px rgba(201, 168, 118, 0.18);
  position: relative;
  /* Shine gradient가 텍스트 픽셀만 밝히도록 background-clip: text로 마스킹 */
  background-image: linear-gradient(
    115deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 240, 180, 0.9) 48%,
    #FFF3C4 50%,
    rgba(255, 240, 180, 0.9) 52%,
    transparent 58%,
    transparent 100%
  );
  background-size: 300% 100%;
  background-position: 150% center;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: #FDF7EA;  /* 명시적으로 base color 유지 */
  animation: heroShine 5s ease-in-out infinite;
}
.hero h1 .accent { color: inherit; -webkit-text-fill-color: inherit; }

@keyframes heroShine {
  0%,  35% { background-position: 150% center; }   /* 오른쪽에 대기 */
  65%      { background-position: -50% center; }   /* 왼쪽으로 휙 통과 */
  100%     { background-position: -50% center; }   /* 다음 사이클까지 대기 */
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 { animation: none; background-image: none; }
}
.hero-lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); margin-bottom: 32px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.hero-meta .item { }
.hero-meta .item strong { display: block; font-size: 20px; color: var(--brown-800); margin-bottom: 4px; }
.hero-meta .item span { font-size: 13px; color: var(--muted); }

.hero-visual {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background: var(--ivory-2);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
.hero-visual:hover {
  transform: perspective(1200px) rotateY(0) rotateX(0) translateY(-4px);
  box-shadow: 0 30px 60px -20px rgba(60, 40, 20, 0.28), 0 15px 30px -15px rgba(60, 40, 20, 0.18);
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.15) 0%, transparent 40%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 4/3; }
  .hero-meta { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .hero-meta .item strong { font-size: 16px; }
}

/* Card grid (clinic cards) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
/* Force balanced 2×2 for exactly 4 children, 3×3 for 9, 2×3 for 6, etc.
   Uses :has() where supported to avoid awkward 3+1 or 4+1 rows. */
.card-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid:has(> :nth-child(9):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .card-grid:has(> :nth-child(4):last-child),
  .card-grid:has(> :nth-child(6):last-child),
  .card-grid:has(> :nth-child(8):last-child),
  .card-grid:has(> :nth-child(9):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr !important; }
}
.clinic-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.25s ease;
  color: inherit;
  position: relative;
  will-change: transform;
}
.clinic-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: 0 30px 60px -20px rgba(60, 40, 20, 0.25), 0 12px 24px -12px rgba(60, 40, 20, 0.15);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.clinic-card:hover { transform: translateY(-6px); border-color: var(--camel); }
.clinic-card:hover::before { opacity: 1; }
.clinic-card__media { transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.clinic-card:hover .clinic-card__media { transform: scale(1.04); }
.clinic-card__media {
  aspect-ratio: 16/10;
  background: var(--ivory-2);
  position: relative;
  overflow: hidden;
}
.clinic-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
  filter: saturate(0.95);
}
.clinic-card:hover .clinic-card__media img {
  transform: scale(1.06);
  filter: saturate(1.05) brightness(1.03);
}
.clinic-card__body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.clinic-card__tag { font-size: 12px; letter-spacing: 0.08em; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.clinic-card__title { font-size: 20px; margin: 8px 0 10px; letter-spacing: -0.02em; }
.clinic-card__desc { font-size: 14.5px; color: var(--muted); margin: 0 0 18px; flex: 1; }
.clinic-card__more {
  font-size: 14px; color: var(--brown-700); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.clinic-card__more::after { content: "→"; transition: transform 0.15s; }
.clinic-card:hover .clinic-card__more::after { transform: translateX(4px); }

/* Feature strip (philosophy) */
.philo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px; margin-top: 40px;
}
.philo {
  padding: 28px;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.25s ease;
}
.philo:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -18px rgba(60, 40, 20, 0.22);
  border-color: var(--camel);
}
.philo__num { font-family: "Nanum Myeongjo", serif; font-size: 28px; color: var(--gold); font-weight: 700; }
.philo h3 { font-size: 19px; margin: 10px 0 8px; }
.philo p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* Hours table */
.hours-table {
  width: 100%; border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.hours-table th, .hours-table td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line-2);
  font-size: 15px;
}
/* Tall variant used on hours page — expands row height to align with adjacent column */
.hours-table--tall th, .hours-table--tall td { padding-top: 18px; padding-bottom: 18px; }
.hours-table th { background: var(--ivory-2); font-weight: 600; color: var(--brown-800); width: 120px; }
.hours-table td .lunch { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table .closed { color: var(--danger); font-weight: 600; }

/* Hours page — equal-height columns with matching baselines.
   Left column: table (grows) + notice (fixed). 
   Right column: head (fixed) + info-grid (grows) + cta (fixed).
   Both grow-elements absorb slack so bottom edges align between table↔info-grid
   and notice↔cta. */
.two-col:has(> .hours-col) { align-items: stretch; }
.hours-col { display: flex; flex-direction: column; min-height: 0; height: 100%; }
/* Keep default block margins on eyebrow/h2 so both columns produce identical vertical rhythm */
.hours-col > .eyebrow { flex: 0 0 auto; }
.hours-col > h2 { flex: 0 0 auto; }
.hours-col__cta { flex: 0 0 auto; margin-top: 24px; }
.hours-col .hours-table--tall { flex: 1 1 auto; }
.hours-col .info-grid--stretch {
  flex: 1 1 auto;
  min-height: 0;
  grid-auto-rows: 1fr;
  align-content: stretch;
  margin: 0;
}
.info-grid--stretch .info-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Icon-topped info cards for hours highlights — cards fill column, content top-aligned */
.hours-col .info-grid--iconed {
  gap: 16px;
  grid-auto-rows: 1fr;   /* equal-height rows fill available height */
  align-content: stretch;
}
.info-grid--iconed .info-item {
  align-items: flex-start;
  justify-content: flex-start;  /* content pinned to top, empty space below */
  padding: 22px;
  gap: 10px;
  min-height: 0;
}
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ivory-2), var(--paper));
  color: var(--brown-700);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(60, 40, 20, 0.06), inset 0 -2px 0 rgba(139, 94, 52, 0.06);
  flex: 0 0 auto;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, background 0.25s ease;
}
.info-icon svg { width: 22px; height: 22px; }

/* Facility image cards (about page) — hover lift + subtle zoom */
.facility-img {
  background: var(--ivory-2);
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.facility-img img { transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); filter: saturate(0.95); }
.facility-img:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -18px rgba(60, 40, 20, 0.25); }
.facility-img:hover img { transform: scale(1.05); filter: saturate(1.05); }
.info-item:hover .info-icon {
  transform: rotate(-6deg) scale(1.06);
  color: var(--brown-800);
  background: linear-gradient(135deg, #FDF7EA, var(--ivory-2));
}
/* Match the notice's visual weight so bottom rows align cleanly */
.hours-col .notice { flex: 0 0 auto; }
@media (max-width: 900px) {
  .two-col:has(> .hours-col) { align-items: start; }
  .hours-col { height: auto; gap: 20px; }
  .hours-col .info-grid--stretch { flex: 0 0 auto; grid-auto-rows: auto; min-height: 0; }
}

/* Info list */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 24px;
}
.info-item {
  padding: 20px; background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.info-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(60, 40, 20, 0.18);
  border-color: var(--camel);
}
.info-item dt { font-size: 12px; letter-spacing: 0.08em; color: var(--gold); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.info-item dd { margin: 0; font-size: 16px; color: var(--brown-900); font-weight: 500; }
.info-item dd small { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }

/* CTA band */
.cta-band {
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(201, 168, 118, 0.22), transparent 60%),
    radial-gradient(500px 250px at 90% 100%, rgba(184, 137, 91, 0.18), transparent 60%),
    linear-gradient(135deg, var(--brown-900) 0%, var(--brown-700) 100%);
  color: #F3E9D6;
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 56px);
  text-align: center;
  margin: 40px 0 0;
  box-shadow: 0 30px 60px -25px rgba(60, 40, 20, 0.5);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(253, 247, 234, 0.03) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #FDF7EA; font-size: clamp(22px, 3vw, 32px); margin-bottom: 12px; }
.cta-band p { color: rgba(253, 247, 234, 0.8); margin-bottom: 24px; }
.cta-band .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================
   Right-side vertical quick-action bar
   Desktop: fixed to right edge, always visible
   Mobile: hidden (floating-cta covers it)
   ============================================ */
.quickbar {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 95;
}
.qb-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  color: #FDF7EA;
  box-shadow: 0 6px 16px -4px rgba(60, 40, 20, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
}
.qb-btn:hover { transform: translateX(-3px) scale(1.05); }
.qb-ico { display: flex; align-items: center; justify-content: center; }
.qb-ico svg { width: 22px; height: 22px; }
.qb-label { font-size: 9.5px; letter-spacing: -0.02em; }

/* ─── Quickbar Colors: 3버튼 각자 다른 톤으로 분리 ─── */

/* 1. 전화 예약 — 가장 밝고 눈에 띄게 (레드-오렌지 그라디언트 + 흰 아이콘 + 흔들림) */
.qb-tel {
  background: linear-gradient(135deg, #FF6B4A 0%, #E8412C 50%, #C93017 100%);
  color: #FFFFFF !important;
  animation: qbTelPulse 1.8s ease-in-out infinite, qbTelShake 2.4s ease-in-out infinite;
  transform-origin: center;
}
.qb-tel .qb-ico {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  box-shadow: 0 2px 6px rgba(201, 48, 23, 0.35);
}
.qb-tel .qb-ico svg {
  width: 18px;
  height: 18px;
  stroke: #E8412C;
  fill: none;
  stroke-width: 2.2;
}
.qb-tel:hover {
  animation-play-state: paused;
  background: linear-gradient(135deg, #FF8065 0%, #FF5A3E 50%, #E8412C 100%);
}
@keyframes qbTelPulse {
  0%, 100% { box-shadow: 0 6px 18px -4px rgba(201, 48, 23, 0.5), 0 0 0 0 rgba(255, 107, 74, 0.6); }
  50%      { box-shadow: 0 10px 24px -4px rgba(201, 48, 23, 0.65), 0 0 0 14px rgba(255, 107, 74, 0); }
}
@keyframes qbTelShake {
  0%, 92%, 100% { transform: rotate(0deg); }
  93%           { transform: rotate(-8deg); }
  95%           { transform: rotate(8deg); }
  97%           { transform: rotate(-6deg); }
  99%           { transform: rotate(4deg); }
}

/* 2. 오시는 길 — 세이지 그린으로 확실히 구분 */
.qb-map {
  background: linear-gradient(135deg, #6B9080 0%, #4C7A66 100%);
  color: #FDF7EA !important;
  box-shadow: 0 6px 16px -4px rgba(76, 122, 102, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.qb-map:hover {
  background: linear-gradient(135deg, #7BA290 0%, #5C8A76 100%);
}

/* 3. TOP — 아이보리 카드형(다크 텍스트) */
.qb-top {
  background: rgba(253, 247, 234, 0.95);
  color: var(--brown-800) !important;
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold);
  box-shadow: 0 6px 16px -4px rgba(60, 40, 20, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0) scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}
.qb-top:hover {
  background: #FFFFFF;
  color: var(--brown-900) !important;
}
.qb-top.qb-top--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

@media (max-width: 900px) {
  .quickbar {
    right: 12px;
    gap: 8px;
  }
  .qb-btn { width: 52px; height: 52px; font-size: 9.5px; }
  .qb-ico svg { width: 18px; height: 18px; }
  .qb-label { font-size: 8.5px; }
  /* Hide overlapping labels on tiny screens; keep icons */
  .qb-btn .qb-label { display: none; }
}
@media (max-width: 480px) {
  /* On very small screens rely on the bottom floating-cta and hide the right column */
  .quickbar { display: none; }
}

/* Floating CTA (mobile) */
.floating-cta {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 90;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(60, 40, 20, 0.22), 0 4px 10px rgba(60, 40, 20, 0.1);
  border: 1px solid var(--line);
  animation: floatY 3.5s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}
@media (min-width: 901px) { .floating-cta { display: none; } }

/* Footer */
.site-footer {
  background: var(--brown-900);
  color: rgba(253, 247, 234, 0.75);
  padding: 56px 0 32px;
  font-size: 14px;
}
.site-footer h4 { color: #FDF7EA; font-size: 15px; margin-bottom: 14px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
}
.site-footer a { color: rgba(253, 247, 234, 0.75); }
.site-footer a:hover { color: #FDF7EA; }
.footer-brand p { color: rgba(253, 247, 234, 0.7); font-size: 13px; margin-bottom: 8px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(253, 247, 234, 0.1);
  margin-top: 40px; padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: rgba(253, 247, 234, 0.5);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Breadcrumb */
/* Breadcrumb — same deep brown as the page-hero so the two sections
   read as one continuous dark surface, with only a faint golden hairline
   separating from the header. */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  color: rgba(253, 247, 234, 0.75);
  border-bottom: 0;
  background: var(--brown-900);
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(201, 168, 118, 0.15);
}
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: rgba(201, 168, 118, 0.5); }
.breadcrumb a { color: rgba(253, 247, 234, 0.75); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .current { color: var(--gold); font-weight: 600; }

/* Page hero (inner pages) — inverted, deep brown with subtle clinic photo backdrop */
.page-hero {
  padding: clamp(64px, 9vw, 104px) 0 clamp(48px, 7vw, 72px);
  color: #FDF7EA;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--brown-900);
}
/* Subtle background photo layer (dimmed, tone-matched) */
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(42, 31, 20, 0.88) 0%, rgba(60, 44, 27, 0.75) 50%, rgba(92, 61, 34, 0.7) 100%),
    radial-gradient(1200px 500px at 85% -20%, rgba(201, 168, 118, 0.22), transparent 60%),
    radial-gradient(800px 400px at 10% 120%, rgba(184, 137, 91, 0.15), transparent 60%),
    url("../img/hero-clinic.webp") center right / cover no-repeat;
  z-index: -1;
  opacity: 1;
  filter: saturate(0.7);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(253, 247, 234, 0.025) 0 2px, transparent 2px 14px);
  pointer-events: none;
  z-index: 0;
}
.page-hero > * { position: relative; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero .eyebrow::before { background: var(--gold); opacity: 0.9; }
.page-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 14px;
  letter-spacing: -0.025em;
  background: linear-gradient(100deg,
    #FDF7EA 0%,
    #F5E4C4 25%,
    #E8C58A 45%,
    #F5E4C4 55%,
    #FDF7EA 100%);
  background-size: 220% auto;
  background-position: 0% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: heroGradientSweep 6s ease-in-out infinite;
  text-shadow: 0 1px 30px rgba(201, 168, 118, 0.15);
}
@keyframes heroGradientSweep {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}
@media (prefers-reduced-motion: reduce) {
  .page-hero h1 { animation: none; background-position: 50% center; }
}
.page-hero p { font-size: 17px; color: rgba(253, 247, 234, 0.82); max-width: 720px; margin: 0; }

/* When breadcrumb precedes page-hero, remove its border so the seam looks clean */
.breadcrumb + .page-hero { border-top: 0; }

/* Placeholder image */
.ph {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(139, 94, 52, 0.06) 0 10px,
      rgba(139, 94, 52, 0.02) 10px 20px
    ),
    var(--ivory-2);
  display: grid; place-items: center;
  color: var(--brown-600);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 20px;
}
.ph small { display: block; opacity: 0.7; margin-top: 4px; font-size: 11px; }

/* Two-column content */
.two-col {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 20px; }

/* Bullet list */
.check-list { list-style: none; padding: 0; margin: 20px 0; }
.check-list li {
  position: relative; padding-left: 28px; margin-bottom: 12px;
  color: var(--brown-800); font-size: 15.5px;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brown-700);
  background-image: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.4) 50%);
}

/* Doctor career */
.career {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.25s ease;
}
.career:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -18px rgba(60, 40, 20, 0.22);
  border-color: var(--camel);
}
.career h3 { font-size: 18px; color: var(--brown-700); margin-bottom: 16px; }
.career ul { list-style: none; padding: 0; margin: 0; }
.career li {
  padding: 12px 0; border-bottom: 1px dashed var(--line-2);
  font-size: 15px; color: var(--brown-800);
  display: flex; gap: 12px; align-items: baseline;
}
.career li:last-child { border-bottom: 0; }
.career li::before { content: "•"; color: var(--gold); flex: 0 0 auto; }

/* FAQ */
.faq details {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.faq details:hover { border-color: var(--camel); box-shadow: 0 10px 24px -14px rgba(60, 40, 20, 0.18); }
.faq details[open] { box-shadow: 0 14px 30px -16px rgba(60, 40, 20, 0.22); border-color: var(--camel); }
.faq summary {
  padding: 20px 24px; cursor: pointer; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  color: var(--brown-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 24px; color: var(--brown-600); font-weight: 300;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line-2); }
.faq .faq-a { padding: 20px 24px; color: var(--brown-800); font-size: 15px; line-height: 1.7; }
.faq .faq-q-tag { display: inline-block; font-family: "Nanum Myeongjo", serif; color: var(--gold); font-weight: 700; margin-right: 8px; }

/* Process infographic */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 40px;
  position: relative;
  list-style: none;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  counter-reset: none;
}
.process > li { list-style: none; }
.process > li::marker { content: none; }
.process__step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.process__step:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -16px rgba(60, 40, 20, 0.22);
}
.process__step:hover .process__num {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 8px 16px rgba(60, 40, 20, 0.25);
}
.process__num { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease; }
.process__num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brown-700); color: #FDF7EA;
  display: grid; place-items: center;
  font-family: "Nanum Myeongjo", serif;
  font-weight: 700; font-size: 18px;
  margin: 0 auto 14px;
}
.process__step h3, .process__step h4 { font-size: 16px; margin-bottom: 6px; }
.process__step p { font-size: 13px; color: var(--muted); margin: 0; }
.process__step:not(:last-child)::after {
  content: "→"; position: absolute;
  right: -14px; top: 40px;
  color: var(--camel); font-size: 18px;
  font-weight: 700;
  z-index: 2;
}
@media (max-width: 800px) {
  .process { grid-template-columns: repeat(2, 1fr); }
  .process__step:not(:last-child)::after { display: none; }
}

/* Map */
.map-wrap {
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ivory-2);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* Scroll reveal animations — progressive enhancement:
   Only hides once .js-reveal-ready is set on <html> AND element has .reveal/.reveal-stagger.
   Ensures no-JS / pre-init state shows content immediately (no FOUC). */
html.js-reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
html.js-reveal-ready .reveal.in { opacity: 1; transform: translateY(0); }
html.js-reveal-ready .reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
html.js-reveal-ready .reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 0.54s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .floating-cta { animation: none; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-24 { margin-bottom: 24px; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* Small notice (medical law disclaimer) */
.notice {
  background: var(--ivory-2);
  border-left: 3px solid var(--camel);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 24px;
}
.notice strong { color: var(--brown-800); }

/* Symptoms/keywords chip list */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip {
  display: inline-block;
  padding: 6px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--brown-800);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: default;
}
.chip:hover {
  transform: translateY(-2px);
  background: var(--brown-700);
  color: #FDF7EA;
  border-color: var(--brown-700);
}
