/* Efectos compartidos de las páginas web de ejemplo */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
img { max-width: 100%; }

/* Aparición al hacer scroll */
html.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); will-change: opacity, transform; }
html.js [data-reveal="left"] { transform: translateX(-46px); }
html.js [data-reveal="right"] { transform: translateX(46px); }
html.js [data-reveal="zoom"] { transform: scale(.92); }
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal].in { opacity: 1; transform: none; }

/* Barra de progreso de lectura */
#fx-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--fx, #2563eb); z-index: 10000; transition: width .12s linear; box-shadow: 0 0 10px var(--fx, #2563eb); }

/* Volver arriba */
.fx-top { position: fixed; right: 1.1rem; bottom: 5.4rem; width: 2.8rem; height: 2.8rem; border-radius: 50%; border: none; background: var(--fx, #2563eb); color: #fff; font-size: 1.2rem; z-index: 9990; cursor: pointer; opacity: 0; transform: translateY(14px); pointer-events: none; transition: .3s; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.fx-top.show { opacity: 1; transform: none; pointer-events: auto; }
.fx-top:hover { transform: translateY(-3px); }

/* Galería con zoom */
.fx-lb { position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 9998; display: none; place-items: center; padding: 2rem; cursor: zoom-out; }
.fx-lb.open { display: grid; }
.fx-lb img { max-width: 100%; max-height: 88vh; border-radius: .6rem; animation: fxzoom .35s cubic-bezier(.2,.7,.2,1); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.fx-lb button { position: absolute; top: 1.2rem; right: 1.4rem; background: none; border: none; color: #fff; font-size: 2.2rem; cursor: pointer; }
[data-lightbox] img { cursor: zoom-in; }
@keyframes fxzoom { from { transform: scale(.88); opacity: 0; } }

/* Cinta de texto infinita */
.fx-marquee { overflow: hidden; }
.fx-marquee .track { display: flex; gap: 3.5rem; white-space: nowrap; width: max-content; animation: fxm 32s linear infinite; }
.fx-marquee:hover .track { animation-play-state: paused; }
@keyframes fxm { to { transform: translateX(-50%); } }

/* Utilidades de movimiento */
.fx-float { animation: fxf 6s ease-in-out infinite; }
.fx-float.d2 { animation-delay: -2s; } .fx-float.d3 { animation-delay: -4s; }
@keyframes fxf { 50% { transform: translateY(-14px); } }
.fx-pulse { animation: fxp 2.4s ease-in-out infinite; }
@keyframes fxp { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 50% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } }
.fx-tilt { transition: transform .25s ease; transform-style: preserve-3d; will-change: transform; }
.fx-shine { position: relative; overflow: hidden; }
.fx-shine::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-20deg); transition: left .7s; }
.fx-shine:hover::after { left: 130%; }
.fx-cursor { caret-color: currentColor; border-right: 2px solid currentColor; padding-right: 3px; animation: fxcaret .8s steps(1) infinite; }
@keyframes fxcaret { 50% { border-color: transparent; } }

/* Confeti */
.fx-conf { position: fixed; width: 9px; height: 14px; z-index: 10001; pointer-events: none; border-radius: 2px; animation: fxc 1.7s cubic-bezier(.2,.6,.3,1) forwards; }
@keyframes fxc { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* Aviso tipo "toast" */
.fx-toast { position: fixed; left: 50%; bottom: 5.6rem; transform: translate(-50%, 30px); background: #111; color: #fff; padding: .8rem 1.4rem; border-radius: 9999px; font: 500 .9rem system-ui, sans-serif; z-index: 10002; opacity: 0; transition: .35s; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.fx-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* WhatsApp flotante */
.fx-wa { position: fixed; right: 1.1rem; bottom: 1.1rem; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: #25d366; display: grid; place-items: center; z-index: 9991; box-shadow: 0 8px 24px rgba(37,211,102,.45); transition: transform .25s; }
.fx-wa:hover { transform: scale(1.1); }
.fx-wa svg { width: 1.7rem; height: 1.7rem; fill: #fff; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Banner de demo */
.demo-banner { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 9999; background: rgba(10,10,10,.92); backdrop-filter: blur(12px); border: 1px solid rgba(37,99,235,.4); border-radius: 9999px; padding: .5rem .55rem .5rem 1.1rem; display: flex; align-items: center; gap: .8rem; font: 500 .78rem/1.2 system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; color: #fff; white-space: nowrap; max-width: calc(100vw - 1.5rem); box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.demo-banner span { opacity: .6; }
.demo-banner a { background: rgba(255,255,255,.12); padding: .4rem .85rem; border-radius: 9999px; font-weight: 600; color: #fff; text-decoration: none; }
.demo-banner a.cta { background: #2563eb; }
@media (max-width: 680px) { .demo-banner span { display: none; } .fx-top { bottom: 4.6rem; } }

/* ---- Móvil: toques cómodos, texto legible, sin zoom en formularios ---- */
@media (max-width: 768px) {
  button, .btn { min-height: 2.6rem; }
  .dots button, .dt button, .qt button, .hb, .nv, .x, .burger, .fx-top, .stp i, .tg2 button { min-height: 0; }
  footer a { display: inline-block; padding: .55rem .2rem; }
  .qv { display: none !important; }
  small, .tag { font-size: .75rem !important; }
  input, select, textarea { font-size: 16px !important; }
  .chips button, .tabs button, .days button, .times button, .filters button, .opt { min-height: 2.75rem; }
}

/* Evita el desplazamiento horizontal en celular causado por animaciones de aparición que parten fuera de pantalla */
html, body { overflow-x: clip; }
