/* ═══════════════════════════════════════════════════════════
   MercuryFreeDental.com — Global Design System
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --navy: #0D1B2A;
  --navy-mid: #1A2E45;
  --emerald: #00A878;
  --emerald-light: #00C896;
  --emerald-dim: rgba(0,168,120,0.12);
  --gold: #C9A84C;
  --gold-dim: rgba(201,168,76,0.15);
  --slate: #6B7280;
  --slate-light: #9CA3AF;
  --paper: #F8F9FA;
  --paper-warm: #F3F4F6;
  --white: #FFFFFF;
  --text: #0D1B2A;
  --text-mid: #374151;
  --red: #ef4444;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(13,27,42,0.08);
  --shadow-lg: 0 16px 48px rgba(13,27,42,0.12);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--paper); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* ─── NAVIGATION ─────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248,249,250,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(13,27,42,0.08);
}
.nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 64px; }
.logo { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 20px; color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); display: inline-block; animation: pulse 2.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { font-size: 13.5px; font-weight: 500; color: var(--text-mid); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--emerald); }
.nav-cta { background: var(--navy); color: white; padding: 9px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background 0.2s, transform 0.15s; white-space: nowrap; }
.nav-cta:hover { background: var(--emerald); transform: translateY(-1px); }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 200; position: relative; }
.nav-mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: all 0.3s; }
.nav-mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-panel { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: var(--paper); z-index: 99; overflow-y: auto; padding: 24px; transform: translateY(-12px); opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; pointer-events: none; }
.nav-mobile-panel.open { display: block; opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-mobile-panel ul { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.nav-mobile-panel a { display: block; padding: 16px 18px; font-size: 17px; font-weight: 500; color: var(--navy); text-decoration: none; border-radius: 10px; transition: background 0.15s; }
.nav-mobile-panel a:active, .nav-mobile-panel a.active { background: var(--emerald-dim); color: var(--emerald); }
.nav-mobile-panel .nav-cta { display: block; text-align: center; padding: 16px; font-size: 16px; }

/* ─── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb { padding: 80px 32px 0; max-width: 1280px; margin: 0 auto; }
.breadcrumb-inner { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--slate); }
.breadcrumb-inner a { color: var(--slate); text-decoration: none; transition: color 0.2s; }
.breadcrumb-inner a:hover { color: var(--emerald); }
.breadcrumb-sep { opacity: 0.4; }

/* ─── PAGE HERO ──────────────────────────────────────────── */
.page-hero { padding: 48px 32px 64px; background: white; border-bottom: 1px solid rgba(13,27,42,0.07); }
.page-hero-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.page-hero-left { }
.page-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--emerald-dim); border: 1px solid rgba(0,168,120,0.25); color: var(--emerald); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; border-radius: 100px; margin-bottom: 20px; }
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(28px, 3.5vw, 52px); font-weight: 700; line-height: 1.1; color: var(--navy); margin-bottom: 16px; }
.page-hero-sub { font-size: 17px; color: var(--slate); line-height: 1.65; max-width: 600px; }
.page-hero-meta { display: flex; gap: 24px; margin-top: 24px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--slate); }
.page-hero-badge { background: var(--navy); border-radius: 16px; padding: 28px; min-width: 200px; text-align: center; }
.hero-badge-num { font-family: 'Playfair Display', serif; font-size: 48px; font-weight: 700; color: white; line-height: 1; }
.hero-badge-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 6px; }

/* ─── SECTIONS ───────────────────────────────────────────── */
.section { padding: 80px 32px; }
.section-alt { background: white; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-inner-narrow { max-width: 820px; margin: 0 auto; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--emerald); margin-bottom: 12px; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(24px, 2.5vw, 38px); font-weight: 700; line-height: 1.15; color: var(--navy); margin-bottom: 14px; }
.section-sub { font-size: 16px; color: var(--slate); line-height: 1.65; max-width: 580px; }
.section-header { margin-bottom: 48px; }
.section-header-split { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; gap: 24px; flex-wrap: wrap; }
.view-all { font-size: 14px; font-weight: 600; color: var(--emerald); text-decoration: none; white-space: nowrap; }
.view-all:hover { text-decoration: underline; }

/* ─── ARTICLE BODY ───────────────────────────────────────── */
.article-body { font-size: 16px; line-height: 1.8; color: var(--text-mid); }
.article-body h2 { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--navy); margin: 48px 0 16px; line-height: 1.25; }
.article-body h3 { font-size: 18px; font-weight: 600; color: var(--navy); margin: 32px 0 12px; }
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--navy); font-weight: 600; }
.article-body a { color: var(--emerald); text-decoration: none; border-bottom: 1px solid rgba(0,168,120,0.3); transition: border-color 0.2s; }
.article-body a:hover { border-color: var(--emerald); }
.article-body blockquote { border-left: 3px solid var(--emerald); padding: 16px 24px; margin: 32px 0; background: var(--emerald-dim); border-radius: 0 8px 8px 0; font-style: italic; color: var(--navy); }
.article-body .callout { background: var(--paper-warm); border: 1px solid rgba(13,27,42,0.1); border-radius: 12px; padding: 20px 24px; margin: 28px 0; }
.article-body .callout-warn { background: rgba(201,168,76,0.1); border-color: rgba(201,168,76,0.3); }
.article-body .callout-info { background: var(--emerald-dim); border-color: rgba(0,168,120,0.25); }
.callout-title { font-weight: 700; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; }
.callout-warn .callout-title { color: var(--gold); }
.callout-info .callout-title { color: var(--emerald); }

/* ─── CARDS ──────────────────────────────────────────────── */
.card { background: white; border: 1px solid rgba(13,27,42,0.08); border-radius: var(--radius); padding: 28px; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.card:hover { border-color: rgba(0,168,120,0.3); box-shadow: 0 8px 32px rgba(0,168,120,0.08); transform: translateY(-2px); }
.card-link { text-decoration: none; display: block; }
.card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--emerald-dim); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px; }
.card-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; color: var(--navy); margin-bottom: 8px; line-height: 1.3; }
.card-desc { font-size: 13.5px; color: var(--slate); line-height: 1.6; margin-bottom: 16px; }
.card-meta { display: flex; gap: 10px; font-size: 12px; color: var(--slate-light); flex-wrap: wrap; }
.card-tag { background: var(--paper-warm); padding: 3px 8px; border-radius: 4px; font-weight: 500; }
.card-tag-green { background: var(--emerald-dim); color: var(--emerald); font-weight: 600; }

/* ─── GRIDS ──────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; transition: all 0.2s; cursor: pointer; border: none; font-family: 'Inter', sans-serif; }
.btn-primary { background: var(--emerald); color: white; }
.btn-primary:hover { background: var(--emerald-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,168,120,0.3); }
.btn-secondary { background: var(--navy); color: white; }
.btn-secondary:hover { background: var(--navy-mid); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid rgba(13,27,42,0.2); }
.btn-outline:hover { border-color: var(--emerald); color: var(--emerald); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }

/* ─── TABLES ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; border-radius: 16px; overflow: hidden; border: 1px solid rgba(13,27,42,0.08); }
.data-table th { background: var(--navy); color: white; font-size: 13.5px; font-weight: 600; padding: 16px 20px; text-align: left; }
.data-table th.hl { background: var(--emerald); }
.data-table td { padding: 14px 20px; font-size: 14px; color: var(--text-mid); border-bottom: 1px solid rgba(13,27,42,0.06); background: white; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--paper); }
.data-table td.hl { background: rgba(0,168,120,0.04); }
.data-table tr:nth-child(even) td.hl { background: rgba(0,168,120,0.07); }
.check-yes { color: var(--emerald); font-weight: 700; }
.check-no { color: var(--red); }
.check-warn { color: var(--gold); }

/* ─── SIDEBAR LAYOUT ─────────────────────────────────────── */
.sidebar-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.sidebar { position: sticky; top: 80px; }
.sidebar-card { background: white; border: 1px solid rgba(13,27,42,0.08); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.sidebar-card h3 { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 14px; letter-spacing: 0.02em; }
.sidebar-links { display: flex; flex-direction: column; gap: 8px; }
.sidebar-links a { font-size: 13.5px; color: var(--slate); text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: all 0.15s; display: block; }
.sidebar-links a:hover { background: var(--paper-warm); color: var(--navy); }
.sidebar-links a.active { background: var(--emerald-dim); color: var(--emerald); font-weight: 500; }

/* ─── TOC ────────────────────────────────────────────────── */
.toc { background: var(--paper-warm); border-radius: 12px; padding: 20px 24px; margin-bottom: 36px; }
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.toc-list a { font-size: 14px; color: var(--slate); text-decoration: none; transition: color 0.2s; display: flex; align-items: center; gap: 8px; }
.toc-list a::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--emerald); flex-shrink: 0; }
.toc-list a:hover { color: var(--emerald); }

/* ─── DISCLAIMER ─────────────────────────────────────────── */
.disclaimer { background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.25); border-radius: 10px; padding: 16px 20px; font-size: 13px; color: var(--text-mid); line-height: 1.6; margin-bottom: 32px; }
.disclaimer strong { color: var(--gold); }

/* ─── CHECKLIST ──────────────────────────────────────────── */
.checklist { display: flex; flex-direction: column; gap: 0; }
.check-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(13,27,42,0.06); }
.check-row:last-child { border-bottom: none; }
.check-box { width: 22px; height: 22px; border: 2px solid rgba(13,27,42,0.2); border-radius: 5px; flex-shrink: 0; margin-top: 1px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.check-box.checked { background: var(--emerald); border-color: var(--emerald); }
.check-box.checked::after { content: '✓'; color: white; font-size: 13px; font-weight: 700; }
.check-text { font-size: 14px; color: var(--text-mid); line-height: 1.5; }
.check-text.done { text-decoration: line-through; color: var(--slate-light); }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer { background: var(--navy); padding: 64px 32px 40px; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: white; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.65; max-width: 280px; }
.footer-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 13.5px; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--emerald); }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 32px; flex-wrap: wrap; gap: 16px; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.28); }
.footer-disclaimer { font-size: 12px; color: rgba(255,255,255,0.22); max-width: 560px; line-height: 1.6; }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease forwards; }
@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .page-hero-inner { grid-template-columns: 1fr; }
  .page-hero-badge { justify-self: start; }
  .nav-inner { padding: 0 24px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-cta { display: none; }
}

@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 15px; }
  .nav-inner { padding: 0 16px; height: 58px; }
  .logo { font-size: 17px; }
  .breadcrumb { padding: 74px 16px 0; }
  .breadcrumb-inner { font-size: 12px; flex-wrap: wrap; }
  .page-hero { padding: 32px 16px 40px; }
  .page-hero h1 { font-size: clamp(24px, 7vw, 34px); }
  .page-hero-sub { font-size: 15px; }
  .page-hero-meta { gap: 12px 16px; }
  .meta-item { font-size: 12px; }
  .section { padding: 40px 16px; }
  .section-title { font-size: clamp(21px, 6vw, 28px); }
  .section-sub { font-size: 14.5px; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .section-header-split { flex-direction: column; align-items: flex-start; gap: 12px; }
  .card { padding: 22px; }
  .article-body { font-size: 15px; }
  .article-body h2 { font-size: 21px; margin: 36px 0 12px; }
  .article-body h3 { font-size: 16.5px; }
  .toc { padding: 16px 18px; }
  .data-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .btn { padding: 13px 22px; font-size: 14.5px; }
  .btn-sm { padding: 10px 16px; }
  footer { padding: 48px 16px 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .footer-disclaimer { max-width: 100%; }
  /* Touch targets */
  a, button, .check-box, .opt-pill, .filter-btn, .cat-btn { min-height: 38px; }
  .check-box { min-height: 22px; }
  .nav-links a, .sidebar-links a { padding: 10px; }
}

@media (max-width: 400px) {
  .page-hero h1 { font-size: 23px; }
  .nav-inner { padding: 0 14px; }
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: rgba(13,27,42,0.18); border-radius: 4px; }
