// Top navigation with real Biolife logo + responsive mobile menu. function TopNav() { const [scrolled, setScrolled] = React.useState(false); const [openMobile, setOpenMobile] = React.useState(false); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 30); onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); // Close mobile menu when clicking a link React.useEffect(() => { if (!openMobile) return; document.body.style.overflow = "hidden"; return () => { document.body.style.overflow = ""; }; }, [openMobile]); const links = [ { href: "#empresa", label: "A empresa" }, { href: "#especialidades", label: "Especialidades" }, { href: "#atuacao", label: "Atuação" }, { href: "#estrutura", label: "Estrutura" }, { href: "#contato", label: "Contato" }, ]; return ( <>
Biolife Produtos Médicos {/* Desktop nav */} {/* Mobile hamburger button */}
{/* Mobile menu overlay */} {openMobile && (
setOpenMobile(false)} style={{ position: "fixed", top: 84, left: 0, right: 0, bottom: 0, background: "rgba(255,255,255,0.98)", backdropFilter: "blur(14px)", WebkitBackdropFilter: "blur(14px)", zIndex: 99, padding: "30px 24px", overflowY: "auto", animation: "fadeIn .18s ease", }}>
)} ); } Object.assign(window, { TopNav });