/* 연세튼튼의원·한의원 — yonseitntn.com
   색상/폰트 체계는 sujitntn.com 포맷을 기준으로 구성 */

:root {
  --bg: #f8f7f3;
  --ink: #1f2a26;
  --text: #35423d;
  --muted: #5c6b64;
  --accent: #8a6a3b;      /* 오버라인 라벨용 골드 */
  --brand: #2e5943;       /* 메인 그린 (CTA/포인트) */
  --brand-dark: #223f32;
  --alt-bg: #e7ede7;      /* 섹션 교차 배경 */
  --line: #dfe3dc;
  --white: #ffffff;
  --radius: 6px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, .overline {
  font-family: "Noto Serif KR", serif;
  color: var(--ink);
  margin: 0;
}
h1 { font-size: 2.2rem; font-weight: 900; line-height: 1.35; }
h2 { font-size: 1.85rem; font-weight: 800; line-height: 1.35; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }
table { border-collapse: collapse; width: 100%; }

.overline {
  display: block;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.6em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* 상단 고지바 */
.topbar {
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  padding: 6px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.topbar a { color: #fff; font-weight: 700; }

/* 헤더 */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,247,243,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: "Noto Serif KR", serif; font-weight: 900; font-size: 1.15rem; color: var(--ink); }
.brand span { font-size: 0.62rem; letter-spacing: 0.12em; color: var(--muted); }
nav.main-nav { display: none; }
nav.main-nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink);
  padding: 8px 12px; display: inline-block;
}
nav.main-nav a:hover { color: var(--brand); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: none;
}
.btn:hover { background: var(--brand-dark); }
.btn-outline {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--brand);
  color: var(--brand) !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 19px;
  border-radius: var(--radius);
}
.menu-toggle {
  background: none; border: none; font-size: 1.4rem; color: var(--ink); cursor: pointer;
}

@media (min-width: 960px) {
  nav.main-nav { display: flex; }
  .menu-toggle { display: none; }
}

/* 모바일 메뉴 */
#mobileMenu {
  display: none;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
#mobileMenu.open { display: block; }
#mobileMenu a {
  display: block; padding: 14px 20px; border-bottom: 1px solid var(--line);
  font-size: 0.95rem; font-weight: 500; color: var(--ink);
}

/* 히어로 */
.hero { padding: 64px 0 56px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: 1.02rem; color: var(--text); max-width: 640px; }
.hero blockquote {
  margin: 24px 0; padding: 16px 20px;
  border-left: 3px solid var(--brand);
  background: var(--white);
  font-size: 0.92rem; color: var(--muted);
}
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* 섹션 공통 */
section { padding: 56px 0; }
section.alt { background: var(--alt-bg); }
section.dark { background: var(--brand); color: #fff; }
section.dark h2, section.dark .overline { color: #fff; }
section.white { background: var(--white); }
.section-head { max-width: 680px; margin-bottom: 34px; }
.section-head h2 { margin-bottom: 12px; }

/* 카드 그리드 */
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 700px) { .grid.cols-3 { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 900px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px;
}
section.dark .card { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.98rem; color: var(--muted); margin-bottom: 0; }
section.dark .card p { color: rgba(255,255,255,0.82); }

a.card.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
a.card.card-link h3 { color: var(--ink); position: relative; padding-right: 22px; }
a.card.card-link h3::after {
  content: "→";
  position: absolute; right: 0; top: 0;
  color: var(--brand);
  opacity: 0.7;
}
a.card.card-link:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(31,42,38,0.10);
  transform: translateY(-2px);
}

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.85rem;
  margin-bottom: 10px;
}

/* 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
table.data th, table.data td {
  padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.92rem;
}
table.data th { background: var(--alt-bg); font-weight: 700; color: var(--ink); }
table.data tr:last-child td { border-bottom: none; }

/* 원장 소개 */
.doctor-card { display: grid; gap: 26px; }
@media (min-width: 800px) { .doctor-card { grid-template-columns: 260px 1fr; align-items: start; } }
.doctor-photo {
  background: var(--alt-bg); border-radius: 12px; aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.85rem; text-align: center; padding: 20px;
}
.doctor-info h3 { font-size: 1.3rem; margin-bottom: 4px; }
.doctor-info .role { color: var(--accent); font-weight: 700; font-size: 0.88rem; margin-bottom: 16px; }
.doctor-info ul { margin: 0 0 16px; padding-left: 1.1em; font-size: 0.93rem; }
.doctor-info li { margin-bottom: 4px; }

/* 진료시간 표 */
.hours-note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

/* 오시는길 */
.location-grid { display: grid; gap: 18px; }
@media (min-width: 800px) { .location-grid { grid-template-columns: 1fr 1fr; } }
.info-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.info-row:last-child { border-bottom: none; }
.info-row .label { flex: 0 0 84px; font-weight: 700; color: var(--ink); }
.map-embed { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 260px; }
.map-embed iframe { width: 100%; height: 100%; min-height: 260px; border: 0; }

/* 링크아웃 카드 (비급여/건강정보) */
.linkout { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.linkout .btn-outline { white-space: nowrap; }

/* 배너/공지 */
.notice-empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--white); border: 1px dashed var(--line); border-radius: 10px; }

/* 칼럼 리스트 */
.column-list { display: grid; gap: 22px; }
@media (min-width: 700px) { .column-list { grid-template-columns: repeat(3,1fr); gap: 26px; } }
.column-item {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.column-item:hover { border-color: var(--brand); box-shadow: 0 8px 20px rgba(31,42,38,0.08); transform: translateY(-2px); }
.column-item img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.column-item .meta { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; }
.column-item .meta .tag { color: var(--accent); font-weight: 700; }
.column-item .meta .dot { color: var(--line); }
.column-item h3 { font-size: 1.05rem; line-height: 1.4; margin-bottom: 8px; word-break: keep-all; }
.column-item .excerpt {
  font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.column-item .more-link { margin-top: auto; font-size: 0.88rem; font-weight: 700; color: var(--brand); align-self: flex-start; }
.column-item .more-link:hover { text-decoration: underline; }

/* 풋터 */
footer.site-footer { background: var(--ink); color: rgba(255,255,255,0.82); padding: 40px 0 24px; font-size: 0.86rem; }
footer.site-footer .foot-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
footer.site-footer strong { color: #fff; }
footer.site-footer a { color: rgba(255,255,255,0.82); text-decoration: underline; }
footer.site-footer .legal { font-size: 0.78rem; color: rgba(255,255,255,0.55); border-top: 1px solid rgba(255,255,255,0.15); padding-top: 16px; margin-top: 10px; }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 10px; top: 10px; }

@media (min-width: 700px) {
  .hero h1 { font-size: 2.8rem; }
}

.mobile-only { display: block; }
.desktop-only { display: none; }
span.mobile-only { display: inline; }
span.desktop-only { display: none; }
@media (min-width: 700px) {
  .mobile-only { display: none; }
  .desktop-only { display: block; }
  span.mobile-only { display: none; }
  span.desktop-only { display: inline; }
}

/* 사진 */
.hero-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero-img { border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(31,42,38,0.12); }
.hero-img img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.card img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.doctor-photo { overflow: hidden; padding: 0; }
.doctor-photo img { width: 100%; height: 100%; min-height: 100%; object-fit: cover; border-radius: 12px; }
.doctor-photo { position: relative; }
.doctor-photo img { position: absolute; inset: 0; }
.gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-grid figure { margin: 0; }
.gallery-grid img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.gallery-grid figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 6px; text-align: center; }
.specialty-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.specialty-tags span { font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.specialty-tags span.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.hint { font-size: 0.78rem; color: var(--muted); margin-top: -8px; margin-bottom: 20px; }

/* 모바일 하단 고정 액션바 */
.mobile-actionbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 14px rgba(31,42,38,0.08);
}
.mobile-actionbar a {
  flex: 1; text-align: center; padding: 13px 4px;
  font-size: 0.85rem; font-weight: 700; color: var(--ink);
  border-right: 1px solid var(--line);
}
.mobile-actionbar a:first-child { color: var(--brand); }
.mobile-actionbar a:last-child { border-right: none; }
@media (max-width: 899px) {
  .mobile-actionbar { display: flex; }
  body { padding-bottom: 54px; }
}


/* ===== 건강정보 칼럼 상세 (article) ===== */
.article { padding: 36px 0 64px; }
.article-wrap { max-width: 800px; }
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.article-head h1 { font-size: 1.7rem; font-weight: 800; line-height: 1.4; word-break: keep-all; }
@media (min-width: 700px) { .article-head h1 { font-size: 2.05rem; } }
.article-meta { font-size: 0.88rem; color: var(--muted); margin: 14px 0 22px; }
.article h2 { font-size: 1.32rem; font-weight: 800; line-height: 1.45; margin: 44px 0 14px; word-break: keep-all; }
.article h3 { font-size: 1.05rem; margin: 22px 0 6px; line-height: 1.5; }
.article p { margin-bottom: 1.1em; }
.article sup a { color: var(--brand); font-size: 0.75em; padding: 0 1px; text-decoration: none; }
.art-fig { margin: 22px auto; max-width: 520px; }
.art-fig img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.summary-box { background: var(--alt-bg); border-left: 4px solid var(--brand); border-radius: 8px; padding: 20px 22px; margin: 6px 0 28px; }
.summary-box h2 { font-size: 1.05rem; margin: 0 0 10px; font-family: "Noto Sans KR", sans-serif; color: var(--brand); }
.summary-box ul { margin: 0; padding-left: 1.15em; }
.summary-box li { margin-bottom: 8px; font-size: 0.97rem; }
.summary-box li:last-child { margin-bottom: 0; }
table.compare caption { caption-side: top; text-align: left; font-size: 0.82rem; color: var(--muted); padding: 10px 14px 0; }
table.compare th[scope="row"] { background: var(--alt-bg); white-space: nowrap; }
table.compare td { min-width: 190px; }
.table-note { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.faq h3 { color: var(--brand); }
.legal-note { margin: 34px 0 10px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-size: 0.86rem; color: var(--muted); }
.refs { margin-top: 28px; }
.refs h2 { font-size: 1.05rem; margin-top: 0; }
.refs ol { padding-left: 1.4em; font-size: 0.86rem; color: var(--muted); }
.refs li { margin-bottom: 8px; word-break: break-word; }
.refs a { text-decoration: underline; text-underline-offset: 3px; }
.clinic-box { margin-top: 40px; padding: 24px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 6px 18px rgba(31,42,38,0.06); }
.clinic-box h2 { font-size: 1.2rem; margin: 0 0 8px; }
.clinic-lead { font-size: 0.95rem; color: var(--muted); }
.clinic-box dl { margin: 0 0 16px; }
.clinic-box dl > div { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.clinic-box dl > div:last-child { border-bottom: none; }
.clinic-box dt { flex: 0 0 76px; font-weight: 700; color: var(--ink); }
.clinic-box dd { margin: 0; }
.clinic-box .small { font-size: 0.78rem; color: var(--muted); }
.clinic-box .cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.back-list { margin-top: 26px; font-size: 0.92rem; }
.back-list a { color: var(--brand); font-weight: 700; }
.column-item h3 a { color: var(--ink); }
.column-item h3 a:hover { color: var(--brand); text-decoration: underline; }
.article p, .article li, .article dd, .article td, .article th, .article dt, .summary-box li { word-break: keep-all; overflow-wrap: break-word; }
table.compare th[scope="row"] { white-space: normal; }
@media (max-width: 640px) {
  table.compare th, table.compare td { padding: 10px 8px; font-size: 0.84rem; line-height: 1.55; }
  table.compare td { min-width: 0; }
  table.compare th[scope="row"] { width: 22%; }
  table.compare caption { padding: 10px 8px 0; }
}

.art-fig.wide { max-width: 720px; }
.related { margin-top: 34px; }
.related h2 { font-size: 1.05rem; margin: 0 0 8px; }
.related ul { margin: 0; padding-left: 1.2em; }
.related li { margin-bottom: 6px; word-break: keep-all; }
.related a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* nonpay tables: identical column widths across 양방/한방/제증명 */
table.data.nonpay { table-layout: fixed; }
table.data.nonpay th:nth-child(1), table.data.nonpay td:nth-child(1) { width: 52%; word-break: keep-all; overflow-wrap: break-word; }
table.data.nonpay th:nth-child(2), table.data.nonpay td:nth-child(2) { width: 28%; }
table.data.nonpay th:nth-child(3), table.data.nonpay td:nth-child(3) { width: 20%; }
table.data.nonpay td:nth-child(3) { color: var(--muted); font-size: 0.82rem; }
table.data.nonpay th:nth-child(3) { font-size: 0.85rem; }
@media (max-width:640px){ table.data.nonpay th, table.data.nonpay td { padding-left: 8px; padding-right: 8px; font-size: 0.86rem; } table.data.nonpay td:nth-child(3), table.data.nonpay th:nth-child(3) { font-size: 0.74rem; } table.data.nonpay th:nth-child(1), table.data.nonpay td:nth-child(1){width:46%;} table.data.nonpay th:nth-child(2), table.data.nonpay td:nth-child(2){width:29%;} table.data.nonpay th:nth-child(3), table.data.nonpay td:nth-child(3){width:25%;} }

.pc-br { display: none; }
@media (min-width: 641px) { .pc-br { display: inline; } }


/* 건강정보 목록: 검색 + 페이지 이동 */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.column-search-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.column-search { flex: 1 1 320px; margin: 0; }
.column-search input { width: 100%; box-sizing: border-box; padding: 14px 16px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.column-search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.column-status { margin: 0; font-size: 0.86rem; color: var(--muted); white-space: nowrap; }
.column-pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }
.pg-btn { min-width: 44px; height: 44px; padding: 0 16px; font: inherit; font-size: 0.92rem; font-weight: 700; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pg-btn:disabled { opacity: 0.4; cursor: default; }
.pg-indicator { font-size: 0.92rem; font-weight: 700; color: var(--ink); min-width: 48px; text-align: center; }
