// Shared header — sticky nav with mega-dropdown for Productos function Header({ active }) { const [scrolled, setScrolled] = useState(false); const [open, setOpen] = useState(null); // 'productos' | 'sectores' | null const [mobile, setMobile] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 8); window.addEventListener('scroll', onScroll); return () => window.removeEventListener('scroll', onScroll); }, []); const link = (label, href, key) => ( e.currentTarget.style.background = 'var(--surface-subtle)'} onMouseLeave={e => e.currentTarget.style.background = 'transparent'}> {label} ); const dropTrigger = (label, key, allHref) => (
setOpen(key)} onMouseLeave={() => setOpen(null)}> { if (!allHref) e.preventDefault(); }} style={{ display: 'flex', alignItems: 'center', gap: 4, background: 'transparent', border: 0, color: 'var(--fg-strong)', fontWeight: 500, fontSize: 14, padding: '8px 12px', borderRadius: 8, cursor: 'pointer', fontFamily: 'inherit', textDecoration: 'none', }}> {label} {open === key && key === 'productos' && } {open === key && key === 'sectores' && }
); return (
Iniciar sesión Sobre nosotros
{mobile && setMobile(false)}/>}
); } function ProductosMenu() { const items = [ { icon: 'file', title: 'Facturación', desc: 'Verifactu, cobros, bancos, proyectos y CRM', href: '/software-facturacion-cloud/', color: 'var(--brand-primary)' }, { icon: 'clock', title: 'Control horario', desc: 'Fichajes, vacaciones, contratos', href: '/software-control-horario/', color: '#16A34A' }, { icon: 'whatsapp', title: 'Fichaje por WhatsApp', desc: 'Tu equipo ficha respondiendo a un mensaje', href: '/fichaje-por-whatsapp/', color: '#25D366' }, { icon: 'sparkle', title: 'Inteligencia artificial', desc: 'OCR, conciliación, asistente', href: '/erp-con-ia/', color: '#7C3AED' }, { icon: 'message', title: 'Agentes IA por WhatsApp', desc: 'Citas, gastos, atención 24/7', href: '/agentes-whatsapp-para-pymes/', color: '#25D366' }, ]; return (
{items.map(it => ( e.currentTarget.style.background = 'var(--surface-subtle)'} onMouseLeave={e => e.currentTarget.style.background = 'transparent'}>
{it.title}
{it.desc}
))}
); } function SectoresMenu() { const sectors = [ ['Construcción', '/software-gestion-empresas-construccion/'], ['Jardinería', '/software-gestion-empresas-jardineria-mantenimiento/'], ['Industria & oficios', '/software-gestion-industriales-carpinteria-fontaneria-electricidad-herreria/'], ['Servicios profesionales', '/software-gestion-servicios-profesionales-abogados-consultores-asesorias/'], ['Retail', '/software-gestion-tiendas-retail/'], ['Marketing & diseño', '/software-gestion-agencias-marketing-diseno/'], ['Marina', '/software-gestion-empresas-nautica/'], ['Asesorías', '/asesorias/'], ]; return (
SECTORES
{sectors.map(([label, href]) => ( e.currentTarget.style.background = 'var(--surface-subtle)'} onMouseLeave={e => e.currentTarget.style.background = 'transparent'}> {label} ))}
Ver todos los sectores
); } function MobileMenu({ close }) { return (
{[ ['Facturación', '/software-facturacion-cloud/'], ['Control horario', '/software-control-horario/'], ['IA', '/erp-con-ia/'], ['Sectores', '/sectores/'], ['Precios', '/precios/'], ].map(([label, href]) => ( {label} ))}
Sobre nosotros
); } window.Header = Header;