/* ==========================================================================
   AlmeriaFans - hoja de estilos principal
   Paleta y tipografia segun PLAN-SEO-DESARROLLO.md seccion 4
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Azul - color de marca */
  --brand-900: #0A2540;
  --brand-700: #12437A;
  --brand-600: #1A5FB4;
  --brand-500: #2B7FD9;
  --brand-100: #DCEAFB;
  --brand-50:  #F2F7FD;

  /* Neutros */
  --white:    #FFFFFF;
  --gray-900: #14181F;
  --gray-600: #5A6472;
  --gray-200: #E4E8ED;

  /* Utilidad */
  --success:  #1E8E5A;
  --success-dark: #176F46;

  /* Tipografia */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Escala: 16 / 18 / 20 / 24 / 32 / 40 / 52 */
  --fs-sm:   0.875rem;  /* 14 */
  --fs-base: 1rem;      /* 16 */
  --fs-md:   1.125rem;  /* 18 */
  --fs-lg:   1.25rem;   /* 20 */
  --fs-xl:   1.5rem;    /* 24 */
  --fs-2xl:  2rem;      /* 32 */
  --fs-3xl:  2.5rem;    /* 40 */
  --fs-4xl:  3.25rem;   /* 52 */

  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5.5rem;

  --radius:    8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, .05);
  --shadow:    0 2px 8px rgba(10, 37, 64, .07);
  --shadow-lg: 0 8px 28px rgba(10, 37, 64, .12);

  --container: 1140px;
  --measure: 68ch;
}

/* --- Fuente self-hosted -------------------------------------------------
   Inter variable (subconjunto latin), un solo fichero para los pesos 400-700.
   Si /fonts/Inter-Variable.woff2 falta, se usa la pila del sistema.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Inter-Variable.woff2') format('woff2-variations'),
       url('/fonts/Inter-Variable.woff2') format('woff2');
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1.65;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  color: var(--brand-900);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

@media (min-width: 768px) {
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-3xl); }
  h3 { font-size: var(--fs-xl); }
}

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-500); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-700); }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.35em; }
li { margin-bottom: var(--space-2); }

strong { font-weight: 600; color: var(--brand-900); }

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* --- Utilidades --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.measure { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--brand-600);
  color: var(--white);
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* --- Secciones ---------------------------------------------------------- */
.section {
  padding-block: var(--space-8);
}
@media (min-width: 768px) {
  .section { padding-block: var(--space-9); }
}

.section--alt { background: var(--brand-50); }
.section--brand { background: var(--brand-900); color: var(--white); }
.section--brand h2,
.section--brand h3 { color: var(--white); }

.section__intro {
  max-width: var(--measure);
  color: var(--gray-600);
  font-size: var(--fs-lg);
  margin-bottom: var(--space-6);
}
.section--brand .section__intro { color: var(--brand-100); }

.section__head { margin-bottom: var(--space-6); }

/* --- Botones ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: 0 var(--space-6);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.btn__icon { flex: none; width: 20px; height: 20px; fill: currentColor; }

.btn--primary { background: var(--brand-600); color: var(--white); }
.btn--primary:hover { background: var(--brand-700); color: var(--white); }

.btn--whatsapp { background: var(--success); color: var(--white); }
.btn--whatsapp:hover { background: var(--success-dark); color: var(--white); }

.btn--telegram {
  background: transparent;
  color: var(--brand-600);
  border-color: var(--brand-600);
}
.btn--telegram:hover { background: var(--brand-600); color: var(--white); }

.section--brand .btn--telegram { color: var(--white); border-color: var(--white); }
.section--brand .btn--telegram:hover { background: var(--white); color: var(--brand-900); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.microcopy {
  font-size: var(--fs-sm);
  color: var(--gray-600);
}
.section--brand .microcopy { color: var(--brand-100); }

/* --- Header ------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--brand-900);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--brand-700); }
.logo__mark { color: var(--brand-600); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--brand-900);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-5) var(--space-6);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
}
.nav[data-open="true"] { display: block; }

.nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}
.nav__list li { margin: 0; }

.nav__link {
  display: block;
  padding: var(--space-3) var(--space-2);
  color: var(--brand-900);
  font-size: var(--fs-base);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
}
.nav__link:hover { background: var(--brand-50); color: var(--brand-700); }
.nav__link[aria-current="page"] { color: var(--brand-600); font-weight: 600; }

.nav .btn { width: 100%; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    position: static;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
  }
  .nav__list { flex-direction: row; align-items: center; gap: var(--space-1); margin: 0; }
  .nav__link { padding: var(--space-2) var(--space-3); font-size: var(--fs-base); }
  .nav .btn { width: auto; min-height: 44px; padding-inline: var(--space-5); font-size: var(--fs-sm); }
}

/* --- Breadcrumbs -------------------------------------------------------- */
.breadcrumbs {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--gray-200);
  background: var(--brand-50);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--gray-600);
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: var(--space-2); }
.breadcrumbs li + li::before { content: "\203A"; color: var(--gray-600); }
.breadcrumbs a { color: var(--gray-600); }
.breadcrumbs a:hover { color: var(--brand-700); }
.breadcrumbs [aria-current="page"] { color: var(--brand-900); font-weight: 500; }

/* --- Hero --------------------------------------------------------------- */
.hero {
  padding-block: var(--space-8);
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
}
@media (min-width: 768px) {
  .hero { padding-block: var(--space-9); }
}

.hero__grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: var(--space-8); }
  /* Sin imagen (pendiente de fotografia): una sola columna, texto legible */
  .hero__grid > :only-child { grid-column: 1 / -1; max-width: 46rem; }
}

.hero__lead {
  max-width: var(--measure);
  margin-bottom: var(--space-6);
  font-size: var(--fs-lg);
  color: var(--gray-600);
}

.page-header {
  padding-block: var(--space-7) var(--space-6);
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
}
.page-header__lead {
  max-width: var(--measure);
  font-size: var(--fs-lg);
  color: var(--gray-600);
  margin-bottom: var(--space-5);
}

/* --- Grids y tarjetas --------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px){ .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--gray-600); font-size: var(--fs-base); }

.card--link:hover { border-color: var(--brand-500); box-shadow: var(--shadow); }
.card__link { text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; }

.card__more {
  margin-top: auto;
  padding-top: var(--space-4);
  color: var(--brand-600);
  font-weight: 600;
  font-size: var(--fs-base);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  background: var(--brand-100);
  border-radius: var(--radius);
  color: var(--brand-600);
}
.card__icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

/* --- Pasos -------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px){ .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  margin: 0;
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  background: var(--brand-600);
  color: var(--white);
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--fs-md);
}
.step h3 { margin-bottom: var(--space-2); }
.step p { color: var(--gray-600); font-size: var(--fs-base); }

/* --- Lista con marcas --------------------------------------------------- */
.checklist { list-style: none; margin: 0 0 var(--space-5); padding: 0; }
.checklist li {
  position: relative;
  margin-bottom: var(--space-3);
  padding-left: 2rem;
  color: var(--gray-600);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 1.15rem;
  height: 1.15rem;
  background: var(--brand-100);
  border-radius: 50%;
}
.checklist li::after {
  content: "";
  position: absolute;
  left: .33rem;
  top: .72em;
  width: .5rem;
  height: .28rem;
  border-left: 2px solid var(--brand-600);
  border-bottom: 2px solid var(--brand-600);
  transform: rotate(-45deg);
}
/* Checklist compacta dentro de tarjetas de servicio (home) */
.checklist--sm { margin-bottom: 0; margin-top: var(--space-3); }
.checklist--sm li { font-size: .9375rem; margin-bottom: .5rem; }

.section--brand .checklist li { color: var(--brand-100); }
.section--brand .checklist li::before { background: rgba(255,255,255,.18); }
.section--brand .checklist li::after { border-color: var(--white); }

/* --- Hueco de imagen ----------------------------------------------------
   Placeholder visible mientras no haya fotografia propia (riesgo #5).
   Al sustituirlo, elimina .media__note y la clase is-empty.
   ------------------------------------------------------------------------ */
.media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--brand-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.media.is-empty { border: 1px dashed var(--brand-500); }
.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media__note {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-4);
  text-align: center;
  color: var(--brand-700);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.media__note svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { max-width: var(--measure); }
.faq__item { border-bottom: 1px solid var(--gray-200); }
.faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--brand-900);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex: none;
  width: .7rem;
  height: .7rem;
  margin-top: .45em;
  border-right: 2px solid var(--brand-600);
  border-bottom: 2px solid var(--brand-600);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg); }
.faq__item summary h3 { margin: 0; font-size: inherit; font-weight: inherit; color: inherit; }
.faq__answer { padding-bottom: var(--space-5); color: var(--gray-600); }

/* --- Prosa (guias y legales) -------------------------------------------- */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { color: var(--gray-600); }
.prose table {
  width: 100%;
  margin-bottom: var(--space-5);
  border-collapse: collapse;
  font-size: var(--fs-base);
}
.prose th, .prose td {
  padding: var(--space-3);
  border: 1px solid var(--gray-200);
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--brand-50); color: var(--brand-900); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.toc {
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  background: var(--brand-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}
.toc h2 { margin: 0 0 var(--space-3); font-size: var(--fs-md); }
.toc ol { margin: 0; color: var(--gray-600); }

.note {
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  background: var(--brand-50);
  border-left: 4px solid var(--brand-600);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gray-600);
  font-size: var(--fs-base);
}
.note strong { display: block; margin-bottom: var(--space-2); }

.meta {
  margin-bottom: var(--space-5);
  color: var(--gray-600);
  font-size: var(--fs-sm);
}

/* --- Bloque CTA --------------------------------------------------------- */
.cta-local {
  padding: var(--space-6);
  margin-block: var(--space-7);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-lg);
}
.cta-local h2 { font-size: var(--fs-xl); margin-bottom: var(--space-3); margin-top: 0; }
.cta-local p { color: var(--gray-600); margin-bottom: var(--space-5); }

/* --- Footer ------------------------------------------------------------- */
.footer {
  padding-block: var(--space-7) var(--space-6);
  background: var(--brand-900);
  color: var(--brand-100);
  font-size: var(--fs-base);
}
.footer a { color: var(--brand-100); text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }

.footer__grid {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1000px){ .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

.footer__head {
  margin: 0 0 var(--space-4);
  color: var(--white);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.footer__brand { font-size: var(--fs-lg); font-weight: 700; color: var(--white); }
.footer__tagline { margin-top: var(--space-3); color: var(--brand-100); }

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: var(--space-2); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: var(--fs-sm);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* --- Boton flotante WhatsApp -------------------------------------------- */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--success);
  color: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transition: background-color .18s ease, bottom .18s ease;
}
.wa-float:hover { background: var(--success-dark); color: var(--white); }
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }

@media (min-width: 900px) { .wa-float { display: none; } }

/* --- Modal 18+ ----------------------------------------------------------
   Oculto por defecto: sin JS no bloquea el renderizado ni oculta contenido
   a Googlebot, porque el HTML se sirve completo (plan seccion 11).
   ------------------------------------------------------------------------ */
.age-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: rgba(10, 37, 64, .82);
}
.age-gate[data-visible="true"] { display: flex; }

.age-gate__box {
  width: 100%;
  max-width: 460px;
  padding: var(--space-6);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.age-gate__box h2 { font-size: var(--fs-xl); }
.age-gate__box p { color: var(--gray-600); font-size: var(--fs-base); }
.age-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-5);
}
.age-gate__actions .btn { flex: 1 1 140px; }

/* --- Banner de cookies -------------------------------------------------- */
.cookie-banner {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.cookie-banner[data-visible="true"] { display: block; }
.cookie-banner p { font-size: var(--fs-sm); color: var(--gray-600); }

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.cookie-banner__actions .btn { min-height: 44px; font-size: var(--fs-sm); flex: 1 1 auto; }

@media (min-width: 800px) {
  .cookie-banner { left: auto; right: 16px; max-width: 440px; }
}

/* Deja hueco al boton flotante cuando el banner esta visible */
body[data-cookie-open="true"] .wa-float { bottom: 220px; }

/* --- 404 ---------------------------------------------------------------- */
.error-page { padding-block: var(--space-9); text-align: center; }
.error-page__code {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--brand-500);
  font-size: var(--fs-4xl);
  font-weight: 700;
  line-height: 1;
}
.error-page .btn-group { justify-content: center; }

/* --- Columna de texto + imagen lateral ----------------------------------
   Para paginas de contenido largo: el texto manda y la imagen se alinea
   arriba, en lugar de centrarse y dejar un hueco (a diferencia de .hero__grid).
   ------------------------------------------------------------------------ */
.split {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--space-8); }
  .split .media { position: sticky; top: 96px; }
  .split > :only-child { grid-column: 1 / -1; }
}

/* --- Indice de guia -----------------------------------------------------
   Sticky en escritorio (requisito de maquetacion de las guias). En movil se
   queda en flujo: un indice fijo taparia demasiada pantalla.
   ------------------------------------------------------------------------ */
@media (min-width: 900px) {
  /* Indice a la derecha, texto a la izquierda. Se usa flex sobre un wrapper
     para no tener que colocar cada hijo en una fila del grid. */
  .guia {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: var(--space-8);
    max-width: none;
  }
  .guia__toc { flex: none; width: 16rem; }
  .guia__toc .toc { position: sticky; top: 88px; margin: 0; }
  .guia__cuerpo { flex: 1 1 auto; min-width: 0; max-width: var(--measure); }
}

/* --- Formula destacada (guia 2) ----------------------------------------- */
.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-6) var(--space-5);
  margin-bottom: var(--space-5);
  background: var(--brand-900);
  border-radius: var(--radius-lg);
  color: var(--white);
  font-size: var(--fs-lg);
  font-weight: 700;
  text-align: center;
}
.formula span { white-space: nowrap; }
.formula em {
  color: var(--brand-100);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-xl);
}

/* --- Niveles si / no / depende (guia 3) --------------------------------- */
.niveles { display: grid; gap: var(--space-4); margin-bottom: var(--space-5); }

.nivel {
  padding: var(--space-5);
  border: 1px solid var(--gray-200);
  border-left: 5px solid var(--gray-600);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--white);
}
.nivel h3 { margin-bottom: var(--space-2); }
.nivel p { color: var(--gray-600); font-size: var(--fs-base); }

.nivel__estado {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: 2px var(--space-3);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.nivel--si  { border-left-color: var(--success); }
.nivel--si  .nivel__estado { background: #DFF3E8; color: #145F3C; }

.nivel--no  { border-left-color: #B3261E; }
.nivel--no  .nivel__estado { background: #FBE4E2; color: #8C1D18; }

.nivel--dep { border-left-color: var(--brand-600); }
.nivel--dep .nivel__estado { background: var(--brand-100); color: var(--brand-700); }

/* --- Aviso legal destacado (guia 4) ------------------------------------- */
.aviso-legal {
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  background: #FFF8E6;
  border: 1px solid #E8D9A8;
  border-radius: var(--radius-lg);
  color: #6B5518;
  font-size: var(--fs-base);
}
.aviso-legal strong { display: block; margin-bottom: var(--space-2); color: #5A4712; }
.aviso-legal p:last-child { margin-bottom: 0; }
