/* global React, Icon, Button, Eyebrow, Badge, Droplets, Container */ const { useState, useEffect, useRef } = React; // ============================================================ // MENU MODEL — mapped to the FRSKO sitemap // ============================================================ const HUES = { leadgen: { soft: 'var(--sub-leadgen-bg)', ink: 'var(--sub-leadgen-1)' }, neuro: { soft: 'var(--sub-neuro-bg)', ink: 'var(--sub-neuro-1)' }, interactive: { soft: 'var(--sub-interactive-bg)', ink: 'var(--sub-interactive-1)' }, academy: { soft: 'var(--sub-academy-bg)', ink: 'var(--sub-academy-1)' }, start: { soft: 'var(--sub-start-bg)', ink: 'var(--sub-start-1)' }, cyan: { soft: 'var(--cyan-50)', ink: 'var(--cyan-800)' }, teal: { soft: 'var(--teal-50)', ink: 'var(--teal-700)' }, yellow: { soft: 'var(--yellow-50)', ink: 'var(--yellow-700)' }, }; // Static export adapter. For the future build, remove these overrides so // links resolve to their clean sitemap routes. const STATIC_ROUTE_OVERRIDES = { '/': '/', }; const HUBSPOT_MEETING_URL = 'https://meetings.hubspot.com/cristian13'; function linkTo(route) { return STATIC_ROUTE_OVERRIDES[route] || route; } const MENU = [ { label: 'Soluciones IA', href: linkTo('/ia'), kind: 'mega', width: 980, eyebrow: 'PRODUCTOS IA', intro: 'IA aplicada al marketing — no como adorno, como motor.', columns: [ { title: 'Disponibles hoy', meta: '6 productos · Live', metaTone: 'cyan', items: [ { label: 'Lead Engine AI', href: linkTo('/ia/lead-engine'), desc: 'El SDR que nunca duerme', icon: 'target', hue: 'leadgen'}, { label: 'NeuroCopy Lab', href: linkTo('/ia/neurocopy-lab'), desc: 'Copy con ciencia, no con suerte', icon: 'brain', hue: 'neuro'}, { label: 'Content Studio AI', href: linkTo('/ia/content-studio'), desc: '60 piezas al mes, mismo costo', icon: 'film', hue: 'interactive'}, { label: 'Smart Ads AI', href: linkTo('/ia/smart-ads'), desc: 'Copiloto para Meta, Google, TikTok',icon: 'zap', hue: 'cyan'}, { label: 'SEO Pulse', href: linkTo('/ia/seo-pulse'), desc: 'SEO + AEO para ChatGPT y Perplexity',icon: 'search', hue: 'academy'}, { label: 'Bootcamps & Workshops',href: linkTo('/ia/bootcamps'), desc: 'Forma a tu equipo en IA', icon: 'graduation', hue: 'start'}, ], }, { title: 'Enterprise', meta: 'Q3 2026 · Próximamente', metaTone: 'neutral', muted: true, items: [ { label: 'Onboarding Claude', href: linkTo('/ia/enterprise/onboarding-claude'), icon: 'sparkles' }, { label: 'AI Strategy Sprint', href: linkTo('/ia/enterprise/ai-strategy-sprint'), icon: 'compass' }, { label: 'Sales Co-Pilot', href: linkTo('/ia/enterprise/sales-copilot'), icon: 'users' }, { label: 'Customer Support AI', href: linkTo('/ia/enterprise/customer-support-ai'), icon: 'message' }, { label: 'Knowledge Q&A', href: linkTo('/ia/enterprise/knowledge-qa'), icon: 'search' }, { label: 'Content Engine', href: linkTo('/ia/enterprise/content-engine'), icon: 'film' }, { label: 'Market Intelligence', href: linkTo('/ia/enterprise/market-intelligence'), icon: 'chart' }, { label: 'Document Automation', href: linkTo('/ia/enterprise/document-automation'), icon: 'clipboard' }, { label: 'AI Training in-company',href: linkTo('/ia/enterprise/ai-training'), icon: 'graduation' }, ], more: 'Ver Enterprise completo', moreHref: linkTo('/ia/enterprise'), }, ], promo: { eyebrow: '5 MIN · GRATIS', title: '¿No sabes por dónde empezar?', body: 'Responde 5 preguntas y te decimos qué solución FRSKO tiene más sentido para tu empresa hoy.', cta: 'Hacer el diagnóstico', href: linkTo('/herramientas/diagnostico-ia'), }, }, { label: 'Servicios', href: linkTo('/servicios'), kind: 'dropdown', items: [ { label: 'Consultoría estratégica', href: linkTo('/servicios/consultoria'), sub: 'FRSKO Start', icon: 'compass', hue: 'start' }, { label: 'Campañas digitales', href: linkTo('/servicios/campanas-digitales'), sub: 'FRSKO Interactive', icon: 'megaphone', hue: 'interactive' }, { label: 'Generación de leads', href: linkTo('/servicios/lead-generation'), sub: 'FRSKO LeadGen', icon: 'target', hue: 'leadgen' }, { label: 'Neuromarketing', href: linkTo('/servicios/neuromarketing'), sub: 'FRSKO Neuro Insights', icon: 'brain', hue: 'neuro' }, ], }, { label: 'Industrias', href: linkTo('/industrias'), kind: 'mega', width: 880, eyebrow: 'POR VERTICAL', intro: 'Llegamos con los playbooks ya probados — los ajustamos a tu caso.', columns: [ { title: 'Verticales MX', meta: 'México · LATAM', metaTone: 'teal', items: [ { label: 'Bienes Raíces', href: linkTo('/industrias/bienes-raices'), icon: 'home' }, { label: 'Retail & E-commerce', href: linkTo('/industrias/retail-ecommerce'), icon: 'shopping' }, { label: 'Fintech & Servicios', href: linkTo('/industrias/fintech'), icon: 'credit-card' }, { label: 'Salud', href: linkTo('/industrias/salud'), icon: 'heart' }, { label: 'Legal', href: linkTo('/industrias/legal'), icon: 'scale' }, { label: 'B2B & SaaS', href: linkTo('/industrias/b2b-saas'), icon: 'server' }, { label: 'Emprendedores', href: linkTo('/industrias/emprendedores'), icon: 'rocket' }, ], }, { title: 'Empresas extranjeras', meta: 'Tu equipo en MX', metaTone: 'cyan', items: [ { label: 'USA y Canadá', href: linkTo('/industrias/empresas-extranjeras/usa-canada'), icon: 'globe', tag: 'EN' }, { label: 'España y Europa', href: linkTo('/industrias/empresas-extranjeras/espana-europa'), icon: 'globe' }, { label: 'LATAM', href: linkTo('/industrias/empresas-extranjeras/latam'), icon: 'globe' }, ], }, ], promo: { eyebrow: 'NEARSHORING', title: 'Marketing en México, sin abrir oficina.', body: 'Equipo bilingüe, ágil y local. Para marcas de USA, Canadá y Europa.', cta: 'Ver propuesta nearshoring', href: linkTo('/en/nearshoring-marketing-partner'), }, }, { label: 'Academy', href: linkTo('/academy'), kind: 'link' }, { label: 'Recursos', href: linkTo('/recursos'), kind: 'dropdown', items: [ { label: 'Blog IA & Marketing', href: linkTo('/blog'), sub: '4 categorías activas', icon: 'message', hue: 'teal' }, { label: 'Guías & whitepapers', href: linkTo('/guias'), sub: 'Pillar pages SEO', icon: 'clipboard', hue: 'cyan' }, { label: 'Herramientas gratis', href: linkTo('/herramientas'), sub: 'Calculadoras y diagnóstico IA', icon: 'sparkles', hue: 'yellow' }, { label: 'Casos de éxito', href: linkTo('/casos-de-exito'), sub: 'Pilotos y resultados', icon: 'chart', hue: 'leadgen' }, ], }, ]; // ============================================================ // MEGA / DROPDOWN PANELS // ============================================================ function MegaPanel({ item, onClose }) { const isMega = item.kind === 'mega'; return (
{isMega ? : }
); } function MegaContent({ item, onClose }) { return (
{item.columns.map((col, i) => ( ))}
); } function MegaColumn({ col, onClose }) { const toneColors = { cyan: { bg: 'var(--cyan-50)', fg: 'var(--cyan-800)' }, teal: { bg: 'var(--teal-50)', fg: 'var(--teal-700)' }, neutral: { bg: 'var(--ink-100)', fg: 'var(--ink-600)' }, }; const tone = toneColors[col.metaTone] || toneColors.teal; return (
{col.title}
{col.meta}
{col.more && ( {col.more} )}
); } function MegaItem({ it, muted, onClose }) { const hue = HUES[it.hue] || HUES.teal; return (
  • { e.currentTarget.style.background = 'var(--ink-50)'; }} onMouseLeave={e => { e.currentTarget.style.background = ''; }}>
    {it.label} {it.tag && {it.tag}}
    {it.desc &&
    {it.desc}
    }
  • ); } function PromoCard({ promo, eyebrow, intro }) { return (
    {promo.eyebrow}

    {promo.title}

    {promo.body}

    {promo.cta}
    ); } function DropdownContent({ item, onClose }) { return (
    Ver todo en {item.label.toLowerCase()} Ir
    ); } // ============================================================ // DESKTOP NAV // ============================================================ function HeaderCtaLink({ children = 'Habla con un estratega', size = 'sm', style, ...props }) { const sizes = { sm: { padding: '9px 14px', fontSize: 13 }, compact: { padding: '8px 12px', fontSize: 12.5 }, md: { padding: '13px 22px', fontSize: 15 }, }; return ( {children} ); } function DesktopNav({ scrolled, compact, openIdx, setOpenIdx, onCta }) { const closeTimer = useRef(null); const open = (i) => { clearTimeout(closeTimer.current); setOpenIdx(i); }; const scheduleClose = () => { clearTimeout(closeTimer.current); closeTimer.current = setTimeout(() => setOpenIdx(null), 120); }; return ( FRSKO
    {compact ? 'Diagnóstico' : 'Diagnóstico gratis'}
    ); } // ============================================================ // MOBILE DRAWER // ============================================================ function MobileNav({ onCta }) { const [open, setOpen] = useState(false); const [exp, setExp] = useState(null); useEffect(() => { document.body.style.overflow = open ? 'hidden' : ''; return () => { document.body.style.overflow = ''; }; }, [open]); const mobileDrawer = open ? (
    setOpen(false)}>
    ) : null; const renderedDrawer = mobileDrawer && typeof ReactDOM !== 'undefined' && ReactDOM.createPortal ? ReactDOM.createPortal(mobileDrawer, document.body) : mobileDrawer; return ( <> FRSKO
    Agenda
    {renderedDrawer} ); } function MobileAccordionBody({ item, onClose }) { if (item.kind === 'dropdown') { return ( ); } // mega return (
    {item.columns.map((col, i) => (
    {col.title}
    {col.meta}
    ))} {item.promo && (
    {item.promo.eyebrow}
    {item.promo.title}
    {item.promo.body}
    {item.promo.cta}
    )}
    ); } // ============================================================ // MAIN HEADER // ============================================================ function Header({ onCta }) { const [scrolled, setScrolled] = useState(false); const [openIdx, setOpenIdx] = useState(null); const [isMobile, setIsMobile] = useState(false); const [compactDesktop, setCompactDesktop] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 20); const onResize = () => { setIsMobile(window.innerWidth < 1180); setCompactDesktop(window.innerWidth < 1320); }; onScroll(); onResize(); window.addEventListener('scroll', onScroll, { passive: true }); window.addEventListener('resize', onResize); return () => { window.removeEventListener('scroll', onScroll); window.removeEventListener('resize', onResize); }; }, []); return (
    {isMobile ? : }
    ); } Object.assign(window, { Header });