/* ================================================================
   HUELLA · styles.css → APARIENCIA
   ================================================================
   Índice:
     1. Tipografías (guardadas en la propia web)
     2. Variables: colores, letras y medidas
     3. Base
     4. Piezas reutilizables (contenedor, botones, títulos, secciones)
     5. Cabecera fija y menú
     6. Portada con carrusel
     7. Ventajas
     8. Servicios
     9. Galería
    10. Urgencias
    11. Cómo pedir cita
    12. Equipo
    13. Opiniones
    14. Preguntas frecuentes
    15. Contacto y mapa
    16. Pie de página y aviso flotante
    17. Movimiento reducido
    18. Responsive (tablet y móvil)
   ================================================================ */


/* ---------- 1. TIPOGRAFÍAS ----------
   DM Serif Display (títulos) + Manrope (textos), guardadas en la web. */
@font-face {
  font-family: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-serif-display.woff2") format("woff2");
}
@font-face {
  font-family: "DM Serif Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-serif-display-italica.woff2") format("woff2");
}
/* Manrope es "variable": un archivo con todos los grosores (400 a 800). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope.woff2") format("woff2");
}


/* ---------- 2. VARIABLES ---------- */
:root {
  /* Marca */
  --green: #3F5A41;        /* Verde bosque: botones (texto claro, contraste 7:1) */
  --green-dark: #2B3A2E;   /* Titulares y secciones oscuras */
  --green-mid: #364A39;    /* Tarjetas sobre fondo oscuro */
  --mint: #E8E1D4;         /* Fondos suaves (arena) */
  --mint-line: #DDD4C4;    /* Bordes finos */
  --yellow: #C9A77E;       /* Detalles en tierra dorada */
  --yellow-soft: #EFE4D2;
  --coral: #C8432B;        /* Solo para urgencias */
  --coral-ink: #B03A24;
  --coral-soft: #FDECE8;
  --white: #FFFFFF;
  --bg: #F5F0E7;           /* Arena clara de fondo */

  /* Texto */
  --text: #2B3A2E;
  --text-soft: #4E5A50;
  --text-on-dark: #EFE9DF;

  /* Letras */
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Medidas */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 1.5rem);
  --section-y: clamp(4.5rem, 9vw, 5.5rem);
  --radius: 6px;
  --header-h: 76px;
  --shadow: 0 14px 40px rgba(43, 58, 46, 0.10);
}


/* ---------- 3. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Al saltar a una sección, deja sitio a la cabecera fija */
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* Contorno visible al navegar con teclado */
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

/* Enlace oculto "Saltar al contenido" (aparece al pulsar Tab) */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: .6rem 1rem;
  background: var(--green-dark);
  color: var(--white);
  border-radius: 4px;
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }


/* ---------- 4. PIEZAS REUTILIZABLES ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 880px; }

.demo-bar {
  background: var(--green-dark);
  color: #D9EFE1;
  font-size: 12px;
  text-align: center;
  padding: 6px 16px;
}

/* Botones: todos tienen al menos 44 px de alto (tamaño cómodo para el dedo) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 56px;
  padding: 0 1.9rem;
  border-radius: 4px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--small { min-height: 44px; padding: 0 1.3rem; font-size: 15px; }
.btn--green  { background: var(--green); color: var(--white); }
.btn--green:hover { background: var(--green-dark); color: var(--white); }
.btn--yellow { background: var(--yellow); color: var(--green-dark); }
.btn--yellow:hover { background: #FFD873; color: var(--green-dark); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.btn--ghost  { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.75); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--green-dark); }
.btn--white  { background: var(--white); color: var(--coral-ink); }
.btn--white:hover { color: var(--coral-ink); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.btn--mint   { background: var(--mint); color: var(--green-dark); }
.btn--mint:hover { background: #D8EEDF; color: var(--green-dark); }
.btn--urgent { background: var(--coral-soft); color: var(--coral-ink); }
.btn--urgent:hover { background: var(--coral); color: var(--white); }

/* Etiqueta redondeada pequeña */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
}
.pill--yellow { background: var(--yellow); color: var(--green-dark); }

/* Secciones y títulos */
.section { padding-block: var(--section-y); }
.section--mint { background: var(--mint); }
.section--dark { background: var(--green-dark); color: var(--white); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-width: 680px;
  margin-bottom: 2.5rem;
}
.eyebrow {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow--yellow { color: var(--yellow); }
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  color: var(--green-dark);
}
.section--dark .section-title { color: var(--white); }
.section-title--center { text-align: center; margin-bottom: 1.75rem; }
.section-lead { color: var(--text-soft); }


/* ---------- 5. CABECERA FIJA Y MENÚ ---------- */
.header {
  position: sticky;            /* sticky = se queda pegada arriba al hacer scroll */
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(8px);   /* Desenfoca lo que pasa por detrás */
  border-bottom: 1px solid var(--mint-line);
  transition: box-shadow .3s;
}
/* Clase que añade JavaScript al bajar: sombra suave */
.header.is-scrolled { box-shadow: 0 6px 22px rgba(19, 60, 41, .08); }

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-right: auto;
  text-decoration: none;
  color: var(--green-dark);
}
.brand__logo { flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-size: 28px; }
.brand__tag {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__list { display: flex; gap: 1.6rem; }
.nav__list a {
  position: relative;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  padding-block: .4rem;
}
/* Rayita amarilla debajo del enlace activo o al pasar el ratón */
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transition: transform .3s;
}
.nav__list a:hover::after,
.nav__list a.is-active::after { transform: scaleX(1); }
.nav__actions { display: flex; gap: .6rem; }

/* Botón de menú (hamburguesa): oculto en ordenador */
.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--mint);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--green-dark);
  transition: transform .3s, opacity .3s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }


/* ---------- 6. PORTADA CON CARRUSEL ---------- */
.hero {
  position: relative;
  min-height: min(720px, 88vh);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--green-dark);   /* Color de respaldo mientras cargan las fotos */
  color: var(--white);
  isolation: isolate;
}
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);   /* Encuadre: se define en cada foto del HTML */
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s ease, transform 7s linear;
}
.hero__img.is-active { opacity: 1; transform: scale(1); }

/* Velo verde a la izquierda para que el texto se lea sobre cualquier foto */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(19,60,41,.92) 0%, rgba(19,60,41,.70) 42%, rgba(19,60,41,.10) 78%);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding-block: 5rem 7rem;
}
.hero__title {
  max-width: 640px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.01em;
}
.hero__title span { color: var(--yellow); }
.hero__lead { max-width: 32em; font-size: 20px; color: var(--text-on-dark); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: .5rem;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-on-dark);
}
.hero__extras strong { color: var(--white); }
.hero__team { display: flex; align-items: center; gap: .75rem; }
.avatars { display: flex; }
.avatars img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green-dark);
}
.avatars img + img { margin-left: -12px; }
.hero__next {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  border-radius: 6px;
  background: rgba(255,255,255,.14);
}

/* Puntos del carrusel */
.hero__dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 60px;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.hero__dot {
  width: 44px;              /* Zona de clic cómoda, aunque el punto se vea pequeño */
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__dot span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.6);
  transition: width .4s, background-color .4s;
}
.hero__dot[aria-current="true"] span { width: 32px; background: var(--yellow); }


/* ---------- 7. VENTAJAS ---------- */
.perks-wrap { position: relative; z-index: 2; margin-top: -36px; }
.perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* Este contenedor ya tiene padding propio: quitamos el margen lateral doble */
.perks.container { max-width: calc(var(--container) - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter)); }
.perk { display: flex; align-items: center; gap: .9rem; font-size: 14px; line-height: 1.3; color: #51605A; }
.perk strong { display: block; font-size: 16px; font-weight: 900; color: var(--green-dark); }
.perk__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.perk__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--green-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.perk__icon--mint { background: var(--mint); }
.perk__icon--coral { background: var(--coral-soft); }
.perk__icon--yellow { background: var(--yellow-soft); }


/* ---------- 8. SERVICIOS ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.service {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.9rem;
  border-radius: var(--radius);
  transition: transform .3s;
}
.service:hover { transform: translateY(-4px); }
.service--mint { background: var(--mint); }
.service--yellow { background: var(--yellow-soft); }
.service__icon {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--green-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 21px; font-weight: 900; color: var(--green-dark); }
.service p { color: var(--text-soft); font-size: 16px; }


/* ---------- 9. GALERÍA ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 260px;
  gap: 1rem;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.gallery__tall { grid-row: span 2; }


/* ---------- 10. URGENCIAS ---------- */
.urgent-wrap { padding-top: var(--section-y); }
.urgent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem 2.75rem;
  border-radius: 6px;
  background: var(--coral);
  color: var(--white);
}
.urgent__text { display: flex; align-items: center; gap: 1.25rem; flex: 1 1 420px; }
.urgent__icon {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.urgent__icon svg { width: 34px; height: 34px; fill: none; stroke: var(--white); stroke-width: 2.4; stroke-linecap: round; }
.urgent h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; }
.urgent p { font-size: 18px; }
.urgent .btn { min-height: 60px; font-size: 19px; }


/* ---------- 11. CÓMO PEDIR CITA ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3.5rem;
  align-items: center;
}
.split__media { position: relative; }
.split__media::before {     /* Mancha menta decorativa detrás de la foto */
  content: "";
  position: absolute;
  left: -24px; bottom: -24px;
  width: 200px; height: 200px;
  border-radius: 6px;
  background: var(--mint);
  z-index: -1;
}
.split__media img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center 70%;
  border-radius: 6px;
}
.split__text { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.steps { display: flex; flex-direction: column; gap: 1.1rem; }
.steps li { display: flex; gap: 1rem; align-items: flex-start; color: var(--text-soft); }
.steps strong { display: block; font-size: 18px; font-weight: 900; color: var(--green-dark); }
.steps__n {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--green-dark);
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ---------- 12. EQUIPO ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.member { background: var(--green-mid); border-radius: var(--radius); overflow: hidden; }
.member img { width: 100%; height: 320px; object-fit: cover; object-position: center 20%; }
.member__body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .25rem; color: #CFE6D7; font-size: 15px; }
.member h3 { font-size: 20px; font-weight: 900; color: var(--white); }
.member__role { color: var(--yellow); font-weight: 800; }


/* ---------- 13. OPINIONES ---------- */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.review {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.9rem;
  background: var(--white);
  border: 1px solid var(--mint-line);
  border-radius: var(--radius);
}
.review__stars { color: #E8A400; font-size: 20px; letter-spacing: 2px; }
.review blockquote { font-size: 17px; flex: 1; }
.review figcaption { display: flex; align-items: center; gap: .75rem; font-size: 14px; line-height: 1.3; color: #51605A; }
.review figcaption strong { display: block; font-size: 16px; color: var(--green-dark); }
.review__avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--green-dark);
}
.review__avatar--yellow { background: #FFE08A; }
.review__avatar--mint { background: #CDEBD7; }
.review__avatar--coral { background: #FFD6CC; }


/* ---------- 14. PREGUNTAS FRECUENTES ---------- */
.faq { display: flex; flex-direction: column; gap: .75rem; }
.faq details { background: var(--white); border-radius: 6px; padding: 1.25rem 1.6rem; }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 18px;
  font-weight: 900;
  color: var(--green-dark);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* El "+" que gira y se convierte en "×" al abrir */
.faq summary::after {
  content: "+";
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform .3s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: .75rem; color: var(--text-soft); }


/* ---------- 15. CONTACTO Y MAPA ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem;
  align-items: stretch;
}
.contact__info { display: flex; flex-direction: column; gap: 1.4rem; }
.contact__data { display: flex; flex-direction: column; gap: 1rem; }
.contact__data dt { font-weight: 900; color: var(--green-dark); }
.contact__data dd { color: var(--text-soft); }
.contact__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.map {
  position: relative;
  min-height: 380px;
  border-radius: 6px;
  overflow: hidden;
  background: #DCEFE2;
}
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map__pin svg { position: static; width: 44px; height: 54px; }
.map__label {
  padding: .6rem 1rem;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(19,60,41,.2);
  font-weight: 900;
  color: var(--green-dark);
  white-space: nowrap;
}


/* ---------- 16. PIE DE PÁGINA Y AVISO FLOTANTE ---------- */
.footer { background: var(--green-dark); color: #CFE6D7; padding-block: 2.75rem; font-size: 15px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer__brand { font-family: var(--font-display); font-size: 24px; color: var(--white); }
.footer__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer__links a { color: #CFE6D7; }
.footer__links a:hover { color: var(--white); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 120;
  max-width: calc(100% - 2rem);
  padding: .9rem 1.4rem;
  border-radius: 4px;
  background: var(--green-dark);
  color: var(--white);
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transform: translate(-50%, 150%);
  opacity: 0;
  transition: transform .4s, opacity .4s;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }


/* ---------- 17. MOVIMIENTO REDUCIDO ----------
   Para quien tiene activado "reducir movimiento" en su dispositivo. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}


/* ---------- 18. RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
  .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services, .team, .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { gap: 2.5rem; }
  .contact { grid-template-columns: 1fr; }
}

/* Menú en móvil y tablet pequeña */
@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem var(--gutter) 1.75rem;
    background: var(--bg);
    border-bottom: 1px solid var(--mint-line);
    box-shadow: 0 16px 30px rgba(19,60,41,.10);
    /* Oculto hasta que se pulsa el botón */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { display: block; padding: .8rem 0; font-size: 18px; border-bottom: 1px solid var(--mint-line); }
  .nav__list a::after { display: none; }
  .nav__actions .btn { flex: 1; min-height: 52px; }
}

/* Móvil */
@media (max-width: 640px) {
  :root { --header-h: 68px; }
  body { font-size: 16px; }
  .brand__name { font-size: 24px; }

  .hero { min-height: 640px; align-items: flex-end; }
  .hero__img { object-position: var(--pos-movil, var(--pos, center)); }
  .hero::after { background: linear-gradient(0deg, rgba(19,60,41,.96) 0%, rgba(19,60,41,.78) 50%, rgba(19,60,41,.25) 100%); }
  .hero__content { padding-block: 6rem 6.5rem; }
  .hero__lead { font-size: 17px; }
  .btn { padding: 0 1.1rem; font-size: 16px; white-space: nowrap; }   /* Que los botones no partan el texto en dos líneas */
  .hero__actions .btn { flex: 1; }
  .hero__next { display: none; }
  .hero__dots { bottom: 28px; }

  .perks { grid-template-columns: 1fr; padding: 1.25rem; }
  .services, .team, .reviews, .split { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; gap: .6rem; }
  .gallery img { border-radius: 6px; }
  .split__media img { height: 420px; }
  .urgent { padding: 1.75rem; }
  .urgent__text { flex-direction: column; align-items: flex-start; }
  .urgent .btn { width: 100%; }
  .contact__actions .btn { flex: 1; }
  .member img { height: 300px; }
}


/* ---------- PÁGINAS LEGALES (aviso legal, privacidad, cookies) ---------- */
.legal { padding-block: 3.5rem 5rem; }
.legal__inner { max-width: 780px; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; color: var(--green-dark); margin-bottom: .5rem; }
.legal h2 { margin: 2.25rem 0 .6rem; font-size: 1.3rem; font-weight: 900; color: var(--green-dark); }
.legal p, .legal li { line-height: 1.7; }
.legal p + p { margin-top: .75rem; }
.legal ul { padding-left: 1.2rem; list-style: disc; }
.legal a:not(.btn) { text-decoration: underline; }
.legal .btn { margin-top: 2.5rem; }
.legal__updated { font-size: .9rem; color: #51605A; }
.legal__note { margin-top: 2.25rem; padding: 1rem 1.25rem; border-radius: 6px; background: var(--mint); font-size: .95rem; }
.legal__back { font-weight: 800; text-decoration: none; }
/* Datos que hay que rellenar en cada cliente: resaltados en amarillo */
mark.rellenar { background: #FFE08A; color: var(--text); padding: 0 .25em; border-radius: 4px; }
.legal__table { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: .9rem; }
.legal__table th, .legal__table td { padding: .6rem .75rem; border: 1px solid var(--mint-line); text-align: left; vertical-align: top; }
.legal__table th { background: var(--mint); }
@media (max-width: 640px) { .legal__table { display: block; overflow-x: auto; } }


/* ---------- 19. BOTÓN Y VENTANA DE NALA (asistente con IA) ---------- */
.nala-boton {
  position: fixed;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom)); /* sin insignia de Netlify (plan Personal) */
  z-index: 130;
  display: flex; align-items: center; gap: .5rem;
  min-height: 56px;
  padding: .5rem 1.1rem .5rem .6rem;
  border: 0; border-radius: 4px;
  background: var(--green); color: var(--white);
  font: inherit; font-weight: 800; font-size: 16px;
  box-shadow: 0 12px 30px rgba(19, 60, 41, .30);
  cursor: pointer;
  transition: transform .2s;
}
.nala-boton:hover { transform: translateY(-2px); }
.nala-boton span[aria-hidden] {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  background: var(--yellow, #C9A77E);
}
.nala-boton[hidden], .nala-panel[hidden] { display: none; }

.nala-panel {
  position: fixed;
  right: 1rem; bottom: 1rem;
  z-index: 140;
  width: 390px; height: min(640px, calc(100dvh - 2rem));
  border-radius: 6px; overflow: hidden;
  background: #FFFDF8;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.nala-panel iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- 20. BOTÓN DE WHATSAPP (encima del de Nala) ---------- */
.wa-boton {
  position: fixed;
  right: 1rem;
  /* justo encima del botón 🐾 (56px de alto + separación) */
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 56px + .75rem);
  z-index: 130;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; /* verde de WhatsApp: el icono oficial va en blanco encima */
  box-shadow: 0 12px 30px rgba(19, 60, 41, .30);
  transition: transform .2s;
}
.wa-boton:hover { transform: translateY(-2px); }
.wa-boton img { display: block; }
html.nala-abierta .wa-boton { display: none; }

/* Móvil: el chat ocupa toda la pantalla y la página de detrás no se mueve */
@media (max-width: 600px) {
  /* Móvil: el botón empieza redondo (solo 🐾) y a los 1,5 s se estira y muestra
     "¿Te ayudo?", que ya se queda fijo. Así llama la atención y se entiende que es un chat. */
  .nala-boton { padding: .4rem; gap: 0; transition: transform .2s, padding .5s ease; }
  .nala-boton__texto {
    display: inline-block; overflow: hidden; white-space: nowrap;
    max-width: 0; opacity: 0; margin-left: 0;
    transition: max-width .5s ease, opacity .4s ease .15s, margin-left .5s ease;
  }
  .nala-boton--abierto { padding-right: 1.1rem; }
  .nala-boton--abierto .nala-boton__texto { max-width: 8rem; opacity: 1; margin-left: .5rem; }
  .nala-panel { inset: 0; width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  html.nala-abierta, html.nala-abierta body { overflow: hidden; background: #FFFDF8; }
  /* Con el chat abierto, la web de detrás se oculta del todo: así, aunque el iPhone mueva
     la pantalla al sacar el teclado o bajo las barras de Safari, solo se ve el color del chat */
  html.nala-abierta body > *:not(.nala-panel) { visibility: hidden; }
}

/* Quien prefiere menos movimiento (ajuste del móvil): el texto aparece sin animación */
@media (prefers-reduced-motion: reduce) {
  .nala-boton, .nala-boton__texto { transition: none; }
}
