/* ═══════════════════════════════════════════
   오상신경외과 — Frontend Design Refinement
   "조용한 권위" — Luxury/Refined Medical Clinic
   ═══════════════════════════════════════════ */

/* ─── 순수 흑백 제거, 틴티드 뉴트럴로 ─── */
body {
  color: #2c2c2c;
  background: #faf9f7;
  line-height: 1.8;
  word-break: keep-all;
}

/* ─── 타이포그래피 스케일 (fluid clamp) ─── */
h1 { font-size: clamp(28px, 4.5vw, 52px); line-height: 1.25; letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3vw, 36px); line-height: 1.35; }
h3 { font-size: clamp(18px, 2.2vw, 24px); line-height: 1.4; }

/* ─── 섹션 리듬 (일정하지 않은 여백) ─── */
.ab-section,
.section,
[class*="-section"] {
  padding: clamp(64px, 10vw, 120px) 0;
}

/* ─── 라벨/뱃지 통일 스타일 ─── */
.ab-label,
[class*="__label"],
[class*="-label"] {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold, #c3a990);
  font-weight: 600;
}

/* ─── 제목에 세리프 적용 ─── */
.ab-title,
[class*="__title"],
[class*="-title"] {
  font-family: 'Noto Serif KR', serif;
}

/* ─── 카드 hover → 미세한 상승 + 보더 변화 (그림자 과다 방지) ─── */
[class*="card"]:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold, #c3a990) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 그림자 과다 방지 — 미세한 그림자만 */
[class*="card"] {
  box-shadow: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[class*="card"]:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

/* ─── 링크 호버 — 밑줄 애니메이션 ─── */
.ab-container a:not([class]),
.ts-container a:not([class]) {
  position: relative;
  color: var(--color-olive, #515c3e);
}
.ab-container a:not([class])::after,
.ts-container a:not([class])::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--color-olive, #515c3e);
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
}
.ab-container a:not([class]):hover::after,
.ts-container a:not([class]):hover::after {
  width: 100%;
}

/* ─── CTA 버튼 — 사각형에 가까운 미세 라운딩 ─── */
[class*="__btn"],
[class*="-btn"] {
  border-radius: 4px !important;
  letter-spacing: 0.02em;
  font-weight: 600;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ─── FAQ 아코디언 — 깔끔한 보더 스타일 ─── */
[class*="faq"] [class*="item"],
.faq-item {
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--color-border-warm, #f0ece7) !important;
  background: transparent !important;
}

/* ─── 증상/원인 번호 — Playfair italic ─── */
[class*="__num"],
[class*="-num"] {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--color-gold, #c3a990);
}

/* ─── 콘텐츠 보호 해제 (사용자 경험 우선) ─── */
::selection {
  background: rgba(195, 169, 144, 0.2);
  color: #2c2c2c;
}

/* ─── 포커스 가시성 (접근성) ─── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #c3a990;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── 스크롤바 브랜드 색상 ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #faf9f7; }
::-webkit-scrollbar-thumb { background: var(--color-gold, #c3a990); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-olive, #515c3e); }

/* ─── prefers-reduced-motion 대응 ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══ ANIMATE: 카드 호버 ═══ */
[class*="card"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ═══ ANIMATE: FAQ 답변 슬라이드 ═══ */
[class*="faq"] [class*="answer"] {
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ═══ ANIMATE: 버튼/CTA 호버 스케일 ═══ */
[class*="btn"]:hover,
[class*="cta"]:hover {
  transform: scale(1.02);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ═══ ANIMATE: 페이지 페이드인 ═══ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
main { animation: fadeIn 0.6s ease-out; }

/* ═══ BOLDER: CTA 섹션 그라디언트 배경 — 삭제 (각 페이지 고유 배경 사용) ═══ */

/* ═══ TYPESET ═══ */
h1, h2, h3 { letter-spacing: -0.02em; }
[class*="label"] {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  body { font-size: 16px; }
}

/* ─── 서브탭 모바일 스크롤 ─── */
.subtab-inner {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.subtab-inner::-webkit-scrollbar { display: none; }

/* ─── 수평 오버플로우 방지 ─── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ─── max-w-content 모바일 패딩 ─── */
.max-w-content {
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 768px) {
  .max-w-content {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (min-width: 1280px) {
  .max-w-content {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ─── 모바일 여백 조정 ─── */
@media (max-width: 768px) {
  .ab-section, .section, [class*="-section"] {
    padding: clamp(48px, 8vw, 80px) 0;
  }
  h1 { font-size: clamp(24px, 6vw, 36px); }
  h2 { font-size: clamp(20px, 5vw, 28px); }
}

/* ─── 반응형 줄바꿈 (어드민 CMS용) ─── */
br[data-br="pc"] { display: none; }
br[data-br="mobile"] { display: inline; }
@media (min-width: 768px) {
  br[data-br="pc"] { display: inline; }
  br[data-br="mobile"] { display: none; }
}
