window.Navigation = ({ theme, setTheme, navigate, onOpenLogin, isAdminLoggedIn, scrolled }) => {
    React.useEffect(() => { lucide.createIcons(); }, []);
    
    // El SVG original de Orbitylab que me enviaste
    const OrbityLogo = ({ className }) => (
        <svg className={className} viewBox="0 0 526.82 125.71" xmlns="http://www.w3.org/2000/svg">
            <defs>
                <linearGradient id="orbity-grad-main" x1="124.2" y1="1.91" x2="7.01" y2="118.34" gradientUnits="userSpaceOnUse">
                    <stop offset="0" stopColor="#7337d5"/>
                    <stop offset="1" stopColor="#3e52d5"/>
                </linearGradient>
                <linearGradient id="orbity-grad-2" x1="78.52" y1="19.84" x2="22.36" y2="75.63" xlinkHref="#orbity-grad-main"/>
                <linearGradient id="orbity-grad-3" x1="105.98" y1="47.46" x2="49.83" y2="103.25" xlinkHref="#orbity-grad-main"/>
                <filter id="orbity-shadow-1" x="26.9" y="27.05" width="86" height="86" filterUnits="userSpaceOnUse"><feOffset dx="1" dy="1"/><feGaussianBlur result="blur" stdDeviation="4"/><feFlood floodColor="#000" floodOpacity=".23"/><feComposite in2="blur" operator="in"/><feComposite in="SourceGraphic"/></filter>
                <filter id="orbity-shadow-2" x="14.9" y="15.05" width="86" height="86" filterUnits="userSpaceOnUse"><feOffset dx="1" dy="1"/><feGaussianBlur result="blur-2" stdDeviation="4"/><feFlood floodColor="#000" floodOpacity=".23"/><feComposite in2="blur-2" operator="in"/><feComposite in="SourceGraphic"/></filter>
            </defs>
            <g>
                <g>
                    <path fill="currentColor" d="M183.14,90.78c-3.97,0-7.65-.69-11.02-2.08s-6.31-3.32-8.81-5.79c-2.5-2.47-4.44-5.37-5.83-8.7-1.39-3.32-2.08-6.92-2.08-10.8s.69-7.51,2.08-10.83c1.39-3.32,3.33-6.22,5.83-8.7,2.5-2.47,5.44-4.4,8.81-5.77s7.05-2.06,11.02-2.06,7.65.7,11.02,2.1c3.37,1.4,6.31,3.35,8.81,5.85,2.5,2.5,4.45,5.4,5.85,8.72s2.1,6.88,2.1,10.7-.7,7.47-2.1,10.8c-1.4,3.32-3.35,6.22-5.85,8.7-2.5,2.47-5.44,4.41-8.81,5.79-3.37,1.39-7.05,2.08-11.02,2.08ZM183.14,81.48c2.47,0,4.77-.42,6.9-1.28,2.12-.85,3.97-2.07,5.55-3.65,1.58-1.59,2.81-3.49,3.69-5.72.89-2.22,1.33-4.7,1.33-7.42,0-3.65-.77-6.83-2.31-9.54s-3.62-4.81-6.26-6.3c-2.64-1.49-5.6-2.23-8.9-2.23-2.47,0-4.77.42-6.88,1.27s-3.96,2.07-5.53,3.66-2.81,3.49-3.69,5.7c-.89,2.21-1.33,4.69-1.33,7.44,0,3.65.77,6.83,2.31,9.54,1.54,2.71,3.62,4.81,6.26,6.3,2.64,1.49,5.59,2.23,8.87,2.23Z"/>
                    <path fill="currentColor" d="M217.89,89.65v-33.29l9.71-6.11v6.79c1.3-2.2,2.92-3.76,4.87-4.69,1.95-.92,4.01-1.39,6.19-1.39.5,0,1.02.03,1.56.08.54.05,1.06.11,1.56.19v10.2c-.78-.25-1.58-.45-2.42-.6-.84-.15-1.67-.22-2.49-.22-2.7,0-4.92.81-6.65,2.42-1.74,1.61-2.61,3.86-2.61,6.73v19.91h-9.71Z"/>
                    <path fill="currentColor" d="M270.07,90.78c-2.45,0-4.66-.36-6.64-1.07-1.97-.71-3.69-1.71-5.14-3s-2.59-2.77-3.41-4.44l3.22-2.29v4.46l-10.42,7.08v-52.86l9.67-4.5v26.54l-2.1-2.17c1.7-2.35,3.76-4.19,6.19-5.53,2.42-1.34,5.25-2.01,8.47-2.01,3.7,0,6.97.89,9.82,2.66,2.85,1.77,5.07,4.16,6.67,7.16s2.4,6.36,2.4,10.08c0,2.88-.46,5.53-1.39,7.97-.93,2.44-2.23,4.54-3.9,6.32-1.67,1.77-3.66,3.15-5.94,4.12-2.29.97-4.79,1.46-7.52,1.46ZM268.27,82.31c2.1,0,3.97-.47,5.62-1.41,1.65-.94,2.94-2.26,3.88-3.96.94-1.7,1.41-3.71,1.41-6.04s-.47-4.37-1.41-6.07c-.94-1.7-2.23-3.01-3.88-3.94-1.65-.92-3.52-1.39-5.62-1.39s-3.97.46-5.62,1.39-2.94,2.24-3.88,3.94c-.94,1.7-1.41,3.72-1.41,6.07s.47,4.34,1.41,6.04,2.23,3.02,3.88,3.96c1.65.94,3.52,1.41,5.62,1.41Z"/>
                    <path fill="currentColor" d="M299.65,45.87c-1.65,0-3.08-.53-4.29-1.59-1.21-1.06-1.82-2.47-1.82-4.22s.61-3.11,1.82-4.16c1.21-1.05,2.64-1.57,4.29-1.57s3.12.52,4.33,1.57,1.82,2.44,1.82,4.16-.61,3.16-1.82,4.22-2.66,1.59-4.33,1.59ZM294.81,89.65v-33.25l9.71-6.15v39.4h-9.71Z"/>
                    <path fill="currentColor" d="M308.79,60v-2.25l9.33-6.37v8.62h-9.33ZM329.67,90.78c-3.85,0-6.9-1.1-9.17-3.3-2.26-2.2-3.39-5.54-3.39-10.01v-36.21h9.71v10.87h9.82v7.87h-9.82v15.56c0,2.4.47,4.09,1.42,5.06s2.25,1.46,3.9,1.46c.85,0,1.66-.1,2.42-.3.76-.2,1.47-.46,2.12-.79v8.43c-1.03.4-2.14.72-3.34.97-1.2.25-2.42.38-3.67.38Z"/>
                    <path fill="currentColor" d="M348.23,106.45c-1.1,0-2.17-.09-3.22-.26s-2.1-.45-3.15-.82v-9.18c.77.45,1.64.8,2.59,1.05.95.25,1.81.38,2.59.38,1.6,0,2.9-.36,3.9-1.09,1-.73,1.76-1.89,2.29-3.49l.97-2.92-14.7-37.98h10.57l9.63,27.85,9.33-27.85h10.31l-15.97,42.32c-1.22,3.07-2.6,5.48-4.12,7.22-1.53,1.74-3.21,2.97-5.06,3.69-1.85.72-3.84,1.09-5.96,1.09Z"/>
                    <path fill="currentColor" d="M400.67,89.65v-52.48h9.86v43.45h23.21l-1.95,9.03h-31.12Z"/>
                    <path fill="currentColor" d="M454.69,90.78c-3.65,0-6.9-.85-9.75-2.55-2.85-1.7-5.09-4.05-6.71-7.05-1.62-3-2.44-6.42-2.44-10.27,0-2.92.47-5.6,1.41-8.02.94-2.42,2.25-4.52,3.94-6.3,1.69-1.77,3.69-3.15,6-4.12,2.31-.97,4.83-1.46,7.55-1.46,3.62,0,6.67.78,9.15,2.32,2.47,1.55,4.32,3.56,5.55,6.04l-3.22,2.85v-4.87l10.38-7.09v39.4h-8.51v-9.33l1.35,2.1c-1.22,2.47-3.07,4.49-5.55,6.04-2.47,1.55-5.52,2.32-9.15,2.32ZM456.16,82.31c2.05,0,3.89-.47,5.51-1.41,1.62-.94,2.91-2.26,3.84-3.96s1.41-3.71,1.41-6.04-.47-4.37-1.41-6.07c-.94-1.7-2.22-3.01-3.84-3.94-1.62-.92-3.46-1.39-5.51-1.39s-3.92.46-5.53,1.39-2.89,2.24-3.82,3.94c-.94,1.7-1.41,3.72-1.41,6.07s.47,4.34,1.41,6.04c.94,1.7,2.21,3.02,3.82,3.96,1.61.94,3.46,1.41,5.53,1.41Z"/>
                    <path fill="currentColor" d="M508.08,90.78c-2.45,0-4.66-.36-6.64-1.07-1.97-.71-3.69-1.71-5.14-3-1.45-1.29-2.59-2.77-3.41-4.44l3.22-2.29v4.46l-10.42,7.08v-52.86l9.67-4.5v26.54l-2.1-2.17c1.7-2.35,3.76-4.19,6.19-5.53s5.25-2.01,8.47-2.01c3.7,0,6.97.89,9.82,2.66,2.85,1.77,5.07,4.16,6.67,7.16,1.6,3,2.4,6.36,2.4,10.08,0,2.88-.46,5.53-1.39,7.97-.92,2.44-2.22,4.54-3.9,6.32-1.67,1.77-3.66,3.15-5.94,4.12-2.29.97-4.79,1.46-7.52,1.46ZM506.28,82.31c2.1,0,3.97-.47,5.62-1.41,1.65-.94,2.94-2.26,3.88-3.96.94-1.7,1.41-3.71,1.41-6.04s-.47-4.37-1.41-6.07c-.94-1.7-2.23-3.01-3.88-3.94s-3.52-1.39-5.62-1.39-3.97.46-5.62,1.39-2.94,2.24-3.88,3.94c-.94,1.7-1.41,3.72-1.41,6.07s.47,4.34,1.41,6.04c.94,1.7,2.23,3.02,3.88,3.96,1.65.94,3.52,1.41,5.62,1.41Z"/>
                </g>
                <g>
                    <path fill="url(#orbity-grad-main)" d="M96.03,0H29.68C13.29,0,0,13.29,0,29.68v66.35c0,16.39,13.29,29.68,29.68,29.68h66.35c16.39,0,29.67-13.29,29.67-29.68V29.68c0-16.39-13.28-29.68-29.67-29.68Z"/>
                    <path fill="url(#orbity-grad-2)" d="M26.08,62.85c0-20.31,16.46-36.77,36.77-36.77,9.33,0,17.85,3.48,24.33,9.2-3.31,2.68-7.42,6.28-12.03,10.52-3.46-2.51-7.71-3.99-12.3-3.99-11.6,0-21.04,9.44-21.04,21.04,0,4.6,1.48,8.85,3.99,12.31-4.24,4.6-7.84,8.72-10.52,12.03-5.73-6.48-9.2-15-9.2-24.34Z"/>
                    <path fill="url(#orbity-grad-3)" d="M88.86,88.86c-6.66,6.66-15.85,10.77-26.01,10.77-9.33,0-17.85-3.47-24.33-9.21,3.31-2.67,7.43-6.27,12.04-10.52,3.46,2.51,7.7,3.99,12.29,3.99,11.6,0,21.04-9.43,21.04-21.04,0-4.59-1.48-8.83-3.99-12.29,4.25-4.61,7.84-8.72,10.53-12.04,5.72,6.48,9.2,15,9.2,24.33,0,10.16-4.12,19.35-10.77,26.01Z"/>
                </g>
                <path fill="#fff" filter="url(#orbity-shadow-1)" d="M99.63,62.85c0,10.16-4.12,19.35-10.77,26.01-6.66,6.66-15.85,10.77-26.01,10.77-9.33,0-17.85-3.47-24.33-9.21,3.31-2.67,7.43-6.27,12.04-10.52,3.46,2.51,7.7,3.99,12.29,3.99,11.6,0,21.04-9.43,21.04-21.04,0-4.59-1.48-8.83-3.99-12.29,4.25-4.61,7.84-8.72,10.53-12.04,5.72,6.48,9.2,15,9.2,24.33Z"/>
                <path fill="#fff" filter="url(#orbity-shadow-2)" d="M87.18,35.28c-3.31,2.68-7.42,6.28-12.03,10.52-3.46-2.51-7.71-3.99-12.3-3.99-11.6,0-21.04,9.44-21.04,21.04,0,4.6,1.48,8.85,3.99,12.31-4.24,4.6-7.84,8.72-10.52,12.03-5.73-6.48-9.2-15-9.2-24.34,0-20.31,16.46-36.77,36.77-36.77,9.33,0,17.85,3.48,24.33,9.2Z"/>
            </g>
        </svg>
    );
    
    // Clases dinámicas dependiendo de si has hecho scroll
    const navClasses = `fixed top-0 w-full z-50 transition-all duration-300 ${scrolled ? 'py-4' : 'py-8'}`;
    const glassClasses = `flex items-center justify-between p-3 rounded-2xl border transition-all glass-card ${
        theme === 'dark' 
            ? (scrolled ? 'bg-black/60 border-white/10 shadow-2xl' : 'bg-transparent border-transparent') 
            : (scrolled ? 'bg-white/80 border-slate-200 shadow-xl' : 'bg-transparent border-transparent text-slate-900')
    }`;

    // Estilos del botón Pro (Blanco y Negro como lo solicitaste)
    const btnProClasses = `px-5 py-2 font-black rounded-xl transition-all text-[10px] uppercase tracking-widest shadow-xl font-brand ${
        theme === 'dark' ? 'bg-white text-black hover:bg-gray-200' : 'bg-slate-900 text-white hover:bg-slate-800'
    }`;

    return (
        <nav className={navClasses}>
            <div className="max-w-7xl mx-auto px-6 text-inherit">
                <div className={glassClasses}>
                    {/* Logo Restaurado */}
                    <div className="flex items-center gap-3 px-2 cursor-pointer text-inherit" onClick={() => navigate('home', '/')}>
                        <OrbityLogo className="h-10 w-auto text-inherit" />
                    </div>
                    
                    <div className="hidden md:flex items-center gap-8 text-inherit">
                        <button onClick={() => navigate('home', '/')} className="text-[10px] font-black uppercase tracking-widest opacity-70 hover:opacity-100 transition-all font-brand">Laboratorio</button>
                        <button onClick={() => navigate('blog-list', '/journal')} className="text-[10px] font-black uppercase tracking-widest opacity-70 hover:opacity-100 transition-all font-brand">Journal</button>
                        
                        <button onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')} className="p-2 rounded-lg hover:bg-white/10 transition-colors">
                            <i data-lucide={theme === 'dark' ? 'sun' : 'moon'} className="w-5 h-5"></i>
                        </button>
                        
                        {/* Botón Pro en Blanco y Negro puro (sin la palabra "Admin") */}
                        <button 
                            onClick={isAdminLoggedIn ? () => navigate('admin-dashboard', '/admin') : onOpenLogin}
                            className={btnProClasses}
                        >
                            Cuenta Pro
                        </button>
                    </div>
                </div>
            </div>
        </nav>
    );
};
