// 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 (
<>