/*
Theme Name: InfoHub Child
Theme URI: https://infohub.rand3.com
Template: twentytwentyfive
Description: Premium dental implant info hub theme
Version: 1.0.0
Text Domain: infohub-child
*/

:root {
  --ih-primary: #1B4965;
  --ih-primary-light: #2D6A8F;
  --ih-accent: #62B6CB;
  --ih-accent-light: #BEE9E8;
  --ih-warm: #F0F4F8;
  --ih-bg: #FAFBFC;
  --ih-text: #2D3748;
  --ih-text-light: #718096;
  --ih-border: #E2E8F0;
  --ih-card-bg: #FFFFFF;
  --ih-success: #48BB78;
  --ih-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --ih-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --ih-shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --ih-radius-sm: 8px;
  --ih-radius-md: 12px;
  --ih-radius-lg: 16px;
  --ih-radius-xl: 24px;
  --ih-font-heading: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --ih-font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --ih-max-width: 1200px;
  --ih-content-width: 780px;
  --ih-spacing-xs: 8px;
  --ih-spacing-sm: 16px;
  --ih-spacing-md: 24px;
  --ih-spacing-lg: 40px;
  --ih-spacing-xl: 64px;
  --ih-spacing-2xl: 96px;
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 100 900;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
}
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--ih-font-body);
  color: var(--ih-text);
  background: var(--ih-bg);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* WP default overrides */
body .wp-site-blocks { padding: 0; }
.wp-block-post-content, .entry-content { max-width: 100%; }
.has-global-padding { padding: 0 !important; }

/* Site header override */
.wp-block-template-part, header.wp-block-template-part { display: none !important; }
.wp-block-group.has-background { background: none !important; }

/* Typography scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ih-font-heading);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ih-primary);
  letter-spacing: -0.02em;
}
h1 { font-size: 2.25rem; margin-bottom: var(--ih-spacing-md); }
h2 { font-size: 1.625rem; margin: var(--ih-spacing-xl) 0 var(--ih-spacing-md); padding-bottom: var(--ih-spacing-sm); border-bottom: 2px solid var(--ih-accent-light); }
h3 { font-size: 1.25rem; margin: var(--ih-spacing-lg) 0 var(--ih-spacing-sm); color: var(--ih-primary-light); }
p { margin-bottom: 1.2em; }

/* Custom header */
.ih-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ih-border);
  transition: box-shadow 0.2s;
}
.ih-header.scrolled { box-shadow: var(--ih-shadow-md); }
.ih-header-inner {
  max-width: var(--ih-max-width);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--ih-spacing-sm) var(--ih-spacing-md);
}
.ih-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ih-logo img { width: 40px; height: 40px; border-radius: var(--ih-radius-sm); }
.ih-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--ih-primary); letter-spacing: -0.01em; }
.ih-nav { display: flex; gap: 4px; }
.ih-nav a {
  color: var(--ih-text); text-decoration: none;
  padding: 8px 16px; border-radius: var(--ih-radius-sm);
  font-size: 0.9rem; font-weight: 500;
  transition: all 0.2s;
}
.ih-nav a:hover { background: var(--ih-warm); color: var(--ih-primary); }
.ih-mobile-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.ih-mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--ih-text); margin: 5px 0; transition: 0.3s; border-radius: 2px; }

/* Single post styles */
.ih-single-wrap {
  max-width: var(--ih-content-width);
  margin: 0 auto;
  padding: var(--ih-spacing-xl) var(--ih-spacing-md) var(--ih-spacing-2xl);
}
.ih-single-wrap h1 { font-size: 2rem; line-height: 1.4; margin-bottom: var(--ih-spacing-lg); }
.ih-single-wrap .entry-content img,
.ih-single-wrap img {
  max-width: 100%; height: auto;
  border-radius: var(--ih-radius-md);
  margin: var(--ih-spacing-lg) 0;
  box-shadow: var(--ih-shadow-sm);
}
.ih-single-wrap table {
  width: 100%; border-collapse: collapse;
  margin: var(--ih-spacing-lg) 0;
  font-size: 0.92rem;
  border-radius: var(--ih-radius-md);
  overflow: hidden;
  box-shadow: var(--ih-shadow-sm);
}
.ih-single-wrap table thead { background: var(--ih-primary); color: #fff; }
.ih-single-wrap table th { padding: 14px 16px; font-weight: 600; text-align: left; }
.ih-single-wrap table td { padding: 12px 16px; border-bottom: 1px solid var(--ih-border); }
.ih-single-wrap table tbody tr:nth-child(even) { background: var(--ih-warm); }
.ih-single-wrap table tbody tr:hover { background: var(--ih-accent-light); }
.ih-single-wrap blockquote {
  border-left: 4px solid var(--ih-accent);
  background: var(--ih-warm);
  padding: var(--ih-spacing-md) var(--ih-spacing-lg);
  margin: var(--ih-spacing-lg) 0;
  border-radius: 0 var(--ih-radius-md) var(--ih-radius-md) 0;
  font-size: 1.02rem;
  color: var(--ih-primary);
}
.ih-single-wrap ul, .ih-single-wrap ol {
  padding-left: 1.5em;
  margin: var(--ih-spacing-md) 0;
}
.ih-single-wrap li { margin-bottom: 8px; line-height: 1.7; }

/* Callout box */
.ih-callout {
  background: linear-gradient(135deg, var(--ih-accent-light) 0%, #E6F7F8 100%);
  border-radius: var(--ih-radius-md);
  padding: var(--ih-spacing-md) var(--ih-spacing-lg);
  margin: var(--ih-spacing-lg) 0;
  border-left: 4px solid var(--ih-accent);
}
.ih-callout strong { color: var(--ih-primary); }

/* Timeline/step component */
.ih-steps { padding: var(--ih-spacing-md) 0; }
.ih-step {
  display: flex; gap: var(--ih-spacing-md);
  padding: var(--ih-spacing-md) 0;
  position: relative;
}
.ih-step::before {
  content: ''; position: absolute;
  left: 19px; top: 52px; bottom: 0;
  width: 2px; background: var(--ih-accent-light);
}
.ih-step:last-child::before { display: none; }
.ih-step-num {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--ih-primary);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.ih-step-content h4 { color: var(--ih-primary); margin-bottom: 4px; font-size: 1.05rem; }
.ih-step-content p { color: var(--ih-text-light); font-size: 0.95rem; margin: 0; }

/* Bar chart */
.ih-bar { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.ih-bar-label { width: 120px; font-size: 0.88rem; color: var(--ih-text-light); text-align: right; flex-shrink: 0; }
.ih-bar-track { flex: 1; height: 28px; background: var(--ih-warm); border-radius: 14px; overflow: hidden; }
.ih-bar-fill { height: 100%; border-radius: 14px; background: linear-gradient(90deg, var(--ih-accent) 0%, var(--ih-primary) 100%); display: flex; align-items: center; padding: 0 12px; color: #fff; font-size: 0.8rem; font-weight: 600; transition: width 0.8s ease; }

/* Card list (related, carousel) */
.ih-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--ih-spacing-md);
  margin: var(--ih-spacing-lg) 0;
}
.ih-card {
  background: var(--ih-card-bg);
  border-radius: var(--ih-radius-md);
  overflow: hidden;
  box-shadow: var(--ih-shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: inherit;
  display: block;
}
.ih-card:hover { transform: translateY(-4px); box-shadow: var(--ih-shadow-lg); }
.ih-card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ih-card-body { padding: var(--ih-spacing-md); }
.ih-card-body h3 { font-size: 1.05rem; margin: 0 0 8px; color: var(--ih-primary); }
.ih-card-body p { font-size: 0.88rem; color: var(--ih-text-light); margin: 0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer */
.ih-footer {
  background: var(--ih-primary);
  color: rgba(255,255,255,0.8);
  padding: var(--ih-spacing-xl) var(--ih-spacing-md) var(--ih-spacing-lg);
}
.ih-footer-inner {
  max-width: var(--ih-max-width);
  margin: 0 auto;
}
.ih-footer-top { display: flex; justify-content: space-between; gap: var(--ih-spacing-lg); margin-bottom: var(--ih-spacing-lg); flex-wrap: wrap; }
.ih-footer-brand { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.ih-footer-desc { font-size: 0.85rem; max-width: 400px; line-height: 1.7; }
.ih-footer-links { display: flex; gap: var(--ih-spacing-lg); flex-wrap: wrap; }
.ih-footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.ih-footer-links a:hover { color: #fff; }
.ih-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: var(--ih-spacing-md);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}
.ih-footer-legal { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-top: var(--ih-spacing-sm); line-height: 1.8; }

/* Legal notice */
.legal-notice { font-size: 0.85em; color: #777; background: #f8f9fa; border-left: 3px solid #cbd5e1; padding: 10px 14px; margin-top: 2em; border-radius: 0 6px 6px 0; }
.legal-notice p { margin: 4px 0; }
.ai-notice { font-size: 0.85em; color: #888; margin-top: 2em; }

/* TOC */
.ih-toc {
  background: var(--ih-warm);
  border-radius: var(--ih-radius-md);
  padding: var(--ih-spacing-md) var(--ih-spacing-lg);
  margin: var(--ih-spacing-lg) 0;
  border: 1px solid var(--ih-border);
}
.ih-toc-title { font-size: 0.95rem; font-weight: 700; color: var(--ih-primary); margin-bottom: 12px; }
.ih-toc ol { padding-left: 1.2em; }
.ih-toc li { margin: 6px 0; }
.ih-toc a { color: var(--ih-primary-light); text-decoration: none; font-size: 0.9rem; }
.ih-toc a:hover { color: var(--ih-accent); text-decoration: underline; }

/* FAQ */
.ih-faq { margin: var(--ih-spacing-lg) 0; }
.ih-faq-item { border-bottom: 1px solid var(--ih-border); padding: var(--ih-spacing-md) 0; }
.ih-faq-q { font-weight: 700; color: var(--ih-primary); margin-bottom: 8px; font-size: 1.02rem; }
.ih-faq-a { color: var(--ih-text-light); font-size: 0.95rem; line-height: 1.7; }

/* Responsive */
@media (max-width: 768px) {
  :root { --ih-spacing-xl: 48px; --ih-spacing-2xl: 64px; }
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.35rem; }
  .ih-nav { display: none; position: fixed; top: 60px; left: 0; right: 0; background: #fff; flex-direction: column; padding: var(--ih-spacing-md); box-shadow: var(--ih-shadow-lg); z-index: 999; }
  .ih-nav.open { display: flex; }
  .ih-nav a { padding: 12px 16px; border-radius: var(--ih-radius-sm); }
  .ih-mobile-toggle { display: block; }
  .ih-card-grid { grid-template-columns: 1fr; }
  .ih-footer-top { flex-direction: column; }
  .ih-single-wrap { padding: var(--ih-spacing-lg) var(--ih-spacing-sm) var(--ih-spacing-xl); }
  .ih-single-wrap table { font-size: 0.82rem; display: block; overflow-x: auto; }
  .ih-bar-label { width: 80px; font-size: 0.8rem; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Checklist */
.ih-checklist { list-style: none; padding: 0; }
.ih-checklist li {
  padding: 10px 0 10px 32px;
  position: relative;
  border-bottom: 1px solid var(--ih-border);
}
.ih-checklist li::before {
  content: ''; position: absolute; left: 0; top: 14px;
  width: 18px; height: 18px;
  border: 2px solid var(--ih-accent);
  border-radius: 4px;
}

/* Summary box */
.ih-summary {
  background: linear-gradient(135deg, var(--ih-primary) 0%, var(--ih-primary-light) 100%);
  color: #fff;
  border-radius: var(--ih-radius-lg);
  padding: var(--ih-spacing-lg);
  margin: var(--ih-spacing-lg) 0;
}
.ih-summary h3 { color: #fff; margin: 0 0 12px; }
.ih-summary ul { padding-left: 1.2em; }
.ih-summary li { margin: 6px 0; color: rgba(255,255,255,0.9); }
