
// ═══════════════════════════════════════════════════
//  sections.jsx — Process · Testimonials · FAQ · CTA · Footer · FloatingWA
// ═══════════════════════════════════════════════════
const { useState: useState2, useEffect: useEffect2, useRef: useRef2 } = React;
const useInView2 = window.useInView;

/* ── Process ──────────────────────────────────── */
const ProcessSection = ({ accent }) => {
  const ac = accent || '#0ea5e9';
  const [ref, inView] = useInView2(0.1);
  const steps = [
    { n:'01', title:'Consulta gratuita', desc:'Hablamos sobre tu proyecto y tus metas. Sin compromisos. Entendemos tu negocio antes de proponer cualquier solución.' },
    { n:'02', title:'Propuesta clara', desc:'Recibes un plan detallado con alcance, tiempo de entrega y precio exacto. Sin costos ocultos ni sorpresas.' },
    { n:'03', title:'Desarrollo activo', desc:'Construimos tu proyecto con actualizaciones constantes para que veas el avance en cada etapa del proceso.' },
    { n:'04', title:'Entrega y soporte', desc:'Revisión final, ajustes y lanzamiento. Incluye soporte técnico post-entrega para que todo funcione perfecto.' },
  ];
  return (
    <section id="proceso" ref={ref} style={{ padding:'8rem 2rem', position:'relative' }}>
      {/* diagonal divider top */}
      <div style={{ position:'absolute', top:0, left:0, right:0, height:'60px', background:'rgba(5,9,18,0.4)', clipPath:'polygon(0 0,100% 0,100% 0,0 100%)', pointerEvents:'none' }} />
      <div style={{ maxWidth:'1200px', margin:'0 auto' }}>
        <div style={{ marginBottom:'4rem', opacity:inView?1:0, transform:inView?'none':'translateY(28px)', transition:'all 0.7s ease' }}>
          <div style={{ display:'flex', alignItems:'center', gap:'0.85rem', marginBottom:'0.9rem' }}>
            <div style={{ height:'2px', width:'36px', background:'linear-gradient(90deg,transparent,#4f46e5)' }} />
            <span style={{ fontFamily:'DM Sans,sans-serif', fontSize:'0.8rem', letterSpacing:'0.14em', textTransform:'uppercase', color:'#4f46e5', fontWeight:600 }}>Proceso</span>
          </div>
          <h2 style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:800, fontSize:'clamp(2rem,4vw,3.2rem)', color:'#f0f6ff', letterSpacing:'-0.03em', lineHeight:1.1 }}>
            Así trabajamos<br /><span style={{ color:'#4f46e5' }}>contigo</span>
          </h2>
        </div>
        <div style={{ display:'grid', gridTemplateColumns:'repeat(auto-fit,minmax(230px,1fr))', gap:'0' }}>
          {steps.map((step, i) => (
            <div key={step.n} style={{ padding:'2rem 1.75rem 2rem 0', position:'relative', opacity:inView?1:0, transform:inView?'none':'translateY(28px)', transition:`all 0.7s ease ${i*0.14}s` }}>
              {/* connector line between steps */}
              {i < steps.length - 1 && (
                <div style={{ position:'absolute', top:'2.6rem', left:'calc(1.75rem + 26px)', right:0, height:'1px', background:'linear-gradient(90deg,rgba(79,70,229,0.35),rgba(14,165,233,0.15),transparent)', display:'none' }} className="step-line" />
              )}
              <div style={{ display:'flex', alignItems:'center', gap:'1rem', marginBottom:'1.5rem' }}>
                <div style={{ width:'52px', height:'52px', borderRadius:'50%', border:'1.5px solid rgba(79,70,229,0.4)', background:'rgba(79,70,229,0.07)', display:'flex', alignItems:'center', justifyContent:'center', flexShrink:0 }}>
                  <span style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:800, fontSize:'0.85rem', color:'#4f46e5' }}>{step.n}</span>
                </div>
                {i < steps.length - 1 && (
                  <div className="step-connector" style={{ flex:1, height:'1px', background:'linear-gradient(90deg,rgba(79,70,229,0.3),transparent)' }} />
                )}
              </div>
              <h3 style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:700, fontSize:'1.1rem', color:'#f0f6ff', letterSpacing:'-0.01em', marginBottom:'0.65rem' }}>{step.title}</h3>
              <p style={{ fontFamily:'DM Sans,sans-serif', fontSize:'0.9rem', color:'rgba(240,246,255,0.48)', lineHeight:1.75 }}>{step.desc}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
};

/* ── Testimonials ─────────────────────────────── */
const TestimonialsSection = ({ accent }) => {
  const ac = accent || '#0ea5e9';
  const [ref, inView] = useInView2(0.1);
  const [active, setActive] = useState2(0);
  const items = [
    { name:'Carlos M.', role:'Restaurante · Guatemala', quote:'Gracias a Soluciones Web pasamos a recibir reservas en línea y nuestra presencia en Google se disparó. El bot de WhatsApp maneja más de 50 consultas al día. Totalmente recomendados.', initials:'CM', color:ac },
    { name:'Sofía R.', role:'Boutique de Ropa · Guatemala', quote:'Mi tienda en línea superó todas mis expectativas. Es fácil de administrar, mis clientes la adoran y las ventas aumentaron 40% en el primer mes. Un servicio de primera calidad.', initials:'SR', color:'#4f46e5' },
    { name:'Roberto J.', role:'Servicios Contables · Guatemala', quote:'Profesionalismo y calidad en cada detalle. Entregaron en el tiempo acordado y los ajustes los hicieron sin problema. Ahora tengo una imagen que genera confianza inmediata.', initials:'RJ', color:'#22c55e' },
    { name:'Andrea P.', role:'Clínica Dental · Guatemala', quote:'Tenía miedo de digitalizar mi negocio pero el proceso fue muy sencillo. En menos de una semana tenía mi página lista, con citas en línea y todo. Mis pacientes me lo agradecen.', initials:'AP', color:'#f97316' },
    { name:'Miguel T.', role:'Ferretería · Guatemala', quote:'Nunca pensé que una página web pudiera traerme tantos clientes nuevos. Ahora recibo pedidos por WhatsApp desde la web todos los días. La inversión se pagó sola en el primer mes.', initials:'MT', color:'#a855f7' },
  ];
  useEffect2(() => {
    const iv = setInterval(() => setActive(a => (a+1) % items.length), 5000);
    return () => clearInterval(iv);
  }, []);
  return (
    <section id="testimonios" ref={ref} style={{ padding:'8rem 2rem', background:'rgba(5,9,18,0.55)', position:'relative', overflow:'hidden' }}>
      {/* glow behind */}
      <div style={{ position:'absolute', top:'50%', left:'50%', transform:'translate(-50%,-50%)', width:'600px', height:'300px', background:`radial-gradient(ellipse,${ac}0C,transparent 70%)`, pointerEvents:'none' }} />
      <div style={{ maxWidth:'860px', margin:'0 auto', position:'relative', zIndex:1 }}>
        <div style={{ marginBottom:'4rem', opacity:inView?1:0, transform:inView?'none':'translateY(28px)', transition:'all 0.7s ease' }}>
          <div style={{ display:'flex', alignItems:'center', gap:'0.85rem', marginBottom:'0.9rem' }}>
            <div style={{ height:'2px', width:'36px', background:'linear-gradient(90deg,transparent,#22c55e)' }} />
            <span style={{ fontFamily:'DM Sans,sans-serif', fontSize:'0.8rem', letterSpacing:'0.14em', textTransform:'uppercase', color:'#22c55e', fontWeight:600 }}>Testimonios</span>
          </div>
          <h2 style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:800, fontSize:'clamp(2rem,4vw,3.2rem)', color:'#f0f6ff', letterSpacing:'-0.03em', lineHeight:1.1 }}>
            Lo que dicen<br /><span style={{ color:'#22c55e' }}>nuestros clientes</span>
          </h2>
        </div>
        <div style={{ position:'relative', minHeight:'230px', opacity:inView?1:0, transition:'opacity 0.7s ease 0.2s' }}>
          {items.map((t, i) => (
            <div key={i} style={{
              position: i===0?'relative':'absolute', top:0, left:0, right:0,
              opacity: active===i?1:0, transform:`translateX(${active===i?0:(i>active?28:-28)}px)`,
              transition:'opacity 0.55s ease,transform 0.55s ease', pointerEvents:active===i?'auto':'none',
              background:'rgba(10,17,30,0.82)', border:`1px solid ${t.color}20`, borderRadius:'20px', padding:'2.5rem', backdropFilter:'blur(16px)',
            }}>
              <div style={{ fontFamily:'Georgia,serif', fontSize:'3.5rem', color:t.color, lineHeight:0.8, opacity:0.25, marginBottom:'0.25rem' }}>"</div>
              <p style={{ fontFamily:'DM Sans,sans-serif', fontSize:'1.05rem', color:'rgba(240,246,255,0.78)', lineHeight:1.8, marginBottom:'1.75rem', fontStyle:'italic' }}>{t.quote}</p>
              <div style={{ display:'flex', alignItems:'center', gap:'1rem' }}>
                <div style={{ display:'flex', gap:'2px' }}>
                  {[1,2,3,4,5].map(s=><svg key={s} width="15" height="15" viewBox="0 0 24 24" fill="#f59e0b"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>)}
                </div>
              </div>
            </div>
          ))}
        </div>
        <div style={{ display:'flex', justifyContent:'center', gap:'0.45rem', marginTop:'2rem' }}>
          {items.map((t, i) => (
            <button key={i} onClick={() => setActive(i)} style={{ width:active===i?'22px':'8px', height:'8px', borderRadius:'100px', background:active===i?t.color:'rgba(240,246,255,0.18)', border:'none', cursor:'pointer', transition:'all 0.3s ease', padding:0 }} />
          ))}
        </div>
      </div>
    </section>
  );
};

/* ── FAQ ──────────────────────────────────────── */
const FAQItem2 = ({ faq, isOpen, onToggle, inView, delay, accent }) => {
  const ac = accent || '#0ea5e9';
  const [hov, setHov] = useState2(false);
  return (
    <div onMouseEnter={() => setHov(true)} onMouseLeave={() => setHov(false)} onClick={onToggle} style={{
      background: isOpen?`${ac}08`:hov?'rgba(255,255,255,0.025)':'rgba(10,17,30,0.55)',
      border:`1px solid ${isOpen?ac+'30':'rgba(255,255,255,0.06)'}`, borderRadius:'12px',
      overflow:'hidden', cursor:'pointer', transition:'all 0.3s ease',
      opacity:inView?1:0, transform:inView?'none':'translateY(18px)', transitionDelay:`${delay}s`,
    }}>
      <div style={{ padding:'1.2rem 1.5rem', display:'flex', justifyContent:'space-between', alignItems:'center', gap:'1rem' }}>
        <span style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:600, fontSize:'0.98rem', color:isOpen?ac:'#f0f6ff', flex:1, textWrap:'pretty' }}>{faq.q}</span>
        <div style={{ width:'22px', height:'22px', borderRadius:'50%', background:isOpen?`${ac}22`:'rgba(255,255,255,0.05)', display:'flex', alignItems:'center', justifyContent:'center', flexShrink:0, transition:'all 0.3s' }}>
          <svg width="11" height="11" viewBox="0 0 24 24" fill={isOpen?ac:'rgba(240,246,255,0.45)'} style={{ transform:isOpen?'rotate(45deg)':'rotate(0)', transition:'transform 0.3s' }}><path d="M19 11H13V5h-2v6H5v2h6v6h2v-6h6z"/></svg>
        </div>
      </div>
      <div style={{ maxHeight:isOpen?'220px':'0', overflow:'hidden', transition:'max-height 0.42s ease' }}>
        <p style={{ padding:'0 1.5rem 1.25rem', fontFamily:'DM Sans,sans-serif', fontSize:'0.93rem', color:'rgba(240,246,255,0.55)', lineHeight:1.78 }}>{faq.a}</p>
      </div>
    </div>
  );
};

const FAQSection = ({ accent }) => {
  const ac = accent || '#0ea5e9';
  const [ref, inView] = useInView2(0.1);
  const [open, setOpen] = useState2(null);
  const faqs = [
    { q:'¿Cuánto tiempo tarda un proyecto?', a:'Depende del alcance. Una landing page está lista en 5–7 días hábiles. Un e-commerce completo puede tomar 2–4 semanas. Siempre recibirás una estimación exacta antes de comenzar.' },
    { q:'¿Qué necesito para empezar?', a:'Solo necesitas tener clara la idea de tu negocio. Nosotros te guiamos en todo lo demás: textos, imágenes, colores y estructura. Una consulta gratuita es todo lo que hace falta.' },
    { q:'¿Ofrecen mantenimiento después de la entrega?', a:'Sí. Ofrecemos soporte técnico post-entrega y planes de mantenimiento mensuales con actualizaciones, respaldos y modificaciones menores incluidas.' },
    { q:'¿Puedo pedir cambios durante el desarrollo?', a:'Absolutamente. Trabajamos de forma iterativa: cada etapa se revisa contigo para asegurarnos de que el resultado final sea exactamente lo que necesitas.' },
    { q:'¿Trabajan con clientes de toda Latinoamérica?', a:'Sí, trabajamos 100% de forma remota con clientes de Guatemala y toda Latinoamérica. La comunicación es por WhatsApp y videollamadas cuando se necesite.' },
    { q:'¿Cuáles son los métodos de pago?', a:'Aceptamos transferencia bancaria, depósito, PayPal y criptomonedas (USDT/Binance). El pago se divide: 50% al iniciar y 50% en la entrega final.' },
  ];
  return (
    <section id="faq" ref={ref} style={{ padding:'8rem 2rem', position:'relative' }}>
      <div style={{ maxWidth:'780px', margin:'0 auto' }}>
        <div style={{ marginBottom:'4rem', opacity:inView?1:0, transform:inView?'none':'translateY(28px)', transition:'all 0.7s ease' }}>
          <div style={{ display:'flex', alignItems:'center', gap:'0.85rem', marginBottom:'0.9rem' }}>
            <div style={{ height:'2px', width:'36px', background:`linear-gradient(90deg,transparent,${ac})` }} />
            <span style={{ fontFamily:'DM Sans,sans-serif', fontSize:'0.8rem', letterSpacing:'0.14em', textTransform:'uppercase', color:ac, fontWeight:600 }}>FAQ</span>
          </div>
          <h2 style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:800, fontSize:'clamp(2rem,4vw,3.2rem)', color:'#f0f6ff', letterSpacing:'-0.03em', lineHeight:1.1 }}>
            Preguntas <span style={{ color:ac }}>frecuentes</span>
          </h2>
        </div>
        <div style={{ display:'flex', flexDirection:'column', gap:'0.65rem' }}>
          {faqs.map((f, i) => <FAQItem2 key={i} faq={f} index={i} isOpen={open===i} onToggle={() => setOpen(open===i?null:i)} inView={inView} delay={i*0.07} accent={ac} />)}
        </div>
      </div>
    </section>
  );
};

/* ── CTA Section ──────────────────────────────── */
const CTASection = ({ accent }) => {
  const ac = accent || '#0ea5e9';
  const [ref, inView] = useInView2(0.2);
  return (
    <section ref={ref} style={{ padding:'7rem 2rem', position:'relative', overflow:'hidden' }}>
      {/* skewed bg */}
      <div style={{ position:'absolute', inset:0, background:`linear-gradient(135deg,${ac}0C 0%,#4f46e510 100%)`, clipPath:'polygon(0 7%,100% 0,100% 93%,0 100%)', pointerEvents:'none' }} />
      <div style={{ position:'absolute', top:'10%', left:'50%', transform:'translateX(-50%)', width:'700px', height:'300px', background:`radial-gradient(ellipse,${ac}12,transparent 70%)`, pointerEvents:'none' }} />
      {/* diagonal deco lines */}
      <div style={{ position:'absolute', top:0, left:0, right:0, height:'2px', background:`linear-gradient(90deg,transparent,${ac}30,transparent)` }} />
      <div style={{ position:'absolute', bottom:0, left:0, right:0, height:'2px', background:`linear-gradient(90deg,transparent,${ac}30,transparent)` }} />
      <div style={{ maxWidth:'680px', margin:'0 auto', textAlign:'center', position:'relative', zIndex:2, opacity:inView?1:0, transform:inView?'none':'translateY(36px)', transition:'all 0.8s ease' }}>
        <h2 style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:800, fontSize:'clamp(2.2rem,5vw,3.8rem)', color:'#f0f6ff', letterSpacing:'-0.03em', lineHeight:1.06, marginBottom:'1.25rem', textWrap:'pretty' }}>
          ¿Listo para llevar tu negocio al siguiente nivel?
        </h2>
        <p style={{ fontFamily:'DM Sans,sans-serif', fontSize:'1.05rem', color:'rgba(240,246,255,0.55)', lineHeight:1.75, marginBottom:'2.5rem', maxWidth:'480px', margin:'0 auto 2.5rem' }}>
          Escríbenos hoy y recibe una consulta completamente gratuita. Sin compromisos.
        </p>
        <button onClick={() => window.open('https://wa.me/50255580173?text=Hola%2C%20me%20interesa%20una%20consulta%20gratuita%20sobre%20sus%20servicios','_blank')} style={{ display:'inline-flex', alignItems:'center', gap:'0.75rem', background:`linear-gradient(135deg,${ac},#4f46e5)`, border:'none', color:'#fff', padding:'1.05rem 2.4rem', borderRadius:'12px', fontFamily:'Space Grotesk,sans-serif', fontWeight:700, fontSize:'1.02rem', cursor:'pointer', letterSpacing:'0.01em', boxShadow:`0 12px 40px ${ac}38`, transition:'transform 0.2s,box-shadow 0.2s' }}
          onMouseEnter={e=>{e.currentTarget.style.transform='translateY(-3px)';e.currentTarget.style.boxShadow=`0 20px 60px ${ac}55`;}} onMouseLeave={e=>{e.currentTarget.style.transform='none';e.currentTarget.style.boxShadow=`0 12px 40px ${ac}38`;}}>
          <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51a5.526 5.526 0 00-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg>
          Consulta gratuita por WhatsApp
        </button>
      </div>
    </section>
  );
};

/* ── Footer ───────────────────────────────────── */
const FooterSection = ({ accent }) => {
  const ac = accent || '#0ea5e9';
  const go = (id) => document.querySelector(id)?.scrollIntoView({ behavior:'smooth' });
  return (
    <footer style={{ borderTop:'1px solid rgba(255,255,255,0.04)', background:'rgba(4,7,14,0.98)', padding:'4rem 2rem 2rem' }}>
      <div style={{ maxWidth:'1200px', margin:'0 auto' }}>
        <div className="footer-grid" style={{ display:'grid', gridTemplateColumns:'1.4fr 1fr 1fr', gap:'3rem', marginBottom:'3rem', alignItems:'start' }}>
          <div>
            <div style={{ display:'flex', alignItems:'center', gap:'0.6rem', marginBottom:'1rem', cursor:'pointer' }} onClick={() => go('#hero')}>
              <img src="uploads/logo-1779233943449.png" alt="Soluciones Web" style={{ height:'34px', width:'auto' }} />
              <span style={{ color:'#f0f6ff', fontFamily:'Space Grotesk,sans-serif', fontWeight:700, fontSize:'0.98rem' }}>Soluciones<span style={{ color:ac }}>Web</span></span>
            </div>
            <p style={{ fontFamily:'DM Sans,sans-serif', fontSize:'0.87rem', color:'rgba(240,246,255,0.35)', lineHeight:1.75, maxWidth:'240px' }}>
              Tu aliado en tecnología y desarrollo web. Transformamos ideas en soluciones digitales de alto impacto.
            </p>
          </div>
          <div>
            <p style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:600, fontSize:'0.76rem', letterSpacing:'0.12em', textTransform:'uppercase', color:'rgba(240,246,255,0.25)', marginBottom:'1rem' }}>Navegar</p>
            <div style={{ display:'flex', flexDirection:'column', gap:'0.65rem' }}>
              {[['Servicios','#servicios'],['Proceso','#proceso'],['Testimonios','#testimonios'],['FAQ','#faq']].map(([l,h]) => (
                <button key={h} onClick={() => go(h)} style={{ background:'none', border:'none', padding:0, color:'rgba(240,246,255,0.42)', fontFamily:'DM Sans,sans-serif', fontSize:'0.88rem', cursor:'pointer', textAlign:'left', transition:'color 0.2s' }}
                  onMouseEnter={e=>e.target.style.color=ac} onMouseLeave={e=>e.target.style.color='rgba(240,246,255,0.42)'}>{l}</button>
              ))}
            </div>
          </div>
          <div>
            <p style={{ fontFamily:'Space Grotesk,sans-serif', fontWeight:600, fontSize:'0.76rem', letterSpacing:'0.12em', textTransform:'uppercase', color:'rgba(240,246,255,0.25)', marginBottom:'1rem' }}>Contacto</p>
            <div style={{ display:'flex', flexDirection:'column', gap:'0.65rem' }}>
              <a href="https://wa.me/50255580173" target="_blank" rel="noopener" style={{ color:'rgba(240,246,255,0.42)', fontFamily:'DM Sans,sans-serif', fontSize:'0.88rem', textDecoration:'none', display:'flex', alignItems:'center', gap:'0.5rem', transition:'color 0.2s' }}
                onMouseEnter={e=>e.currentTarget.style.color='#25d366'} onMouseLeave={e=>e.currentTarget.style.color='rgba(240,246,255,0.42)'}>
                <svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51a5.526 5.526 0 00-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg>
                +502 5558-0173
              </a>
              <a href="https://www.instagram.com/solucionesweb2025" target="_blank" rel="noopener" style={{ color:'rgba(240,246,255,0.42)', fontFamily:'DM Sans,sans-serif', fontSize:'0.88rem', textDecoration:'none', display:'flex', alignItems:'center', gap:'0.5rem', transition:'color 0.2s' }}
                onMouseEnter={e=>e.currentTarget.style.color='#e1306c'} onMouseLeave={e=>e.currentTarget.style.color='rgba(240,246,255,0.42)'}>
                <svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/></svg>
                @solucionesweb2025
              </a>
            </div>
          </div>
        </div>
        <div style={{ borderTop:'1px solid rgba(255,255,255,0.04)', paddingTop:'1.5rem', display:'flex', justifyContent:'space-between', alignItems:'center', flexWrap:'wrap', gap:'0.75rem' }}>
          <span style={{ fontFamily:'DM Sans,sans-serif', fontSize:'0.78rem', color:'rgba(240,246,255,0.2)' }}>© 2025 Soluciones Web · Guatemala</span>
          <span style={{ fontFamily:'DM Sans,sans-serif', fontSize:'0.78rem', color:'rgba(240,246,255,0.15)' }}>Diseñado y desarrollado con cuidado</span>
        </div>
      </div>
    </footer>
  );
};

/* ── Floating WhatsApp ────────────────────────── */
const FloatingWhatsApp = () => {
  const [hov, setHov] = useState2(false);
  const [label, setLabel] = useState2(false);
  useEffect2(() => {
    const t1 = setTimeout(() => setLabel(true), 3500);
    const t2 = setTimeout(() => setLabel(false), 8000);
    return () => { clearTimeout(t1); clearTimeout(t2); };
  }, []);
  return (
    <div style={{ position:'fixed', bottom:'1.75rem', right:'1.75rem', zIndex:200, display:'flex', alignItems:'center', gap:'0.7rem' }}>
      <div style={{ background:'rgba(7,11,20,0.92)', border:'1px solid rgba(37,211,102,0.3)', borderRadius:'8px', padding:'0.48rem 0.9rem', fontFamily:'DM Sans,sans-serif', fontSize:'0.82rem', color:'#f0f6ff', backdropFilter:'blur(14px)', whiteSpace:'nowrap', opacity:(label||hov)?1:0, transform:(label||hov)?'translateX(0)':'translateX(8px)', transition:'all 0.3s ease', pointerEvents:'none' }}>
        Escríbenos ahora
      </div>
      <button onClick={() => window.open('https://wa.me/50255580173?text=Hola%2C%20me%20interesa%20conocer%20m%C3%A1s','_blank')}
        onMouseEnter={() => setHov(true)} onMouseLeave={() => setHov(false)}
        style={{ width:'54px', height:'54px', borderRadius:'50%', background:'#25d366', border:'none', display:'flex', alignItems:'center', justifyContent:'center', cursor:'pointer', boxShadow:'0 4px 20px rgba(37,211,102,0.45)', transition:'transform 0.2s,box-shadow 0.2s', transform:hov?'scale(1.1)':'scale(1)', position:'relative' }}>
        <div style={{ position:'absolute', inset:'-7px', borderRadius:'50%', border:'2px solid rgba(37,211,102,0.35)', animation:'pulse-ring 2s ease-out infinite' }} />
        <svg width="26" height="26" viewBox="0 0 24 24" fill="white"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51a5.526 5.526 0 00-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg>
      </button>
    </div>
  );
};

Object.assign(window, { ProcessSection, TestimonialsSection, FAQSection, FAQItem2, CTASection, FooterSection, FloatingWhatsApp });
