/* ============================================================
   guides.css — shared styles for all Afterward guide pages
   Extends the design system from index.html
   ============================================================ */

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

:root {
  --cream:      #F5F0E8;
  --warm-white: #FDFAF5;
  --charcoal:   #1C1C1E;
  --navy:       #1A2744;
  --slate:      #4A5568;
  --muted:      #8A9BB0;
  --amber:      #C8823A;
  --amber-lt:   #E8B87A;
  --sage:       #5C7A6E;
  --sage-lt:    #EBF3EF;
  --divider:    #E2D9CC;
  --shadow:     rgba(28,28,30,0.08);
  --red:        #9B3A3A;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.25; }

a { color: var(--amber); }
a:hover { opacity: 0.8; }

.container { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 780px; }

.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 16px; display: block;
}

/* ─── Main nav ───────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(253,250,245,0.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider); padding: 16px 0;
  transition: box-shadow 0.2s;
}
nav.scrolled { box-shadow: 0 2px 20px var(--shadow); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--navy); text-decoration: none; }
.nav-logo span { color: var(--amber); }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--slate); text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--navy); }
.nav-links a.active { color: var(--amber); }
.nav-cta {
  background: var(--amber); color: #fff !important; padding: 8px 18px;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.88; }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ─── Guide sub-nav ──────────────────────────────────── */
.guides-subnav {
  position: sticky; top: 57px; z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--divider);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.guides-subnav::-webkit-scrollbar { display: none; }
.guides-tabs {
  display: flex; gap: 0; min-width: max-content;
  padding: 0 32px;
}
.guides-tab {
  display: inline-block; padding: 14px 20px;
  font-size: 13px; font-weight: 500; color: var(--slate);
  text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.guides-tab:hover { color: var(--navy); opacity: 1; }
.guides-tab.active {
  color: var(--amber); border-bottom-color: var(--amber);
  font-weight: 600;
}
@media (max-width: 640px) {
  .guides-tabs { padding: 0 16px; }
  .guides-tab { padding: 12px 14px; font-size: 12px; }
}

/* ─── Guide hero ─────────────────────────────────────── */
.guide-hero {
  background: var(--navy);
  padding: 120px 0 64px;
  margin-bottom: 0;
}
.guide-hero-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--amber-lt); margin-bottom: 16px; display: block;
}
.guide-hero h1 {
  font-size: clamp(28px, 4vw, 48px); color: #fff;
  max-width: 700px; margin-bottom: 20px; letter-spacing: -0.01em;
}
.guide-hero-intro {
  font-size: 17px; color: rgba(255,255,255,0.65); max-width: 620px; line-height: 1.8; margin-bottom: 32px;
}
.guide-hero-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.guide-hero-meta-item {
  font-size: 12px; color: rgba(255,255,255,0.4); display: flex; align-items: center; gap: 6px;
}
.guide-hero-meta-item strong { color: rgba(255,255,255,0.65); }

/* ─── Content layout ─────────────────────────────────── */
.guide-body {
  padding: 56px 0 80px;
}
.guide-body--alt { background: var(--cream); }

.guide-section { margin-bottom: 56px; }
.guide-section:last-child { margin-bottom: 0; }

.guide-h2 {
  font-size: clamp(22px, 3vw, 32px); color: var(--navy); margin-bottom: 16px;
}
.guide-h3 {
  font-size: 19px; color: var(--navy); margin-bottom: 10px; margin-top: 32px;
}
.guide-h3:first-child { margin-top: 0; }

.guide-lead {
  font-size: 16px; color: var(--slate); line-height: 1.8; margin-bottom: 24px;
}

.guide-p {
  font-size: 15px; color: var(--slate); line-height: 1.8; margin-bottom: 16px;
}
.guide-p:last-child { margin-bottom: 0; }

/* ─── Step lists ─────────────────────────────────────── */
.step-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.step-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border: 1px solid var(--divider); border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 1px 6px var(--shadow);
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.step-content h4 { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.step-content p { font-size: 13px; color: var(--slate); line-height: 1.6; }
.step-tag {
  display: inline-block; padding: 2px 10px; border-radius: 100px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-left: 8px;
}
.step-tag--urgent { background: rgba(155,58,58,0.1); color: var(--red); }
.step-tag--week { background: rgba(200,130,58,0.1); color: var(--amber); }
.step-tag--month { background: rgba(92,122,110,0.1); color: var(--sage); }
.step-tag--later { background: rgba(138,155,176,0.1); color: var(--muted); }

/* ─── Checklist ──────────────────────────────────────── */
.phase-block {
  border: 1px solid var(--divider); border-radius: 16px; overflow: hidden;
  margin-bottom: 28px; background: #fff; box-shadow: 0 2px 12px var(--shadow);
}
.phase-header {
  padding: 20px 24px; display: flex; align-items: center; gap: 14px;
  background: var(--navy);
}
.phase-header-icon { font-size: 24px; }
.phase-header-text {}
.phase-header-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-lt); margin-bottom: 2px; }
.phase-header-title { font-family: 'Playfair Display', serif; font-size: 18px; color: #fff; }
.phase-tasks { padding: 8px 0; }
.phase-task {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 24px;
  border-bottom: 1px solid var(--divider);
}
.phase-task:last-child { border-bottom: none; }
.phase-task-check {
  width: 20px; height: 20px; border: 2px solid var(--divider); border-radius: 4px;
  flex-shrink: 0; margin-top: 2px; cursor: pointer; transition: all 0.15s;
}
.phase-task-check:hover { border-color: var(--amber); }
.phase-task-info { flex: 1; }
.phase-task-name { font-size: 14px; font-weight: 500; color: var(--charcoal); line-height: 1.4; margin-bottom: 3px; }
.phase-task-detail { font-size: 12px; color: var(--muted); line-height: 1.5; }
.phase-task-badge {
  padding: 2px 10px; border-radius: 100px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; margin-top: 2px;
}
.badge--urgent { background: rgba(155,58,58,0.1); color: var(--red); }
.badge--week   { background: rgba(200,130,58,0.1); color: var(--amber); }
.badge--month  { background: rgba(92,122,110,0.1); color: var(--sage); }
.badge--later  { background: rgba(138,155,176,0.1); color: var(--muted); }

/* ─── Guide steps ────────────────────────────────────── */
.guide-section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 2.5vw, 28px); color: var(--navy);
  margin-bottom: 20px; margin-top: 0;
}

.guide-steps { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; padding: 0; }
.guide-step {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border: 1px solid var(--divider); border-radius: 12px;
  padding: 20px 22px; box-shadow: 0 1px 6px var(--shadow);
}
.guide-step-number {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.guide-step-body { flex: 1; }
.guide-step-title { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 5px; line-height: 1.4; }
.guide-step-detail { font-size: 13px; color: var(--slate); line-height: 1.65; }
.guide-step-detail a { color: var(--amber); font-weight: 500; }

/* ─── Checklist items ────────────────────────────────── */
.checklist-block { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.checklist-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid var(--divider); border-radius: 10px;
  padding: 14px 18px; font-size: 14px; color: var(--slate); line-height: 1.6;
}
.checklist-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.checklist-item strong { color: var(--navy); }
.checklist-item a { color: var(--amber); }

/* ─── Comparison / data table ────────────────────────── */
.comparison-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 13px; border-radius: 10px; overflow: hidden; }
.comparison-table thead { background: var(--navy); }
.comparison-table th {
  padding: 12px 16px; text-align: left; color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.comparison-table td { padding: 12px 16px; border-bottom: 1px solid var(--divider); color: var(--slate); vertical-align: top; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--cream); }
.comparison-table td:first-child { color: var(--charcoal); }
@media (max-width: 640px) {
  .comparison-table th:nth-child(n+3),
  .comparison-table td:nth-child(n+3) { display: none; }
}

/* ─── Info cards ─────────────────────────────────────── */
.info-card {
  border-radius: 12px; padding: 20px 24px; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(92,122,110,0.05); border: 1px solid var(--divider);
}
.info-card--tip     { background: var(--sage-lt); border: 1px solid rgba(92,122,110,0.25); }
.info-card--warn,
.info-card--warning { background: rgba(200,130,58,0.08); border: 1px solid rgba(200,130,58,0.25); }
.info-card--urgent  { background: rgba(155,58,58,0.06); border: 1px solid rgba(155,58,58,0.2); }
.info-card-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.info-card-title { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.info-card-body  { font-size: 13px; color: var(--slate); line-height: 1.65; }

/* ─── State comparison table ─────────────────────────── */
.state-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 13px; }
.state-table th {
  background: var(--navy); color: #fff; padding: 12px 16px;
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.state-table td { padding: 12px 16px; border-bottom: 1px solid var(--divider); color: var(--slate); vertical-align: top; }
.state-table tr:last-child td { border-bottom: none; }
.state-table tr:nth-child(even) td { background: var(--cream); }
.state-table td:first-child { font-weight: 600; color: var(--navy); }
@media (max-width: 640px) {
  .state-table th:nth-child(n+3),
  .state-table td:nth-child(n+3) { display: none; }
}

/* ─── CTA block ──────────────────────────────────────── */
.guide-cta {
  background: var(--navy); border-radius: 16px; padding: 40px 44px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap; margin: 56px 0 0;
}
.guide-cta-text {}
.guide-cta-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-lt); margin-bottom: 10px; }
.guide-cta-title { font-family: 'Playfair Display', serif; font-size: 24px; color: #fff; margin-bottom: 10px; line-height: 1.3; }
.guide-cta-body  { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; max-width: 480px; }
.guide-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
  border: none; text-decoration: none; transition: opacity 0.2s, transform 0.15s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #fff; }
.btn-ghost   { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.2); }
.btn-ghost:hover { color: #fff; }

@media (max-width: 640px) {
  .guide-cta { padding: 28px 24px; }
  .guide-cta-title { font-size: 20px; }
}

/* ─── FAQ ────────────────────────────────────────────── */
.faq-section { padding: 64px 0; background: var(--cream); }
.faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 32px; }
.faq-item {
  border-bottom: 1px solid var(--divider); overflow: hidden;
}
.faq-item:first-child { border-top: 1px solid var(--divider); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 20px 0; background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--navy); text-align: left; transition: color 0.15s;
}
.faq-question:hover { color: var(--amber); }
.faq-icon {
  font-size: 20px; color: var(--amber); flex-shrink: 0;
  transition: transform 0.25s ease; line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  font-size: 14px; color: var(--slate); line-height: 1.75;
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding: 0;
}
.faq-item.open .faq-answer { max-height: 800px; padding-bottom: 20px; }
.faq-answer p { margin-bottom: 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer a { color: var(--amber); font-weight: 500; }

/* ─── Internal links nav (between guides) ────────────── */
.guides-also {
  background: var(--warm-white); padding: 40px 0; border-top: 1px solid var(--divider);
}
.guides-also-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.guides-also-links { display: flex; gap: 12px; flex-wrap: wrap; }
.guides-also-link {
  padding: 10px 18px; border: 1px solid var(--divider); border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--slate); text-decoration: none;
  background: #fff; transition: all 0.15s;
}
.guides-also-link:hover { border-color: var(--amber); color: var(--amber); opacity: 1; }

/* ─── Footer ─────────────────────────────────────────── */
footer { background: var(--charcoal); padding: 64px 0 32px; }
.footer-cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 32px;
}
@media (max-width: 768px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-logo-text { font-family: 'Playfair Display', serif; font-size: 20px; color: #fff; }
.footer-logo-text span { color: var(--amber); }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 12px; max-width: 240px; line-height: 1.7; }
.footer-col-title { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 16px; }
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a { font-size: 13px; color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.15s; }
.footer-col-links a:hover { color: rgba(255,255,255,0.85); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.25); }

/* ─── Sitewide Disclaimer Bar ───────────────────────── */
.advice-disclaimer {
  background: #FFF8E1;
  border-bottom: 1px solid #F0D070;
  padding: 11px 0;
  font-size: 12.5px;
  color: #5a4a00;
  line-height: 1.5;
}
.advice-disclaimer .container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.advice-disclaimer-icon {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 1px;
}
.advice-disclaimer-text a {
  color: #5a4a00;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(90,74,0,0.4);
}
.advice-disclaimer-text a:hover { text-decoration-color: #5a4a00; }

/* ─── Utility ────────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: none; }
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .guide-hero { padding: 100px 0 48px; }
}
