/*
Theme Name: DermaOpenCost
Theme URI: https://dermaopencost.rand3.com
Author: DermaOpenCost
Description: 피부과 개원 비용 정보 검색 플랫폼 전용 테마. 심해군·민트 디자인 토큰 기반, Pretendard+Noto Serif KR 페어링.
Version: 1.0.0
Requires at least: 6.0
License: GNU General Public License v2 or later
Text Domain: dermaopencost
*/

:root {
  --navy: #0F2A44;
  --navy-800: #17344F;
  --navy-700: #1F4468;
  --navy-500: #2E5A82;
  --mint: #17B2A6;
  --mint-600: #0E9A8F;
  --mint-soft: #E4F6F3;
  --bg: #FFFFFF;
  --bg-soft: #F4F7FA;
  --ink: #16283A;
  --gray-700: #44566A;
  --gray-500: #71808F;
  --gray-400: #93A1AF;
  --line: #E3EAF0;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(15,42,68,.06);
  --shadow-md: 0 10px 34px rgba(15,42,68,.10);
  --container: 1180px;
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --font-display: 'Noto Serif KR', 'Pretendard Variable', Pretendard, serif;
  --ease: cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  word-break: keep-all;
}
img { max-width: 100%; height: auto; }
a { color: var(--mint-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--navy); }
h1,h2,h3,h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.35; letter-spacing: -.01em; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--navy); letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--navy); display: inline-flex; align-items: center; justify-content: center; color: var(--mint); font-family: var(--font-display); font-weight: 700; font-size: 18px; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; color: var(--mint-600); }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { color: var(--gray-700); font-size: 15px; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-sm); }
.main-nav a:hover { color: var(--navy); background: var(--bg-soft); }
.nav-cta { background: var(--navy); color: #fff !important; padding: 10px 18px !important; border-radius: 999px; }
.nav-cta:hover { background: var(--mint-600); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }

.site-footer { background: var(--navy); color: #C6D2DE; margin-top: 0; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 64px 24px 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .brand-mark { background: rgba(255,255,255,.08); }
.footer-desc { font-size: 14px; color: #A9BCCD; line-height: 1.7; margin: 0 0 16px; max-width: 380px; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 14px; font-weight: 700; margin: 0 0 14px; letter-spacing: .02em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: #A9BCCD; font-size: 14px; }
.footer-col a:hover { color: var(--mint); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; line-height: 1.7; color: #93A6B8; }
.footer-bottom { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12.5px; color: #7E93A7; }

.page-wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.entry-hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: 72px 0 40px; }
.entry-hero-inner { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.entry-breadcrumb { font-size: 13px; color: var(--gray-400); margin-bottom: 16px; }
.entry-breadcrumb a { color: var(--gray-500); }
.entry-title { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; margin: 0 0 14px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--gray-500); font-size: 14px; }
.entry-meta .cat-badge { background: var(--mint-soft); color: var(--mint-600); font-weight: 700; padding: 4px 12px; border-radius: 999px; font-size: 13px; }
.entry-featured { max-width: 860px; margin: 8px auto 0; padding: 0 24px; }
.entry-featured img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

.entry-content { max-width: 800px; margin: 48px auto 72px; padding: 0 24px; font-size: 17px; line-height: 1.8; }
.entry-content p { margin: 0 0 1.35em; }
.entry-content h2 { font-size: 26px; font-weight: 800; margin: 2.4em 0 .8em; padding-top: .4em; }
.entry-content h3 { font-size: 20px; font-weight: 700; margin: 2em 0 .7em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(23,178,166,.5); }
.entry-content ul, .entry-content ol { margin: 0 0 1.5em; padding-left: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content strong { color: var(--navy); }

.summary-box { background: var(--navy); color: #EAF2F9; border-radius: var(--radius-lg); padding: 26px 28px; margin: 0 0 2em; box-shadow: var(--shadow-md); }
.summary-box strong { color: var(--mint); }
.summary-box p { margin: 0; font-size: 15.5px; line-height: 1.75; }

.cost-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 1.8em; font-size: 14.5px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.cost-table thead th { background: var(--navy); color: #fff; text-align: left; padding: 12px 14px; font-weight: 700; font-size: 13.5px; }
.cost-table tbody td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.cost-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.cost-table tbody tr:hover { background: var(--mint-soft); }

.chart { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin: 0 0 1.8em; }
.chart-title { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 15px; margin-bottom: 14px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.bar-track { background: #E7EDF3; border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--navy), var(--mint)); }
.bar-val { font-size: 12.5px; color: var(--gray-500); text-align: right; font-weight: 600; }

.check-list { list-style: none; padding-left: 0 !important; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: .6em; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 6px; background: var(--mint-soft); border: 1.5px solid var(--mint); }

.timeline-v { list-style: none; padding-left: 0 !important; position: relative; }
.timeline-v li { position: relative; padding: 0 0 1.4em 34px; }
.timeline-v li::before { content: ""; position: absolute; left: 7px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft); }
.timeline-v li::after { content: ""; position: absolute; left: 11px; top: 1.6em; bottom: 0; width: 2px; background: var(--line); }
.timeline-v li:last-child::after { display: none; }

blockquote { margin: 0 0 1.8em; padding: 18px 22px; border-left: 4px solid var(--mint); background: var(--mint-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
blockquote p { margin: 0; font-size: 15.5px; color: var(--navy-800); }

.post-figure { margin: 2em 0; }
.post-figure img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.post-figure figcaption { font-size: 13px; color: var(--gray-400); text-align: center; margin-top: 10px; }

.note { font-size: 13.5px; color: var(--gray-500); background: #F0F4F8; border-radius: var(--radius-sm); padding: 12px 16px; }

.legal-notice { font-size: 13px; color: var(--gray-500); background: var(--bg-soft); border-left: 3px solid var(--line); padding: 14px 18px; margin: 2.2em 0 1.4em; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.legal-notice p { margin: 6px 0; }
.ai-notice { font-size: 12.5px; color: var(--gray-400); margin-top: 2em; }

.related-section { background: var(--bg-soft); padding: 72px 0; }
.related-inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: 26px; font-weight: 800; }
.section-head .more { font-size: 14px; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { padding: 20px 22px 24px; }
.card-body h3 { font-size: 17.5px; font-weight: 700; margin: 0 0 8px; line-height: 1.45; }
.card-body h3 a { color: var(--navy); }
.card-body h3 a:hover { color: var(--mint-600); }
.card-body p { font-size: 14px; color: var(--gray-500); margin: 0 0 12px; line-height: 1.65; }
.card-meta { font-size: 12.5px; color: var(--gray-400); }

/* TOC (easy-table-of-contents) 스타일 통일 */
#ez-toc-container { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; margin: 0 0 2em; }
#ez-toc-container .ez-toc-title { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 15px; }
#ez-toc-container ul { margin: 10px 0 0; }
#ez-toc-container a { color: var(--gray-700); font-size: 14px; }
#ez-toc-container a:hover { color: var(--mint-600); }

/* Archive */
.archive-head { padding: 64px 0 8px; }
.archive-head h1 { font-size: 34px; font-weight: 800; margin: 0 0 8px; }
.archive-head p { color: var(--gray-500); margin: 0; }
.archive-grid { padding: 40px 0 80px; }

/* Page */
.page-content { max-width: 800px; margin: 48px auto 80px; padding: 0 24px; }
.page-content h2 { font-size: 24px; margin: 1.8em 0 .7em; }

/* 404 & search */
.notfound { text-align: center; padding: 120px 24px; }
.notfound h1 { font-size: 42px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); }
.btn:hover { background: var(--mint-600); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--navy); background: transparent; color: var(--navy); }

@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 68px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 16px 24px 24px; gap: 4px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); display: none; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 12px; border-radius: var(--radius-sm); }
  .nav-toggle { display: inline-flex; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .entry-content { font-size: 16px; }
  .cost-table { display: block; overflow-x: auto; white-space: nowrap; }
  .bar-row { grid-template-columns: 82px 1fr 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
