/*
Theme Name: Cost Dental Child
Template: twentytwentyfive
Description: Premium dental cost information platform theme
Version: 1.0.0
Text Domain: cost-dental-child
*/

:root {
  --brand-primary: #1a5276;
  --brand-secondary: #2e86c1;
  --brand-accent: #148f77;
  --brand-light: #eaf2f8;
  --brand-bg: #f8fafb;
  --brand-card: #ffffff;
  --brand-text: #2c3e50;
  --brand-text-sub: #5d6d7e;
  --brand-border: #d5dbdb;
  --brand-hover: #1a6fa0;
  --brand-gradient: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
  --brand-gradient-soft: linear-gradient(135deg, #eaf2f8 0%, #d4efdf 100%);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 128px;
  --content-width: 780px;
  --wide-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--brand-text);
  background: var(--brand-bg);
  line-height: 1.75;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-primary); }

/* ===== SITE HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0 var(--space-md);
}
.header-inner {
  max-width: var(--wide-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.header-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; color: var(--brand-primary);
  text-decoration: none;
}
.header-brand img { width: 36px; height: 36px; border-radius: 8px; }
.header-nav { display: flex; gap: 4px; align-items: center; }
.header-nav a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--brand-text-sub);
  transition: all 0.2s;
}
.header-nav a:hover, .header-nav a.active {
  background: var(--brand-light); color: var(--brand-primary);
}
.header-cta {
  padding: 8px 20px !important; background: var(--brand-gradient) !important;
  color: #fff !important; border-radius: 24px !important; font-weight: 600 !important;
}
.mobile-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--brand-text); margin: 5px 0; transition: 0.3s; border-radius: 2px; }

/* ===== ARTICLE SINGLE ===== */
.single-article { max-width: var(--content-width); margin: 0 auto; padding: var(--space-xl) var(--space-md) var(--space-3xl); }
.single-article .entry-title {
  font-size: 2rem; font-weight: 800; color: var(--brand-primary);
  line-height: 1.35; margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}
.single-article .entry-meta {
  font-size: 0.85rem; color: var(--brand-text-sub); margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md); border-bottom: 1px solid var(--brand-border);
}
.single-article .featured-image {
  width: 100%; border-radius: var(--radius-lg); margin-bottom: var(--space-lg);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.single-article .featured-image img { width: 100%; height: auto; display: block; }
.entry-content { font-size: 1.05rem; line-height: 1.8; color: var(--brand-text); }
.entry-content h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--brand-primary);
  margin: 2.5em 0 0.8em; padding-bottom: 0.4em;
  border-bottom: 2px solid var(--brand-light);
  letter-spacing: -0.01em;
}
.entry-content h3 {
  font-size: 1.2rem; font-weight: 700; color: #2c3e50;
  margin: 2em 0 0.6em;
}
.entry-content p { margin-bottom: 1.2em; }
.entry-content ul, .entry-content ol {
  margin: 1em 0 1.5em 1.2em; padding: 0;
}
.entry-content li { margin-bottom: 0.5em; }
.entry-content blockquote {
  border-left: 4px solid var(--brand-accent);
  background: #f0f9f6;
  padding: 1.2em 1.5em;
  margin: 1.5em 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1em;
  color: #1b4332;
}
.entry-content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1.5em 0; border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
  font-size: 0.95em;
}
.entry-content table th {
  background: var(--brand-primary); color: #fff; padding: 12px 16px;
  text-align: left; font-weight: 600; font-size: 0.9em;
}
.entry-content table td {
  padding: 12px 16px; border-bottom: 1px solid #eee;
  background: #fff;
}
.entry-content table tr:last-child td { border-bottom: none; }
.entry-content table tr:nth-child(even) td { background: #f8f9fa; }
.entry-content .info-box {
  background: var(--brand-light); border-radius: var(--radius-md);
  padding: 1.2em 1.5em; margin: 1.5em 0;
  border-left: 4px solid var(--brand-secondary);
}
.entry-content .check-list { list-style: none; margin-left: 0; padding: 0; }
.entry-content .check-list li {
  position: relative; padding-left: 28px; margin-bottom: 0.6em;
}
.entry-content .check-list li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--brand-accent); background: #e8f8f5;
}
.entry-content img {
  border-radius: var(--radius-md); margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

/* Summary box */
.summary-box {
  background: var(--brand-gradient-soft);
  border-radius: var(--radius-lg);
  padding: 1.5em 2em;
  margin-bottom: 2em;
  border: 1px solid rgba(26,82,118,0.1);
}
.summary-box h3 { margin-top: 0; font-size: 1.1rem; color: var(--brand-primary); }
.summary-box ul { margin: 0.5em 0 0 1em; }
.summary-box li { font-size: 0.95rem; }

/* TOC */
.toc-box {
  background: #fff; border: 1px solid var(--brand-border);
  border-radius: var(--radius-md); padding: 1.2em 1.5em;
  margin-bottom: 2em;
}
.toc-box .toc-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.8em; color: var(--brand-primary); }
.toc-box ol { margin: 0; padding-left: 1.2em; }
.toc-box li { margin-bottom: 0.3em; font-size: 0.92rem; }
.toc-box a { color: var(--brand-text-sub); }
.toc-box a:hover { color: var(--brand-primary); }

/* Bar chart inline */
.bar-chart { margin: 1.5em 0; }
.bar-item { display: flex; align-items: center; margin-bottom: 10px; }
.bar-label { width: 120px; font-size: 0.88rem; font-weight: 600; color: var(--brand-text); flex-shrink: 0; }
.bar-track { flex: 1; height: 28px; background: #eef1f3; border-radius: 14px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 14px; display: flex; align-items: center; padding-left: 12px; font-size: 0.78rem; color: #fff; font-weight: 600; transition: width 0.6s ease; }
.bar-fill.primary { background: var(--brand-gradient); }
.bar-fill.accent { background: linear-gradient(135deg, #148f77, #1abc9c); }
.bar-fill.muted { background: linear-gradient(135deg, #5d6d7e, #85929e); }

/* Step timeline */
.step-timeline { margin: 1.5em 0; position: relative; }
.step-timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 2px; background: var(--brand-border);
}
.step-item { display: flex; gap: 16px; margin-bottom: 20px; position: relative; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-gradient); color: #fff; display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; z-index: 1;
}
.step-body { flex: 1; padding-top: 8px; }
.step-body strong { color: var(--brand-primary); }

/* Related posts */
.related-posts { margin-top: 3em; padding-top: 2em; border-top: 1px solid var(--brand-border); }
.related-posts h3 { font-size: 1.2rem; margin-bottom: 1em; color: var(--brand-primary); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.related-card {
  background: #fff; border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related-card img { width: 100%; height: 140px; object-fit: cover; }
.related-card .card-body { padding: 14px 16px; }
.related-card .card-title { font-size: 0.92rem; font-weight: 600; color: var(--brand-text); line-height: 1.4; }

/* ===== FOOTER ===== */
.site-footer {
  background: #1b2838; color: #b0bec5; padding: var(--space-xl) var(--space-md) var(--space-lg);
  margin-top: var(--space-3xl);
}
.footer-inner {
  max-width: var(--wide-width); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-xl);
}
.footer-brand { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-desc { font-size: 0.88rem; line-height: 1.7; color: #78909c; }
.footer-links h4 { color: #ecf0f1; font-size: 0.9rem; margin-bottom: 12px; font-weight: 600; }
.footer-links a { display: block; font-size: 0.85rem; color: #78909c; margin-bottom: 6px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--wide-width); margin: var(--space-lg) auto 0;
  padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem; color: #546e7a;
}
.footer-legal { font-size: 0.78rem; color: #607d8b; line-height: 1.7; margin-top: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-nav { 
    display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 16px;
    box-shadow: var(--shadow-lg); z-index: 999;
  }
  .header-nav.open { display: flex; }
  .mobile-toggle { display: block; }
  .single-article .entry-title { font-size: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-md); }
  .related-grid { grid-template-columns: 1fr; }
  .entry-content table { font-size: 0.85em; display: block; overflow-x: auto; }
  .bar-label { width: 80px; font-size: 0.8rem; }
}

/* Hide WP defaults */
.wp-site-blocks > header, .wp-site-blocks > footer { display: none !important; }

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s; }
  .fade-in.visible { opacity: 1; transform: translateY(0); }
}
