/*
Theme Name: DentalCrown Custom
Template: twentytwentyfive
Description: 크라운 비용 안내소 커스텀 테마
Version: 1.0
*/

:root {
  --dc-primary: #0f766e;
  --dc-primary-dark: #0d5f59;
  --dc-primary-light: #14b8a6;
  --dc-accent: #0ea5e9;
  --dc-accent-dark: #0284c7;
  --dc-navy: #1e293b;
  --dc-navy-light: #334155;
  --dc-gray-50: #f8fafc;
  --dc-gray-100: #f1f5f9;
  --dc-gray-200: #e2e8f0;
  --dc-gray-300: #cbd5e1;
  --dc-gray-400: #94a3b8;
  --dc-gray-500: #64748b;
  --dc-gray-600: #475569;
  --dc-gray-700: #334155;
  --dc-gray-800: #1e293b;
  --dc-gray-900: #0f172a;
  --dc-white: #ffffff;
  --dc-bg: #f8fafc;
  --dc-radius-sm: 6px;
  --dc-radius: 12px;
  --dc-radius-lg: 16px;
  --dc-radius-xl: 24px;
  --dc-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --dc-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --dc-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --dc-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --dc-font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dc-font-serif: 'Noto Serif KR', Georgia, serif;
  --dc-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --dc-max-width: 1200px;
  --dc-content-width: 780px;
}

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

/* === GLOBAL RESET === */
body {
  font-family: var(--dc-font-sans) !important;
  color: var(--dc-gray-800);
  background: var(--dc-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--dc-primary);
  text-decoration: none;
  transition: color var(--dc-transition);
}
a:hover {
  color: var(--dc-primary-dark);
}

/* === HIDE DEFAULT WP CHROME === */
.wp-site-blocks > header,
.wp-site-blocks > footer,
.wp-block-template-part,
body:not(.single):not(.page) .wp-site-blocks {
  display: none !important;
}

/* === CUSTOM HEADER === */
.dc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dc-gray-200);
  transition: box-shadow var(--dc-transition);
}
.dc-header.scrolled {
  box-shadow: var(--dc-shadow);
}
.dc-header-inner {
  max-width: var(--dc-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.dc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dc-navy);
}
.dc-logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--dc-radius-sm);
}
.dc-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dc-nav a {
  padding: 8px 16px;
  border-radius: var(--dc-radius);
  color: var(--dc-gray-600);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--dc-transition);
}
.dc-nav a:hover {
  background: var(--dc-gray-100);
  color: var(--dc-primary);
}
.dc-nav-cta {
  background: var(--dc-primary) !important;
  color: var(--dc-white) !important;
}
.dc-nav-cta:hover {
  background: var(--dc-primary-dark) !important;
}
.dc-mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--dc-gray-700);
}
.dc-mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* === SINGLE POST STYLES === */
body.single .dc-header,
body.page .dc-header {
  display: flex;
}

body.single .wp-site-blocks,
body.page .wp-site-blocks {
  display: block !important;
}
body.single .wp-site-blocks > header,
body.page .wp-site-blocks > header,
body.single .wp-site-blocks > footer,
body.page .wp-site-blocks > footer {
  display: none !important;
}

/* === POST CONTENT STYLES === */
.dc-post-wrap {
  max-width: var(--dc-content-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.dc-post-wrap .entry-title,
.dc-post-wrap h1 {
  font-family: var(--dc-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--dc-gray-900);
  line-height: 1.35;
  margin-bottom: 16px;
}
.dc-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--dc-gray-500);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--dc-gray-200);
}
.dc-post-hero {
  width: 100%;
  border-radius: var(--dc-radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--dc-shadow);
}
.dc-post-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Post body typography */
.dc-post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--dc-gray-700);
}
.dc-post-body h2 {
  font-family: var(--dc-font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dc-gray-900);
  margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--dc-primary);
  line-height: 1.4;
}
.dc-post-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dc-gray-800);
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--dc-primary-light);
}
.dc-post-body p {
  margin: 0 0 20px;
}
.dc-post-body ul, .dc-post-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.dc-post-body li {
  margin-bottom: 8px;
}
.dc-post-body strong {
  color: var(--dc-gray-900);
  font-weight: 600;
}

/* Tables in posts */
.dc-post-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0 32px;
  border-radius: var(--dc-radius);
  overflow: hidden;
  box-shadow: var(--dc-shadow-sm);
  border: 1px solid var(--dc-gray-200);
  font-size: 0.93rem;
}
.dc-post-body thead th {
  background: var(--dc-primary);
  color: var(--dc-white);
  padding: 14px 16px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.dc-post-body tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--dc-gray-100);
}
.dc-post-body tbody tr:last-child td {
  border-bottom: none;
}
.dc-post-body tbody tr:nth-child(even) {
  background: var(--dc-gray-50);
}
.dc-post-body tbody tr:hover {
  background: rgba(20,184,166,0.04);
}
.dc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0 32px;
}

/* Blockquote / callout */
.dc-post-body blockquote,
.dc-callout {
  background: linear-gradient(135deg, rgba(15,118,110,0.04), rgba(14,165,233,0.04));
  border-left: 4px solid var(--dc-primary);
  border-radius: 0 var(--dc-radius) var(--dc-radius) 0;
  padding: 20px 24px;
  margin: 24px 0 32px;
  font-size: 0.98rem;
  color: var(--dc-gray-700);
}
.dc-post-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Info box */
.dc-info-box {
  background: var(--dc-gray-50);
  border: 1px solid var(--dc-gray-200);
  border-radius: var(--dc-radius);
  padding: 24px;
  margin: 24px 0 32px;
}
.dc-info-box-title {
  font-weight: 700;
  color: var(--dc-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Checklist */
.dc-checklist {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
}
.dc-checklist li {
  padding: 8px 0 8px 28px;
  position: relative;
}
.dc-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--dc-primary);
  font-weight: 700;
}

/* Bar chart CSS */
.dc-bar-chart {
  margin: 24px 0 32px;
}
.dc-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.dc-bar-label {
  min-width: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dc-gray-700);
  text-align: right;
}
.dc-bar-track {
  flex: 1;
  height: 28px;
  background: var(--dc-gray-100);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.dc-bar-fill {
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--dc-primary), var(--dc-primary-light));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dc-white);
  transition: width 0.6s ease;
}

/* Cost range card */
.dc-cost-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}
.dc-cost-card {
  background: var(--dc-white);
  border: 1px solid var(--dc-gray-200);
  border-radius: var(--dc-radius);
  padding: 20px;
  text-align: center;
  transition: all var(--dc-transition);
}
.dc-cost-card:hover {
  box-shadow: var(--dc-shadow);
  border-color: var(--dc-primary-light);
}
.dc-cost-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--dc-gray-800);
}
.dc-cost-card .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dc-primary);
}
.dc-cost-card .note {
  font-size: 0.8rem;
  color: var(--dc-gray-500);
  margin-top: 4px;
}

/* Post images */
.dc-post-body .dc-content-img {
  width: 100%;
  border-radius: var(--dc-radius);
  margin: 28px 0;
  box-shadow: var(--dc-shadow-sm);
}

/* FAQ */
.dc-faq {
  margin: 32px 0;
}
.dc-faq-item {
  border: 1px solid var(--dc-gray-200);
  border-radius: var(--dc-radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.dc-faq-q {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--dc-gray-800);
  background: var(--dc-gray-50);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dc-faq-q::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--dc-primary);
  transition: transform var(--dc-transition);
}
.dc-faq-item.open .dc-faq-q::after {
  transform: rotate(45deg);
}
.dc-faq-a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--dc-gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
}
.dc-faq-item.open .dc-faq-a {
  padding: 16px 20px;
  max-height: 500px;
}

/* Related posts */
.dc-related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--dc-gray-200);
}
.dc-related h3 {
  font-family: var(--dc-font-serif);
  font-size: 1.3rem;
  margin-bottom: 24px;
  border-left: none;
  padding-left: 0;
  color: var(--dc-gray-900);
}
.dc-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.dc-related-card {
  border-radius: var(--dc-radius);
  overflow: hidden;
  background: var(--dc-white);
  border: 1px solid var(--dc-gray-200);
  transition: all var(--dc-transition);
}
.dc-related-card:hover {
  box-shadow: var(--dc-shadow-lg);
  transform: translateY(-2px);
}
.dc-related-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.dc-related-card .card-body {
  padding: 16px;
}
.dc-related-card .card-title {
  font-weight: 600;
  color: var(--dc-gray-800);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Legal notices */
.legal-notice {
  font-size: 0.85em !important;
  color: #777 !important;
}
.ai-notice {
  font-size: 0.85em !important;
  color: #888 !important;
}

/* === FOOTER === */
.dc-footer {
  background: var(--dc-gray-900);
  color: var(--dc-gray-400);
  padding: 64px 24px 32px;
  margin-top: 80px;
}
.dc-footer-inner {
  max-width: var(--dc-max-width);
  margin: 0 auto;
}
.dc-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.dc-footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dc-white);
  margin-bottom: 12px;
}
.dc-footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--dc-gray-400);
  max-width: 360px;
}
.dc-footer h4 {
  color: var(--dc-white);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.dc-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dc-footer-links li {
  margin-bottom: 10px;
}
.dc-footer-links a {
  color: var(--dc-gray-400);
  font-size: 0.875rem;
  transition: color var(--dc-transition);
}
.dc-footer-links a:hover {
  color: var(--dc-white);
}
.dc-footer-legal {
  padding-top: 24px;
  border-top: 1px solid var(--dc-gray-700);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--dc-gray-500);
}
.dc-footer-legal p {
  margin: 4px 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .dc-header-inner {
    height: 56px;
    padding: 0 16px;
  }
  .dc-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--dc-white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--dc-gray-200);
    box-shadow: var(--dc-shadow-lg);
    gap: 4px;
  }
  .dc-nav.open {
    display: flex;
  }
  .dc-nav a {
    width: 100%;
    padding: 12px 16px;
  }
  .dc-mobile-toggle {
    display: block;
  }
  .dc-post-wrap {
    padding: 24px 16px 60px;
  }
  .dc-post-body h2 {
    font-size: 1.25rem;
    margin-top: 40px;
  }
  .dc-post-body h3 {
    font-size: 1.1rem;
  }
  .dc-post-body table {
    font-size: 0.82rem;
  }
  .dc-post-body thead th,
  .dc-post-body tbody td {
    padding: 10px 10px;
  }
  .dc-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .dc-cost-cards {
    grid-template-columns: 1fr 1fr;
  }
  .dc-bar-label {
    min-width: 72px;
    font-size: 0.82rem;
  }
  .dc-related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .dc-cost-cards {
    grid-template-columns: 1fr;
  }
  .dc-related-grid {
    grid-template-columns: 1fr;
  }
}
