/* Acuaags · componentes. Depende de tokens.css y base.css */

/* ---------- Botón ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border: 2px solid transparent; border-radius: var(--radio-pill);
  font: 600 16px/1.1 var(--font-texto); text-align: center; text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primario { background: var(--turquesa); color: var(--azul-profundo); box-shadow: 0 8px 20px rgba(26, 204, 217, .35); }
.btn--primario:hover { color: var(--azul-profundo); box-shadow: 0 12px 26px rgba(26, 204, 217, .45); }
.btn--secundario { background: transparent; color: var(--blanco); border-color: rgba(255, 255, 255, .7); }
.btn--secundario:hover { color: var(--blanco); border-color: var(--blanco); background: rgba(255, 255, 255, .08); }
.btn--claro { background: transparent; color: var(--azul-profundo); border-color: var(--azul-profundo); }
.btn--claro:hover { color: var(--azul-profundo); background: rgba(0, 66, 120, .06); }
/* Sobre celeste-claro, donde el turquesa no contrasta (bloque para administradores) */
.btn--azul { background: var(--azul-profundo); color: var(--blanco); }
.btn--azul:hover { color: var(--blanco); box-shadow: var(--sombra-tarjeta); }
.btn--wa { background: var(--whatsapp); color: var(--blanco); }
.btn--wa:hover { color: var(--blanco); }
.btn--chico { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--bloque { width: 100%; }
.botones { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 599px) {
  .botones--apilar { flex-direction: column; align-items: stretch; }
}

/* Enlace con flecha (tarjetas) */
.enlace { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--azul-medio); text-decoration: none; }
.enlace::after { content: "→"; transition: transform .2s ease; }
.enlace:hover::after { transform: translateX(3px); }

/* ---------- Ola (4 capas, CSS puro) ---------- */
/* Uso: <svg class="ola" style="--ola-fondo: var(--fondo-neutro)">…4 <use href="#ola-trazo">…</svg>
   La última capa toma el color de la sección siguiente. Con .ola--quieta no se anima. */
.ola { display: block; width: 100%; height: 72px; margin-bottom: -1px; pointer-events: none; }
.ola use:nth-child(1) { fill: rgba(136, 246, 249, .45); }
.ola use:nth-child(2) { fill: rgba(26, 204, 217, .55); }
.ola use:nth-child(3) { fill: rgba(0, 122, 174, .35); }
.ola use:nth-child(4) { fill: var(--ola-fondo, var(--fondo-neutro)); }
.ola:not(.ola--quieta) use { animation: ola 22s cubic-bezier(.55, .5, .45, .5) infinite; }
.ola:not(.ola--quieta) use:nth-child(1) { animation-delay: -2s; animation-duration: 9s; }
.ola:not(.ola--quieta) use:nth-child(2) { animation-delay: -3s; animation-duration: 13s; }
.ola:not(.ola--quieta) use:nth-child(3) { animation-delay: -4s; animation-duration: 17s; }
.ola:not(.ola--quieta) use:nth-child(4) { animation-delay: -5s; animation-duration: 24s; }
@keyframes ola { 0% { transform: translate3d(-90px, 0, 0); } 100% { transform: translate3d(85px, 0, 0); } }
@media (min-width: 900px) { .ola { height: 120px; } }
@media (prefers-reduced-motion: reduce) { .ola use { animation: none !important; } }

/* ---------- Franja de confianza ---------- */
.franja {
  display: grid; grid-template-columns: 1fr;
  list-style: none; margin: 0; padding: 0;
  background: var(--blanco); border-radius: var(--radio-md); box-shadow: var(--sombra-flotante);
}
.franja li { display: flex; gap: 14px; align-items: center; padding: 18px 20px; }
.franja li + li { border-top: 1px solid var(--linea); }
.franja svg { width: 34px; height: 34px; color: var(--azul-medio); flex: none; }
.franja__logo { width: 44px; height: auto; flex: none; }
.franja b { display: block; font: 900 15px/1.2 var(--font-titulo); color: var(--azul-profundo); }
.franja span { display: block; font-size: 15px; line-height: 1.35; color: var(--texto-suave); }
@media (min-width: 760px) {
  .franja { grid-template-columns: repeat(3, 1fr); }
  .franja li { padding: 20px 22px; }
  .franja li + li { border-top: 0; border-left: 1px solid var(--linea); }
}

/* ---------- Tarjeta (público / servicio) ---------- */
.tarjeta {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--blanco); border-radius: var(--radio-md); box-shadow: var(--sombra-tarjeta);
}
.tarjeta__foto { aspect-ratio: 4 / 3; background: linear-gradient(160deg, var(--azul-medio), var(--turquesa)); position: relative; }
.tarjeta__foto img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta__cuerpo { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: var(--esp-3); }
.tarjeta h3 { font-size: 20px; line-height: 1.2; }
.tarjeta p { color: var(--texto-suave); }
.tarjeta .enlace { margin-top: auto; }
.tarjeta--destacada { outline: 3px solid var(--turquesa); outline-offset: -3px; }
.tarjeta, .servicio { transition: transform .25s var(--ease-salida), box-shadow .25s var(--ease-salida); }
.tarjeta__foto { overflow: hidden; }
.tarjeta__foto img { transition: transform .6s var(--ease-salida); }
@media (hover: hover) {
  .tarjeta:hover, .servicio:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 66, 120, .14); }
  .tarjeta:hover .tarjeta__foto img { transform: scale(1.04); }
}

/* Ícono en cuadro suave */
.ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--celeste-claro); color: var(--azul-medio); }
.ico svg { width: 24px; height: 24px; }

/* ---------- Plan (sin precio) ---------- */
.plan {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; background: var(--blanco); border-radius: var(--radio-lg); box-shadow: var(--sombra-tarjeta);
}
.plan h3, .plan h4 { font-family: var(--font-titulo); font-weight: 900; font-size: 22px; color: var(--azul-profundo); }
.plan__datos { display: grid; gap: 12px; margin: 0; }
.plan__datos dt { font: 800 12px/1.2 var(--font-titulo); letter-spacing: .08em; text-transform: uppercase; color: var(--azul-medio); }
.plan__datos dd { margin: 2px 0 0; color: var(--texto-suave); white-space: pre-line; }
.plan__para { color: var(--texto-suave); }
.plan ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.plan li { position: relative; padding-left: 26px; color: var(--texto-suave); }
.plan li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--turquesa); }
.plan .btn { margin-top: auto; }
.plan--destacado { background: var(--azul-profundo); color: var(--blanco); }
.plan--destacado h3, .plan--destacado h4 { color: var(--blanco); }
.plan--destacado .plan__datos dt { color: var(--celeste); }
.plan--destacado .plan__datos dd { color: #d8ecf5; }
.plan--destacado .plan__para, .plan--destacado li { color: #d8ecf5; }

/* Sello (“El más pedido”, “Para administradores”, “EJEMPLO”) */
.sello {
  align-self: flex-start; display: inline-block;
  padding: 7px 12px; border-radius: var(--radio-pill);
  background: var(--turquesa); color: var(--azul-profundo);
  font: 800 12px/1 var(--font-titulo); letter-spacing: .08em; text-transform: uppercase;
}
.sello--suave { background: var(--celeste-claro); color: var(--azul-profundo); }

/* ---------- Lectura del agua (etiqueta sobre foto) ---------- */
.lectura {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 10px; border-radius: var(--radio-sm);
  background: rgba(255, 255, 255, .92); box-shadow: var(--sombra-tarjeta);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 600 14px/1 var(--font-texto); color: var(--azul-profundo); white-space: nowrap;
}
.lectura i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--turquesa); box-shadow: 0 0 0 4px rgba(26, 204, 217, .25); }
/* Latido lento, como un sensor encendido */
.lectura i::after, .reporte__titulo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--turquesa);
  animation: latido 2.6s ease-out infinite;
}
@keyframes latido { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.8); opacity: 0; } }
.lectura b { font: 900 16px/1 var(--font-titulo); }

/* ---------- Antes y después (js/antes-despues.js) ---------- */
.ad {
  --corte: 50%;
  position: relative; overflow: hidden; aspect-ratio: 4 / 3;
  border-radius: var(--radio-lg); background: var(--azul-profundo);
  user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize;
}
.ad img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ad__despues { clip-path: inset(0 0 0 var(--corte)); }
.ad__barra { position: absolute; top: 0; bottom: 0; left: var(--corte); width: 3px; background: var(--blanco); transform: translateX(-50%); pointer-events: none; }
.ad__tirador {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--turquesa); color: var(--azul-profundo);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .85), var(--sombra-flotante);
}
.ad__tirador svg { width: 24px; height: 24px; }
/* El rango solo da teclado y lector de pantalla; el arrastre lo maneja el contenedor para no bloquear el scroll vertical */
.ad__rango { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ad__rango:focus-visible + .ad__barra .ad__tirador { outline: 3px solid var(--celeste); outline-offset: 6px; }
.ad__rotulo {
  position: absolute; bottom: 14px; padding: 7px 12px; border-radius: var(--radio-pill);
  background: rgba(0, 66, 120, .6); color: var(--blanco); font: 900 14px/1 var(--font-titulo); pointer-events: none;
}
.ad__rotulo--antes { left: 14px; }
.ad__rotulo--despues { right: 14px; }
@media (min-width: 900px) { .ad { aspect-ratio: 16 / 9; } }

/* ---------- Pestañas ---------- */
.pestanas { display: flex; flex-wrap: wrap; gap: 8px; }
.pestana {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--radio-pill); cursor: pointer;
  background: var(--celeste-claro); color: var(--azul-profundo); font-weight: 600;
  transition: background-color .2s ease, color .2s ease;
}
.pestana[aria-selected="true"] { background: var(--azul-profundo); color: var(--blanco); }

/* ---------- Preguntas frecuentes (details/summary) ---------- */
.faq { border-bottom: 1px solid #dbe6ee; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 48px; padding: 20px 0; cursor: pointer; list-style: none;
  font: 600 18px/1.4 var(--font-texto); color: var(--azul-profundo);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--azul-medio); color: var(--azul-medio);
  font: 400 20px/1 var(--font-texto); transition: transform .2s ease;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq::details-content { block-size: 0; overflow: hidden; transition: block-size .3s var(--ease-salida), content-visibility .3s allow-discrete; }
.faq[open]::details-content { block-size: auto; }
.faq summary:hover { color: var(--azul-medio); }
.faq p { padding: 0 48px 22px 0; color: var(--texto-suave); font-size: 17px; line-height: 1.6; }

/* ---------- Formulario ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--azul-profundo); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1.5px solid #c9dbe7; border-radius: var(--radio-sm); background: var(--blanco);
  font-weight: 400; font-size: 16px; color: var(--texto);
}
.campo textarea { min-height: 120px; resize: vertical; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 3px solid var(--azul-medio); outline-offset: 1px; border-color: var(--azul-medio); }

/* ---------- Cabecera ---------- */
.cabecera {
  position: fixed; inset: 0 0 auto; z-index: 30; height: var(--alto-header);
  color: var(--blanco); transition: background-color .25s ease, box-shadow .25s ease;
}
/* Al bajar: azul profundo como vidrio líquido (translúcido, desenfoca y satura lo que pasa debajo, con brillo en el borde) */
.cabecera.es-solida { background: var(--azul-profundo); box-shadow: 0 6px 20px rgba(0, 30, 60, .25); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .cabecera::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
    /* Reflejo: luz arriba que se apaga hacia abajo, como la superficie de un vidrio curvo */
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 38%, rgba(255, 255, 255, 0) 60%),
      radial-gradient(120% 140% at 15% -40%, rgba(136, 246, 249, .22), rgba(136, 246, 249, 0) 55%);
    transition: opacity .3s ease;
  }
  .cabecera.es-solida {
    background: rgba(0, 66, 120, .74);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .28),
      inset 0 -1px 0 rgba(136, 246, 249, .18),
      0 10px 30px rgba(0, 30, 60, .22);
  }
  .cabecera.es-solida::before { opacity: 1; }
}
/* Quien pide menos transparencia en su sistema, ve el azul sólido */
@media (prefers-reduced-transparency: reduce) {
  .cabecera.es-solida { background: var(--azul-profundo); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .cabecera.es-solida::before { opacity: 0; }
}
.cabecera__fila { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cabecera__logo { display: block; flex: none; }
.cabecera__logo img { height: 38px; width: auto; }
.menu { display: none; }
.menu ul { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; }
.menu a:not(.btn) { color: var(--blanco); text-decoration: none; font-weight: 600; opacity: .9; }
.menu a:not(.btn):hover { opacity: 1; color: var(--celeste); }
.menu-boton {
  width: 48px; height: 48px; display: grid; place-items: center; margin-right: -10px;
  background: none; border: 0; color: var(--blanco); cursor: pointer;
}
.menu-boton svg { width: 28px; height: 28px; }
@media (min-width: 1000px) {
  .cabecera__logo img { height: 46px; }
  .menu { display: block; }
  .menu-boton { display: none; }
}

/* Menú en celular */
.menu-movil {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  padding: 0 var(--gutter) var(--esp-4); background: var(--azul-profundo); color: var(--blanco);
  overflow-y: auto;
}
.menu-movil[hidden] { display: none; }
.menu-movil__fila { height: var(--alto-header); flex: none; display: flex; align-items: center; justify-content: space-between; }
.menu-movil ul { list-style: none; padding: var(--esp-3) 0; display: grid; gap: 4px; }
.menu-movil ul a {
  display: block; padding: 14px 0; color: var(--blanco); text-decoration: none;
  font: 900 26px/1.2 var(--font-titulo); border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.menu-movil .btn { margin-top: auto; }
body.menu-abierto { overflow: hidden; }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
  position: fixed; right: 16px; bottom: 16px; z-index: 25;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
.wa-flotante { transition: opacity .3s ease, transform .3s var(--ease-salida); }
.wa-flotante:hover { transform: translateY(-2px); }
.wa-flotante.es-oculto { opacity: 0; transform: translateY(16px); pointer-events: none; visibility: hidden; transition: opacity .3s ease, transform .3s var(--ease-salida), visibility 0s .3s; }
@media (min-width: 900px) { .wa-flotante { right: 22px; bottom: 22px; } }

/* Nota en fotos recreadas o editadas (como en las fotos de comida) */
.nota-ilustrativa {
  position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: var(--radio-pill);
  background: rgba(11, 37, 64, .55); color: var(--blanco); font: 600 12px/1.2 var(--font-texto); pointer-events: none;
}

/* ---------- Ventana (dialog) ---------- */
.dialogo { width: min(960px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--radio-lg); background: var(--blanco); color: var(--texto); box-shadow: 0 30px 80px rgba(0, 20, 45, .45); }
.dialogo::backdrop { background: rgba(0, 30, 60, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialogo[open] { animation: dialogo-entra .3s var(--ease-salida); }
@keyframes dialogo-entra { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.dialogo__caja { display: flex; flex-direction: column; gap: 14px; padding: 16px; max-height: inherit; overflow: auto; }
.dialogo__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialogo__cabeza h2 { font-size: 18px; line-height: 1.25; }
.dialogo__cerrar { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fondo-neutro); color: var(--azul-profundo); cursor: pointer; }
.dialogo__cerrar svg { width: 22px; height: 22px; }
.dialogo__cerrar:hover { background: var(--celeste-claro); }
.dialogo img { width: 100%; height: auto; border-radius: var(--radio-sm); }
.dialogo__nota { font-size: 15px; color: var(--texto-suave); }
@media (min-width: 760px) { .dialogo__caja { padding: 24px; } .dialogo__cabeza h2 { font-size: 22px; } }
body.dialogo-abierto { overflow: hidden; }
