/* ==========================================================================
   Cesar & Associates — Learning Center / Guides shared stylesheet
   Mirrors the homepage design system (index.html :root + nav + footer)
   and adds guide-specific article/table/card styles.
   ========================================================================== */

:root {
  --red: #ce1f31;
  --blue: #4a90c4;
  --gold: #c4922a;
  --ink: #0f2538;
  --ink-2: #183f5e;
  --text: #243848;
  --muted: #445a6a;
  --cloud: #f7fbfd;
  --paper: #ffffff;
  --mist: #eaf7ff;
  --baby: #cfeeff;
  --baby-2: #e1f5ff;
  --line: #c9e3f1;
  --cream: #fff8ea;
  --shadow: 0 24px 80px rgba(15, 37, 56, .15);
  --soft-shadow: 0 10px 34px rgba(15, 37, 56, .10);
  --radius: 8px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
  --wrap: 1320px;
  --wide: 1680px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--cloud);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { color: var(--ink); line-height: 1.1; font-family: var(--serif); }
p { color: var(--muted); }
.wrap { width: min(calc(100% - 36px), var(--wrap)); margin-inline: auto; }
.wide { width: min(calc(100% - 36px), var(--wide)); margin-inline: auto; }

/* Language toggle */
html:not(.es) .es-only,
html.es .en-only,
[hidden] { display: none; }

.skip-link {
  position: absolute; left: 16px; top: -72px; z-index: 200;
  padding: 10px 16px; border-radius: var(--radius);
  background: var(--red); color: #fff; font-weight: 700;
}
.skip-link:focus { top: 16px; }
:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(74,144,196,.72);
  outline-offset: 3px;
}

.icon {
  width: 20px; height: 20px;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  fill: none; flex: 0 0 auto;
}
.sprite-root { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================== NAV ===================================== */
.nav {
  position: sticky; top: 0; z-index: 80;
  border-bottom: 1px solid rgba(15,37,56,.07);
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}
.nav-inner {
  min-height: 84px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  min-width: 0; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center;
  min-width: 0; flex: 0 1 230px; overflow: visible;
}
.brand-mark {
  height: 44px; width: auto; max-width: none;
  object-fit: contain; flex-shrink: 0; object-position: left center;
}
.nav-links {
  display: flex; align-items: center;
  justify-content: center; gap: 4px; flex-wrap: nowrap;
}
.nav-links a {
  min-height: 44px; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; padding: 8px 8px;
  color: var(--ink-2); font-size: .86rem; font-weight: 600;
  white-space: nowrap; background: transparent;
  transition: background .18s, border-color .18s;
}
.nav-links a:hover {
  background: rgba(206, 31, 49, .08);
  border-color: rgba(206, 31, 49, .2);
}
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.nav-phone {
  color: var(--ink-2); font-weight: 700;
  font-size: .86rem; white-space: nowrap;
  padding: 8px 9px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
}
.nav-phone:hover { background: var(--mist); }
.nav-cta {
  min-height: 44px; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--red); background: var(--red);
  color: #fff; font-size: .86rem; font-weight: 700;
  padding: 8px 11px; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(206,31,49,.2);
  transition: opacity .15s;
}
.nav-cta:hover { opacity: .88; }
.lang-toggle {
  min-height: 44px; border-radius: var(--radius);
  border: 1px solid var(--line); background: rgba(206,31,49,.06);
  color: var(--ink-2); font-size: .84rem; font-weight: 700;
  padding: 8px 10px; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.lang-toggle:hover { background: rgba(206,31,49,.12); border-color: var(--red); }

/* ============================== BUTTONS ================================= */
.btn {
  min-height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: var(--radius);
  padding: 12px 20px;
  border: 1px solid rgba(206,31,49,.2);
  background: #fff; color: var(--ink-2);
  font-size: 1rem; font-weight: 700;
  transition: transform .18s, border-color .18s, background .18s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--red); background: rgba(255,255,255,.95); }
.btn.primary {
  background: var(--red); border-color: var(--red);
  color: #fff; box-shadow: 0 10px 28px rgba(206,31,49,.3);
}
.btn.primary:hover { background: #b01b27; transform: translateY(-2px); }
.btn.blue { background: var(--baby-2); border-color: rgba(74,144,196,.28); color: var(--ink-2); }
.btn.dark { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 30px; border-radius: 999px;
  border: 1px solid rgba(206,31,49,.22); background: #fff;
  color: var(--ink-2); padding: 5px 11px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; white-space: nowrap; letter-spacing: .04em;
}
.dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--red); box-shadow: 0 0 0 5px rgba(206,31,49,.12);
}

/* ============================== HERO BAND =============================== */
.guide-hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 100px) 0 clamp(40px, 6vw, 76px);
  background:
    linear-gradient(116deg, rgba(11,27,46,.93) 0%, rgba(12,30,50,.85) 52%, rgba(16,42,68,.66) 100%),
    url("../senior-couple.jpg") center 32% / cover no-repeat;
  border-bottom: 1px solid rgba(15,37,56,.12);
}
.guide-hero-inner {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px); align-items: start;
}
.guide-hero-icon {
  width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: var(--radius); background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.5); color: var(--red);
}
.guide-hero-icon img { width: 38px; height: 38px; }
.guide-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: #dbecff; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px;
}
.breadcrumb {
  font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.72);
  margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: rgba(255,255,255,.92); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span[aria-hidden] { color: var(--line); }
.guide-hero h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.04;
  color: #fff; max-width: 22ch; text-wrap: balance;
}
.guide-hero-sub {
  margin-top: 16px; max-width: 64ch;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: rgba(255,255,255,.86); line-height: 1.6;
}
.guide-meta {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px;
}

/* ============================== ARTICLE BODY =========================== */
.guide-body { padding: clamp(40px, 6vw, 76px) 0; background: var(--paper); }
.guide-article { max-width: 78ch; margin-inline: auto; }
.guide-article > * + * { margin-top: 1.1em; }
.guide-article h2 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15;
  margin-top: 2.2em; color: var(--ink); text-wrap: balance;
}
.guide-article h2:first-child { margin-top: 0; }
.guide-article h3 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  margin-top: 1.7em; color: var(--ink-2);
}
.guide-article p { color: var(--muted); font-size: 1.02rem; }
.guide-article strong { color: var(--ink-2); }
.guide-article a:not(.btn) { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.guide-article a:not(.btn):hover { color: #b01b27; }
.guide-article ul, .guide-article ol { padding-left: 1.3em; color: var(--muted); }
.guide-article li { margin-top: .5em; padding-left: .2em; font-size: 1.02rem; }
.guide-article li::marker { color: var(--red); }
.lead {
  font-size: clamp(1.1rem, 1.7vw, 1.28rem) !important;
  color: var(--ink-2) !important; line-height: 1.55;
}

/* Key-points callout box */
.keybox {
  border-radius: var(--radius);
  border: 1px solid rgba(206,31,49,.14);
  background: linear-gradient(135deg, #fff 0%, rgba(206,31,49,.03) 100%);
  box-shadow: var(--soft-shadow);
  padding: clamp(20px, 3vw, 28px); margin: 2em 0;
}
.keybox h3 {
  margin: 0 0 12px; font-size: 1.12rem; font-weight: 700;
  color: var(--ink); display: flex; align-items: center; gap: 10px;
}
.keybox h3 .icon { color: var(--red); }
.keybox ul { margin: 0; padding-left: 1.2em; }
.keybox li { color: var(--text); font-size: .98rem; }

/* Neutral info / definition aside */
.note-box {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--mist);
  padding: clamp(18px, 2.6vw, 24px); margin: 2em 0;
}
.note-box p { color: var(--ink-2); font-size: .98rem; }
.note-box strong { color: var(--ink); }

/* ============================== TABLE ================================== */
.table-scroll { overflow-x: auto; margin: 2em 0; -webkit-overflow-scrolling: touch; }
.cmp-table {
  width: 100%; border-collapse: collapse; min-width: 540px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--soft-shadow); background: #fff;
  font-size: .96rem;
}
.cmp-table caption {
  caption-side: bottom; margin-top: 12px;
  font-size: .82rem; color: var(--muted); text-align: left;
}
.cmp-table th, .cmp-table td {
  text-align: left; padding: 14px 16px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.cmp-table thead th {
  background: var(--ink-2); color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: .9rem;
}
.cmp-table thead th:first-child { background: var(--ink); }
.cmp-table tbody th {
  background: var(--cloud); color: var(--ink);
  font-weight: 700; width: 30%;
}
.cmp-table tbody tr:last-child th,
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:nth-child(even) td { background: rgba(234,247,255,.45); }
.cmp-table td { color: var(--muted); }

/* ============================== CTA BAND =============================== */
.cta-band { padding: clamp(40px, 6vw, 72px) 0; background: linear-gradient(180deg, #edf4fb 0%, #e4f1fb 50%, #eef5fb 100%); }
.cta-card {
  border-radius: var(--radius);
  border: 1px solid rgba(206,31,49,.12);
  background: linear-gradient(135deg, #fff 0%, rgba(206,31,49,.03) 100%);
  box-shadow: var(--shadow);
  padding: clamp(28px, 4.5vw, 52px);
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: clamp(20px, 3vw, 40px); align-items: center;
}
.cta-card h2 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; color: var(--ink);
}
.cta-card p { margin-top: 10px; color: var(--muted); font-size: 1.04rem; max-width: 52ch; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; min-width: 220px; }
.disclaimer-inline {
  margin-top: 18px; font-size: .8rem; color: var(--muted);
  max-width: 70ch;
}

/* ============================== MORE GUIDES =========================== */
.more-guides { padding: clamp(40px, 6vw, 76px) 0; background: linear-gradient(180deg, #f3f8fc 0%, #eef4fa 100%); }
.more-head { margin-bottom: 28px; }
.more-head .section-label {
  color: var(--red); text-transform: uppercase;
  font-weight: 700; font-size: .78rem; margin-bottom: 10px; letter-spacing: .06em;
}
.more-head h2 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.04; color: var(--ink);
}
.more-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.more-card {
  display: block; border-radius: var(--radius);
  border: 1px solid rgba(206,31,49,.1); background: #fff;
  box-shadow: 0 8px 24px rgba(15,37,56,.06);
  padding: 22px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.more-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--red); }
.more-card .tile-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: var(--radius); background: rgba(206,31,49,.08);
  color: var(--red); border: 1px solid rgba(206,31,49,.2); margin-bottom: 12px;
}
.more-card .tile-icon img { width: 30px; height: 30px; }
.more-card b { display: block; color: var(--ink); font-size: .95rem; line-height: 1.35; margin-bottom: 6px; }
.more-card .read { font-size: .82rem; color: var(--red); font-weight: 600; }

/* ============================== FOOTER ================================ */
.footer { padding: 42px 0; background: #0d2133; color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 340px);
  gap: 24px 40px; align-items: start;
}
.footer p { color: rgba(255,255,255,.65); font-size: .9rem; margin-top: 8px; }
.footer a { color: rgba(255,255,255,.85); font-weight: 700; }
.footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.footer-wordmark { width: min(200px, 52vw); height: auto; object-fit: contain; }
.footer-contact { text-align: right; }
.footer-contact a { display: block; font-size: 1rem; margin-bottom: 6px; }
.footer strong { font-size: .96rem; }
.footer-disclaimer { margin-top: 14px; font-size: .82rem; }
.footer-address { margin-top: 8px; }
.footer-social {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: flex-end; margin-top: 12px;
}
.footer-social a {
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 7px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06); font-size: .82rem;
}

/* ============================== RESPONSIVE ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 1100px) {
  .nav-inner { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; padding: 10px 0; }
  .nav-links { grid-column: 1 / -1; justify-content: center; padding-top: 6px; }
  .nav-right { justify-content: flex-end; }
  .nav-phone { display: none; }
  .cta-card { grid-template-columns: 1fr; }
  .cta-actions { min-width: 0; }
}
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-contact { text-align: left; }
  .footer-social { justify-content: flex-start; }
  .footer-brand { align-items: flex-start; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1500px) and (min-width: 1101px) {
  .nav-phone { display: none; }
  .nav-inner { gap: 12px; }
  .nav-links a { padding-inline: 9px; font-size: .9rem; }
  .brand-mark { height: clamp(48px, 5vw, 60px); max-width: clamp(210px, 24vw, 280px); }
}
@media (max-width: 740px) {
  html { font-size: 17px; }
  .wrap, .wide { width: min(calc(100% - 28px), var(--wrap)); }
  .nav-inner { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 8px 0 10px; }
  .brand { justify-content: center; }
  .brand-mark { height: clamp(52px, 13vw, 64px); max-width: min(82vw, 320px); }
  .nav-links {
    width: 100%; flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; padding: 2px 0 5px; scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; padding: 8px 10px; font-size: .82rem; }
  .nav-right { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .lang-toggle, .nav-cta { min-width: 0; width: 100%; justify-content: center; padding: 8px 9px; font-size: .8rem; }
  .guide-hero-inner { grid-template-columns: 1fr; }
  .guide-hero-icon { width: 56px; height: 56px; }
  .more-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-contact { text-align: left; }
  .footer-social { justify-content: flex-start; }
  .footer-brand { align-items: flex-start; }
}
@media (max-width: 440px) {
  .wrap, .wide { width: min(calc(100% - 24px), var(--wrap)); }
  .nav-right .nav-cta span { display: none; }
  .nav-links { gap: 0; justify-content: center; }
  .nav-links a { padding: 7px 6px; font-size: .78rem; }
  .btn { width: 100%; min-height: 50px; }
}
