/* ============================================================================
   Dent amb Dent · base.css
   Sistema base + componentes compartidos (Fase 1)
   Orden: tokens · reset · elementos · a11y · layout · header · footer ·
          botones · tarjetas · badges · migas · formularios · avisos ·
          acciones flotantes · utilidades · movimiento reducido · impresión
   Todos los colores/tamaños salen de las variables de la Ficha Maestra.
   Los tokens marcados «Fase 1» son añadidos necesarios no presentes en la ficha.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------------------- */
:root {
  /* Color · base (paleta de marca: pizarra + dorado del logo) */
  --color-white:        #FFFFFF;
  --color-surface:      #F7F6F1;  /* off-white cálido, combina con el dorado */
  --color-border:       #E7E3D8;

  /* Color · pizarra (color de acción; del texto "SU SALUD DENTAL") */
  --color-primary:      #3B4A59;  /* acción principal, enlaces (blanco encima 9:1) */
  --color-primary-dark: #2A3742;  /* hover/active, encabezados, texto sobre dorado */
  --color-primary-tint: #EDEFF2;  /* fondos de sección suaves */

  /* Color · dorado de marca (del logotipo "Dent amb Dent") */
  --color-accent:        #D7C192;  /* dorado exacto del logo (CTA con texto pizarra) */
  --color-accent-strong: #C9A94F;  /* dorado más rico: hover, bordes */
  --color-accent-dark:   #6E5A24;  /* bronce legible para texto/iconos sobre claro (AA) */
  --color-accent-tint:   #F5EFDF;  /* fondos cálidos suaves, badges */

  /* Color · texto */
  --color-text:         #26323C;  /* pizarra muy oscuro */
  --color-text-muted:   #5A6773;

  /* Color · feedback */
  --color-error:        #C0392B;
  --color-error-tint:   #FBECEA;
  --color-success:      #3E7D69;   /* verde semántico, independiente de la marca */
  --color-success-tint: #EAF5F1;
  --color-focus:        #3B4A59;   /* anillo de foco visible */

  /* Color · superficies oscuras (pie / franjas) */
  --color-ink:          #26323C;   /* pizarra profundo */
  --color-ink-soft:     #3B4A59;
  --color-on-ink:       #E3E6EA;
  --color-on-ink-muted: #9AA7B2;

  /* Tipografía (system stack = 0 requests, ideal para <1s) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  /* Escala tipográfica (ratio ~1.2, base 16px) */
  --step--1: 0.833rem;
  --step-0:  1rem;
  --step-1:  1.2rem;
  --step-2:  1.44rem;
  --step-3:  1.728rem;
  --step-4:  2.074rem;
  --step-5:  2.488rem;

  /* Line-height (Fase 1) */
  --lh-tight:  1.15;
  --lh-snug:   1.3;
  --lh-body:   1.65;

  /* Peso (Fase 1) */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold:600;
  --fw-bold:    700;

  /* Espaciado (base 4px) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-5: 1.25rem;
  --space-10: 2.5rem;

  /* Radios y sombras */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15,76,119,0.06);
  --shadow-md: 0 4px 14px rgba(15,76,119,0.10);
  --shadow-lg: 0 12px 32px rgba(15,76,119,0.14); /* Fase 1: menú/overlay */

  /* Layout */
  --container-max: 1200px;
  --measure: 72ch;      /* ancho de lectura cómodo */
  --tap-min: 48px;      /* target táctil mínimo accesible */

  /* Estructura (Fase 1) */
  --header-h: 72px;         /* alto de la barra principal */
  --topbar-h: 40px;         /* alto de la franja de utilidad superior */
  --gutter: var(--space-4); /* margen lateral del contenedor */

  /* Transiciones (Fase 1) */
  --transition-fast: 120ms ease;
  --transition:      200ms ease;

  /* Capas / z-index (Fase 1) */
  --z-header: 100;
  --z-menu:   110;
  --z-fab:    90;
  --z-skip:   200;
}

/* ---------------------------------------------------------------------------
   2. RESET moderno
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

/* ---------------------------------------------------------------------------
   3. ELEMENTOS base
   ------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--color-primary-dark);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: var(--step-2); font-weight: var(--fw-semibold); }
h4 { font-size: var(--step-1); font-weight: var(--fw-semibold); }

p { max-width: var(--measure); }
p, ul, ol { line-height: var(--lh-body); }

a {
  color: var(--color-primary);
  text-decoration-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
  text-underline-offset: 0.15em;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-dark); text-decoration-color: currentColor; }

strong, b { font-weight: var(--fw-semibold); }

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

:target { scroll-margin-top: calc(var(--header-h) + var(--space-4)); }

/* ---------------------------------------------------------------------------
   4. ACCESIBILIDAD
   ------------------------------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Anillo de foco visible y consistente en todo el sitio */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Salto al contenido */
.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip);
  transform: translateY(-150%);
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); color: var(--color-white); }

/* ---------------------------------------------------------------------------
   5. LAYOUT
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 780px; }

.section { padding-block: var(--space-16); }
.section--sm { padding-block: var(--space-12); }
.section--tint    { background: var(--color-primary-tint); }
.section--surface { background: var(--color-surface); }
.section--accent  { background: var(--color-accent-tint); }

/* Cabecera de sección reutilizable */
.section-head { max-width: var(--measure); margin-bottom: var(--space-8); }
.section-head > * + * { margin-top: var(--space-3); }
.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}
.section-head p { color: var(--color-text-muted); font-size: var(--step-1); }

/* Rejilla auto-fit reutilizable */
.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Pila vertical con ritmo constante */
.stack > * + * { margin-top: var(--space-4); }
.stack--lg > * + * { margin-top: var(--space-8); }

/* ---------------------------------------------------------------------------
   6. HEADER + NAVEGACIÓN
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
/* Sombra sutil al hacer scroll (activada por JS con .is-scrolled) */
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

/* Franja de utilidad: teléfono + horario abreviado */
.topbar {
  background: var(--color-primary-tint);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--step--1);
  color: var(--color-primary-dark);
}
.topbar__inner {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.topbar a { color: var(--color-primary-dark); font-weight: var(--fw-semibold); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar__item { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.topbar svg { width: 17px; height: 17px; flex: none; color: var(--color-accent-dark); }

/* Barra principal */
.navbar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* Marca */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-primary-dark);
  font-weight: var(--fw-bold);
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--color-primary-dark); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name b { color: var(--color-accent-dark); font-weight: var(--fw-bold); }
.brand__tag {
  display: block;
  font-size: 0.62rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Lista de navegación */
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  padding: 0; margin: 0;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-weight: var(--fw-medium);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.nav__link:hover { background: var(--color-primary-tint); color: var(--color-primary-dark); }
.nav__link[aria-current="page"] {
  color: var(--color-primary-dark);
  font-weight: var(--fw-semibold);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

.nav__cta { margin-left: var(--space-2); }

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-primary-dark);
}
.nav-toggle:hover { background: var(--color-primary-tint); }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* --- Responsive: menú móvil --- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    inset: calc(var(--header-h)) 0 auto 0;
    z-index: var(--z-menu);
    display: block;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4) var(--gutter) var(--space-6);
    /* oculto por defecto */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: translateY(0); }

  .nav__list { flex-direction: column; align-items: stretch; gap: var(--space-1); }
  .nav__link { min-height: var(--tap-min); padding: var(--space-3) var(--space-4); }
  .nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--color-accent); }
  .nav__cta { margin: var(--space-3) 0 0; }
  .nav__cta .btn { width: 100%; }
}

/* Fallback sin JavaScript: si no hay JS, el menú se muestra estático y se
   oculta la hamburguesa (main.js añade la clase .js a <html>). */
@media (max-width: 860px) {
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .nav {
    position: static;
    visibility: visible; opacity: 1; transform: none;
    box-shadow: none; border-bottom: 0; padding: 0 0 var(--space-4);
  }
}

/* Fondo oscurecido tras el menú móvil */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-fab);
  background: rgba(12,42,62,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; }
@media (min-width: 861px) { .nav-backdrop { display: none; } }

/* ---------------------------------------------------------------------------
   7. FOOTER
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-on-ink);
  padding-block: var(--space-16) var(--space-8);
  font-size: var(--step-0);
}
.site-footer a { color: var(--color-on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--color-white); text-decoration: underline; }

.footer-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col h3 {
  color: var(--color-white);
  font-size: var(--step-0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li + li { margin-top: var(--space-2); }

.footer-brand__name { color: var(--color-white); font-weight: var(--fw-bold); font-size: var(--step-2); }
.footer-brand p { color: var(--color-on-ink-muted); margin-top: var(--space-3); }

/* Bloque NAP */
.nap { list-style: none; padding: 0; margin: 0; }
.nap li { display: flex; gap: var(--space-3); margin-top: var(--space-3); }
.nap svg { width: 20px; height: 20px; flex: none; color: var(--color-accent); margin-top: 2px; }
.nap a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-on-ink) 40%, transparent); }

/* Tabla de horario */
.hours { list-style: none; padding: 0; margin: 0; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--color-ink-soft);
}
.hours li:last-child { border-bottom: 0; }
.hours .day { color: var(--color-on-ink-muted); }
.hours .closed { color: var(--color-on-ink-muted); font-style: italic; }

/* Redes sociales */
.social { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min); height: var(--tap-min);
  border: 1px solid var(--color-ink-soft);
  border-radius: var(--radius-md);
}
.social a:hover { background: var(--color-ink-soft); text-decoration: none; }
.social svg { width: 22px; height: 22px; }

/* Barra legal inferior */
.footer-legal {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  align-items: center;
  justify-content: space-between;
  color: var(--color-on-ink-muted);
  font-size: var(--step--1);
}
.footer-legal nav { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); }
.footer-legal a { color: var(--color-on-ink-muted); text-decoration: underline; }

/* ---------------------------------------------------------------------------
   8. BOTONES
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-3) var(--space-6);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              color var(--transition-fast), transform var(--transition-fast);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; }

.btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent-strong);
  color: var(--color-primary-dark);
}
.btn--primary:hover { background: var(--color-accent-strong); border-color: var(--color-accent-strong); color: var(--color-primary-dark); }

.btn--accent {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}
.btn--accent:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: var(--color-white); }

.btn--secondary {
  background: var(--color-white);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.btn--secondary:hover { background: var(--color-primary-tint); color: var(--color-primary-dark); }

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-primary-dark);
  padding-inline: var(--space-3);
}
.btn--ghost:hover { background: var(--color-primary-tint); color: var(--color-primary-dark); }

.btn--sm { min-height: 40px; padding: var(--space-2) var(--space-4); font-size: var(--step--1); }
.btn--lg { min-height: 56px; padding: var(--space-4) var(--space-8); font-size: var(--step-1); }
.btn--block { display: flex; width: 100%; }

.btn[aria-disabled="true"], .btn:disabled {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}

/* ---------------------------------------------------------------------------
   9. TARJETAS
   ------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card__media { aspect-ratio: 16 / 10; background: var(--color-primary-tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.card__body > h3 { margin: 0; }
.card__body p { color: var(--color-text-muted); margin: 0; }
.card__footer { margin-top: auto; padding-top: var(--space-2); }

/* Tarjeta enlazable completa (patrón "stretched link") */
.card--link { position: relative; }
.card--link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card--link .card__link::after { content: ""; position: absolute; inset: 0; }
.card--link .card__link:focus-visible { outline: none; }
.card--link:has(.card__link:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* Tarjeta de tratamiento: acento lateral salvia */
.card--treatment { border-left: 4px solid var(--color-accent); }
.card--treatment .card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-accent-tint);
  color: var(--color-accent-dark);
}
.card--treatment .card__icon svg { width: 26px; height: 26px; }

/* Tarjeta de equipo (doctoras)
   Las tarjetas se estiran a la misma altura dentro de su fila. La foto tiene
   proporción fija y no se deforma aunque la especialidad ocupe 1 o 3 líneas;
   el nº de colegiado se ancla abajo para que todas queden alineadas. */
.card--team { text-align: center; align-items: center; padding: var(--space-6); height: 100%; }
.card--team .card__avatar {
  width: 100%; max-width: 220px;
  height: 280px;                       /* altura fija: TODAS las fotos idénticas,
                                          independientemente del texto de debajo */
  aspect-ratio: auto;
  border-radius: var(--radius-md);
  object-fit: cover; background: var(--color-primary-tint);
  border: 1px solid var(--color-border);
  flex: none;                          /* la foto nunca se comprime ni se estira */
  min-height: 0;
}
.card--team h3 { margin: var(--space-4) 0 0; font-size: var(--step-1); }
.card--team .role {
  color: var(--color-accent-dark); font-weight: var(--fw-semibold);
  margin-top: var(--space-2); line-height: var(--lh-snug); text-wrap: balance;
}
.card--team .col-num { color: var(--color-text-muted); font-size: var(--step--1); margin-top: auto; padding-top: var(--space-3); }

/* Tarjeta de zona (landings locales) */
.card--zone { flex-direction: row; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-6); }
.card--zone .card__pin {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint); color: var(--color-primary);
}
.card--zone h3 { font-size: var(--step-1); margin: 0; }
.card--zone .dist { color: var(--color-text-muted); font-size: var(--step--1); }

/* ---------------------------------------------------------------------------
   10. BADGES / PÍLDORAS
   ------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
}
.badge--accent  { background: var(--color-accent-tint);  color: var(--color-accent-dark); }
.badge--primary { background: var(--color-primary-tint); color: var(--color-primary-dark); }
.badge--outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-muted); }

/* ---------------------------------------------------------------------------
   11. MIGAS DE PAN
   ------------------------------------------------------------------------- */
.breadcrumb { font-size: var(--step--1); color: var(--color-text-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.breadcrumb li { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumb li + li::before { content: "/"; color: var(--color-border); }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--color-text); font-weight: var(--fw-medium); }

/* ---------------------------------------------------------------------------
   12. FORMULARIOS (estilos base — el backend seguro llega en la Fase 3)
   ------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field > label { font-weight: var(--fw-semibold); color: var(--color-text); }
.field .hint { font-size: var(--step--1); color: var(--color-text-muted); }
.field .req { color: var(--color-error); }

.input, .textarea, .select {
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.textarea { min-height: 120px; padding-block: var(--space-3); resize: vertical; line-height: var(--lh-body); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--color-primary); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--color-text-muted); }

.field[data-invalid="true"] .input,
.field[data-invalid="true"] .textarea { border-color: var(--color-error); }
.field .error-msg { color: var(--color-error); font-size: var(--step--1); font-weight: var(--fw-medium); }

/* Casilla (consentimiento RGPD) */
.check { display: flex; align-items: flex-start; gap: var(--space-3); }
.check input[type="checkbox"] {
  width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--color-primary);
}
.check label { font-size: var(--step--1); color: var(--color-text-muted); line-height: var(--lh-snug); }

/* Feedback de envío del formulario (Fase 3) */
.form-feedback:empty { display: none; }
.form-feedback {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--step--1);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
}
.form-feedback.is-success { background: var(--color-success-tint); color: var(--color-accent-dark); }
.form-feedback.is-error { background: var(--color-error-tint); color: var(--color-error); }
.check a { font-weight: var(--fw-semibold); }

/* ---------------------------------------------------------------------------
   13. AVISOS / NOTAS
   ------------------------------------------------------------------------- */
.notice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
}
.notice svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.notice__body { line-height: var(--lh-snug); }
.notice--success { border-left-color: var(--color-success); background: var(--color-success-tint); color: var(--color-accent-dark); }
.notice--error   { border-left-color: var(--color-error);   background: var(--color-error-tint);   color: var(--color-error); }

/* ---------------------------------------------------------------------------
   14. ACCIONES FLOTANTES (WhatsApp / teléfono)
   ------------------------------------------------------------------------- */
.fab-stack {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: var(--z-fab);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition);
}
.fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--color-white); }
.fab svg { width: 28px; height: 28px; }
.fab--whatsapp { background: #25D366; }
.fab--phone { background: var(--color-primary); }

/* ---------------------------------------------------------------------------
   15. UTILIDADES
   ------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.measure     { max-width: var(--measure); }
.mx-auto     { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.flow > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cluster--center { justify-content: center; }

.hide-mobile { }
.hide-desktop { display: none; }
@media (max-width: 640px) {
  .hide-mobile { display: none; }
  .hide-desktop { display: revert; }
}

/* ===========================================================================
   COMPONENTES DE PÁGINA (añadidos en Fase 2 — reutilizables en Fases 4 y 6)
   hero · media-placeholder · features · split · steps · faq · contacto
   =========================================================================== */

/* --- Placeholder de imagen (sustituir por <img> reales) --- */
.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%; height: 100%;
  min-height: 180px;
  background:
    radial-gradient(120% 120% at 70% 10%, var(--color-primary-tint), transparent 60%),
    var(--color-accent-tint);
  color: var(--color-accent-dark);
  text-align: center;
  overflow: hidden;   /* el contenido nunca estira la caja */
  padding: var(--space-4);
}
/* Si el contenedor ya fija una proporción, el placeholder la respeta sin
   imponer una altura mínima propia (evitaba huecos verticales enormes). */
.hero__frame .media-placeholder,
.split__media > .media-placeholder,
.map-frame .media-placeholder,
.card__avatar.media-placeholder { min-height: 0; }
.media-placeholder svg { width: 46px; height: 46px; flex: none; opacity: .7; }
.media-placeholder span { font-size: var(--step--1); font-weight: var(--fw-semibold); letter-spacing: .04em; }

/* --- HERO --- */
.hero {
  background: linear-gradient(180deg, var(--color-accent-tint) 0%, var(--color-white) 82%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--space-12);
  align-items: center;
  padding-block: var(--space-16);
}
.hero__content { max-width: 40rem; }
.hero h1 { font-size: clamp(var(--step-4), 3.4vw + 1rem, var(--step-5)); }
.hero__lead { font-size: var(--step-1); color: var(--color-text-muted); margin-top: var(--space-4); }
.hero__cta { margin-top: var(--space-8); }
.hero__trust { list-style: none; padding: 0; margin: var(--space-8) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.hero__trust li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--step--1); font-weight: var(--fw-medium); }
.hero__trust svg { width: 20px; height: 20px; flex: none; color: var(--color-accent-dark); }

.hero__media { position: relative; }
.hero__frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
/* La foto llena el marco sin deformarse, sea cual sea su proporción original */
.hero__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__card {
  position: absolute;
  left: 0;                    /* antes sobresalía con un valor negativo, que
                                 podía provocar desborde lateral en pantallas
                                 intermedias; ahora queda dentro del marco. */
  bottom: var(--space-8);
  max-width: 268px;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.hero__card .ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-accent-tint); color: var(--color-accent-dark); }
.hero__card .ic svg { width: 24px; height: 24px; }
.hero__card b { display: block; color: var(--color-text); }
.hero__card span { font-size: var(--step--1); color: var(--color-text-muted); }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-8); padding-block: var(--space-12); }
  .hero__frame { aspect-ratio: 16 / 10; }
  .hero__card { position: static; max-width: none; margin-top: calc(-1 * var(--space-8)); margin-inline: var(--space-4); }
}

/* --- Tira de valores --- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-6); }
.feature { display: flex; gap: var(--space-4); }
.feature__icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-primary-tint); color: var(--color-primary); }
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: var(--step-1); margin: 0 0 var(--space-1); }
.feature p { margin: 0; color: var(--color-text-muted); font-size: var(--step-0); }

/* --- Sección partida (media + texto) --- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
.split__media > .media-placeholder,
.split__media > img { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; display: block; }
.split__body { max-width: var(--measure); }
.checklist { list-style: none; padding: 0; margin: var(--space-6) 0 0; display: grid; gap: var(--space-3); }
.checklist li { display: flex; gap: var(--space-3); align-items: flex-start; }
.checklist svg { width: 22px; height: 22px; flex: none; color: var(--color-primary); margin-top: 2px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: var(--space-8); }
  .split--reverse .split__media { order: -1; }
}

/* --- Pasos (proceso real y ordenado → numeración justificada) --- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-8) var(--space-6); }
.step { position: relative; padding-top: var(--space-8); }
.step__num {
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-primary); color: var(--color-white);
  font-weight: var(--fw-bold); font-size: var(--step-1);
}
.step h3 { font-size: var(--step-1); margin: var(--space-6) 0 var(--space-2); }
.step p { margin: 0; color: var(--color-text-muted); }

/* --- FAQ (acordeón nativo con <details>) --- */
.faq { max-width: var(--measure); }
.faq details { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-white); margin-bottom: var(--space-3); overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: var(--tap-min);
  padding: var(--space-4) var(--space-6);
  font-weight: var(--fw-semibold); color: var(--color-primary-dark);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform var(--transition);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { background: var(--color-primary-tint); }
.faq__answer { padding: 0 var(--space-6) var(--space-4); color: var(--color-text-muted); }
.faq__answer > * { max-width: none; }

/* --- Bloque de contacto --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.info-list li { display: flex; gap: var(--space-3); }
.info-list svg { width: 22px; height: 22px; flex: none; color: var(--color-primary); margin-top: 2px; }
.info-list b { display: block; color: var(--color-text); }
.map-frame { position: relative; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--color-surface); }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Mapa bloqueado hasta que se acepten cookies de terceros (Consent Mode) */
.map-frame[data-consent-blocked] iframe { display: none; }
.map-frame__consent-cta {
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  width: 100%; height: 100%;
  background: var(--color-surface);
  border: 0; cursor: pointer; color: var(--color-primary-dark);
  font: inherit; text-align: center; padding: var(--space-4);
}
.map-frame[data-consent-blocked] .map-frame__consent-cta { display: flex; }
.map-frame__consent-cta:hover { background: var(--color-primary-tint); }
.map-frame__consent-cta svg { width: 30px; height: 30px; color: var(--color-primary); }
.map-frame__consent-cta strong { font-size: var(--step-0); }
.map-frame__consent-cta span { font-size: var(--step--1); color: var(--color-text-muted); max-width: 30ch; }

/* --- Banner de cookies (Fase 3) --- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 24px rgba(15,20,25,0.12);
  padding: var(--space-6) var(--gutter);
  transform: translateY(110%);
  transition: transform var(--transition);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner__inner { max-width: var(--container-max); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); }
.cookie-banner__text { flex: 1 1 380px; }
.cookie-banner__text h2 { font-size: var(--step-1); margin: 0 0 var(--space-2); color: var(--color-primary-dark); }
.cookie-banner__text p { margin: 0; color: var(--color-text-muted); font-size: var(--step--1); max-width: 65ch; }
.cookie-banner__text a { font-weight: var(--fw-semibold); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); flex: 0 0 auto; }

/* En móvil los tres botones se apilan a ancho completo para que ninguno
   quede cortado por el borde de la pantalla. */
@media (max-width: 640px) {
  .cookie-banner { padding: var(--space-4) var(--gutter); max-height: 85vh; overflow-y: auto; }
  .cookie-banner__inner { gap: var(--space-4); }
  .cookie-banner__actions { width: 100%; flex-direction: column-reverse; gap: var(--space-2); }
  .cookie-banner__actions .btn { width: 100%; }
}

/* Panel de configuración detallada */
.cookie-modal-backdrop {
  position: fixed; inset: 0; z-index: 310;
  background: rgba(12,17,22,0.5);
  display: none; align-items: center; justify-content: center;
  padding: var(--space-4);
}
.cookie-modal-backdrop.is-visible { display: flex; }
.cookie-modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  padding: var(--space-8);
}
.cookie-modal h2 { margin: 0 0 var(--space-2); }
.cookie-modal > p { color: var(--color-text-muted); margin: 0 0 var(--space-6); font-size: var(--step--1); }
.cookie-cat { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-4); }
.cookie-cat__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.cookie-cat__head strong { color: var(--color-text); }
.cookie-cat p { margin: var(--space-2) 0 0; font-size: var(--step--1); color: var(--color-text-muted); }
.cookie-modal__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* Interruptor accesible (toggle) */
.toggle { position: relative; display: inline-flex; align-items: center; width: 44px; height: 26px; flex: none; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle__track { position: absolute; inset: 0; background: var(--color-border); border-radius: var(--radius-pill); transition: background var(--transition-fast); }
.toggle__thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--color-white); border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform var(--transition-fast); }
.toggle input:checked ~ .toggle__track { background: var(--color-primary); }
.toggle input:checked ~ .toggle__thumb { transform: translateX(18px); }
.toggle input:disabled ~ .toggle__track { background: var(--color-accent); opacity: .6; cursor: not-allowed; }
.toggle input:focus-visible ~ .toggle__track { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* Enlace "Configurar cookies" del pie */
.footer-legal a[data-cookie-settings] { cursor: pointer; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: var(--space-8); } }

/* --- Carrusel (scroll-snap; TODO el contenido queda en el HTML → rastreable
       por Google/IA, sin ocultar nada tras interacción; regla 7) --- */
.carousel { position: relative; }
.carousel__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-8);
}
.carousel__nav { display: flex; gap: var(--space-2); }
.carousel__btn {
  width: var(--tap-min); height: var(--tap-min);
  display: grid; place-items: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  background: var(--color-white); color: var(--color-primary-dark);
  transition: background var(--transition-fast), opacity var(--transition-fast);
}
.carousel__btn:hover { background: var(--color-primary-tint); }
.carousel__btn svg { width: 22px; height: 22px; }
.carousel__btn:disabled { opacity: .35; cursor: not-allowed; }
.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 85%;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--space-1);
  padding: var(--space-2) var(--space-1) var(--space-4);
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.carousel__track > * { scroll-snap-align: start; height: 100%; }
.carousel__track:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-md); }
@media (min-width: 640px) { .carousel__track { grid-auto-columns: 46%; } }
@media (min-width: 960px) { .carousel__track { grid-auto-columns: 31.5%; } }

/* Marca: ocultar el subtítulo en pantallas muy estrechas para que quepa el CTA */
@media (max-width: 420px) { .brand__tag { display: none; } }

/* Logo real en la cabecera */
.brand__logo { height: 44px; width: auto; }
@media (max-width: 520px) { .brand__logo { height: 34px; } }
/* CTA de cabecera: en pantallas muy estrechas queda solo el icono (con aria-label) */
@media (max-width: 400px) {
  .navbar .btn__label { display: none; }
  .navbar .btn { padding-inline: var(--space-3); }
}

/* --- Páginas interiores: cabecera de página --- */
.page-head { background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding-block: var(--space-12); }
.page-head .breadcrumb { margin-bottom: var(--space-4); }
.page-head h1 { font-size: clamp(var(--step-3), 2.5vw + 1rem, var(--step-4)); }
.page-head .updated { color: var(--color-text-muted); font-size: var(--step--1); margin-top: var(--space-3); }
.page-head p.lead { color: var(--color-text-muted); font-size: var(--step-1); margin-top: var(--space-3); }

/* --- Texto largo (legal / artículos) --- */
.prose { max-width: 75ch; }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-10); font-size: var(--step-2); }
.prose h3 { margin-top: var(--space-6); font-size: var(--step-1); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: var(--space-2); }
.prose a { font-weight: var(--fw-medium); }
.prose table { width: 100%; border-collapse: collapse; margin-block: var(--space-4); font-size: var(--step--1); }
.prose th, .prose td { border: 1px solid var(--color-border); padding: var(--space-3); text-align: left; vertical-align: top; }
.prose th { background: var(--color-primary-tint); color: var(--color-primary-dark); }
.prose .data-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-6); }
.prose .data-box ul { list-style: none; padding: 0; }

/* Información básica RGPD bajo el formulario (capa 1) */
.rgpd-basic { font-size: var(--step--1); color: var(--color-text-muted); line-height: var(--lh-snug); margin-top: var(--space-4); }
.rgpd-basic b { color: var(--color-text); }

/* --- Tira de zonas en el pie (enlazado interno SEO local) --- */
.footer-zones { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--color-ink-soft); }
.footer-zones h3 { color: var(--color-white); font-size: var(--step-0); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-3); }
.footer-zones ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer-zones a { color: var(--color-on-ink-muted); font-size: var(--step--1); text-decoration: none; }
.footer-zones a:hover { color: var(--color-white); text-decoration: underline; }

/* --- Seguros dentales: grid de logotipos de aseguradoras --- */
/* Rejilla de logotipos de aseguradoras.
   Los logos llegan en formatos y proporciones muy distintos (unos apaisados,
   otros cuadrados, unos con fondo blanco y otros transparente). Se normalizan
   con una caja de altura fija y object-fit: contain, de modo que todos ocupen
   el mismo espacio visual sin deformarse. */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-4);
}
.logo-tile {
  display: flex; align-items: center; justify-content: center;
  height: 96px; padding: var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.logo-tile:hover { box-shadow: var(--shadow-sm); border-color: var(--color-accent-strong); }
.logo-tile img {
  max-width: 100%; max-height: 56px;
  width: auto; height: auto;
  object-fit: contain;
}
.logo-tile.is-placeholder { background: var(--color-surface); border-style: dashed; color: var(--color-text-muted); text-align: center; font-size: var(--step--1); gap: var(--space-2); flex-direction: column; }
.logo-tile.is-placeholder svg { width: 26px; height: 26px; opacity: .55; }

/* Aviso "¿no ves tu compañía?" bajo los logos */
.insurers-note {
  display: flex; gap: var(--space-4);
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent-strong);
  border-radius: var(--radius-md);
}
.insurers-note > svg { width: 26px; height: 26px; flex: none; color: var(--color-accent-dark); margin-top: 2px; }
.insurers-note strong { display: block; color: var(--color-primary-dark); font-size: var(--step-1); margin-bottom: var(--space-2); }
.insurers-note p { color: var(--color-text-muted); margin: 0; }
@media (max-width: 520px) {
  .insurers-note { flex-direction: column; gap: var(--space-3); }
  .insurers-note .btn { width: 100%; }
}

/* Distintivo de distancia en páginas de zona */
.dist-badge { display: inline-flex; align-items: center; gap: var(--space-2); }
.dist-badge svg { width: 16px; height: 16px; }


/* --- Bloque de reseñas de Google (enlace a la ficha, sin copiar textos) --- */
.reviews { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-8); text-align: center; }
.reviews__score { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.reviews__number { font-size: var(--step-5); font-weight: var(--fw-bold); color: var(--color-primary-dark); line-height: 1; }
.reviews__stars { display: flex; gap: 2px; }
.reviews__stars svg { width: 22px; height: 22px; color: #F4B400; }
.reviews__meta { color: var(--color-text-muted); font-size: var(--step--1); }
.reviews__brand { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--fw-semibold); color: var(--color-text); }
.reviews__brand svg { width: 20px; height: 20px; }
.reviews__text { max-width: 46ch; text-align: left; }
@media (max-width: 600px) { .reviews__text { text-align: center; } }

/* ---------------------------------------------------------------------------
   16. MOVIMIENTO REDUCIDO
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================================================================
   PROTECCIÓN ANTI-DESBORDE HORIZONTAL (móvil)
   Objetivo: que NINGUNA página tenga scroll lateral en móvil. Google penaliza
   el desbordamiento horizontal y arruina la experiencia táctil.
   =========================================================================== */

/* 1) Red de seguridad global. overflow-x en html Y body (hace falta en ambos
      para que funcione de forma fiable en iOS Safari). */
html, body { overflow-x: hidden; max-width: 100%; }

/* 2) Nada puede ser más ancho que su contenedor. */
img, svg, video, iframe, table, pre, blockquote { max-width: 100%; }

/* 3) Palabras muy largas (emails, URLs de las páginas legales, nombres de
      cookies) deben poder partirse en lugar de estirar el contenedor. */
p, li, td, th, h1, h2, h3, h4, dd, dt, summary, label, figcaption {
  overflow-wrap: break-word;
  word-break: break-word;
}
a { overflow-wrap: break-word; }

/* 4) Tablas de las páginas legales: en móvil se desplazan dentro de su propio
      contenedor en lugar de empujar toda la página. */
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: normal; }
@media (min-width: 720px) { .prose table { display: table; } }

/* 5) Botones: el texto puede partirse en pantallas muy estrechas en lugar de
      forzar un ancho mayor que el viewport. */
@media (max-width: 420px) {
  .btn { white-space: normal; padding-inline: var(--space-4); }
  .topbar__item { white-space: normal; }
}

/* 6) La marca no debe forzar ancho en pantallas diminutas. */
@media (max-width: 360px) {
  .brand { white-space: normal; }
  .brand__logo { max-width: 60vw; }
}

/* 7) El carrusel scrollea horizontalmente A PROPÓSITO, pero debe contenerse
      dentro de su caja y no propagar el scroll a la página. */
.carousel, .carousel__track { max-width: 100%; }

/* 8) Grid/flex: permitir que los hijos se encojan por debajo de su contenido
      mínimo (causa clásica de desborde en grids con texto largo). */
.grid > *, .features > *, .contact-grid > *, .split > *, .steps > * { min-width: 0; }

/* 9) El botón flotante no debe solaparse con el borde en pantallas pequeñas. */
@media (max-width: 420px) {
  .fab-stack { right: var(--space-3); bottom: var(--space-3); }
}

/* 10) Targets táctiles cómodos en móvil (WCAG 2.5.8 / Google Mobile-Friendly).
       Los enlaces dentro de un párrafo se dejan en línea a propósito; aquí se
       agrandan los que son acciones independientes. */
@media (max-width: 640px) {
  .topbar__item, .topbar a { min-height: 40px; }
  .breadcrumb a, .breadcrumb li { min-height: 32px; display: inline-flex; align-items: center; }
  .footer-legal a, .footer-col li a, .footer-zones a { display: inline-block; padding-block: var(--space-2); }
  .check input[type="checkbox"] { width: 26px; height: 26px; }
  .check label { padding-block: var(--space-1); }
}

/* ---------------------------------------------------------------------------
   17. IMPRESIÓN (mínimo)
   ------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .fab-stack, .nav-toggle, .skip-link { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
