/* global React, Glyphs, Social, useReveal */ // vertical.jsx — Renderer reutilizable de página vertical FersaMedia. // Lee la config en window.__vertical y monta la página completa. const { useState, useEffect } = React; const HOME = 'index.html'; const CONTACT = 'contacto.html'; function VWordmark() { return FERSAMEDIA; } /* ---------- NAV ---------- */ function VNav({ links }) { const [scrolled, setScrolled] = useState(false); const [menu, setMenu] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 24); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); const navLinks = links || [[HOME, 'Inicio'], ['#pilares', 'Enfoque'], ['#servicios', 'Servicios'], ['#planes', 'Planes']]; return (
{navLinks.map(([h, l]) => setMenu(false)}>{l})}
); } /* wrap an emphasis phrase inside a headline string */ function emphasize(text, em) { if (!em || !text.includes(em)) return {text}; const [before, after] = text.split(em); return {before}{em}{after}; } /* ---------- HERO ---------- */ function VHero({ c }) { return (

{c.eyebrow}

{emphasize(c.headline, c.headlineEm)}

{c.subheadline}

{c.ctaButton} {c.heroTiny ? {c.heroTiny} : null}
); } /* ---------- VALUE PROP ---------- */ function VProp({ c }) { if (!c.valueProp) return null; return (

{c.valuePropLead || 'Nuestra propuesta.'} {c.valueProp}

); } /* ---------- PILARES ---------- */ function VPilares({ c }) { return (

Nuestro enfoque

{c.pilaresTitle || 'Tres pilares, un objetivo'}

{c.pilares.map((p, i) =>

{p.name}

{p.desc}

)}
); } /* ---------- SERVICIOS ---------- */ function VServicios({ c }) { return (

Servicios

{c.serviciosTitle || 'Todo lo que necesitas'}

{c.serviciosSub ?

{c.serviciosSub}

: null}
{c.servicios.map((s, i) =>

{s.name}

{Glyphs[s.g] || Glyphs.social}
{s.desc ?

{s.desc}

: null}
)}
); } /* ---------- PLANES ---------- */ function VPlanes({ c }) { if (!c.planes) return null; const p = c.planes; const two = p.cards.length === 2; return (

Planes

{p.title}

{p.subtitle ?

{p.subtitle}

: null}
{p.cards.map((card, i) =>
{card.label ? {card.label} : null}
{card.name}
{card.price}{card.period ? {card.period} : null}

{card.tagline}

    {card.features.map((f, j) =>
  • {f}
  • )}
{card.cta}
)}
{p.note ?

{p.note}

: null}
); } /* ---------- FAQ ---------- */ function VFaq({ c }) { const [open, setOpen] = useState(0); if (!c.faq) return null; return (

Preguntas frecuentes

{c.faqTitle || 'Lo que sueles preguntarte'}

{c.faq.map((f, i) =>

{f.a}

)}
); } /* ---------- OBJECIONES ---------- */ function VObjeciones({ c }) { if (!c.objeciones) return null; return (

Sin rodeos

{c.objecionesTitle || 'Lo que nos dicen, y lo que hacemos'}

El problemaNuestra solución
{c.objeciones.map((o, i) =>
{o.problem}
{o.solution}
)}
); } /* ---------- TESTIMONIO ---------- */ function VTesti({ c }) { if (!c.testimonial) return null; const t = c.testimonial; return (
{t.q}

{t.name} — {t.role}

); } /* ---------- CTA FINAL ---------- */ function VCta({ c }) { return (

{c.ctaTitle || 'Tu próximo cliente está a un clic.'}

{c.ctaButton}
); } /* ---------- FOOTER ---------- */ const VFOOTER = [ { h: 'Sobre nosotros', links: [['Nuestra historia', HOME + '#filosofia'], ['Cómo trabajamos', HOME + '#filosofia'], ['Testimonios', HOME + '#testimonios'], ['Contacto', CONTACT]] }, { h: 'Verticales', links: [['Asesorías y Despachos', 'asesoriasydespachos.html'], ['Salud y Bienestar', 'saludybienestar.html'], ['Fontaneros y Electricistas', 'fontanerosyelectricistas.html']] }, { h: 'Servicios', links: [['SEO Local', HOME + '#servicios'], ['Publicidad de Pago', HOME + '#servicios'], ['Diseño Web', HOME + '#servicios'], ['Reputación Online', HOME + '#servicios'], ['CRM y Automatización', HOME + '#servicios'], ['Redes Sociales', HOME + '#servicios']] }]; function VFooter() { return ( ); } /* ---------- PAGE ---------- */ function VerticalPage() { useReveal(); const c = window.__vertical || {}; return (
); } Object.assign(window, { VerticalPage, VNav, VFooter });