// Top nav — minimal, sticky, blurred — mobile-responsive const NAV_LINKS = [ { id: "services", label: "Services", labelBn: "সার্ভিস", url: "#/services" }, { id: "case-studies", label: "Case Studies", labelBn: "কেস স্টাডি", url: "#/case-studies" }, { id: "pricing", label: "Pricing", labelBn: "মূল্য", url: "#/pricing" }, { id: "blog", label: "Blog", labelBn: "ব্লগ", url: "#/blog" }, { id: "contact", label: "Contact", labelBn: "যোগাযোগ", url: "#/contact" }, ] const NAV_TXT = { en: { search: "Search", getQuote: "Get a Quote", clientLogin: "Client Login" }, bn: { search: "খুঁজুন", getQuote: "কোট নিন", clientLogin: "ক্লায়েন্ট লগইন" }, }; const Nav = ({ onCmdK, theme, onToggleTheme, accent, lang, onToggleLang, route }) => { const [scrolled, setScrolled] = React.useState(false); const [menuOpen, setMenuOpen] = React.useState(false); const links = NAV_LINKS; const t = NAV_TXT[lang] || NAV_TXT.en; const bn = lang === "bn"; React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 12); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); return ( <> {/* Mobile drawer */} {menuOpen && (
{links.map(l => ( setMenuOpen(false)} style={{ fontSize: 15, color: "var(--text-dim)", padding: "12px 4px", textDecoration: "none", display: "block", borderBottom: "1px solid var(--line)", }} >{bn && l.labelBn ? l.labelBn : l.label} ))}
setMenuOpen(false)} style={{ padding: "8px 14px", background: "transparent", border: "1px solid var(--line)", borderRadius: 8, color: "var(--text-dim)", fontSize: 13, textDecoration: "none", }} >{t.getQuote} setMenuOpen(false)} style={{ padding: "8px 14px", background: "var(--text)", color: "var(--bg)", fontSize: 13, fontWeight: 500, borderRadius: 8, textDecoration: "none", }} >{t.clientLogin}
)} ); }; window.Nav = Nav;