/* =====================================================================
   Bloque «Moof Active» en la home de moofclinic.com (28-10-2026, v4)
   Una sola escena compacta y centrada: título, tres tarjetas que salen
   de un mazo al hacer scroll (animación ligada al scroll) y botones.
   Debajo, una tira de fotos baja. Funde con el blanco de los vecinos.
   ===================================================================== */
.mah {
  --mah-azul: #03689D; --mah-osc: #024e77; --mah-cielo: #73B0ED;
  --mah-tinta: #333; --mah-linea: #d6e5f0; --mah-ease: cubic-bezier(.2, .7, .2, 1);
  position: relative; overflow-x: clip; padding: 14px 0 40px; font-family: "Lato", sans-serif; color: rgba(0, 0, 0, .75);
  background: linear-gradient(180deg, #fff 0%, #F1F7FC 20%, #EAF3FA 55%, #F5F9FD 88%, #fff 100%);
}
.mah *, .mah *::before, .mah *::after { box-sizing: border-box; }
.mah-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Escena */
.mah-escena { padding: 20px 0 0; }
.mah-cab { text-align: center; max-width: 680px; margin: 0 auto; }
.mah a.mah-logo { display: inline-block; }
.mah-logo img { width: 132px; height: auto; display: block; }
.mah h2.mah-titulo { margin: 14px 0 0; font: 600 40px/1.15 "Lato", sans-serif; color: var(--mah-tinta); letter-spacing: -.01em; text-wrap: balance; }
.mah-hl { position: relative; display: inline-block; color: var(--mah-azul); }
.mah-hl svg { position: absolute; left: -2%; bottom: -11px; width: 104%; height: 16px; overflow: visible; }
.mah-hl path { fill: none; stroke: var(--mah-cielo); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; transition: stroke-dashoffset 1.3s var(--mah-ease) .3s; }
.mah.is-in .mah-hl path, .mah:not(.mah--js) .mah-hl path { stroke-dashoffset: 0; }
.mah-texto { margin: 18px auto 0; max-width: 600px; font-size: 15.5px; line-height: 1.65; text-wrap: balance; }
.mah-texto strong { color: var(--mah-tinta); font-weight: 700; }

/* Tarjetas */
.mah-razones { list-style: none; margin: 30px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; }
.mah-razon { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(3, 104, 157, .05), 0 18px 40px rgba(3, 104, 157, .13); will-change: transform; transform-origin: 50% 60%; }
.mah-razon__foto { display: block; height: 132px; overflow: hidden; background: #e3edf5; }
.mah-razon__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mah-razon__cuerpo { display: block; padding: 16px 18px 18px; text-align: left; }
.mah-razon__num { display: block; font-size: 42px; line-height: 1; font-weight: 300; color: var(--mah-azul); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mah-razon__t { display: block; margin-top: 8px; font-size: 16.5px; font-weight: 700; color: var(--mah-tinta); }
.mah-razon__txt { display: block; margin-top: 5px; font-size: 13.5px; line-height: 1.55; color: rgba(0, 0, 0, .6); }
.mah-razon__info { display: block; }
.mah-razon__corto { display: none; }

/* Barra recogida: botones + tiendas */
.mah-dock { display: flex; align-items: center; justify-content: center; width: max-content; max-width: 100%; margin: 18px auto 0; padding: 7px 8px 7px 7px; gap: 18px;
  background: rgba(255, 255, 255, .92); border: 1px solid #e1edf6; border-radius: 26px; box-shadow: 0 14px 34px rgba(3, 104, 157, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mah-dock__acc { display: flex; align-items: center; gap: 18px; padding-right: 18px; border-right: 1px solid #e1edf6; }
.mah-dock__apps { display: flex; align-items: center; gap: 8px; }
.mah a.mah-tienda { position: relative; display: block; line-height: 0; border-radius: 8px; transition: transform .3s var(--mah-ease), opacity .3s; }
.mah a.mah-tienda img { height: 40px; width: auto; display: block; }
.mah a.mah-tienda:hover { transform: translateY(-2px); }
.mah a.mah-tienda.is-pronto img { opacity: .55; filter: grayscale(.4); }
.mah a.mah-tienda em { position: absolute; top: -8px; right: -6px; padding: 3px 7px; border-radius: 99px; background: var(--mah-azul); color: #fff;
  font: 700 9.5px/1.2 "Lato", sans-serif; font-style: normal; letter-spacing: .04em; white-space: nowrap; line-height: 1.2; }
.mah a.mah-btn { display: inline-block; padding: 12px 22px; border-radius: 20px; background: var(--mah-azul); color: #fff; font: 700 15.5px/1.2 "Lato", sans-serif; text-decoration: none;
  transition: background .3s, transform .3s var(--mah-ease); }
.mah a.mah-btn:hover, .mah a.mah-btn:focus-visible { background: var(--mah-osc); color: #fff; transform: translateY(-2px); }
.mah a.mah-enlace { display: inline-flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 700; color: var(--mah-azul); text-decoration: none; padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .4s var(--mah-ease); }
.mah a.mah-enlace:hover, .mah a.mah-enlace:focus-visible { background-size: 100% 1.5px; color: var(--mah-azul); }
.mah a.mah-enlace svg { transition: transform .3s var(--mah-ease); }
.mah a.mah-enlace:hover svg { transform: translateX(4px); }
.mah a:focus-visible { outline: 2px solid var(--mah-azul); outline-offset: 4px; }

/* Escena fija (JS + sin «reducir movimiento»): el mazo se reparte según el scroll */
.mah--pin .mah-pin { height: calc(var(--esc-h, 600px) + 95vh); height: calc(var(--esc-h, 600px) + 95svh); }
.mah--pin .mah-escena { position: sticky; top: var(--esc-top, 90px); padding: 0; }

/* Entrada del título y botones */
.mah--js .mah-cab { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--mah-ease), transform .9s var(--mah-ease); }
.mah.is-in .mah-cab { opacity: 1; transform: none; }

/* Tira de fotos con pie */
.mah-cinta { margin-top: 30px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.mah-pista { display: flex; align-items: flex-start; gap: 16px; width: max-content; animation: mah-cinta 80s linear infinite; }
.mah-cinta:hover .mah-pista, .mah-cinta:focus-within .mah-pista { animation-play-state: paused; }
@keyframes mah-cinta { to { transform: translateX(calc(-50% - 8px)); } }
.mah a.mah-foto { flex: none; display: block; width: 150px; text-decoration: none; color: inherit; }
.mah a.mah-foto--h { width: 300px; }
.mah-foto__img { display: block; height: 210px; border-radius: 6px; overflow: hidden; background: #e3edf5; }
.mah-foto__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s var(--mah-ease); }
.mah a.mah-foto:hover .mah-foto__img img { transform: scale(1.05); }
.mah-foto__pie { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; font-size: 12px; color: rgba(0, 0, 0, .5); }
.mah-foto__pie b { font-size: 13.5px; font-weight: 700; color: var(--mah-tinta); }
.mah-foto__pie::before { content: ""; width: 14px; height: 1px; background: var(--mah-azul); align-self: center; transition: width .4s var(--mah-ease); }
.mah a.mah-foto:hover .mah-foto__pie::before { width: 24px; }

@media (max-width: 1024px) {
  .mah h2.mah-titulo { font-size: 34px; }
  .mah-razon__foto { height: 120px; }
  .mah-razon__num { font-size: 36px; }
}
@media (max-width: 767px) {
  .mah { padding: 6px 0 34px; }
  .mah-logo img { width: 104px; }
  .mah h2.mah-titulo { font-size: 25px; margin-top: 10px; }
  .mah-hl svg { bottom: -8px; height: 12px; }
  .mah-texto { font-size: 13.5px; line-height: 1.5; margin-top: 10px; }
  .mah-razones { grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .mah-razon { flex-direction: row; align-items: stretch; border-radius: 14px; }
  .mah-razon__foto { width: 70px; height: auto; flex: none; position: relative; }
  .mah-razon__foto img { position: absolute; inset: 0; }
  .mah-razon__cuerpo { min-height: 66px; }
  .mah-razon__cuerpo { display: flex; align-items: center; gap: 14px; padding: 12px 14px; flex: 1; min-width: 0; }
  .mah-razon__num { font-size: 30px; width: 58px; flex: none; white-space: nowrap; }
  .mah-razon__t { margin-top: 0; font-size: 15px; }
  .mah-razon__txt { display: none; }
  .mah-razon__corto { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: rgba(0, 0, 0, .58); }
  /* En móvil: sin caja, como en una app — dos botones a todo el ancho y las tiendas debajo */
  .mah-dock { flex-direction: column; gap: 14px; width: 100%; margin-top: 18px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mah-dock__acc { flex-direction: column; align-items: stretch; width: 100%; gap: 10px; padding: 0; border: 0; }
  .mah a.mah-btn { display: block; width: 100%; padding: 15px 18px; border-radius: 16px; text-align: center; font-size: 15.5px; box-shadow: 0 12px 26px rgba(3, 104, 157, .22); }
  .mah a.mah-enlace { justify-content: center; width: 100%; padding: 14px 18px; border-radius: 16px; background: #fff; border: 1.5px solid #cfe2f1; font-size: 15.5px; }
  .mah a.mah-enlace:hover, .mah a.mah-enlace:focus-visible { background: #fff; border-color: var(--mah-azul); }
  .mah-dock__apps { gap: 12px; }
  .mah a.mah-tienda img { height: 40px; }
  .mah-cinta { margin-top: 24px; }
  .mah--pin .mah-pin { height: calc(var(--esc-h, 600px) + 80svh); }
  .mah-pista { gap: 12px; animation-duration: 60s; }
  @keyframes mah-cinta { to { transform: translateX(calc(-50% - 6px)); } }
  .mah a.mah-foto { width: 120px; } .mah a.mah-foto--h { width: 240px; }
  .mah-foto__img { height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  .mah-pista { animation: none; }
  .mah-cinta { overflow-x: auto; }
  .mah-hl path, .mah--js .mah-cab { transition: none; }
}
