// Top navigation with Limine 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);
}, []);
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 (
<>
LIMINE
PRODUTOS MÉDICOS
{openMobile && (
setOpenMobile(false)}
style={{
position: "fixed",
top: 76, left: 0, right: 0, bottom: 0,
background: "rgba(10,27,54,0.98)",
backdropFilter: "blur(14px)",
WebkitBackdropFilter: "blur(14px)",
zIndex: 99,
padding: "30px 24px",
overflowY: "auto",
}}>
)}
>
);
}
Object.assign(window, { TopNav });