/* ==========================================================================
   Psicopedagogía Genios - Hoja de estilos principal
   --------------------------------------------------------------------------
   Organizada por bloques. Para cambiar colores o tipografías, edita
   únicamente el bloque "1. TOKENS": el resto del sitio se actualiza solo.
   ========================================================================== */

/* ==========================================================================
   1. TOKENS (variables de diseño)
   ========================================================================== */
:root {
  /* --- Colores de marca --- */
  --color-primary: #5EE7FF;        /* cian del logo: fondos, gradientes, acentos */
  --color-primary-dark: #4DD0E1;   /* hover y segundo tono de los gradientes */

  /* Cian oscurecido SOLO para texto e iconos sobre fondo blanco.
     El cian de marca (#5EE7FF) sobre blanco da 1,4:1 de contraste y es
     ilegible. Este tono da 4,8:1 y cumple WCAG AA. No cambiar sin
     recalcular el contraste. */
  --color-primary-deep: #0F7C8C;
  --color-primary-soft: #EAFAFD;   /* fondo de secciones y chips en cian muy suave */

  /* --- Texto --- */
  --color-text: #666666;           /* párrafos y contenido general */
  --color-text-dark: #333333;      /* titulares, texto destacado y fondo del footer */

  /* --- Neutros --- */
  --color-white: #FFFFFF;
  --color-bg-light: #F8F9FA;
  --color-border: #E6EAEC;
  --color-overlay: rgba(0, 0, 0, 0.5);

  /* --- Gradiente de marca (botones y bandas destacadas) --- */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);

  /* --- Tipografía --- */
  --font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;  /* titulares */
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif; /* cuerpo de texto */

  /* --- Radios de esquina ---
     Regla del sitio: botones y chips = píldora, tarjetas = 16px,
     campos de formulario = 10px. Mantener esta coherencia. */
  --radius-card: 16px;
  --radius-input: 10px;
  --radius-pill: 999px;

  /* --- Sombras (tintadas hacia el gris de marca, nunca negro puro) --- */
  --shadow-sm: 0 2px 8px rgba(51, 51, 51, 0.06);
  --shadow-md: 0 8px 24px rgba(51, 51, 51, 0.08);
  --shadow-lg: 0 18px 48px rgba(51, 51, 51, 0.12);

  /* --- Medidas --- */
  --container: 1200px;
  --header-h: 76px;

  /* --- Transición estándar --- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease);

  /* --- Capas (z-index). No usar valores fuera de esta escala. --- */
  --z-header: 100;
  --z-menu: 110;
  --z-float: 120;
  --z-cookies: 130;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-primary-deep); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-text-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text-dark);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; letter-spacing: 0; }

p { margin: 0 0 1.2em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

/* Foco visible y coherente en todo el sitio (accesibilidad por teclado) */
:focus-visible {
  outline: 3px solid var(--color-primary-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Enlace para saltar al contenido, visible solo al tabular */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-text-dark); color: var(--color-white);
  padding: 0.8rem 1.4rem; z-index: 999; border-radius: 0 0 var(--radius-input) 0;
}
.skip-link:focus { left: 0; color: var(--color-white); }

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--light { background: var(--color-bg-light); }
.section--soft { background: var(--color-primary-soft); }

/* Cabecera de sección: titular y texto apilados, ancho de lectura cómodo */
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--color-text); font-size: 1.075rem; }

/* Etiqueta pequeña sobre un titular. Uso muy limitado: como máximo una por
   cada tres secciones, para que la página no suene repetitiva. */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-primary-deep);
  margin-bottom: 0.9rem;
}

/* ==========================================================================
   4. BOTONES
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  line-height: 1;
  padding: 0.95rem 1.7rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;          /* la etiqueta nunca parte en dos líneas */
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), color var(--transition),
              border-color var(--transition);
}

/* Botón principal: gradiente cian con texto GRIS OSCURO.
   El texto blanco sobre este cian daría 1,4:1 de contraste y no sería
   legible; en gris oscuro alcanza 9,4:1. */
.btn--primary {
  background: var(--gradient-primary);
  color: var(--color-text-dark);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  color: var(--color-text-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0) scale(0.985); }

/* Botón secundario sobre fondo claro */
.btn--outline {
  background: transparent;
  color: var(--color-text-dark);
  border-color: var(--color-border);
}
.btn--outline:hover {
  color: var(--color-text-dark);
  border-color: var(--color-primary-dark);
  background: var(--color-primary-soft);
  transform: translateY(-2px);
}
.btn--outline:active { transform: translateY(0) scale(0.985); }

/* Botón sobre fondo oscuro o sobre el gradiente */
.btn--solid {
  background: var(--color-white);
  color: var(--color-text-dark);
  box-shadow: var(--shadow-sm);
}
.btn--solid:hover { color: var(--color-text-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--solid:active { transform: translateY(0) scale(0.985); }

.btn--lg { padding: 1.1rem 2.1rem; font-size: 1.075rem; }
.btn--block { width: 100%; }
/* Icono oficial de marca dentro de un botón (por ejemplo, el de WhatsApp) */
.btn__mark { width: 22px; height: 22px; flex-shrink: 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ==========================================================================
   5. CABECERA Y NAVEGACIÓN
   ========================================================================== */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: var(--z-header);
  transition: box-shadow var(--transition);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }

.header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}

/* Contenido visible solo para lectores de pantalla y buscadores.
   Sigue estando en el documento, pero no ocupa espacio en pantalla. */
.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;
}

/* Logo: la imagen va a la izquierda del nombre.
   El logotipo de Genios ya incluye el nombre del centro, así que el bloque
   de texto de al lado lleva la clase .visually-hidden para no repetirlo.
   Si algún día usas una versión del logo sin texto (solo el símbolo),
   quita esa clase en las páginas y el nombre volverá a aparecer al lado. */
.logo { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.logo img { height: 52px; width: auto; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--color-text-dark); letter-spacing: -0.02em;
}
.logo__tag {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-text); font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav__list { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link {
  font-family: var(--font-display); font-weight: 500; font-size: 0.975rem;
  color: var(--color-text-dark);
  position: relative; padding-block: 0.4rem;
  white-space: nowrap;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--gradient-primary);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--transition);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--color-primary-deep); font-weight: 600; }

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--color-border); background: var(--color-white);
  border-radius: var(--radius-input);
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  color: var(--color-text-dark); font-size: 1.5rem;
}

/* ==========================================================================
   6. HERO
   ========================================================================== */
.hero {
  padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 4rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse 70% 60% at 85% 0%, var(--color-primary-soft) 0%, transparent 60%),
    var(--color-white);
  overflow: hidden;
}
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
}
/* El titular del hero se limita a 2 líneas en escritorio: por eso lleva un
   tamaño máximo propio, más contenido que el de h1 general. */
.hero__title { margin-bottom: 1.1rem; font-size: clamp(2rem, 4.2vw, 3.05rem); }
.hero__lead { font-size: clamp(1.075rem, 1.6vw, 1.2rem); margin-bottom: 1.9rem; max-width: 46ch; }

/* Distintivo de "primera consulta gratuita" */
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary);
  color: var(--color-text-dark);
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  padding: 0.5rem 1.1rem; border-radius: var(--radius-pill);
  margin-bottom: 1.4rem;
}
.badge i { color: var(--color-primary-deep); font-size: 1.1rem; }

/* Imagen del hero con tarjeta flotante */
.hero__media { position: relative; }
.hero__img {
  width: 100%; border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 2; object-fit: cover;
}
.hero__card {
  position: absolute; left: -1.5rem; bottom: -1.75rem;
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.35rem;
  display: flex; align-items: center; gap: 0.85rem;
  max-width: 17rem;
}
.hero__card i { font-size: 1.9rem; color: var(--color-primary-deep); flex-shrink: 0; }
.hero__card strong { display: block; font-family: var(--font-display); color: var(--color-text-dark); font-size: 1rem; }
.hero__card span { font-size: 0.85rem; line-height: 1.4; display: block; }

/* ==========================================================================
   7. TARJETAS
   ========================================================================== */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.975rem; margin-bottom: 0; }

/* Icono circular de tarjeta */
.card__icon {
  width: 56px; height: 56px; border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: var(--color-primary-deep);
  margin-bottom: 1.1rem;
  transition: background var(--transition);
}
.card:hover .card__icon { background: var(--gradient-primary); color: var(--color-text-dark); }

/* Tarjeta con foto de fondo (para dar variedad visual a las rejillas) */
.card--photo {
  position: relative; padding: 0; overflow: hidden;
  min-height: 260px; display: flex; align-items: flex-end;
  border: none;
}
.card--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Velo oscuro sobre la foto. Los valores están calculados para que el texto
   blanco mantenga contraste suficiente (WCAG AA) incluso sobre una foto
   muy clara: en la zona del título el velo nunca baja del 62 %. */
.card--photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.62) 45%, rgba(0,0,0,0.18) 100%);
}
.card--photo .card__body { position: relative; z-index: 1; padding: 1.5rem; }
.card--photo h3 { color: var(--color-white); margin-bottom: 0.35rem; }
.card--photo p { color: rgba(255,255,255,0.92); font-size: 0.925rem; }

/* Tarjeta con acento cian (una por rejilla, para romper el blanco sobre blanco) */
.card--accent { background: var(--gradient-primary); border-color: transparent; }
.card--accent h3, .card--accent p { color: var(--color-text-dark); }
.card--accent .card__icon { background: rgba(255,255,255,0.55); }
.card--accent:hover .card__icon { background: var(--color-white); }

/* --- Rejillas --- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Rejilla tipo bento: celdas de distinto tamaño, sin huecos vacíos */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.bento > .span-2 { grid-column: span 2; }

/* ==========================================================================
   8. BLOQUES DE TEXTO E IMAGEN
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--media-first .split__media { order: -1; }
.split__media img { border-radius: var(--radius-card); box-shadow: var(--shadow-md); width: 100%; }
.split__media--portrait img { aspect-ratio: 3 / 4; object-fit: cover; }

/* Chips de rango de edad y similares */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.chips li {
  margin: 0;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-pill); padding: 0.45rem 1rem;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  color: var(--color-text-dark);
}

/* Lista numerada de motivos (sin líneas separadoras en cada fila) */
.reasons { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.75rem; }
.reasons li { margin: 0; display: flex; gap: 1.1rem; }
.reasons__num {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  background: var(--gradient-primary); color: var(--color-text-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
}
.reasons h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.reasons p { font-size: 0.975rem; margin: 0; }

/* ==========================================================================
   9. SERVICIOS (listado detallado)
   ========================================================================== */
.service {
  display: grid; grid-template-columns: 72px 1fr; gap: 1.35rem;
  padding: 1.75rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.service__icon {
  width: 72px; height: 72px; border-radius: var(--radius-card);
  background: var(--color-primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem; color: var(--color-primary-deep);
  transition: background var(--transition);
}
.service:hover .service__icon { background: var(--gradient-primary); color: var(--color-text-dark); }
.service h3 { margin-bottom: 0.4rem; }
.service p { font-size: 0.975rem; margin: 0; }

/* Aviso destacado de primera consulta gratuita */
.notice {
  background: var(--gradient-primary);
  border-radius: var(--radius-card);
  padding: clamp(2rem, 4vw, 3rem);
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
}
.notice h2, .notice p { color: var(--color-text-dark); }
.notice h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.5rem; }
.notice p { margin: 0; max-width: 54ch; }

/* ==========================================================================
   10. PUBLICACIONES (blog)
   ========================================================================== */
.post {
  display: flex; flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.post__img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.post__body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.post__date { font-size: 0.82rem; color: var(--color-text); font-weight: 600; margin-bottom: 0.6rem; }
.post h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.post h3 a { color: var(--color-text-dark); }
.post:hover h3 a { color: var(--color-primary-deep); }
.post p { font-size: 0.95rem; margin-bottom: 1.2rem; }
.post__more {
  margin-top: auto; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.post__more i { transition: transform var(--transition); }
.post:hover .post__more i { transform: translateX(4px); }

/* ==========================================================================
   11. BANDA DE LLAMADA A LA ACCIÓN
   ========================================================================== */
.cta-band { background: var(--gradient-primary); text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 0.7rem; }
.cta-band p { color: var(--color-text-dark); max-width: 52ch; margin-inline: auto; margin-bottom: 2rem; font-size: 1.075rem; }
.cta-band .btn-row { justify-content: center; }

/* ==========================================================================
   12. CABECERA DE PÁGINA INTERIOR
   ========================================================================== */
.page-head {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 5vw, 4rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse 60% 70% at 90% 10%, var(--color-primary-soft) 0%, transparent 62%),
    var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
}
.page-head h1 { margin-bottom: 0.7rem; }
.page-head p { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 62ch; }

/* Migas de pan */
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0 0 1.2rem; font-size: 0.875rem; }
.breadcrumb li { margin: 0; color: var(--color-text); }
.breadcrumb li + li::before { content: '/'; margin-right: 0.5rem; color: var(--color-border); }

/* ==========================================================================
   13. CONTACTO
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }

.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.info-list li { margin: 0; display: flex; gap: 1rem; align-items: flex-start; }
.info-list i { font-size: 1.35rem; color: var(--color-primary-deep); flex-shrink: 0; margin-top: 0.2rem; }
/* Icono oficial de marca dentro de la lista de contacto, alineado con el resto */
.info-list__mark { width: 22px; height: 22px; flex-shrink: 0; margin-top: 0.3rem; }
.info-list strong { display: block; font-family: var(--font-display); color: var(--color-text-dark); font-size: 0.95rem; margin-bottom: 0.15rem; }
.info-list a, .info-list span { font-size: 1rem; }

/* Horario */
.hours { width: 100%; border-collapse: collapse; font-size: 0.975rem; }
.hours caption { text-align: left; font-family: var(--font-display); font-weight: 700; color: var(--color-text-dark); font-size: 1.1rem; margin-bottom: 0.9rem; }
.hours th, .hours td { padding: 0.7rem 0; text-align: left; }
.hours th { font-weight: 600; color: var(--color-text-dark); font-family: var(--font-body); }
.hours td { color: var(--color-text); text-align: right; }
.hours tbody tr + tr { border-top: 1px solid var(--color-border); }

/* Mapa */
.map { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-sm); line-height: 0; }
.map iframe { width: 100%; height: 380px; border: 0; display: block; }

/* --- Formulario --- */
.form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 0.925rem; color: var(--color-text-dark); }
.field .req { color: var(--color-primary-deep); }

.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 1rem;
  color: var(--color-text-dark);
  background: var(--color-white);
  border: 1px solid #C9D1D6;   /* más oscuro que --color-border para cumplir contraste en bordes de campo */
  border-radius: var(--radius-input);
  padding: 0.85rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field textarea { resize: vertical; min-height: 140px; }
/* Placeholder con contraste suficiente: 4,74:1 sobre blanco (WCAG AA pide 4,5:1).
   No aclarar este valor: por debajo deja de cumplir. */
.field input::placeholder, .field textarea::placeholder { color: #6E757A; opacity: 1; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-primary-deep);
  box-shadow: 0 0 0 3px rgba(15, 124, 140, 0.16);
}
.field__help { font-size: 0.85rem; color: var(--color-text); }
/* Mensaje de error debajo del campo */
.field__error { font-size: 0.875rem; color: #B3261E; font-weight: 600; display: none; }
.field.has-error input, .field.has-error textarea { border-color: #B3261E; }
.field.has-error .field__error { display: block; }

/* Casilla de consentimiento */
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9rem; }
.check input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.15rem; accent-color: var(--color-primary-deep); }
.check label { font-family: var(--font-body); font-weight: 400; color: var(--color-text); }

/* Aviso de envío correcto o con error */
.form-status { display: none; border-radius: var(--radius-input); padding: 0.95rem 1.15rem; font-size: 0.95rem; }
.form-status.is-visible { display: block; }
.form-status--ok { background: var(--color-primary-soft); border: 1px solid var(--color-primary); color: var(--color-text-dark); }
.form-status--error { background: #FDECEA; border: 1px solid #F0B4AE; color: #8C1D18; }

/* ==========================================================================
   14. PÁGINAS LEGALES
   ========================================================================== */
.legal { max-width: 78ch; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-top: 2.5rem; }
.legal h3 { font-size: 1.15rem; margin-top: 1.75rem; }
.legal h2:first-child, .legal h3:first-child { margin-top: 0; }
.legal ul { padding-left: 1.2em; }
.legal a { word-break: break-word; }

/* Tabla de cookies */
.cookie-table { width: 100%; border-collapse: collapse; font-size: 0.925rem; margin-bottom: 2rem; }
.cookie-table caption { text-align: left; font-family: var(--font-display); font-weight: 700; color: var(--color-text-dark); margin-bottom: 0.75rem; }
.cookie-table th, .cookie-table td { padding: 0.75rem 0.9rem; text-align: left; vertical-align: top; }
.cookie-table thead th { background: var(--color-bg-light); color: var(--color-text-dark); font-family: var(--font-display); border-bottom: 2px solid var(--color-border); }
.cookie-table tbody tr + tr { border-top: 1px solid var(--color-border); }
.cookie-table td:first-child { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--color-text-dark); white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* ==========================================================================
   15. PIE DE PÁGINA
   ========================================================================== */
.footer { background: var(--color-text-dark); color: rgba(255, 255, 255, 0.78); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer a { color: rgba(255, 255, 255, 0.78); }
.footer a:hover { color: var(--color-primary); }

.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: clamp(2rem, 4vw, 3.5rem); padding-bottom: 3rem; }

.footer__brand .logo__name { color: var(--color-white); }
.footer__brand .logo__tag { color: rgba(255, 255, 255, 0.6); }
.footer__brand p { font-size: 0.95rem; margin: 1.2rem 0 0; max-width: 34ch; }

.footer h4 { color: var(--color-white); font-size: 1rem; margin-bottom: 1.1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.footer li { margin: 0; font-size: 0.95rem; }

.footer__contact li { display: flex; gap: 0.7rem; align-items: flex-start; }
.footer__contact i { color: var(--color-primary); font-size: 1.1rem; flex-shrink: 0; margin-top: 0.15rem; }

/* Redes sociales: se usan los iconos oficiales de cada marca, guardados como
   SVG en assets/icons/. Cada archivo ya lleva su color corporativo (azul de
   Facebook, degradado de Instagram), así que el enlace no pinta ningún fondo:
   solo reserva el tamaño y aporta el efecto al pasar el ratón. */
.social { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.social a {
  width: 42px; height: 42px;
  display: block; line-height: 0;
  border-radius: var(--radius-card);
  transition: transform var(--transition), filter var(--transition);
}
.social a img { width: 100%; height: 100%; display: block; }
.social a:hover { transform: translateY(-3px); filter: brightness(1.08); }
.social a:active { transform: translateY(0) scale(0.96); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  align-items: center; justify-content: space-between;
  font-size: 0.875rem;
}
/* Enlaces legales del pie: van en una sola línea, uno al lado del otro.
   El selector lleva `.footer` delante a propósito: la regla general `.footer ul`
   de más arriba los pone en columna (display: grid) y tiene más peso que una
   clase suelta. Si quitas el `.footer` de aquí, vuelven a apilarse. */
.footer .footer__legal {
  display: flex; flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  list-style: none; padding: 0; margin: 0;
}
.footer .footer__legal li { font-size: 0.875rem; }

/* ==========================================================================
   16. ELEMENTOS FLOTANTES
   ========================================================================== */
/* Botón flotante de WhatsApp. Usa el icono oficial de la marca
   (assets/icons/whatsapp.svg), que ya incluye el círculo verde corporativo. */
.whatsapp {
  position: fixed; right: 1.25rem; bottom: 1.25rem;
  width: 58px; height: 58px;
  display: block; line-height: 0;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: var(--z-float);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp img { width: 100%; height: 100%; display: block; }
.whatsapp:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55); }
.whatsapp:active { transform: scale(0.97); }

/* Banner de cookies */
.cookies {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 640px; margin-inline: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  z-index: var(--z-cookies);
  display: none;
}
.cookies.is-visible { display: block; }
.cookies h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.cookies p { font-size: 0.925rem; margin-bottom: 1.25rem; }
.cookies .btn { padding: 0.75rem 1.4rem; font-size: 0.95rem; }

/* ==========================================================================
   17. ANIMACIÓN DE ENTRADA AL HACER SCROLL
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   18. RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__card { left: 1rem; bottom: -1.5rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > .span-2 { grid-column: span 2; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  /* Menú desplegable a pantalla completa en móvil */
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    flex-direction: column; align-items: stretch;
    gap: 0; padding: 1rem 1.25rem 1.75rem;
    z-index: var(--z-menu);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li + li { border-top: 1px solid var(--color-border); }
  .nav__link { display: block; padding: 0.95rem 0; font-size: 1.05rem; }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: 1.25rem; width: 100%; }

  .split, .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .split--media-first .split__media { order: 0; }
  .notice { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 2rem; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .grid--4, .bento { grid-template-columns: 1fr; }
  .bento > .span-2 { grid-column: span 1; }
  .service { grid-template-columns: 1fr; gap: 1rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .hero__card { position: static; margin-top: 1.25rem; max-width: none; }
  .whatsapp { width: 54px; height: 54px; }
  .logo img { height: 44px; }
  .logo__name { font-size: 1.02rem; }
  .logo__tag { font-size: 0.6rem; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .cookies .btn { width: 100%; }
}

/* ==========================================================================
   19. PREFERENCIA DE MOVIMIENTO REDUCIDO
   Si la persona lo pide en su sistema, se desactiva todo el movimiento.
   ========================================================================== */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .service:hover, .post:hover, .social a:hover, .whatsapp:hover { transform: none; }
}

/* ==========================================================================
   20. IMPRESIÓN
   ========================================================================== */
@media print {
  .header, .nav, .whatsapp, .cookies, .cta-band, .btn { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .page-head, .hero { padding-top: 0; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 9pt; }
}
