/* =========================================================
   서브페이지(진료과목/소개) 공통 템플릿 스타일
   ========================================================= */

/* 서브 히어로 */
.sub-hero {
  position: relative; min-height: 300px; display: flex; align-items: flex-end; color: #fff;
  background: var(--primary-dark) center / cover no-repeat;
}
.sub-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,45,36,.35), rgba(20,45,36,.78)); }
.sub-hero .container { position: relative; padding-bottom: 44px; padding-top: 70px; }
.breadcrumb { font-size: 13.5px; opacity: .85; margin-bottom: 12px; }
.breadcrumb a:hover { text-decoration: underline; }
.sub-hero h1 { font-size: 40px; font-weight: 900; }
.sub-hero .lead { margin: 10px 0 0; font-size: 17px; opacity: .9; max-width: 640px; font-weight: 300; }

/* 2뎁스 탭 내비 */
.sub-tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: var(--header-h); z-index: 500; }
.sub-tabs ul { display: flex; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sub-tabs a {
  display: block; padding: 16px 22px; white-space: nowrap; font-weight: 500; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px; transition: all .2s; font-size: 15px;
}
.sub-tabs a:hover { color: var(--primary); }
.sub-tabs li.active a { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* 본문 */
.page-body { padding: 70px 0 80px; }
.page-body .container { max-width: 960px; }
.page-body.wide .container { max-width: var(--container); }
.page-section { margin-bottom: 64px; }
.page-section:last-child { margin-bottom: 0; }
.page-section > h2 {
  font-size: 28px; font-weight: 900; margin-bottom: 22px; padding-bottom: 14px; position: relative; color: var(--primary-dark);
}
.page-section > h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 4px; background: var(--accent); border-radius: 2px; }
.page-section h3 { font-size: 20px; margin: 28px 0 10px; color: var(--primary-dark); }
.page-section p { color: #444; }
.page-section p.lead { font-size: 18px; font-weight: 500; color: var(--text); }
.page-section img.figure { border-radius: 12px; border: 1px solid var(--line); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* 인용/도입 문구 */
.intro-quote {
  background: var(--ivory); border-radius: var(--radius); padding: 30px 34px; margin-bottom: 40px;
  border-left: 5px solid var(--accent);
}
.intro-quote p { margin: 0 0 6px; font-size: 17px; font-weight: 500; color: var(--primary-dark); }
.intro-quote p:last-child { margin: 0; }
.intro-quote .by { font-size: 14px; color: var(--muted); font-weight: 400; margin-top: 12px; }

/* 강조 박스 */
.highlight-box {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff;
  border-radius: var(--radius); padding: 32px 36px; margin: 26px 0;
}
.highlight-box h3 { color: #fff; margin: 0 0 10px; font-size: 21px; }
.highlight-box h3 small { display: block; font-size: 13px; color: #d9c9a3; letter-spacing: .1em; font-weight: 700; margin-bottom: 6px; }
.highlight-box p { color: rgba(255,255,255,.9); margin: 0; }
.highlight-box ul { margin-top: 12px; display: grid; gap: 6px; }
.highlight-box li { padding-left: 20px; position: relative; color: rgba(255,255,255,.92); }
.highlight-box li::before { content: "✓"; position: absolute; left: 0; color: #d9c9a3; font-weight: 900; }

.note-box { background: var(--ivory); border-radius: 12px; padding: 20px 24px; font-size: 14.5px; color: #555; margin: 20px 0; }
.note-box strong { color: var(--primary-dark); }
.warn-box { background: #fff5f4; border: 1px solid #f2c9c5; border-radius: 12px; padding: 20px 24px; font-size: 14.5px; color: #7a2f2b; margin: 20px 0; }

/* 카드 그리드 */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px 22px;
  transition: all .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .c-num { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--accent); margin-bottom: 8px; }
.card .c-icon { font-size: 30px; line-height: 1; margin-bottom: 12px; }
.card h4 { font-size: 17px; margin-bottom: 8px; color: var(--primary-dark); }
.card p { font-size: 14.5px; color: #555; margin: 0; }
.card ul { margin-top: 8px; }
.card li { font-size: 14px; color: #555; padding-left: 14px; position: relative; line-height: 1.6; margin-bottom: 4px; }
.card li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.card.link { display: block; }
.card.link .more { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--primary); }

/* 체크리스트 */
.check-list { display: grid; gap: 8px; margin: 10px 0 18px; }
.check-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 12px 46px; position: relative; font-size: 15px;
}
.check-list li::before {
  content: "✓"; position: absolute; left: 14px; top: 11px; width: 22px; height: 22px; border-radius: 6px;
  background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.check-group h4 { font-size: 15px; color: var(--accent); margin: 18px 0 8px; letter-spacing: .04em; }

/* 스텝 리스트 */
.step-list { display: grid; gap: 14px; margin-top: 10px; counter-reset: step; }
.step-list li {
  display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px;
}
.step-num {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px;
}
.step-list h4 { font-size: 17px; margin-bottom: 4px; }
.step-list p { margin: 0; font-size: 14.5px; color: #555; }

/* 2단 (이미지 + 텍스트) */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin: 20px 0; }
.two-col.rev > :first-child { order: 2; }
.two-col img { border-radius: 12px; border: 1px solid var(--line); width: 100%; }
.two-col h3 { margin-top: 0; }

/* 표 */
.info-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.info-table th, .info-table td { border: 1px solid var(--line); padding: 12px 14px; vertical-align: top; text-align: left; }
.info-table th { background: var(--ivory); color: var(--primary-dark); font-weight: 700; white-space: nowrap; }
.info-table thead th { background: var(--primary); color: #fff; text-align: center; }
.info-table td.center, .info-table th.center { text-align: center; }
.table-wrap { overflow-x: auto; }

/* 비교 표(VS) */
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.vs-grid .card h4 { text-align: center; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 18px 40px 18px 44px; font-weight: 700; font-size: 16px; position: relative; list-style: none; color: var(--primary-dark);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; position: absolute; left: 6px; top: 16px; color: var(--accent); font-weight: 900; font-size: 18px; }
.faq summary::after { content: "+"; position: absolute; right: 10px; top: 14px; font-size: 22px; color: var(--muted); font-weight: 300; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 20px 20px 44px; color: #555; font-size: 15px; position: relative; }
.faq .a::before { content: "A"; position: absolute; left: 6px; top: -2px; color: var(--primary); font-weight: 900; font-size: 18px; }

/* 이미지 갤러리 (서브) */
.img-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.img-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.img-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.img-row figure { margin: 0; }
.img-row img { width: 100%; border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 4 / 3; object-fit: cover; }
.img-row.free img { aspect-ratio: auto; }
.img-row figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }

/* 원장 약력 페이지 */
.profile { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.profile img { border-radius: var(--radius); box-shadow: var(--shadow); }
.profile h2 { font-size: 30px; font-weight: 900; }
.profile .role { color: var(--accent); font-weight: 700; margin-bottom: 20px; }
.profile h3 { font-size: 16px; color: var(--accent); letter-spacing: .06em; margin: 26px 0 10px; }
.profile ul li { padding: 8px 0 8px 16px; border-bottom: 1px dashed var(--line); position: relative; font-size: 15px; }
.profile ul li::before { content: ""; position: absolute; left: 0; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* 관련 링크 */
.related-links { display: flex; flex-wrap: wrap; gap: 10px; }
.related-links a {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 500; background: #fff; transition: all .2s;
}
.related-links a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* 하단 CTA */
.page-cta {
  background: var(--ivory); border-radius: var(--radius); padding: 40px; text-align: center; margin-top: 60px;
}
.page-cta h3 { font-size: 24px; margin: 0 0 8px; }
.page-cta p { color: var(--muted); margin-bottom: 22px; }
.page-cta .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 면책 문구 */
.disclaimer { font-size: 12.5px; color: #888; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 40px; line-height: 1.6; }

/* 치료 사례 (전·후 사진) */
.ba-case { margin: 26px 0 34px; }
.ba-case h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.ba-case h3 .tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #fff; background: var(--accent); padding: 4px 10px; border-radius: 999px; }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ba-grid figure { margin: 0; }
.ba-grid img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.ba-grid figcaption { text-align: center; font-weight: 700; color: var(--primary-dark); margin-top: 8px; font-size: 15px; }
.ba-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: #555; margin: 12px 0 0; }
.ba-legend span::before { content: ""; display: inline-block; width: 26px; height: 0; border-top: 3px solid; margin-right: 6px; vertical-align: middle; }
.ba-legend .l-mid::before { border-color: var(--primary); }
.ba-legend .l-axis::before { border-color: #d63031; border-top-style: dashed; }
.ba-legend .l-mouth::before { border-color: var(--accent); border-top-style: dashed; }
.ba-note { font-size: 13px; color: #777; margin-top: 10px; }
@media (max-width: 600px) { .ba-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .ba-grid figcaption { font-size: 13px; } }

/* =========================================================
   원장칼럼 (목록 + 본문)
   ========================================================= */
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: all .25s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.post-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .cat { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .08em; }
.post-card h3 { font-size: 18px; line-height: 1.45; color: var(--primary-dark); }
.post-card p { font-size: 14px; color: #555; margin: 0; flex: 1; }
.post-card time { font-size: 12.5px; color: var(--muted); }
.post-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.post-filter a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; background: #fff; }
.post-filter a.active, .post-filter a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

article.post { max-width: 820px; margin: 0 auto; }
.post-head { margin-bottom: 30px; }
.post-head .cat { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .08em; }
.post-head h1 { font-size: 34px; font-weight: 900; line-height: 1.35; margin: 10px 0 14px; color: var(--primary-dark); }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); align-items: center; }
.post-meta .author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.post-meta .author img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top; }
.post-hero { border-radius: var(--radius); overflow: hidden; margin: 0 0 30px; }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.summary-box { background: var(--primary-light); border-left: 5px solid var(--primary); border-radius: 12px; padding: 22px 26px; margin: 0 0 30px; }
.summary-box h2 { font-size: 16px; color: var(--primary-dark); margin: 0 0 10px; letter-spacing: .04em; }
.summary-box ul { display: grid; gap: 6px; }
.summary-box li { padding-left: 18px; position: relative; font-size: 15.5px; }
.summary-box li::before { content: "•"; position: absolute; left: 4px; color: var(--primary); font-weight: 900; }

.toc { background: var(--ivory); border-radius: 12px; padding: 18px 24px; margin: 0 0 34px; font-size: 14.5px; }
.toc strong { display: block; margin-bottom: 8px; color: var(--primary-dark); }
.toc ol { padding-left: 20px; margin: 0; display: grid; gap: 4px; }
.toc a:hover { color: var(--primary); text-decoration: underline; }

.post-body h2 { font-size: 24px; font-weight: 900; margin: 44px 0 14px; color: var(--primary-dark); padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); scroll-margin-top: 140px; }
.post-body h3 { font-size: 19px; margin: 28px 0 10px; color: var(--primary-dark); }
.post-body p { color: #3a3a3a; font-size: 16.5px; line-height: 1.85; }
.post-body img { border-radius: 12px; border: 1px solid var(--line); margin: 10px 0 18px; }
.post-body figure { margin: 18px 0; }
.post-body figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.post-body blockquote { margin: 22px 0; padding: 18px 24px; background: var(--ivory); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; font-size: 16.5px; color: var(--primary-dark); }
.post-body ul.check-list { margin: 12px 0 22px; }
.post-body .info-table { font-size: 15px; }
.post-body .key-answer { background: #fff; border: 2px solid var(--primary); border-radius: 12px; padding: 16px 22px; margin: 16px 0 22px; font-size: 16px; }
.post-body .key-answer strong { color: var(--primary-dark); }

.references { font-size: 13.5px; color: #666; background: var(--ivory); border-radius: 12px; padding: 18px 22px; margin-top: 40px; }
.references h2 { font-size: 15px; margin: 0 0 8px; color: var(--primary-dark); border: 0; padding: 0; }
.references ol { padding-left: 20px; margin: 0; display: grid; gap: 4px; }

.author-box { display: flex; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-top: 40px; }
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; flex: 0 0 84px; }
.author-box h3 { margin: 0 0 4px; font-size: 18px; color: var(--primary-dark); }
.author-box p { margin: 0; font-size: 14px; color: #555; }
.author-box a { color: var(--primary); font-weight: 700; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.post-nav a { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 14px; }
.post-nav a span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.post-nav a:hover { border-color: var(--primary); color: var(--primary); }
.post-nav .next { text-align: right; }

/* 반응형 */
@media (max-width: 900px) {
  .post-list { grid-template-columns: repeat(2, 1fr); }
  .post-head h1 { font-size: 26px; }
  .post-body h2 { font-size: 21px; scroll-margin-top: 120px; }
  .author-box { flex-direction: column; text-align: center; }
  .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .two-col, .two-col.rev { grid-template-columns: 1fr; }
  .two-col.rev > :first-child { order: 0; }
  .profile { grid-template-columns: 1fr; }
  .profile img { max-width: 340px; }
  .img-row.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .sub-hero h1 { font-size: 30px; }
  .sub-hero { min-height: 240px; }
  .page-body { padding: 48px 0 60px; }
  .page-section > h2 { font-size: 24px; }
}
@media (max-width: 600px) {
  .post-list, .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .card-grid, .card-grid.cols-2, .card-grid.cols-4, .vs-grid { grid-template-columns: 1fr; }
  .img-row, .img-row.cols-2, .img-row.cols-4 { grid-template-columns: 1fr 1fr; }
  .sub-tabs a { padding: 14px 16px; font-size: 14px; }
  .highlight-box, .intro-quote { padding: 22px 20px; }
  .page-cta { padding: 28px 20px; }
}
