/* floating.jsx — WhatsApp FAB + sticky booking CTA */ function FloatingCTAs({ onBookClick }) { const [show, setShow] = useState(false); useEffect(() => { const onScroll = () => { // Show sticky cta after hero, hide near contact form const y = window.scrollY; const contact = document.getElementById("contacto"); const contactTop = contact ? contact.getBoundingClientRect().top + window.scrollY : Infinity; setShow(y > window.innerHeight * 0.8 && y < contactTop - 200); }; onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); return ( {/* White outer ring — same bubble shape scaled up behind the green */} {/* Green speech-bubble with tail (official silhouette) */} {/* White handset */} ); } Object.assign(window, { FloatingCTAs });