/* 365바른한의원 — 모바일 우선. 한의원 CLAUDE.md "디자인 방향".
   색 (2026-09-29 변경): 로고(회청색)와 병원 안내 이미지에 맞춰 네이비·슬레이트 블루·민트. 안내 이미지의 형광 민트(#4fe0a3)는 톤을 낮춰 --mint #5cd3a6(어두운 배경 위 전화 버튼·아이콘)과 --orange #4cc99a(장식 점)로 쓴다.
   변수 이름(--orange-*)은 구조를 건드리지 않으려고 그대로 두고 값만 바꿨다. --orange = 민트 장식, --orange-600/700 = 네이비 버튼·링크.
   색 대비: 본문 잉크 #14223d(배경 #f5f7fa 위 약 15:1), 버튼 #1e3a6b 위 흰 글자 약 11:1.
   민트는 흰 배경 대비가 낮아 글자색으로 쓰지 않고 점·선·면 장식에만 쓴다.
   모서리: 큰 면(카드·표·지도 카드) 20 / 사진 14 / 작은 요소(메뉴 항목·안내 상자) 8 / 버튼·칩·배지 알약형. */

:root {
  --ink: #14223d;
  --ink-2: #3b4a63;
  --muted: #56657b;
  --white: #ffffff;
  --cream: #f5f7fa;
  --ivory: #edf1f6;
  --beige: #e1e7ef;
  --sand: #c3cedc;
  --clay: #7d91a9;
  --orange: #4cc99a;
  --mint: #5cd3a6;
  --mint-hover: #72ddb4;
  --orange-50: #ebf7f2;
  --orange-100: #d4efe3;
  --orange-600: #1e3a6b;
  --orange-700: #132a52;
  --warm-dark: #112a57;
  --line: #dde4ed;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* 브랜드색이 섞인 겹그림자 3단계 */
  --sh-sm: 0 1px 2px rgba(30, 58, 107, .06), 0 2px 8px rgba(30, 58, 107, .06);
  --sh: 0 2px 4px rgba(30, 58, 107, .06), 0 10px 24px rgba(30, 58, 107, .09);
  --sh-lg: 0 4px 10px rgba(30, 58, 107, .08), 0 22px 48px rgba(30, 58, 107, .14);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  --header-h: 64px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
html:has(#menu-toggle:checked) { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-600); text-underline-offset: 3px; }
a:hover { color: var(--orange-700); }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--orange-600); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); }
h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1em; }
address { font-style: normal; }
table { border-collapse: collapse; width: 100%; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--r-sm); }
.skip:focus, .skip:hover { top: 12px; color: #fff; }
.muted { color: var(--muted); font-size: .94em; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

/* ── 버튼 ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; white-space: nowrap;
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .94rem; }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 1.06rem; }
.btn--primary { background: var(--orange-600); color: #fff; box-shadow: 0 6px 18px rgba(30, 58, 107, .28); }
.btn--primary:hover { background: var(--orange-700); color: #fff; }
.btn--ghost { background: var(--white); color: var(--ink); border-color: var(--sand); }
.btn--ghost:hover { background: var(--ivory); color: var(--ink); border-color: var(--clay); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--ivory); color: var(--ink); }
/* 어두운 사진·남색 띠 위에서는 네이비 버튼이 묻혀서, 전화 버튼만 톤 낮춘 민트로 띄운다. 민트 위 글자는 남색(대비 약 7:1). */
.hero .btn--primary, .page-head--photo .btn--primary, .cta-band .btn--primary {
  background: var(--mint); color: var(--orange-700); box-shadow: 0 6px 18px rgba(12, 24, 48, .3);
}
.hero .btn--primary:hover, .page-head--photo .btn--primary:hover, .cta-band .btn--primary:hover { background: var(--mint-hover); color: var(--orange-700); }
.btn--text { min-height: 44px; padding: 8px 4px; color: var(--orange-600); border-radius: var(--r-sm); }
.btn--text .ico { transition: transform .25s var(--ease); }
.btn--text:hover { color: var(--orange-700); }
.btn--text:hover .ico { transform: translateX(3px); }
/* 광택은 페이지 진입 때 한 번만 (반복·흔들기 금지 — 유인 연출 금지) */
.btn--shine::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 1.4s var(--ease) 1.2s 1 both;
  pointer-events: none;
}
@keyframes shine { to { transform: translateX(120%); } }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 24px; }
@media (max-width: 479px) { .cta-row .btn--primary, .cta-row .btn--ghost { width: 100%; } }

/* ── 칩·배지 (알약형, 점 없음) ─────────────────── */
.chips { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--orange-50); border: 1px solid var(--orange-100); color: var(--orange-700);
  font-size: .9rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.badge {
  display: inline-flex; align-items: center; margin: 0 0 14px; padding: 6px 14px;
  border-radius: var(--r-pill); background: var(--orange-50); color: var(--orange-700);
  font-size: .88rem; font-weight: 700; letter-spacing: .02em;
}
.badge--glass { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .34); }

/* ── 헤더 (스크롤 시에만 유리 효과) ──────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 247, 250, .97);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(245, 247, 250, .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: rgba(195, 206, 220, .5);
  box-shadow: var(--sh-sm);
}
.site-header__row { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; margin-right: auto; padding-block: 6px; flex: none; }
.brand img { height: 32px; width: auto; }
.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: var(--r-sm); color: var(--ink); cursor: pointer; order: 3;
}
.menu-btn .ico { width: 26px; height: 26px; }
.menu-btn .ico + .ico { display: none; }
.menu-toggle:checked ~ .menu-btn .ico:first-child { display: none; }
.menu-toggle:checked ~ .menu-btn .ico + .ico { display: block; }
.menu-toggle:focus-visible ~ .menu-btn { outline: 3px solid var(--orange-600); outline-offset: 2px; }

/* 모바일 메뉴: 체크박스로 JS 없이 열린다. 하위 메뉴는 늘 펼쳐 둔다 */
.gnb { display: none; }
.gnb ul { list-style: none; margin: 0; padding: 0; }
.menu-toggle:checked ~ .gnb {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: var(--sh);
  padding: 4px var(--gutter) 12px;
  max-height: calc(100svh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.gnb a { display: block; padding: 14px 4px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.gnb__list > li { border-bottom: 1px solid var(--line); }
.gnb__list > li:last-child { border-bottom: 0; }
.gnb a:hover { color: var(--orange-600); }
.gnb a[aria-current] { color: var(--orange-700); font-weight: 800; }
.gnb a[aria-current="page"] { text-decoration: none; }
.gnb__sub { padding: 0 0 6px; }
.gnb__sub a { padding: 10px 4px 10px 16px; min-height: 44px; font-weight: 500; font-size: .95rem; color: var(--ink-2); }

.header-actions { display: flex; gap: 8px; align-items: center; order: 2; }
.header-tel, .header-place { display: none; }
@media (min-width: 900px) {
  .header-tel { display: inline-flex; }
}
@media (min-width: 1024px) {   /* 상위 메뉴 4개 — 1024px 부터 한 줄 (측정) */
  :root { --header-h: 76px; }
  .brand img { height: 36px; }
  .menu-btn { display: none; }
  .gnb, .menu-toggle:checked ~ .gnb {
    display: block; position: static; background: none; border: 0; box-shadow: none; padding: 0;
    order: 1; max-height: none; overflow: visible;
  }
  .gnb__list { display: flex; gap: 2px; }
  .gnb__mobile-only { display: none; }   /* 메뉴에 없는 페이지(오시는 길)는 모바일 메뉴 끝에만 */
  .gnb__list > li { position: relative; border: 0; }
  .gnb__list > li > a { padding: 8px 12px; border-radius: var(--r-sm); font-size: .96rem; }
  .gnb__list > li > a:hover, .gnb__list > li > a[aria-current] { background: none; color: var(--orange-700); }
  /* 상위 메뉴 hover: 밑줄이 왼쪽부터 그어진다. 현재 페이지·누르는 순간·드롭다운이 열린 동안엔 유지.
     ::after 는 드롭다운 꺾쇠 아이콘이 쓰므로 밑줄은 ::before 로 그린다. 서브메뉴 항목에는 밑줄을 두지 않는다. */
  .gnb__list > li > a { position: relative; }
  .gnb__list > li > a::before {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
    background: var(--orange-600); transform: scaleX(0); transform-origin: left center;
    transition: transform .35s cubic-bezier(.22,1,.36,1); pointer-events: none;
  }
  .gnb__list > li > a:hover::before, .gnb__list > li > a:focus-visible::before, .gnb__list > li > a:active::before,
  .gnb__list > li > a[aria-current]::before, .has-sub:hover > a::before, .has-sub:focus-within > a::before { transform: scaleX(1); }
  .gnb a[aria-current="page"] { text-decoration: none; }
  /* 드롭다운: 마우스·키보드 포커스로 JS 없이 열린다 */
  .has-sub > a::after {
    content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6;
  }
  .gnb__sub {
    display: none; position: absolute; left: 0; top: 100%; min-width: 210px; padding: 8px; margin-top: 14px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-lg); z-index: 10;
  }
  /* 메뉴와 드롭다운 사이 14px 틈을 투명 다리로 메워, 마우스가 내려가는 동안 닫히지 않게 한다 */
  .gnb__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
  .has-sub:hover > .gnb__sub, .has-sub:focus-within > .gnb__sub { display: block; }
  .gnb__sub a { padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); font-size: .94rem; }
  .gnb__sub a::before { content: none; }
  .gnb__sub a:hover, .gnb__sub a[aria-current] { background: none; color: var(--orange-700); }
}

/* ── 홈 히어로 ──────────────────────────────── */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: clamp(540px, 82svh, 820px);
  display: flex; align-items: flex-end;
}
.hero__media, .hero__slide { position: absolute; inset: 0; }
.hero__media { z-index: -2; background: var(--warm-dark); }
.hero__slide { opacity: 0; transition: opacity 1.6s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; transform-origin: 60% 50%; }
/* 느린 Ken Burns. 무한 반복 애니메이션은 이 히어로 배경 하나뿐이다 (슬라이드 순환은 main.js) */
.hero__slide.is-active img, .hero__slide.is-leaving img { animation: kenburns 9s linear both; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }
/* 음영: 좁은 화면은 아래로 갈수록 진하게, 넓은 화면은 글자가 놓인 왼쪽만 */
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12, 24, 48, .45) 0%, rgba(12, 24, 48, .6) 35%, rgba(12, 24, 48, .85) 70%, rgba(12, 24, 48, .92) 100%);
}
@media (min-width: 960px) {
  .hero__shade {
    background:
      linear-gradient(90deg, rgba(12, 24, 48, .8) 0%, rgba(12, 24, 48, 0) 65%),
      linear-gradient(180deg, rgba(12, 24, 48, .2) 0%, rgba(12, 24, 48, .35) 45%, rgba(12, 24, 48, .7) 100%);
    /* 실제 히어로 사진 3장에서 글자 칸의 가장 밝은 1% 화소 기준: h1 3.2:1 이상, 리드 4.9:1 이상 (2026-09-23 측정) */
  }
}
.hero__content { padding-top: 88px; padding-bottom: clamp(40px, 7vw, 80px); }
.hero h1 {
  font-weight: 800; color: #fff;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem); line-height: 1.24; letter-spacing: -0.03em;
  max-width: 16em; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .3);
}
.hero__lead { max-width: 34em; margin-top: 16px; font-size: clamp(1rem, .95rem + .3vw, 1.12rem); color: rgba(255, 255, 255, .94); text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.hero__lead p { margin: 0 0 .4em; }
.hero__lead a { color: #fff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 26px; align-items: center; }
@media (max-width: 479px) { .hero__actions .btn { width: 100%; } }
/* 히어로 아래 칩 띠 */
/* 히어로 안 칩: 어두운 사진 위라 반투명 흰 바탕 + 흰 글자 */
.hero__chips { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip--glass { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .32); color: #fff; }

/* ── 하위 페이지 머리 (사진 + 음영) ──────────────── */
.page-head--photo {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: clamp(300px, 40vw, 440px); display: flex; align-items: flex-end;
}
.page-head__bg { position: absolute; inset: 0; margin: 0; z-index: -2; background: var(--warm-dark); }
.page-head__bg picture { display: block; width: 100%; height: 100%; }
.page-head__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-head__shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12, 24, 48, .5) 0%, rgba(12, 24, 48, .68) 45%, rgba(12, 24, 48, .9) 100%);
}
@media (min-width: 960px) {
  .page-head__shade {
    background:
      linear-gradient(90deg, rgba(12, 24, 48, .8) 0%, rgba(12, 24, 48, .05) 65%),
      linear-gradient(180deg, rgba(12, 24, 48, .2) 0%, rgba(12, 24, 48, .35) 45%, rgba(12, 24, 48, .7) 100%);
  }
}
.page-head__content { padding-top: 24px; padding-bottom: clamp(28px, 5vw, 52px); }
.page-head--photo h1 { color: #fff; font-weight: 800; font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.7rem); max-width: 20em; text-shadow: 0 2px 14px rgba(0, 0, 0, .3); }
.page-head--photo .page-head__lead { color: rgba(255, 255, 255, .94); max-width: 40em; margin-top: 12px; }
.page-head__lead p { margin: 0 0 .5em; }
.page-head__lead p:last-child { margin: 0; }
.page-head--photo .page-head__lead a { color: #fff; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (max-width: 479px) { .page-head__actions .btn { width: 100%; } }
/* 모바일은 하단 퀵바에 전화·길찾기가 있으므로 머리말에는 전화 버튼 하나만 */
@media (max-width: 1023px) { .page-head__actions .btn--light { display: none; } }
.page-head--plain { background: linear-gradient(180deg, var(--ivory), var(--cream)); padding: 20px 0 clamp(32px, 5vw, 56px); }
.page-head--photo h1, .page-head--plain h1 { text-wrap: balance; }
.page-head--plain h1 { font-weight: 800; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.page-head--plain .page-head__lead { margin-top: 14px; color: var(--ink-2); font-size: 1.04rem; }

.breadcrumb ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--clay); }
.breadcrumb a { color: var(--muted); }
.page-head--photo .breadcrumb ol, .page-head--photo .breadcrumb a { color: rgba(255, 255, 255, .88); }
.page-head--photo .breadcrumb li + li::before { color: rgba(255, 255, 255, .6); }

/* ── 섹션 공통 ──────────────────────────────── */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--white { background: var(--white); }
.section--cream { background: var(--cream); }
.section--tint { background: #e9f4ef; }
.section-head { max-width: 760px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.15rem); font-weight: 800; }
.eyebrow { margin: 0 0 8px; color: var(--orange-700); font-weight: 700; font-size: .92rem; letter-spacing: .04em; }
.prose { color: var(--ink-2); font-size: 1.04rem; }
.prose > :not(.steps) { max-width: 760px; }   /* 글은 읽기 폭, 단계 목록은 전폭 */
.prose p:last-child { margin-bottom: 0; }
.prose + * { margin-top: 28px; }
h3 { font-size: clamp(1.12rem, 1.04rem + .35vw, 1.28rem); font-weight: 700; margin-bottom: 10px; }

.list { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.list li { position: relative; padding-left: 20px; color: var(--ink-2); }
.list li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
/* "용어 — 설명" 목록 */
.def-list { margin: 0 0 1em; display: grid; gap: 0; border-top: 1px solid var(--line); }
.def-list div { display: grid; gap: 2px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.def-list dt { font-weight: 800; color: var(--ink); }
.def-list dd { margin: 0; color: var(--ink-2); }
@media (min-width: 640px) { .def-list div { grid-template-columns: 9em 1fr; } }

/* 단계 (자동차보험 접수): 모바일은 번호 + 세로 연결선, 900px 이상 4열 */
.steps-block { margin-top: 36px; }
.steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.step { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 0 0 24px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--orange-100); }
.step__num {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--orange-600); color: #fff; font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums;
}
.step__body { display: grid; gap: 4px; color: var(--ink-2); padding-top: 8px; }
.step__title { color: var(--ink); font-size: 1.06rem; }
.steps + p, .steps + .cta-row { margin-top: 16px; }
@media (min-width: 900px) {
  /* 단계 수만큼 칸을 나눈다 (2·3단계에서 빈 칸이 남지 않게). 5단계 이상이면 4열로 줄바꿈 */
  .steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px; }
  .steps:has(> :nth-child(5)) { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
  .step { flex-direction: column; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .section--white .step { background: var(--cream); }
  .step:not(:last-child)::before { left: auto; right: -17px; top: 43px; bottom: auto; width: 18px; height: 2px; }
  .step__body { padding-top: 0; }
}

/* 카드·패널 */
.card-grid { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 720px) {
  .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) and (max-width: 1023px) {
  .card-grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }    /* 2열에서 홀로 남는 카드 */
}
@media (min-width: 1024px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--3 > :last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
}
.card-grid--1 { max-width: none; }
/* 링크 카드가 하나뿐이면 가로형(사진 | 글)으로 전폭을 쓴다 */
@media (min-width: 720px) {
  .card-grid--1 .card--link { flex-direction: row; }
  .card-grid--1 .card--link .card__media { flex: 0 0 46%; }
  .card-grid--1 .card--link .card__media img { height: 100%; }
  .card-grid--1 .card__body { justify-content: center; padding: clamp(24px, 3vw, 40px); }
}
.card, .panel {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 30px); box-shadow: var(--sh-sm); color: var(--ink-2);
}
.section--cream .card, .section--cream .panel, .section--tint .card, .section--tint .panel { background: var(--white); }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.panel { margin-top: 28px; }
.panel .cta-row, .card .cta-row { margin-top: 18px; }

/* 링크 카드 (카드 전체가 링크 — h3 안의 a 를 카드 크기로 늘린다). 떠오르는 효과는 이 카드만 */
.card--link { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--white);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.section--white .card--link { background: var(--cream); }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.card--link .card__media { margin: 0; }
.card--link .card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s var(--ease); }
.card--link:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__link { color: var(--ink); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card--link:focus-within { outline: 3px solid var(--orange-600); outline-offset: 3px; }
.card__body p { margin: 0 0 .6em; }
.card__arrow { margin-top: auto; align-self: flex-end; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--orange-50); color: var(--orange-600); transition: background-color .3s var(--ease), color .3s var(--ease); }
.card--link:hover .card__arrow { background: var(--orange-600); color: #fff; }

/* 사진 */
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-md); box-shadow: var(--sh); background: var(--beige); }
.photo figcaption { margin-top: 10px; font-size: .92rem; color: var(--muted); }

.split { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .split--hours, .split--location { grid-template-columns: 5fr 6fr; align-items: start; }
}
@media (max-width: 959px) {
  .split--hours .hours-card, .split--location .location-card { order: -1; }   /* 모바일은 표·주소 카드 먼저 */
}
.split__text .prose + * { margin-top: 20px; }
.split__text .panel { margin-top: 20px; }

/* 사진이 있는 H3 블록 (교통사고 진료·입원실) */
.feature { display: grid; gap: 20px; margin-top: clamp(36px, 6vw, 64px); align-items: center; }
.feature__text { color: var(--ink-2); }
.feature__text h3 { font-size: clamp(1.22rem, 1.1rem + .55vw, 1.5rem); }
@media (max-width: 959px) { .feature__media { order: -1; } }
@media (min-width: 960px) {
  .feature { grid-template-columns: 5fr 7fr; gap: 56px; }
  .feature--flip { grid-template-columns: 7fr 5fr; }
  .feature--flip .feature__text { order: 2; }
}
.stack { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) {
  .stack--2, .stack--3 { grid-template-columns: 1fr 1fr; }
  .stack--3 .photo--lead { grid-column: 1 / -1; }
}

/* 둘러보기: 모바일은 가로 스크롤, 넓은 화면은 격자. 캡션은 사진 아래 */
.tour {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px; margin-top: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--sand) transparent; border-radius: var(--r-sm);
}
.tour .photo { scroll-snap-align: start; }
.photo--tile img { transition: transform .6s var(--ease); }
@media (min-width: 640px) { .tour { grid-auto-columns: 48%; } }
@media (min-width: 960px) {
  .tour { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; padding: 0; }
}

/* ── 진료시간 ───────────────────────────────── */
.hours-card { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh); padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); overflow-x: auto; }
.hours-table caption { text-align: left; font-weight: 700; padding-bottom: 12px; color: var(--ink); font-size: .96rem; }
.hours-table th, .hours-table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hours-table thead th { font-size: .875rem; color: var(--muted); font-weight: 600; padding-top: 0; }
.hours-table tbody th { font-weight: 700; white-space: nowrap; }
.hours-table tbody tr:last-child > * { border-bottom: 0; }
.hours-table td:nth-child(2) { font-weight: 700; color: var(--ink); font-size: 1.06rem; white-space: nowrap; }
.hours-table td:nth-child(3) { color: var(--muted); white-space: nowrap; }
.hours-table tr.is-today > * { background: var(--orange-50); }
.today-label { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--orange-600); color: #fff; font-size: .875rem; font-weight: 700; vertical-align: 1px; }
.hours-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--cream); color: var(--ink-2); font-size: .95rem; }
.hours-note .ico { margin-top: .3em; color: var(--orange-600); }

/* 진료시간·오시는 길 요약 */
.info-grid { display: grid; gap: 16px; margin-top: 8px; }
.prose + .info-grid { margin-top: 24px; }
@media (min-width: 800px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: clamp(20px, 3vw, 28px); }
.section--white .info-card { background: var(--cream); }
.info-card__label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 800; color: var(--ink); }
.info-card__label .ico { color: var(--orange-600); }
.info-card__list { margin: 0; display: grid; gap: 6px; }
.info-card__list div { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.info-card__list dt { min-width: 7em; color: var(--muted); font-weight: 600; }
.info-card__list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.info-card__note { margin: 12px 0 4px; font-size: .92rem; color: var(--ink-2); }
.info-card__addr { font-weight: 700; color: var(--ink); }
.info-card .cta-row { margin-top: 12px; }

/* ── 오시는 길 ──────────────────────────────── */
.location-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); padding: clamp(20px, 3vw, 30px); }
.location__list { margin: 0; display: grid; }
.location__row { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.location__row:first-child { padding-top: 0; }
.location__row:last-child { border-bottom: 0; }
.location__row dt { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.location__row dt .ico { color: var(--orange-600); }
.location__row dd { margin: 0; font-weight: 600; display: grid; gap: 2px; }
.location__row dd a { color: var(--ink); }
.location-card .cta-row { margin-top: 20px; }

/* ── FAQ ───────────────────────────────────── */
/* 질문이 5~10개 이상이라 카드를 쌓지 않고 한 장의 면에 구분선으로 나눈다 */
.faq {
  max-width: 880px; margin-top: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden;
}
.faq__item + .faq__item { border-top: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; gap: 16px; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 16px 20px; font-weight: 700; font-size: 1.02rem; line-height: 1.5; color: var(--ink);
  transition: background-color .2s var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { background: var(--cream); }
.faq__item summary:focus-visible { outline-offset: -3px; border-radius: 0; }
.faq__item[open] summary { color: var(--orange-700); }
/* + / − : 세로 막대가 90도 돌아 가로 막대에 겹친다 */
.faq__icon, .toc__icon {
  flex: none; width: 28px; height: 28px; padding: 5px; border-radius: 50%;
  background: var(--orange-50); color: var(--orange-600); transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.faq__icon-v, .toc__icon-v { transform-origin: 12px 12px; transition: transform .3s var(--ease); }
.faq__item[open] .faq__icon, .toc[open] .toc__icon { background: var(--orange-600); color: #fff; transform: rotate(180deg); }
.faq__item[open] .faq__icon-v, .toc[open] .toc__icon-v { transform: rotate(90deg); }
.faq__answer { padding: 0 20px 20px; color: var(--ink-2); }
.faq__answer p:last-child { margin-bottom: 0; }
.faq + .prose { margin-top: 24px; }
/* 열림 높이 전환: interpolate-size 지원 브라우저만. 나머지는 바로 열린다. 동작 줄이기 설정이면 전역 규칙이 끈다 */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq__item::details-content, .toc::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .35s var(--ease), content-visibility .35s allow-discrete;
  }
  .faq__item[open]::details-content, .toc[open]::details-content { block-size: auto; }
}

/* ── 이 페이지 목차 (H2 5개 이상) ───────────────── */
.toc-wrap { padding: 20px 0 0; background: var(--white); }
.toc { max-width: none; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--cream); }
.toc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 10px 16px; font-weight: 800; color: var(--ink);
}
.toc summary::-webkit-details-marker { display: none; }
.toc__list { margin: 0; padding: 0 16px 16px 40px; display: grid; gap: 4px; counter-reset: none; }
.toc__list li { color: var(--muted); }
.toc__list a { display: block; padding: 10px 0; min-height: 44px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.toc__list a:hover { color: var(--orange-600); text-decoration: underline; }
@media (min-width: 960px) { .toc__list { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
@media (min-width: 1200px) { .toc__list { grid-template-columns: repeat(3, 1fr); } }

.link-list { list-style: none; margin: 0 0 1em; padding: 0; border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.link-list a:hover { color: var(--orange-600); }
.link-list .ico { color: var(--orange-600); }

/* ── 개인정보처리방침·404 본문 ─────────────────── */
.legal__section { padding: 26px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.legal__section:first-child { padding-top: 0; }
.legal__section:last-child { border-bottom: 0; }
.legal__section h2 { font-size: 1.2rem; margin-bottom: 12px; }
.legal__section h3 { font-size: 1.05rem; margin: 16px 0 8px; }

/* ── 페이지 끝 문의 띠 (진한 웜 면) ────────────────── */
.cta-band { background: var(--warm-dark); color: #fff; padding: clamp(44px, 6vw, 72px) 0; }
.cta-band__inner { display: grid; gap: 22px; align-items: center; }
.cta-band__title { color: #fff; font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.9rem); margin-bottom: 8px; }
.cta-band__text p { margin: 0 0 6px; color: rgba(255, 255, 255, .9); }
.cta-band__addr { display: flex; gap: 8px; align-items: flex-start; font-size: .94rem; }
.cta-band__addr .ico { margin-top: .3em; color: var(--mint); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 10px 12px; }
@media (min-width: 960px) { .cta-band__inner { grid-template-columns: 1.2fr 1fr; } .cta-band__actions { justify-content: flex-end; } }
@media (max-width: 479px) { .cta-band__actions .btn { width: 100%; } }

/* ── 푸터 ───────────────────────────────────── */
.site-footer { background: var(--ivory); border-top: 1px solid var(--line); padding: 44px 0 24px; color: var(--ink-2); font-size: .94rem; }
.footer-grid { display: grid; gap: 28px; }
.footer-brand img { height: 30px; width: auto; margin-bottom: 14px; }
.footer-brand p, .footer-brand address { margin: 0 0 4px; }
.biz-name { font-weight: 800; color: var(--ink); font-size: 1rem; }
.footer-brand a, .footer-links a { color: var(--ink); }
.footer-hours { margin: 0 0 18px; display: grid; gap: 2px; }
.footer-hours div { display: flex; flex-wrap: wrap; gap: 0 12px; }
.footer-hours dt { min-width: 7em; color: var(--muted); }
.footer-hours dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.footer-sitemap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: 0 0 20px; }
.footer-sitemap__group .footer-title { margin: 0 0 4px; font-weight: 800; color: var(--ink); font-size: .94rem; }
.footer-sitemap ul { list-style: none; margin: 0; padding: 0; }
.footer-sitemap a { display: block; padding: 8px 0; color: var(--ink-2); text-decoration: none; }
.footer-sitemap a:hover { color: var(--orange-600); text-decoration: underline; }
@media (min-width: 640px) { .footer-sitemap { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { font-weight: 600; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; } }

/* ── 모바일 하단 퀵바 (유리 효과) ────────────────── */
.quickbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(245, 247, 250, .84);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-top: 1px solid rgba(195, 206, 220, .6);
  box-shadow: 0 -6px 20px rgba(30, 58, 107, .08);
}
.quickbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 700;
}
.quickbar__item .ico { width: 22px; height: 22px; color: var(--orange-600); }
.quickbar__item--tel { background: var(--orange-600); color: #fff; }
.quickbar__item--tel .ico { color: #fff; }
.quickbar__item--tel:hover { color: #fff; background: var(--orange-700); }
.quickbar__item[aria-current="page"] { background: var(--orange-50); color: var(--orange-700); }
body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .quickbar { display: none; }
  body { padding-bottom: 0; }
}

/* ── 스크롤 등장: 사진·카드 묶음에만. JS 가 있을 때만 숨긴다 (main.js 가 3초 안에 안 뜨면 <head> 가 .js 를 뗀다) ── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__slide img { transform: none; }
}

@media print {
  .site-header, .quickbar, .hero__media, .hero__shade, .page-head__bg, .page-head__shade, .cta-band { display: none; }
  .hero, .page-head--photo { color: var(--ink); min-height: 0; }
  .hero h1, .page-head--photo h1 { color: var(--ink); text-shadow: none; }
}

/* ══ 2차 디자인 검수 반영 ══════════════════════ */
/* /hours/ 360·390px: "오늘" 배지를 둘째 줄로, 칸 여백 축소, 점심 칸 줄바꿈 허용 */
@media (max-width: 479px) {
  .today-label { display: block; width: max-content; margin: 4px 0 0; }
  .hours-table th, .hours-table td { padding: 12px 6px; }
  .hours-table td:nth-child(3) { white-space: normal; }
}
/* 진료시간 dl: 홈 요약 카드·연락처 카드·푸터 공통 */
.hours-dl { margin: 0; display: grid; gap: 6px; }
.hours-dl div { display: grid; grid-template-columns: 6.5em 1fr; gap: 0 10px; align-items: baseline; }
.hours-dl dt { color: var(--muted); font-weight: 600; }
.hours-dl dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.dd-sub { display: block; font-size: .875rem; font-weight: 500; color: var(--muted); }
.footer-hours { margin: 0 0 18px; }
.info-card .hours-dl { margin-bottom: 4px; }
.info-card--link { position: relative; }
.info-card--link h3 { font-size: 1.12rem; }
.info-card--link h3 a { color: var(--ink); text-decoration: none; }
.info-card--link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.info-card--link:hover { box-shadow: var(--sh); }
.info-card--link:focus-within { outline: 3px solid var(--orange-600); outline-offset: 3px; }
.card-grid .info-card { height: 100%; }
/* 사진 먼저 (모바일): 입원실 설비 목록 앞에 사진 묶음, 사진 1장 분할 배치도 사진 먼저 */
.media-first { display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 959px) {
  .media-first > .stack { order: -1; }
  .split > .photo { order: -1; }
}
@media (min-width: 960px) { .media-first { display: block; } .media-first > .stack { margin-top: 28px; } }
/* 노선 번호 등 하이픈에서 줄바꿈 금지 */
.nowrap { white-space: nowrap; }
/* 터치 영역 */
@media (pointer: coarse) { .btn--sm { min-height: 44px; } }
.location__row dd a { display: inline-block; padding-block: 8px; }
/* 문의 띠: 진한 면 위에서는 버튼 그림자 없음 */
.cta-band .btn--primary { box-shadow: none; }
.footer-bottom { font-size: .875rem; }
/* /treatment/ 링크가 아닌 카드 묶음은 카드 대신 구분선 목록 */
.card-grid:not(.card-grid--links) { gap: 0 32px; align-items: start; }
.card-grid:not(.card-grid--links) > .card,
.section--cream .card-grid:not(.card-grid--links) > .card,
.section--tint .card-grid:not(.card-grid--links) > .card {
  background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 20px 0;
}

/* ══ 3차 디자인 검수 반영 ══════════════════════ */
/* 메뉴가 열려 있으면 퀵바를 숨겨 마지막 메뉴 항목을 누를 수 있게 */
html:has(#menu-toggle:checked) .quickbar { display: none; }
/* 넓은 화면에서는 숨은 체크박스에 Tab 이 멈추지 않게 */
@media (min-width: 1024px) { .menu-toggle { display: none; } }
/* 열림 전환도 동작 줄이기 설정이면 끈다 */
@media (prefers-reduced-motion: reduce) {
  .faq__item::details-content, .toc::details-content { transition: none; }
}
/* 1600 원본이 없는 머리 사진(966 폭 확대)은 살짝 흐려 의도된 배경처럼 */
.page-head--soft .page-head__bg img { filter: blur(2px); transform: scale(1.04); }


@media (prefers-reduced-motion: reduce) {
  .gnb__list > li > a::before { transition: none; }
}

/* ── 구글 지도 (오시는 길·입원 및 상담 안내) ── */
.map { margin: 0; }
.map__frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh); background: var(--cream); }
.map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: .92rem; }
.map__links a { display: inline-block; padding-block: 8px; color: var(--orange-700); font-weight: 600; }
/* 지도 | 주소 카드 2열. 모바일은 카드 먼저, 지도 아래 */
.split--map { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 3vw, 28px); margin-top: clamp(16px, 3vw, 28px); }
.split--map > :last-child { order: -1; }
@media (min-width: 960px) {
  .split--map { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .split--map > :last-child { order: 0; }
  .split--map .map { display: flex; flex-direction: column; }
  .split--map .map__frame { flex: 1; aspect-ratio: auto; min-height: 300px; }
}

.hours-note--admit { margin-top: 8px; color: var(--orange-700); }

/* 메인 히어로: 키워드 H1은 작은 윗줄, 홍보 문구를 크게 (검색용 H1 유지 + 화면은 간결하게) */
.hero h1.hero__kicker { font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); font-weight: 700; letter-spacing: 0; line-height: 1.5; max-width: 40em; color: rgba(255, 255, 255, .92); }
.hero__display { margin: 14px 0 0; display: grid; gap: 10px; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .3); }
.hero__display-main { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.03em; text-wrap: balance; }
.hero__display-sub { font-size: clamp(1.1rem, .95rem + .8vw, 1.5rem); font-weight: 600; line-height: 1.45; color: rgba(255, 255, 255, .94); text-wrap: balance; }
/* 메인 히어로: 내용은 위아래 가운데. 하위 페이지 높이로 줄였다가 여백이 모자라 조금 늘림 (사용자 요청 2026-09-29) */
.hero { min-height: clamp(460px, 52vw, 600px); align-items: center; }
.hero__content { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); }
.hero__lead { margin-top: 18px; max-width: none; }
/* 리드 문장은 한 문장이 한 줄로 (사용자 요청 2026-09-29). 한 줄에 다 들어가는 넓은 화면에서만 줄바꿈을 막는다 */
@media (min-width: 1100px) { .hero__lead p { white-space: nowrap; } }
.hero__lead p:last-child { margin-bottom: 0; }

/* 진료시간 표 (모던): 카드 없이 얇은 선, 촘촘한 행 */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hours-modern { max-width: 760px; }
.hours-table--modern { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.hours-table--modern thead th { padding: 10px 12px; font-size: .82rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; border-bottom: 1px solid var(--line); }
.hours-table--modern tbody th, .hours-table--modern td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.hours-table--modern tbody th { font-weight: 700; color: var(--ink); width: 28%; }
.hours-table--modern td:nth-child(2) { font-size: 1rem; font-weight: 700; }
.hours-table--modern td:nth-child(3) { color: var(--muted); font-size: .92rem; }
.hours-table--modern tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.hours-table--modern tr.is-today > * { background: var(--orange-50); }
.hours-modern__note { margin: 10px 0 0; font-size: .88rem; color: var(--ink-2); }
.hours-modern__note strong { color: var(--orange-700); }

/* 사진 캐러셀: 모든 폭에서 가로로 넘기고, 넓은 화면엔 이전·다음 버튼 */
.carousel { position: relative; }
.tour--carousel { grid-auto-flow: column !important; grid-template-columns: none !important; grid-auto-columns: 84%; overflow-x: auto !important; overflow-y: hidden !important; padding-bottom: 12px !important; scroll-behavior: smooth; }
@media (min-width: 640px) { .tour--carousel { grid-auto-columns: 46%; } }
@media (min-width: 960px) { .tour--carousel { grid-auto-columns: calc((100% - 28px) / 3); } }
.carousel__nav { position: absolute; top: -52px; right: 0; display: flex; gap: 8px; }
.carousel__nav[hidden] { display: none; }
.carousel__btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: var(--sh-sm); }
.carousel__btn:hover { color: var(--orange-700); border-color: var(--orange-600); }
@media (max-width: 639px) { .carousel__nav { display: none !important; } }

/* 하위 페이지 머리말 크로스페이드 (한의원 소개) */
.page-head__bg .hero__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head__bg .hero__slide--soft img { filter: blur(2px); }   /* 966px 원본은 흐림을 의도한 배경처럼 */

/* 제목 + 글 한 덩어리뿐인 섹션(짧은 글·FAQ·진료시간 표)은 넓은 화면에서 [제목 | 내용] 2열.
   제목과 글이 왼쪽 760px 에만 몰려 오른쪽이 비던 문제 (사용자 지적 2026-09-29) */
@media (min-width: 1024px) {
  .section > .container:has(> .section-head + :is(.prose, .hours-modern):last-child),
  .section > .container:has(> .section-head + .prose + .cta-row:last-child),
  .section > .container:has(> .section-head + .faq),
  .section > .container:has(> .section-head + .prose + .faq) {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 5vw, 80px); align-items: start;
  }
  .section > .container:is(:has(> .section-head + :is(.prose, .hours-modern):last-child), :has(> .section-head + .prose + .cta-row:last-child), :has(> .section-head + .faq), :has(> .section-head + .prose + .faq)) > * { grid-column: 2; min-width: 0; }
  .section > .container:is(:has(> .section-head + :is(.prose, .hours-modern):last-child), :has(> .section-head + .prose + .cta-row:last-child), :has(> .section-head + .faq), :has(> .section-head + .prose + .faq)) > .section-head {
    grid-column: 1; grid-row: 1 / span 20; margin-bottom: 0;   /* 제목은 고정하지 않는다 (사용자 지시 2026-09-29) */
  }
  .section > .container > .section-head ~ .faq, .section > .container > .section-head ~ .prose { margin-top: 0; }
  .section > .container > .section-head ~ .prose + .faq { margin-top: 24px; }
  .faq { max-width: none; }
}

/* FAQ 섹션이 연달아 오면 같은 배경이라 위 여백을 겹치지 않는다 */
.section--tint + .section--tint { padding-top: 0; }
