/* ===== CSS VARIABLES & RESET ===== */
:root {
  --cream: #faf8f3;
  --cream-dark: #f0ece3;
  --forest: #1a3c34;
  --forest-light: #2a5c4e;
  --forest-dark: #0f2920;
  --amber: #d4a853;
  --amber-light: #e8c97a;
  --amber-dark: #b8912e;
  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-light: #8a8a8a;
  --border: #d4d0c8;
  --border-light: #e8e4dc;
  --ad-bg: #f8f6f0;
  --white: #ffffff;
  --serif: 'Georgia', 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Segoe UI', sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--forest);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }
h5 { font-size: 1rem; font-weight: 600; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

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

strong { color: var(--text-primary); }

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 60px 0;
}

section:nth-child(even):not(.hero) {
  background: var(--white);
}

/* ===== HEADER / NAV ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--forest);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: var(--amber);
}

.logo span {
  color: var(--amber);
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}

nav a:hover, nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--forest);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    transform: translateY(-120%);
    transition: transform 0.35s ease;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  nav.open { transform: translateY(0); }
  nav a {
    font-size: 0.95rem;
    padding: 10px 16px;
    width: 100%;
  }
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1a3c34 0%, #2a5c4e 50%, #1a3c34 100%) !important;
  color: #ffffff;
  padding: 64px 0 52px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212,168,83,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: #ffffff !important;
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
}

.hero .subtitle {
  color: #e8c97a !important;
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  margin-bottom: 16px;
  display: block;
}

.hero p {
  color: rgba(255,255,255,0.85) !important;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 28px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
}

.hero-badge svg {
  width: 18px;
  height: 18px;
  fill: var(--amber);
  flex-shrink: 0;
}

/* ===== INSURANCE CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.ins-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.ins-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--amber);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.ins-card:hover {
  border-color: var(--amber);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ins-card:hover::before {
  transform: scaleX(1);
}

.ins-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--forest), var(--forest-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ins-card-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--amber);
}

.ins-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.ins-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.ins-card .card-link {
  color: var(--amber-dark);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ins-card .card-link::after {
  content: '→';
  transition: transform var(--transition);
}

.ins-card:hover .card-link::after {
  transform: translateX(4px);
}

/* ===== QUIZ ===== */
.quiz-section {
  background: var(--white);
  padding: 60px 0;
}

.quiz-box {
  background: var(--cream);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
}

.quiz-box h2 {
  text-align: center;
  margin-bottom: 8px;
}

.quiz-intro {
  text-align: center;
  margin-bottom: 28px;
}

.quiz-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.quiz-progress .step {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  transition: background var(--transition);
}

.quiz-progress .step.active {
  background: var(--amber);
}

.quiz-progress .step.done {
  background: var(--forest);
}

.quiz-question {
  margin-bottom: 24px;
}

.quiz-question h4 {
  margin-bottom: 16px;
  font-family: var(--sans);
  font-size: 1.1rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 18px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.95rem;
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--amber);
  background: rgba(212,168,83,0.05);
}

.quiz-option.selected {
  border-color: var(--forest);
  background: rgba(26,60,52,0.05);
  font-weight: 600;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.quiz-results {
  display: none;
}

.quiz-results h3 {
  margin-bottom: 16px;
}

.rec-list {
  list-style: none;
}

.rec-list li {
  padding: 12px 16px;
  border-left: 4px solid var(--amber);
  background: var(--white);
  margin-bottom: 10px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.rec-list li strong {
  display: block;
  color: var(--forest);
  margin-bottom: 2px;
}

.rec-list li span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--forest-dark);
}
.btn-primary:hover {
  background: var(--amber-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-secondary:hover {
  background: var(--forest);
  color: var(--white);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ===== GUIDE SECTIONS ===== */
.guide-section {
  padding: 60px 0;
}

.guide-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.guide-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--forest), var(--forest-light));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--amber);
}

.guide-section .section-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 800px;
}

.guide-content {
  display: grid;
  gap: 24px;
}

.guide-content h4 {
  color: var(--forest);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--amber);
  display: inline-block;
}

.guide-content p {
  font-size: 0.95rem;
  line-height: 1.75;
}

.guide-content ul, .guide-content ol {
  margin: 8px 0 16px 20px;
  color: var(--text-secondary);
}

.guide-content li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.tip-box {
  background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(212,168,83,0.04));
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 16px 0;
}

.tip-box h5 {
  color: var(--amber-dark);
  margin-bottom: 6px;
  font-family: var(--sans);
}

.tip-box p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.warning-box {
  background: rgba(200,50,50,0.04);
  border-left: 4px solid #c83232;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 16px 0;
}

.warning-box h5 {
  color: #c83232;
  margin-bottom: 6px;
  font-family: var(--sans);
}

.warning-box p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ===== COMPARISON TABLES ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--forest);
  color: var(--white);
}

th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

tbody tr:nth-child(even) {
  background: rgba(26,60,52,0.02);
}

tbody tr:hover {
  background: rgba(212,168,83,0.06);
}

td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.check { color: var(--forest); font-weight: 700; }
.cross { color: var(--text-light); }

/* ===== COST SECTION ===== */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.cost-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.cost-card .cost-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.cost-card .cost-value {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--forest);
  font-weight: 700;
}

.cost-card .cost-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== CROSS-LINKS ===== */
.cross-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.cross-links span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.cross-link {
  font-size: 0.85rem;
  color: var(--forest);
  border: 1px solid var(--border-light);
  padding: 4px 12px;
  border-radius: 100px;
  transition: all var(--transition);
  text-decoration: none;
}

.cross-link:hover {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}

/* ===== AD SLOTS ===== */
.ad-slot {
  min-height: 250px;
  background: var(--ad-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 32px auto;
  max-width: 728px;
}

/* ===== FAQ ===== */
.faq-section {
  padding: 60px 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  max-width: 800px;
  margin: 0 auto;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  gap: 16px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--sans);
}

.faq-question h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.faq-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 1.2rem;
  color: var(--forest);
}

.faq-item.open .faq-toggle {
  background: var(--forest);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ===== GLOSSARY ===== */
.glossary-section {
  padding: 60px 0;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.glossary-item {
  padding: 18px 22px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.glossary-item:hover {
  border-color: var(--amber);
}

.glossary-term {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--forest);
  font-size: 1rem;
  margin-bottom: 4px;
}

.glossary-def {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ===== FOOTER ===== */
footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-about h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-about h3 span { color: var(--amber); }

.footer-about p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  padding: 3px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--amber);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--forest);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 500;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--amber-dark);
}

/* ===== TABLE OF CONTENTS (SIDEBAR) ===== */
.toc-sidebar {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--cream);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.toc-dot.active {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.3);
}

.toc-dot:hover::after {
  content: attr(data-label);
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--forest);
  color: var(--white);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 1300px) {
  .toc-sidebar { display: none; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 40px 0; }
  .hero { padding: 60px 0 40px; }
  .cards-grid { grid-template-columns: 1fr; }
  .quiz-box { padding: 24px 20px; }
  .cost-grid { grid-template-columns: 1fr 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 0;
}

/* Print styles */
@media print {
  header, .back-to-top, .toc-sidebar, .ad-slot, .quiz-section { display: none !important; }
  section { padding: 20px 0; }
  .ins-card { break-inside: avoid; }
}
