/* Ajustes para celular. El diseño va en línea; aquí se reacomoda lo que en pantalla chica no funciona. */
html,body{overflow-x:hidden}
@supports (overflow-x:clip){html,body{overflow-x:clip}}
img{max-width:100%}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

@media (max-width: 640px){
  /* ---------- Barras superiores ---------- */
  nav .nav-link{display:none !important}
  #dc-root nav .btn-comprar{display:none !important}

  /* ---------- Botones ---------- */
  #dc-root .btn-comprar{max-width:100% !important;flex-shrink:1 !important;white-space:normal !important;text-align:center;justify-content:center}
  #dc-root a[style*="min-height: 66px"]{padding-left:26px !important;padding-right:26px !important;font-size:17px !important;width:100%;justify-content:center}

  /* Botón flotante de WhatsApp: en celular solo el círculo */
  a[aria-label^="¿Tienes dudas?"]{width:60px !important;height:60px !important;min-height:0 !important;padding:0 !important;gap:0 !important;justify-content:center !important;right:14px !important;bottom:calc(14px + env(safe-area-inset-bottom)) !important}
  a[aria-label^="¿Tienes dudas?"] > span:last-child{display:none !important}
  a[aria-label^="¿Tienes dudas?"] > span:first-child{width:38px !important;height:38px !important}
  a[aria-label^="¿Tienes dudas?"] > span:first-child img{width:38px !important;height:38px !important}
  a[aria-label^="¿Tienes dudas?"] .punto-vivo{width:22px !important;height:22px !important;top:-9px !important;right:-11px !important;border:2px solid #111111 !important;background:#25D366 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFFFFF'%3E%3Cpath d='M12 4C7.6 4 4 7 4 10.8c0 2.1 1.1 4 2.9 5.2L6.3 20l4-2.3c.6.1 1.1.1 1.7.1 4.4 0 8-3 8-6.9S16.4 4 12 4z'/%3E%3C/svg%3E") no-repeat center/13px 13px !important;box-sizing:border-box;animation:none !important}

  /* ---------- Portada ---------- */
  header#inicio{min-height:calc(100svh - 70px) !important}
  header#inicio .entra.e4{flex-direction:column;align-items:stretch;width:100%;max-width:340px}
  header#inicio .entra.e4 a{justify-content:center}
  header#inicio .entra.e5{flex-wrap:wrap;justify-content:center;font-size:13px !important;row-gap:2px}

  /* ---------- Planes (página principal): carrusel con protagonista ---------- */
  #planes{padding-top:24px !important;padding-bottom:0 !important}
  #t-15{margin-bottom:10px !important}
  #pista-planes{--w:84vw !important;--h:330px !important;padding-top:6px !important;padding-bottom:26px !important}
  #planes div:has(> div[aria-label="Planes"]){margin-top:-18px !important;gap:0 !important}
  #planes div:has(> div[aria-label="Planes"]) > a{min-height:34px !important}
  #planes div:has(> div[aria-label="Planes"]) > p{margin-top:2px !important}
  #como-funciona{padding-top:4px !important}
  #t-como{margin-bottom:16px !important}
  #pista-planes .tarjeta-plan{padding:20px 18px 18px !important}
  #pista-planes div[style*="margin: -30px -26px"]{margin:-24px -18px 4px !important;font-size:11px !important}
  #pista-planes span[style*="-webkit-text-stroke"]{display:none !important}

  /* ---------- Comunidad: se desliza con el dedo ---------- */
  .flecha-carrusel{display:none !important}
  #pista-comu{gap:12px !important;scroll-padding-left:0}
  #pista-comu .foto-comu{flex:0 0 78% !important;min-width:0 !important}

  /* ---------- Carruseles: aviso de que se deslizan ---------- */
  #dc-root div:has(> div[aria-label="Planes"])::before,#dc-root div:has(> #pista-conoce)::after,#dc-root div:has(> #pista-comu)::after,#dc-root div:has(> #pista-hab)::before{content:"Desliza para ver más";display:block;width:max-content;margin:16px 0 0;padding-right:28px;font-family:Poppins,sans-serif;font-size:11px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;line-height:20px;color:#5A5A55;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23BD1D1D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat right 4px center/18px 18px;animation:desliza-aviso 1.6s ease-in-out infinite}
  #dc-root div:has(> div[aria-label="Planes"])::before{margin:0}
  #dc-root div:has(> #pista-hab)::before{margin:-14px 0 14px}
  @keyframes desliza-aviso{0%,100%{background-position:right 6px center}50%{background-position:right 0 center}}

  /* ---------- Fisioterapia: más compacta ---------- */
  #dc-root:has(#t-serv) header > div[style*="padding: 88px"]{padding:44px 20px 36px !important;gap:12px !important}
  #dc-root:has(#t-serv) header h1{font-size:34px !important}
  #dc-root:has(#t-serv) header p{font-size:16px !important}
  #dc-root:has(#t-serv) a[style*="min-height: 66px"]{min-height:50px !important;padding:12px 20px !important;font-size:16px !important}
  #dc-root:has(#t-serv) main{padding-top:24px !important;padding-bottom:56px !important;gap:40px !important}
  #dc-root:has(#t-serv) main h2{font-size:26px !important}
  section[aria-labelledby="t-serv"],section[aria-labelledby="t-consul"],section[aria-labelledby="t-pasos"]{gap:16px !important}
  section[aria-labelledby="t-serv"] > div{grid-template-columns:1fr 1fr !important;gap:10px !important}
  #dc-root .servicio{padding:16px 14px !important;gap:6px !important;border-radius:18px !important}
  #dc-root .servicio > span{font-size:26px !important}
  #dc-root .servicio h3{font-size:15.5px !important;line-height:1.25 !important}
  #dc-root .servicio p{font-size:13px !important;line-height:1.5 !important}
  section[aria-labelledby="t-zonas"],section[aria-labelledby="t-quien"],section[aria-labelledby="t-cta"]{padding:22px 18px !important;gap:16px !important;border-radius:22px !important}
  section[aria-labelledby="t-zonas"] li{padding:7px 14px !important;font-size:13.5px !important}
  section[aria-labelledby="t-zonas"] ul{gap:8px !important}
  section[aria-labelledby="t-consul"] > div:last-child{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important}
  section[aria-labelledby="t-consul"] figure{border-radius:14px !important}
  section[aria-labelledby="t-quien"] > div[aria-hidden="true"]{width:72px !important;height:72px !important;font-size:26px !important}
  #t-quien{font-size:22px !important}
  section[aria-labelledby="t-quien"] p{font-size:15px !important}
  section[aria-labelledby="t-pasos"] ol{gap:10px !important}
  section[aria-labelledby="t-pasos"] li{padding:18px 18px !important;gap:6px !important;border-radius:18px !important}
  section[aria-labelledby="t-pasos"] li h3{font-size:17px !important}
  section[aria-labelledby="t-pasos"] li p{font-size:14px !important}
  section[aria-labelledby="t-pasos"] li > span{height:32px !important;width:32px !important;font-size:14px !important}
  #t-cta{font-size:24px !important}

  /* ---------- Instalaciones: 2 columnas ---------- */
  #pista-inst{grid-template-columns:1fr 1fr !important;gap:10px !important}
  #pista-inst > div{aspect-ratio:1 / 1 !important;border-radius:16px !important}

  /* ---------- Secciones en general ---------- */
  #metas > div{padding:64px 22px !important;gap:36px !important}
  #metas li{padding:16px 20px !important;font-size:17px !important}
  section[id]{scroll-margin-top:64px}

  /* ---------- Reseñas ---------- */
  #resenas{padding:64px 16px 72px !important}
  #resenas > div:first-child{padding:28px 22px !important;gap:28px !important}
  #resenas a[aria-label^="Calificación"]{flex:1 1 100% !important;min-width:0 !important;padding:28px 20px !important}
  #resenas > div:first-child a{justify-content:center}
  #resenas > div:first-child > div a{flex:1 1 100%}

  /* ---------- Llamado final "Empieza hoy" ---------- */
  #dc-root div[style*="padding: 40px 36px"]{padding:30px 22px !important}
  #dc-root div[style*="padding: 40px 36px"] .btn-rojo{align-self:stretch !important;justify-content:center;padding-left:20px !important;padding-right:20px !important}
}

@media (prefers-reduced-motion: reduce){#dc-root div:has(> div[aria-label="Planes"])::before,#dc-root div:has(> #pista-conoce)::after,#dc-root div:has(> #pista-comu)::after,#dc-root div:has(> #pista-hab)::before{animation:none !important}}
