/* ============================================================
   Camas con Dignidad · hoja de estilos
   Tarjeta de visita en una sola pantalla: un vídeo a la izquierda
   y la tarjeta con los datos y el contacto a la derecha,
   sobre una banda verde oscura arriba y verde claro abajo.
   En pantallas verticales (móvil) la tarjeta va arriba y el
   vídeo debajo. Pensada para personas mayores: letra grande y
   legible y botones enormes.
   ============================================================ */

:root {
  /* Colores de marca */
  --verde: #024445;                 /* verde del logotipo */
  --verde-oscuro: #012f30;          /* al pulsar el botón de llamar */
  --verde-claro: #e6f0ec;           /* fondo de la página */
  --verde-linea: rgba(2, 68, 69, 0.12);
  --verde-azulado: #0c5f5c;         /* borde inferior de la banda */
  --verde-tinta: #eef5f2;
  --whatsapp: #128c7e;              /* verde WhatsApp oscurecido: contraste AA con blanco */
  --whatsapp-oscuro: #0e7466;
  --blanco: #ffffff;
  --texto: #14201f;
  --texto-suave: #536360;
  --foco: #f0a933;                  /* anillo de foco muy visible */

  /* Tipografías: Figtree para el nombre, Atkinson Hyperlegible (baja visión) para el resto */
  --fuente-nombre: "Figtree", "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  --fuente: "Atkinson Hyperlegible", "Segoe UI", Arial, Helvetica, sans-serif;

  /* Tamaños fluidos: dependen de la altura de la pantalla, nunca son pequeños */
  --f-base: clamp(1.05rem, 2.1vh, 1.3rem);
  --f-nombre: clamp(1.7rem, min(4.4vh, 7vw), 2.8rem);
  --f-boton: clamp(1.25rem, 2.7vh, 1.7rem);
  --f-detalle: clamp(1rem, 1.9vh, 1.2rem);
  --f-pie: clamp(0.98rem, 1.7vh, 1.1rem);

  --radio-tarjeta: 2rem;
  --radio-boton: 1.15rem;
  --radio-caja: 0.9rem;
  --menta: #5fc7a8;
  /* Sombra en capas: contacto, cercana y lejana */
  --sombra: 0 1px 2px rgba(1, 47, 48, 0.10), 0 10px 20px rgba(1, 47, 48, 0.14), 0 30px 60px rgba(1, 47, 48, 0.26);
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding: clamp(0.75rem, 2vh, 2rem) clamp(1rem, 3vw, 3rem);
  font-family: var(--fuente);
  font-size: var(--f-base);
  line-height: 1.4;
  color: var(--texto);
  /* Fondo: banda verde con degradado profundo y la marca de agua del logotipo
     arriba; verde claro abajo. Los paneles quedan a caballo. */
  background:
    url("assets/marca-agua.svg") no-repeat right -6vw top -14vh / 54vh auto,
    linear-gradient(180deg, var(--verde-oscuro) 0%, var(--verde) 28%, var(--verde-azulado) 54%, var(--verde-claro) 54%, var(--verde-claro) 100%);
  background-repeat: no-repeat;      /* si la página es más alta que la pantalla, abajo sigue el verde claro */
  background-color: var(--verde-claro);
  -webkit-font-smoothing: antialiased;
}

/* Onda entre la banda verde y la zona clara: el borde deja de ser recto */
.onda {
  position: absolute;
  left: 0;
  right: 0;
  top: 54%;
  height: clamp(2rem, 5vh, 3.25rem);
  transform: translateY(-100%);
  z-index: -1;
  pointer-events: none;
}

.onda svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--verde-claro);
}

/* Dos manchas menta sobre el fondo: derivan muy despacio */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70rem 32rem at 80% -20%, rgba(95, 199, 168, 0.45), transparent 62%),
    radial-gradient(40rem 22rem at 5% 105%, rgba(95, 199, 168, 0.18), transparent 60%);
  animation: deriva 26s ease-in-out infinite alternate;
}

/* Grano fino sobre todo el fondo, para que el degradado no parezca de plástico */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Los dos paneles: carrusel y tarjeta, misma altura */
.paneles {
  display: grid;
  grid-template-columns: minmax(0, 50rem) minmax(0, 33rem);
  justify-content: center;
  align-items: stretch;             /* mismo alto y misma línea superior */
  gap: clamp(0.75rem, 1.2vw, 1.25rem); /* cerca, como dos caras de la misma tarjeta */
}

/* ------------------------------------------------------------
   La tarjeta
   ------------------------------------------------------------ */
.tarjeta {
  min-width: 0;
  padding: clamp(1rem, 2.5vh, 1.75rem) clamp(1.1rem, 2.5vw, 2rem);
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radio-tarjeta);
  box-shadow: var(--sombra), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: clamp(0.65rem, 1.5vh, 1.1rem);
  transition: transform 0.25s ease;   /* inclinación leve con el ratón (script) */
}

@supports not (backdrop-filter: blur(1px)) {
  .tarjeta { background: rgba(255, 255, 255, 0.96); }
}

/* Cabecera: logo a la izquierda, nombre y frase a la derecha */
.cabecera {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.5vw, 1.25rem);
}

.logo {
  flex: none;
  width: clamp(3.75rem, 10vh, 6rem);
  height: auto;
  overflow: visible;
}

/* Al cargar, el anillo del logo se dibuja y las partes aparecen una a una */
.logo-trazo {
  fill: none;
  stroke: var(--verde);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: dibujar 1.1s ease-out 0.15s forwards;
}

.logo-parte {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: aparecer-parte 0.5s ease forwards;
}

.logo-anillo { animation-delay: 1.05s; }                 /* anillo relleno, cuando acaba el trazo */
.logo-simbolo:nth-of-type(1) { animation-delay: 0.35s; }
.logo-simbolo:nth-of-type(2) { animation-delay: 0.42s; }
.logo-simbolo:nth-of-type(3) { animation-delay: 0.49s; }
.logo-simbolo:nth-of-type(4) { animation-delay: 0.56s; }
.logo-simbolo:nth-of-type(5) { animation-delay: 0.63s; }
.logo-simbolo:nth-of-type(6) { animation-delay: 0.7s; }
.logo-texto { animation-delay: 0.9s; }                   /* el texto del anillo, todo a la vez */

/* El corazón del logo late despacio y muy poco, una vez dibujado */
.logo-corazon {
  transform-box: fill-box;
  transform-origin: center;
  animation: latir 3.2s ease-in-out 1.9s infinite;
}

.marca { min-width: 0; }

h1 {
  margin: 0 0 0.2em;
  font-family: var(--fuente-nombre);
  font-size: var(--f-nombre);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--verde);
}

.frase {
  margin: 0;
  font-size: var(--f-base);
  line-height: 1.35;
}

/* Servicios: tres datos, cada uno con su icono de línea */
.servicios {
  list-style: none;
  margin: 0;
  padding: clamp(0.5rem, 1.2vh, 0.8rem) clamp(0.8rem, 1.4vw, 1.1rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 0.7vh, 0.5rem);
  background: var(--blanco);
  border: 1px solid var(--verde-linea);
  border-radius: var(--radio-caja);
  font-size: var(--f-detalle);
  font-weight: 700;
  color: var(--verde);
}

.servicios li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.servicios svg {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.42rem;
  border-radius: 0.6rem;
  background: rgba(2, 68, 69, 0.10);
  color: var(--verde);
}

/* ------------------------------------------------------------
   Botones de contacto: grandes, apilados y a todo el ancho
   ------------------------------------------------------------ */
.contacto {
  display: grid;
  gap: clamp(0.6rem, 1.4vh, 1rem);
}

.boton {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.5vw, 1.1rem);
  min-height: clamp(3.9rem, 8.6vh, 5.25rem);
  padding: 0.6rem clamp(0.9rem, 1.6vw, 1.3rem);
  border: 1.5px solid transparent;
  border-radius: var(--radio-boton);
  text-decoration: none;
  color: var(--blanco);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

/* Reflejo que recorre el botón al pasar el ratón */
.boton::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.boton:hover::after { transform: translateX(130%); }
.boton-correo::after { background: linear-gradient(115deg, transparent 30%, rgba(2, 68, 69, 0.08) 50%, transparent 70%); }

.boton:active { transform: scale(0.97); }

.boton:focus-visible {
  outline: 5px solid var(--foco);
  outline-offset: 3px;
}

.icono {
  flex: none;
  width: clamp(2.9rem, 6vh, 3.5rem);
  height: clamp(2.9rem, 6vh, 3.5rem);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.icono svg { width: 55%; height: 55%; }

.etiqueta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.titulo {
  font-size: var(--f-boton);
  font-weight: 700;
}

.detalle {
  font-size: var(--f-detalle);
  overflow-wrap: anywhere;
}

/* El número de teléfono es el protagonista: grande, en Figtree, con cifras alineadas */
.etiqueta-llamar { opacity: 0.85; }

.numero {
  font-family: var(--fuente-nombre);
  font-size: clamp(1.8rem, 3.8vh, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.boton-llamar .icono {
  width: clamp(3.4rem, 7vh, 4rem);
  height: clamp(3.4rem, 7vh, 4rem);
  background: var(--menta);
  color: var(--verde-oscuro);
}

.boton-llamar {
  min-height: clamp(4.75rem, 10vh, 6rem);
  background: var(--verde);
  animation: aparecer 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s backwards, halo 3.4s ease-in-out 1.4s infinite;
}
.boton-llamar:hover, .boton-llamar:active { background: var(--verde-oscuro); }

.boton-whatsapp { background: var(--whatsapp); }
.boton-whatsapp:hover, .boton-whatsapp:active { background: var(--whatsapp-oscuro); }

.boton-correo {
  background: var(--blanco);
  border-color: var(--verde);
  color: var(--verde);
}
.boton-correo .icono { background: var(--verde-tinta); }
.boton-correo:hover, .boton-correo:active { background: var(--verde-tinta); }

.correo-corto { display: none; }

/* "¿Prefiere que le llamemos?": enlace discreto bajo los botones */
.pedir-llamada {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.2rem;
  margin-top: -0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radio-caja);
  font-size: var(--f-detalle);
  font-weight: 700;
  color: var(--verde);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(2, 68, 69, 0.35);
  cursor: pointer;
  transition: background-color 0.15s ease, text-decoration-color 0.15s ease;
}

.pedir-llamada svg { flex: none; width: 1.35rem; height: 1.35rem; }
.pedir-llamada:hover { background: rgba(2, 68, 69, 0.06); text-decoration-color: var(--verde); }
.pedir-llamada:focus-visible { outline: 4px solid var(--foco); outline-offset: 2px; }

/* ------------------------------------------------------------
   Opinión de una familia, con cinco estrellas
   ------------------------------------------------------------ */
.opinion {
  margin: 0;
  padding: clamp(0.45rem, 1.1vh, 0.65rem) clamp(0.8rem, 1.4vw, 1rem);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.15rem 0.7rem;
  background: var(--blanco);
  border: 1px solid var(--verde-linea);
  border-radius: var(--radio-caja);
}

.estrellas {
  grid-row: 1;
  grid-column: 1;
  display: inline-flex;
  gap: 0.1rem;
  color: var(--foco);
}

.estrellas svg { width: 1.15rem; height: 1.15rem; }

.opinion-citas {
  grid-row: 2;
  grid-column: 1 / -1;
  min-width: 0;
}

.opinion blockquote {
  margin: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: aparecer 0.6s ease;
  font-size: var(--f-detalle);
  line-height: 1.3;
  color: var(--verde);
}

.opinion-citas blockquote:not(.activa) { display: none; }

.opinion figcaption {
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  font-size: var(--f-pie);
  color: var(--texto-suave);
}

.ver-opiniones {
  color: var(--verde);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ver-opiniones:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }

/* Portátiles con poca altura: la opinión en una sola fila */
@media (min-width: 861px) and (orientation: landscape) and (max-height: 660px) {
  .opinion figcaption { display: none; }
  .pedir-llamada { min-height: 2rem; padding: 0.1rem 0.6rem; }
}

/* Portátiles aún más bajos: la opinión se oculta antes que cualquier dato de contacto */
@media (min-width: 861px) and (orientation: landscape) and (max-height: 620px) {
  .opinion { display: none; }
  .tarjeta { gap: 0.6rem; }
}

/* ------------------------------------------------------------
   Barra fija de contacto en móvil (la muestra el script al bajar)
   ------------------------------------------------------------ */
.barra-movil {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(1, 47, 48, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 -10px 30px rgba(1, 47, 48, 0.3);
  animation: subir 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.barra-movil[hidden] { display: none; }

.barra-boton {
  flex: 1;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: var(--radio-boton);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--blanco);
  cursor: pointer;
}

.barra-boton svg { width: 1.6rem; height: 1.6rem; }
.barra-llamar { background: var(--menta); color: var(--verde-oscuro); }
.barra-whatsapp { background: var(--whatsapp); }
.barra-boton:focus-visible { outline: 4px solid var(--foco); outline-offset: 2px; }

/* Con la barra a la vista, la página deja hueco abajo para que nada quede tapado */
body.con-barra { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }

@keyframes subir {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

/* ------------------------------------------------------------
   Pie: zonas y dirección
   ------------------------------------------------------------ */
.pie {
  padding-top: clamp(0.7rem, 1.6vh, 1.1rem);
  border-top: 1px solid var(--verde-linea);
  font-size: var(--f-pie);
  line-height: 1.35;
}

.pie p { margin: 0; }

.zonas {
  font-weight: 700;
  color: var(--verde);
}

.direccion {
  margin-top: 0.2rem;
  color: var(--texto-suave);
}

/* Dirección enlazada a Google Maps con la ruta */
.como-llegar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  color: inherit;
  text-decoration: none;
  border-radius: 0.4rem;
}

.como-llegar svg { flex: none; width: 1.1em; height: 1.1em; color: var(--verde); }

.como-llegar-texto {
  padding: 0.1em 0.6em;
  border-radius: 999px;
  background: rgba(2, 68, 69, 0.10);
  color: var(--verde);
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.como-llegar:hover .como-llegar-texto { background: var(--verde); color: var(--blanco); }
.como-llegar:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }

/* Indicador de horario: punto verde (abierto) o gris (cerrado) */
.horario {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: var(--texto-suave);
}

.horario[hidden] { display: none; }

.horario-punto {
  flex: none;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: #9aa5a3;
}

.horario.abierto { color: var(--verde); }
.horario.abierto .horario-punto {
  background: #1fa66a;
  box-shadow: 0 0 0 4px rgba(31, 166, 106, 0.2);
  animation: halo-punto 2.4s ease-in-out infinite;
}

/* ------------------------------------------------------------
   Vídeo: misma altura que la tarjeta, imagen arriba y rótulo debajo
   ------------------------------------------------------------ */
.video {
  order: -1;                       /* a la izquierda de la tarjeta en pantallas anchas */
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--blanco);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radio-tarjeta);
  box-shadow: var(--sombra);
  overflow: hidden;
}

.video-marco {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--verde-tinta);
}

.video-reproductor {
  position: absolute;               /* no impone su altura natural: manda el marco */
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* Aviso mientras no exista el archivo de vídeo */
.video-aviso {
  position: absolute;
  left: 1rem;
  top: 1rem;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--verde);
  font-size: var(--f-pie);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(1, 47, 48, 0.2);
}

.video-aviso[hidden] { display: none; }

/* Botón grande de pausa / reproducir, abajo a la derecha del vídeo */
.video-boton {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: clamp(3.25rem, 7vh, 4rem);
  height: clamp(3.25rem, 7vh, 4rem);
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--verde);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--verde);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(1, 47, 48, 0.25);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.video-boton[hidden] { display: none; }
.video-boton svg { width: 50%; height: 50%; }
.video-boton .icono-play { display: none; }
.video-boton.en-pausa .icono-play { display: block; }
.video-boton.en-pausa .icono-pausa { display: none; }
.video-boton:hover, .video-boton:active { background: var(--verde); color: var(--blanco); }
.video-boton:focus-visible { outline: 4px solid var(--foco); outline-offset: 2px; }

.video-rotulo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: clamp(0.7rem, 1.6vh, 1rem) clamp(1rem, 2vw, 1.5rem);
  background: var(--blanco);
  border-top: 1px solid var(--verde-linea);
}

.video-rotulo-texto {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  min-width: 0;
}

.ver-productos {
  flex: none;
  min-height: 3rem;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--verde);
  border-radius: 999px;
  background: var(--verde);
  color: var(--blanco);
  font: inherit;
  font-size: var(--f-detalle);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ver-productos:hover { background: var(--verde-oscuro); }
.ver-productos:focus-visible { outline: 4px solid var(--foco); outline-offset: 2px; }
.ver-productos[hidden] { display: none; }

.video-rotulo strong {
  font-family: var(--fuente-nombre);
  font-size: clamp(1.2rem, 2.6vh, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--verde);
}

.video-rotulo span {
  font-size: var(--f-detalle);
  color: var(--texto-suave);
}

/* ------------------------------------------------------------
   Galería de productos (ventana emergente)
   ------------------------------------------------------------ */
.productos {
  width: min(62rem, 94vw);
  max-height: 90vh;
  margin: auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 0;
  border-radius: var(--radio-tarjeta);
  background: var(--blanco);
  color: var(--texto);
  box-shadow: var(--sombra);
  overflow: auto;
}

.productos::backdrop {
  background: rgba(1, 47, 48, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.productos[open] { animation: aparecer 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }

.productos-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(0.8rem, 2vh, 1.25rem);
}

.productos h2 {
  margin: 0;
  font-family: var(--fuente-nombre);
  font-size: clamp(1.5rem, 3.5vh, 2.1rem);
  font-weight: 800;
  color: var(--verde);
}

.productos-cerrar {
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--verde);
  border-radius: 50%;
  background: var(--blanco);
  color: var(--verde);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.productos-cerrar svg { width: 50%; height: 50%; }
.productos-cerrar:hover { background: var(--verde); color: var(--blanco); }
.productos-cerrar:focus-visible { outline: 4px solid var(--foco); outline-offset: 2px; }

.productos-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.productos-lista li {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--verde-linea);
  border-radius: var(--radio-caja);
  background: var(--verde-tinta);
}

.productos-lista picture {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 0.7rem;
  background: var(--blanco);
  overflow: hidden;
}

.productos-lista img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  display: block;
}

.productos-lista li:first-child img { object-fit: cover; padding: 0; }

.productos-lista strong {
  display: block;
  font-size: var(--f-detalle);
  font-weight: 700;
  color: var(--verde);
}

.productos-lista span {
  display: block;
  font-size: var(--f-pie);
  color: var(--texto-suave);
}

.productos-pie {
  margin: clamp(0.8rem, 2vh, 1.25rem) 0 0;
  font-size: var(--f-detalle);
}

.productos-pie a {
  color: var(--verde);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------
   Pantallas estrechas o en vertical (móvil, tablet):
   una sola columna, la tarjeta arriba y el vídeo debajo
   ------------------------------------------------------------ */
@media (max-width: 860px), (orientation: portrait) {
  :root {
    --f-base: 1.05rem;
    --f-nombre: clamp(1.55rem, 6.5vw, 2.2rem);
    --f-boton: 1.3rem;
    --f-detalle: 1rem;
    --f-pie: 1rem;
  }

  body {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: 0.75rem;
  }

  .paneles {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .onda { top: 17rem; height: 1.75rem; }

  body {
    background:
      url("assets/marca-agua.svg") no-repeat right -18vw top -6rem / 22rem auto,
      linear-gradient(180deg, var(--verde-oscuro) 0, var(--verde) 8rem, var(--verde-azulado) 17rem, var(--verde-claro) 17rem, var(--verde-claro) 100%);
    background-repeat: no-repeat;
  }

  .tarjeta { padding: 1rem; gap: 0.85rem; }
  .cabecera { gap: 0.8rem; }
  .logo { width: 3.5rem; }
  .frase { line-height: 1.3; }
  .servicios { padding: 0.7rem 0.9rem; gap: 0.35rem; }
  .contacto { gap: 0.55rem; }
  .boton { min-height: 3.75rem; padding: 0.5rem 0.9rem; gap: 0.75rem; }
  .icono { width: 2.85rem; height: 2.85rem; }
  .boton-llamar { min-height: 4.5rem; }
  .boton-llamar .icono { width: 3.25rem; height: 3.25rem; }
  .numero { font-size: 1.75rem; }
  .servicios svg { width: 1.9rem; height: 1.9rem; padding: 0.38rem; }
  .opinion { padding: 0.5rem 0.8rem; grid-template-columns: 1fr; gap: 0.15rem; }
  .estrellas { grid-row: 1; grid-column: 1; }
  .opinion-citas { grid-row: 2; grid-column: 1; }
  .opinion blockquote { white-space: normal; overflow: visible; }
  .opinion figcaption { grid-row: 3; grid-column: 1; justify-self: start; }
  .pie { padding-top: 0.65rem; }

  .video { order: 0; }              /* debajo de la tarjeta */
  .video-marco { flex: none; height: min(62vw, 24rem); }
  .video-rotulo { padding: 0.7rem 1rem; flex-wrap: wrap; }
  .ver-productos { min-height: 2.75rem; }
  .productos-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-rotulo strong { font-size: 1.2rem; }
  .video-boton { width: 3rem; height: 3rem; right: 0.75rem; bottom: 0.75rem; }
}

/* Móviles estrechos: texto corto en el botón de correo */
@media (max-width: 430px) {
  .correo-largo { display: none; }
  .correo-corto { display: block; }
  .tarjeta, .video, .productos { border-radius: 1.1rem; }
  .productos-lista { grid-template-columns: minmax(0, 1fr); }
  .tarjeta { padding: 0.9rem; }
}

/* ------------------------------------------------------------
   Movimiento: entrada escalonada al cargar y detalles de vida
   ------------------------------------------------------------ */
@keyframes aparecer {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes halo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(95, 199, 168, 0.6); }
  50%      { box-shadow: 0 0 0 14px rgba(95, 199, 168, 0); }
}

@keyframes dibujar {
  to { stroke-dashoffset: 0; }
}

@keyframes aparecer-parte {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: none; }
}

@keyframes halo-punto {
  0%, 100% { box-shadow: 0 0 0 3px rgba(31, 166, 106, 0.25); }
  50%      { box-shadow: 0 0 0 7px rgba(31, 166, 106, 0); }
}

@keyframes latir {
  0%   { transform: scale(1); }
  12%  { transform: scale(1.045); }
  24%  { transform: scale(1); }
  36%  { transform: scale(1.035); }
  52%  { transform: scale(1); }
  100% { transform: scale(1); }
}

@keyframes deriva {
  from { transform: translate(0, 0); }
  to   { transform: translate(-12vw, 6vh); }
}

.video, .tarjeta { animation: aparecer 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.tarjeta { animation-delay: 0.1s; }
.cabecera { animation: aparecer 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s backwards; }
.servicios { animation: aparecer 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s backwards; }
.boton-whatsapp { animation: aparecer 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.48s backwards; }
.boton-correo { animation: aparecer 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.56s backwards; }
.pie { animation: aparecer 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.66s backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .logo-parte { opacity: 1; }
  .logo-trazo { display: none; }
  .boton:active { transform: none; }
}
