/* ==========================================================================
   EmiManejo — styles.css
   Mobile-first. Breakpoints: 375 (base) · 720 / 768 (tablet) · 1140 · 1280.
   Sin dependencias externas salvo Google Fonts (cargadas en index.html).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Azules */
  --blue-900: #1E3A8A;
  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-200: #BFDBFE;
  --blue-100: #DBEAFE;
  --blue-50:  #EFF6FF;

  /* Ámbar */
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-700: #B45309;
  --amber-100: #FEF3C7;

  /* Verdes */
  --wa:        #25D366;
  --wa-hover:  #1EBE5A;
  --green-600: #16A34A;
  --green-100: #DCFCE7;

  /* Superficies */
  --bg:      #F8FAFC;
  --bg-alt:  #FCFDFE;
  --surface: #FFFFFF;

  /* Texto */
  --ink:   #0F172A;
  --body:  #334155;
  --muted: #64748B;
  --faint: #94A3B8;

  /* Bordes */
  --border:         #E8EDF4;
  --border-strong:  #E2E8F0;
  --border-stronger:#CBD5E1;
  --divider:        #EEF2F7;
  --navy-raised:    #1E293B;

  /* Acento de la sección Paquetes (era un prop del prototipo).
     Alternativas del diseño: #2563EB · #DC2626 · #F59E0B · #0F172A */
  --accent: #2563EB;

  /* Tipografía */
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1200px;
  --gutter: 20px;
  --section-y: clamp(56px, 7vw, 96px);

  /* Sombras */
  --sh-nav:      0 2px 14px rgba(15, 23, 42, .09);
  --sh-card:     0 1px 2px rgba(15, 23, 42, .04);
  --sh-hover:    0 16px 36px rgba(15, 23, 42, .1);
  --sh-featured: 0 8px 28px rgba(15, 23, 42, .07);
  --sh-float:    0 10px 30px rgba(15, 23, 42, .12);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }

:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Bloquea el scroll del documento mientras el overlay mobile está abierto. */
body.is-menu-open { overflow: hidden; }

.h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: pretty;
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

.section__sub {
  color: var(--muted);
  font-size: 17px;
  margin: 12px 0 0;
}

/* Grilla de 3 columnas usada en Servicios, Testimonios y Blog.
   El min() evita que la pista mínima desborde en viewports muy angostos
   (<375px): por debajo de ese ancho la columna colapsa en vez de recortarse. */
.cards-3 {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

/* --------------------------------------------------------------------------
   3. Botones
   -------------------------------------------------------------------------- */
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wa);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
}
.btn-wa:hover { background: var(--wa-hover); color: #fff; }

.btn-wa--sm { font-size: 15px; padding: 10px 18px; }

.btn-wa--md {
  gap: 10px;
  font-size: 16px;
  padding: 15px 24px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .3);
}
.btn-wa--md:hover { transform: translateY(-2px); }

.btn-wa--lg {
  gap: 12px;
  font-weight: 700;
  font-size: 17.5px;
  padding: 18px 32px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .28);
  margin-top: 32px;
}
.btn-wa--lg:hover { transform: translateY(-2px); }

.btn-wa--block {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  padding: 16px;
  border-radius: 14px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--blue-600);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 24px;
  border: 2px solid var(--blue-600);
  border-radius: 12px;
  transition: background .2s ease, color .2s ease;
}
.btn-outline:hover { background: var(--blue-600); color: #fff; }

.icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
}

/* --------------------------------------------------------------------------
   4. Nav (sticky)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(248, 250, 252, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: var(--sh-nav); }

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.02em;
  color: var(--blue-600);
}
.logo:hover { color: var(--blue-600); }
.logo-mark { flex: none; }
.logo--footer { color: #fff; }

.nav-desktop { display: none; }

.nav-link {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  transition: color .2s ease;
}
.nav-link:hover { color: var(--blue-600); }

@media (min-width: 768px) {
  .nav-desktop { display: flex; align-items: center; gap: 30px; }
  .nav-toggle { display: none; }
}

/* --------------------------------------------------------------------------
   5. Overlay menú mobile
   -------------------------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.mobile-menu[hidden] { display: none; }

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu__links {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu__links a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  padding: 14px 0;
}
.mobile-menu__links a:hover { color: var(--blue-600); }

.mobile-menu .btn-wa--block { margin-top: auto; }

/* --------------------------------------------------------------------------
   6. Placeholders de imagen
   (reemplazar por <img>; conservar el aria-label como base del alt)
   -------------------------------------------------------------------------- */
.ph {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border-radius: 20px;
  background: repeating-linear-gradient(135deg, #E8F1FF 0 10px, #DDEAFE 10px 20px);
}
.ph__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ph__label--sm { font-size: 11px; }

.ph--hero  { aspect-ratio: 4 / 3.2; border: 1px solid var(--blue-200); }
.ph--about { aspect-ratio: 4 / 4.4; background: repeating-linear-gradient(135deg, #EEF2F7 0 10px, #E2E8F0 10px 20px); }
.ph--post  { aspect-ratio: 16 / 9; border-radius: 0; padding: 12px; }

/* Fotos reales que reemplazan a los .ph: mismo encuadre 16/9 que el
   placeholder, así el layout no se mueve al cambiar uno por otro. */
.post__img {
  display: block;
  width: 100%;
  height: auto;          /* sin esto gana el height="" del <img> y muere el aspect-ratio */
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ph--blue  { background: repeating-linear-gradient(135deg, #E8F1FF 0 10px, #DDEAFE 10px 20px); }
.ph--amber { background: repeating-linear-gradient(135deg, #FEF6E0 0 10px, #FDECC8 10px 20px); }
.ph--amber .ph__label { color: #92400E; }
.ph--slate { background: repeating-linear-gradient(135deg, #EEF2F7 0 10px, #E2E8F0 10px 20px); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero { background: linear-gradient(170deg, #DBEAFE 0%, #EFF6FF 42%, #F8FAFC 100%); }

.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 84px) var(--gutter) clamp(48px, 6vw, 92px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--blue-200);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-900);
}
.badge__star { color: var(--amber-500); }

.hero__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -.03em;
  margin: 22px 0 0;
  text-wrap: pretty;
}

.hero__sub {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 46ch;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__media { position: relative; }

/* Foto vertical (1184x2096) dentro de la caja apaisada del hero.
   object-position centra el encuadre en la cara, no en el medio de la foto. */
.hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  object-position: center 36%;
  border: 1px solid var(--blue-200);
  border-radius: 20px;
}

.stat-card {
  position: absolute;
  bottom: -18px;
  left: 18px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--sh-float);
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-card__num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--amber-100);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--amber-700);
}
.stat-card__txt {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.stat-card__txt span { color: var(--muted); font-weight: 500; }

/* --------------------------------------------------------------------------
   8. Sobre mí
   -------------------------------------------------------------------------- */
.section--about { padding-bottom: clamp(8px, 1vw, 16px); }

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}

/* Foto de clase (578x883) en la caja de "Hola, soy Emi".
   Mantiene el mismo recuadro que tenía el placeholder .ph--about. */
.about__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 20px;
}

.about__p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  margin: 20px 0 0;
  max-width: 58ch;
  text-wrap: pretty;
}
.about__p + .about__p { margin-top: 16px; }

.features {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}

.feature { display: flex; gap: 14px; align-items: flex-start; }

.feature__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16.5px;
  margin: 2px 0 0;
}
.feature__txt {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 5px 0 0;
}

/* Chips de ícono */
.chip {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}
.chip--lg { width: 48px; height: 48px; border-radius: 12px; }
.chip--blue  { background: var(--blue-100);  color: var(--blue-600); }
.chip--amber { background: var(--amber-100); color: var(--amber-600); }
.chip--green { background: var(--green-100); color: var(--green-600); }

/* --------------------------------------------------------------------------
   9. Servicios
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.card--hover { transition: box-shadow .2s ease, transform .2s ease; }
.card--hover:hover { box-shadow: var(--sh-hover); transform: translateY(-4px); }

.card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  margin: 20px 0 0;
}
.card__txt {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 10px 0 0;
}
.card__link {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   10. Paquetes
   -------------------------------------------------------------------------- */
.packages {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.packages__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.packages__head .h2 { margin-top: 14px; }

.packages__lead {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 14px 0 0;
  text-wrap: pretty;
}

.pkg-grid {
  margin-top: clamp(36px, 4vw, 52px);
  display: grid;
  gap: 20px;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px)  { .pkg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1140px) { .pkg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Reveal al entrar en viewport. Sólo se oculta si hay JS para revelarlo. */
.js .pkg-grid {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .pkg-grid.is-in { opacity: 1; transform: none; }

.pkg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-card);
}

/* El borde extra de la card destacada se compensa en el padding
   para que el contenido quede alineado con el resto. */
.pkg--featured {
  border: 2px solid var(--accent);
  padding: 27px 23px;
  box-shadow: var(--sh-featured);
}

/* Reserva la altura del badge en todas las cards → títulos alineados. */
.pkg__badge-row { min-height: 26px; }

.pkg__badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
}

.pkg__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
  margin: 14px 0 0;
}

.pkg__txt {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 10px 0 0;
  text-wrap: pretty;
}

.pkg__list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.pkg__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--body);
}
.ico-check {
  flex: none;
  margin-top: 2px;
  color: var(--green-600);
}

.pkg__foot {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pkg__price {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.btn-pkg {
  display: block;
  text-align: center;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  transition: background .2s ease, border-color .2s ease, filter .2s ease;
}
.btn-pkg:hover {
  background: var(--bg);
  border-color: var(--border-stronger);
  color: var(--ink);
}

.btn-pkg--accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.btn-pkg--accent:hover {
  background: var(--accent);
  border-color: transparent;
  filter: brightness(.92);
  color: #fff;
}

/* --------------------------------------------------------------------------
   11. Zonas
   -------------------------------------------------------------------------- */
.zones {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.zones__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter);
}
.zones__title {
  font-size: clamp(24px, 2.8vw, 34px);
  max-width: 24ch;
}
.zones__lead { max-width: 62ch; }

.zones__chips {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-50);
  color: var(--blue-900);
  font-weight: 600;
  font-size: 15.5px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--blue-100);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.zone-chip:hover {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-600);
}

/* --------------------------------------------------------------------------
   12. Testimonios
   -------------------------------------------------------------------------- */
.quote {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.quote__stars {
  color: var(--amber-500);
  font-size: 15px;
  letter-spacing: 2px;
}
.quote blockquote {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.62;
  text-wrap: pretty;
}
.quote figcaption {
  margin-top: auto;
  font-size: 14px;
  color: var(--muted);
}
.quote figcaption strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   13. FAQ
   -------------------------------------------------------------------------- */
.faq {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.faq__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}
.faq__title {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -.025em;
  text-align: center;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.faq__block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--sh-card);
}

.faq-item + .faq-item { border-top: 1px solid var(--divider); }
.faq-item__h { margin: 0; }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: transparent;
  border: 0;
  padding: 22px clamp(18px, 2.4vw, 28px);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(15.5px, 1.4vw, 17.5px);
  line-height: 1.4;
  color: var(--ink);
  transition: background .2s ease;
}
.faq-q:hover { background: #FAFCFE; }

.faq-q__icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform .25s ease;
}
.faq-q[aria-expanded="true"] .faq-q__icon { transform: rotate(45deg); }

.faq-a {
  display: grid;
  grid-template-rows: 1fr;                 /* sin JS, las respuestas quedan visibles */
  transition: grid-template-rows .3s ease;
}
.js .faq-a { grid-template-rows: 0fr; }
.js .faq-a.is-open { grid-template-rows: 1fr; }

.faq-a__clip { overflow: hidden; }

.faq-a p {
  margin: 0;
  padding: 0 clamp(18px, 2.4vw, 28px) 24px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   14. CTA final
   -------------------------------------------------------------------------- */
.cta { background: var(--ink); }
.cta__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  text-align: center;
}
.cta__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -.02em;
  color: #fff;
  margin: 0;
  text-wrap: pretty;
}
.cta__sub {
  color: var(--faint);
  font-size: 17.5px;
  line-height: 1.6;
  margin: 16px 0 0;
}

/* --------------------------------------------------------------------------
   15. Blog
   -------------------------------------------------------------------------- */
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.post__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.post__date {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
}
.post__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.3;
  margin: 0;
  text-wrap: pretty;
}
.post__txt {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}
.post__link {
  margin-top: auto;
  font-weight: 600;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--border-stronger);
}
.site-footer__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--gutter) 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 32px;
}
.site-footer__tagline {
  color: var(--faint);
  font-size: 15px;
  line-height: 1.6;
  margin: 10px 0 0;
  max-width: 32ch;
}
.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer__nav a {
  color: var(--border-stronger);
  font-size: 15px;
  transition: color .2s ease;
}
.site-footer__nav a:hover { color: #fff; }

.site-footer__social {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.social {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--navy-raised);
  display: grid;
  place-items: center;
  color: var(--border-stronger);
  transition: background .2s ease, color .2s ease;
}
.social--wa:hover { background: var(--wa); color: #fff; }
.social--ig:hover { background: var(--blue-600); color: #fff; }

.site-footer__bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid var(--navy-raised);
  font-size: 13.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   17. Botón flotante de WhatsApp
   -------------------------------------------------------------------------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 950;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid;
  place-items: center;
  animation: waPulse 3s ease-out infinite;
  transition: opacity .5s ease, transform .5s ease;
}
.wa-float:hover { color: #fff; }

/* Entra a los 2s desde el load (ver components.js). */
.js .wa-float { opacity: 0; transform: scale(.7); }
.js .wa-float.is-ready { opacity: 1; transform: scale(1); }

@keyframes waPulse {
  0%, 82%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .5); }
  90%           { box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 0 18px rgba(37, 211, 102, 0); }
}

/* --------------------------------------------------------------------------
   18. Movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .card--hover:hover,
  .btn-wa--md:hover,
  .btn-wa--lg:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   19. Páginas de artículo (/blog/*)
   -------------------------------------------------------------------------- */
.article__head {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) var(--gutter) 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
}
.article__meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.article__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 12px 0 0;
  text-wrap: pretty;
}

.article__lead {
  font-size: clamp(17px, 1.4vw, 19.5px);
  line-height: 1.6;
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 62ch;
  text-wrap: pretty;
}

.article__hero {
  max-width: 940px;
  margin: clamp(26px, 3vw, 38px) auto 0;
  padding: 0 var(--gutter);
}
.article__hero .ph { aspect-ratio: 16 / 9; }
.article__img {
  display: block;
  width: 100%;
  height: auto;          /* sin esto gana el height="" del <img> y muere el aspect-ratio */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
}

.article__body {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 48px) var(--gutter) clamp(48px, 6vw, 72px);
}

/* Prosa ------------------------------------------------------------------ */
.prose h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 29px);
  letter-spacing: -.02em;
  line-height: 1.22;
  margin: 46px 0 0;
  scroll-margin-top: 90px;   /* el nav es sticky */
  text-wrap: pretty;
}
.prose > h2:first-child { margin-top: 0; }

.prose h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.35;
  margin: 30px 0 0;
  scroll-margin-top: 90px;
  text-wrap: pretty;
}

.prose p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--body);
  margin: 14px 0 0;
  text-wrap: pretty;
}

.prose ul,
.prose ol {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prose li {
  position: relative;
  padding-left: 26px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
  text-wrap: pretty;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: .66em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-200);
}
.prose ol { counter-reset: n; }
.prose ol > li { counter-increment: n; }
.prose ol > li::before {
  content: counter(n) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--blue-600);
}

.prose strong { color: var(--ink); font-weight: 600; }

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--blue-200);
}
.prose a:hover { text-decoration-color: currentColor; }

/* Marca de dato pendiente de actualizar ---------------------------------- */
.todo {
  background: var(--amber-100);
  color: #92400E;
  font-weight: 600;
  font-size: .95em;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px dashed #FCD34D;
  white-space: nowrap;
}

/* Callouts --------------------------------------------------------------- */
.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid;
  border-radius: 14px;
}
.callout__ico {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.callout strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
}
.callout p {
  margin: 5px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
}
.callout--info { background: var(--blue-50); border-color: var(--blue-100); }
.callout--info .callout__ico { background: var(--blue-100); color: var(--blue-600); }
.callout--warn { background: #FFFBEB; border-color: #FDE68A; }
.callout--warn .callout__ico { background: var(--amber-100); color: var(--amber-700); }
.callout--tip { background: #F0FDF4; border-color: #BBF7D0; }
.callout--tip .callout__ico { background: var(--green-100); color: var(--green-600); }

/* Tablas ----------------------------------------------------------------- */
.table-wrap {
  margin: 24px 0 0;
  overflow-x: auto;                 /* la tabla scrollea, la pagina no */
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.data-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 15px;
}
.data-table th {
  text-align: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 18px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--divider);
  color: var(--body);
  line-height: 1.5;
}
.data-table tbody tr:first-child td { border-top: 0; }

/* Chips de clasificación de falla ---------------------------------------- */
.pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill--leve { background: #F1F5F9; color: #475569; }
.pill--baja { background: var(--blue-100); color: var(--blue-900); }
.pill--alta { background: var(--amber-100); color: var(--amber-700); }
.pill--elim { background: #FEE2E2; color: #B91C1C; }

/* Pasos numerados (artículo de requisitos) -------------------------------- */
.steps {
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--sh-card);
}
.step__n {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
}
.step h3 { margin: 4px 0 0; }
.step > div > :first-child { margin-top: 0; }

/* Bloques de error (artículo de errores comunes) -------------------------- */
.err {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--sh-card);
}
.err__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.err__name { display: flex; align-items: center; gap: 12px; }
.err__n {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
}
.err h3 { margin: 0; }
.err p { font-size: 16px; }

/* Checklist --------------------------------------------------------------- */
.checklist {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
}
.checklist svg { flex: none; margin-top: 3px; color: var(--green-600); }

/* CTA dentro del artículo -------------------------------------------------- */
.article-cta {
  margin-top: 48px;
  background: var(--ink);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 40px);
  text-align: center;
}
.article-cta h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -.02em;
  color: #fff;
  margin: 0;
  text-wrap: pretty;
}
.article-cta p {
  color: var(--faint);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 12px 0 0;
}
.article-cta .btn-wa { margin-top: 24px; }

/* Artículos relacionados --------------------------------------------------- */
.related { background: var(--bg-alt); border-top: 1px solid var(--border); }
.related__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) var(--gutter);
}
