// rbd-components.jsx — Header, Footer, PlaceholderImage, useScrollReveal
const { useState, useEffect } = React;

// ── Placeholder Image ─────────────────────────────────────────────────────────
function PlaceholderImage({ label = 'IMAGEM', style = {}, light = false, src = null }) {
  if (src) {
    return (
      <img
        src={src}
        alt={typeof label === 'string' ? label.replace(/\n/g, ' — ') : 'imagem'}
        loading="lazy"
        style={{ width: '100%', height: '100%', objectFit: 'cover', ...style }} />);


  }
  const bg = light ?
  'repeating-linear-gradient(-45deg,#e8e8e8 0,#e8e8e8 1px,#f0f0f0 1px,#f0f0f0 12px)' :
  'repeating-linear-gradient(-45deg,#141414 0,#141414 1px,#1e1e1e 1px,#1e1e1e 12px)';
  return (
    <div style={{
      width: '100%', height: '100%',
      background: bg,
      display: 'flex', alignItems: 'center', justifyContent: 'center',
      overflow: 'hidden',
      ...style
    }}>
      <span style={{
        fontFamily: 'monospace', fontSize: '9px',
        color: light ? '#bbb' : '#2e2e2e',
        letterSpacing: '0.18em', textTransform: 'uppercase',
        textAlign: 'center', padding: '16px', lineHeight: 1.6
      }}>{label}</span>
    </div>);

}

// ── Scroll Reveal Hook ────────────────────────────────────────────────────────
function useScrollReveal() {
  useEffect(() => {
    const observer = new IntersectionObserver(
      (entries) => entries.forEach((e) => {
        if (e.isIntersecting) e.target.classList.add('visible');
      }),
      { threshold: 0.1, rootMargin: '0px 0px -50px 0px' }
    );
    document.querySelectorAll('.reveal').forEach((el) => observer.observe(el));
    return () => observer.disconnect();
  });
}

// ── Social helpers ───────────────────────────────────────────────────────────
function openInstagram() {
  const user = 'rbd_arquitetura';
  const ua = navigator.userAgent;
  if (/iPad|iPhone|iPod/.test(ua)) {
    window.location = `instagram://user?username=${user}`;
    setTimeout(() => window.open(`https://www.instagram.com/${user}/`, '_blank'), 600);
  } else if (/Android/.test(ua)) {
    window.location = `intent://instagram.com/${user}#Intent;package=com.instagram.android;scheme=https;end`;
    setTimeout(() => window.open(`https://www.instagram.com/${user}/`, '_blank'), 600);
  } else {
    window.open(`https://www.instagram.com/${user}/`, '_blank');
  }
}

function openYouTube() {
  window.open('https://www.youtube.com/', '_blank');
}

function openWhatsApp() {
  const phone = '5542988708525'; // +55 (42) 98870-8525
  const msg = encodeURIComponent('Olá! Vim pelo site da RBD Arquitetura e gostaria de mais informações.');
  window.open(`https://wa.me/${phone}?text=${msg}`, '_blank');
}

// ── Header ────────────────────────────────────────────────────────────────────
function Header({ active, navigate }) {
  const [scrolled, setScrolled] = useState(false);
  const [open, setOpen] = useState(false);

  useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 70);
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, []);

  useEffect(() => {
    document.body.style.overflow = open ? 'hidden' : '';
    return () => {document.body.style.overflow = '';};
  }, [open]);

  const nav = [
  ['home', 'HOME'], ['sobre', 'SOBRE'], ['portfolio', 'PORTFÓLIO'],
  ['servicos', 'SERVIÇOS'], ['contato', 'CONTATO']];


  const go = (id) => {navigate(id);setOpen(false);};

  return (
    <>
      <header style={{
        position: 'fixed', top: 0, left: 0, right: 0, zIndex: 1000,
        display: 'flex', alignItems: 'center', justifyContent: 'space-between',
        padding: scrolled ? '14px 64px' : '28px 64px',
        background: scrolled ? 'rgba(0,0,0,0.96)' : 'transparent',
        backdropFilter: scrolled ? 'blur(20px)' : 'none',
        borderBottom: scrolled ? '1px solid rgba(255,255,255,0.06)' : '1px solid transparent',
        transition: 'all 0.55s cubic-bezier(0.22,1,0.36,1)'
      }}>
        {/* Logo */}
        <div style={{ cursor: 'pointer', lineHeight: 0 }} onClick={() => go('home')}>
          <img
            src="logo.png" alt="RBD Arch"
            style={{ height: 48, width: 'auto', objectFit: 'contain', display: 'block' }}
            onError={(e) => {
              e.target.style.display = 'none';
              e.target.nextElementSibling.style.display = 'flex';
            }} />
          
          <span style={{
            display: 'none', alignItems: 'baseline', gap: '3px',
            fontFamily: 'Montserrat,sans-serif'
          }}>
            <span style={{ fontWeight: 900, fontSize: '17px', letterSpacing: '0.28em', color: '#fff' }}>RBD</span>
            <span style={{ fontWeight: 200, fontSize: '17px', letterSpacing: '0.28em', color: 'rgba(255,255,255,0.7)' }}>ARCH</span>
          </span>
        </div>

        {/* Desktop nav */}
        <nav className="desktop-nav" style={{ display: 'flex', gap: '44px', alignItems: 'center' }}>
          {nav.map(([id, label]) =>
          <button key={id} onClick={() => go(id)} style={{
            background: 'none', border: 'none', cursor: 'pointer',
            fontFamily: 'Montserrat,sans-serif', fontWeight: 500,
            fontSize: '10px', letterSpacing: '0.24em',
            color: active === id ? '#fff' : 'rgba(255,255,255,0.45)',
            paddingBottom: '3px',
            borderBottom: active === id ? '1px solid var(--accent,#fff)' : '1px solid transparent',
            transition: 'all 0.25s ease'
          }}
          onMouseEnter={(e) => e.currentTarget.style.color = '#fff'}
          onMouseLeave={(e) => e.currentTarget.style.color = active === id ? '#fff' : 'rgba(255,255,255,0.45)'}>
            {label}</button>
          )}
          {/* Social icons */}
          <div style={{ display: 'flex', gap: '16px', alignItems: 'center', marginLeft: '8px', borderLeft: '1px solid rgba(255,255,255,0.12)', paddingLeft: '28px' }}>
            <button onClick={openInstagram} title="Instagram" style={{
              background: 'none', border: 'none', cursor: 'pointer', padding: '6px',
              color: 'rgba(255,255,255,0.4)', display: 'flex', alignItems: 'center',
              transition: 'color 0.22s ease'
            }}
            onMouseEnter={(e) => e.currentTarget.style.color = '#fff'}
            onMouseLeave={(e) => e.currentTarget.style.color = 'rgba(255,255,255,0.4)'}>
              <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
                <rect x="2" y="2" width="20" height="20" rx="5" ry="5" style={{ stroke: "rgb(255, 255, 255)", opacity: "1", fill: "rgba(253, 253, 253, 0)" }} />
                <circle cx="12" cy="12" r="4.5" style={{ stroke: "rgb(255, 255, 255)" }} />
                <circle cx="17.5" cy="6.5" r="1" fill="currentColor" stroke="none" />
              </svg>
            </button>
            <button onClick={() => window.open('https://www.youtube.com/', '_blank')} title="YouTube" style={{
              background: 'none', border: 'none', cursor: 'pointer', padding: '6px',
              color: 'rgba(255,255,255,0.4)', display: 'flex', alignItems: 'center',
              transition: 'color 0.22s ease'
            }}
            onMouseEnter={(e) => e.currentTarget.style.color = '#fff'}
            onMouseLeave={(e) => e.currentTarget.style.color = 'rgba(255,255,255,0.4)'}>
              <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
                <path d="M22.54 6.42a2.78 2.78 0 00-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46A2.78 2.78 0 001.46 6.42 29 29 0 001 12a29 29 0 00.46 5.58 2.78 2.78 0 001.95 1.96C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 001.95-1.96A29 29 0 0023 12a29 29 0 00-.46-5.58z" style={{ fill: "rgb(222, 9, 9)", stroke: "rgb(255, 255, 255)" }} />
                <polygon points="9.75 15.02 15.5 12 9.75 8.98 9.75 15.02" fill="currentColor" stroke="none" style={{ stroke: "rgb(255, 255, 255)" }} />
              </svg>
            </button>
            <button onClick={openWhatsApp} title="WhatsApp" style={{
              background: 'none', border: 'none', cursor: 'pointer', padding: '6px',
              color: 'rgba(255,255,255,0.4)', display: 'flex', alignItems: 'center',
              transition: 'color 0.22s ease'
            }}
            onMouseEnter={(e) => e.currentTarget.style.color = '#fff'}
            onMouseLeave={(e) => e.currentTarget.style.color = 'rgba(255,255,255,0.4)'}>
              <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
                <path d="M3 21l1.65-4.8a8.6 8.6 0 113.4 3.3z" style={{ opacity: "1", stroke: "rgb(255, 255, 255)", fill: "rgb(50, 171, 36)" }} />
                <path d="M8.5 8.4c-.2 0-.45.07-.6.32-.16.25-.62.74-.62 1.78 0 1.05.74 2.06.84 2.2.1.14 1.46 2.36 3.6 3.2 1.78.7 2.14.56 2.53.53.39-.04 1.25-.51 1.43-1 .18-.5.18-.92.13-1.01-.05-.1-.2-.16-.42-.27-.22-.11-1.25-.62-1.45-.69-.2-.07-.34-.1-.48.11-.14.21-.55.69-.67.83-.12.14-.25.16-.46.05-.22-.11-.91-.34-1.74-1.07-.64-.57-1.07-1.28-1.2-1.49-.12-.21-.01-.33.1-.43.1-.1.21-.25.32-.38.1-.13.14-.22.21-.37.07-.14.04-.27-.02-.38-.05-.11-.48-1.16-.66-1.58-.16-.41-.33-.36-.46-.36z" fill="currentColor" stroke="none" />
              </svg>
            </button>
          </div>
        </nav>

        {/* Hamburger */}
        <button className="hamburger" onClick={() => setOpen(!open)} style={{
          background: 'none', border: 'none', cursor: 'pointer',
          display: 'flex', flexDirection: 'column', gap: '6px',
          padding: '8px', zIndex: 1001
        }}>
          {[0, 1, 2].map((i) =>
          <span key={i} style={{
            display: 'block', width: '26px', height: '1.5px', background: '#fff',
            transition: 'all 0.36s cubic-bezier(0.22,1,0.36,1)',
            transform: i === 0 && open ? 'translateY(7.5px) rotate(45deg)' :
            i === 2 && open ? 'translateY(-7.5px) rotate(-45deg)' : 'none',
            opacity: i === 1 && open ? 0 : 1,
            transformOrigin: 'center'
          }} />
          )}
        </button>
      </header>

      {/* Mobile overlay */}
      <div style={{
        position: 'fixed', inset: 0, zIndex: 999, background: '#000',
        display: 'flex', flexDirection: 'column',
        alignItems: 'center', justifyContent: 'center', gap: '44px',
        opacity: open ? 1 : 0,
        pointerEvents: open ? 'auto' : 'none',
        transition: 'opacity 0.4s ease'
      }}>
        {/* Social no mobile overlay */}
        <div style={{ display: 'flex', gap: '32px', alignItems: 'center' }}>
          <button onClick={openInstagram} style={{
            background: 'none', border: 'none', cursor: 'pointer', color: 'rgba(255,255,255,0.5)',
            display: 'flex', alignItems: 'center', flexDirection: 'column', gap: '8px',
            fontFamily: 'Montserrat,sans-serif', fontSize: '9px', letterSpacing: '0.22em',
            opacity: open ? 1 : 0, transition: 'opacity 0.5s ease 0.4s'
          }}>
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
              <rect x="2" y="2" width="20" height="20" rx="5" ry="5" />
              <circle cx="12" cy="12" r="4.5" />
              <circle cx="17.5" cy="6.5" r="1" fill="currentColor" stroke="none" />
            </svg>
            INSTAGRAM
          </button>
          <button onClick={() => window.open('https://www.youtube.com/', '_blank')} style={{
            background: 'none', border: 'none', cursor: 'pointer', color: 'rgba(255,255,255,0.5)',
            display: 'flex', alignItems: 'center', flexDirection: 'column', gap: '8px',
            fontFamily: 'Montserrat,sans-serif', fontSize: '9px', letterSpacing: '0.22em',
            opacity: open ? 1 : 0, transition: 'opacity 0.5s ease 0.42s'
          }}>
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
              <path d="M22.54 6.42a2.78 2.78 0 00-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46A2.78 2.78 0 001.46 6.42 29 29 0 001 12a29 29 0 00.46 5.58 2.78 2.78 0 001.95 1.96C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 001.95-1.96A29 29 0 0023 12a29 29 0 00-.46-5.58z" />
              <polygon points="9.75 15.02 15.5 12 9.75 8.98 9.75 15.02" fill="currentColor" stroke="none" />
            </svg>
            YOUTUBE
          </button>
          <button onClick={openWhatsApp} style={{
            background: 'none', border: 'none', cursor: 'pointer', color: 'rgba(255,255,255,0.5)',
            display: 'flex', alignItems: 'center', flexDirection: 'column', gap: '8px',
            fontFamily: 'Montserrat,sans-serif', fontSize: '9px', letterSpacing: '0.22em',
            opacity: open ? 1 : 0, transition: 'opacity 0.5s ease 0.44s'
          }}>
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
              <path d="M3 21l1.65-4.8a8.6 8.6 0 113.4 3.3z" />
              <path d="M8.5 8.4c-.2 0-.45.07-.6.32-.16.25-.62.74-.62 1.78 0 1.05.74 2.06.84 2.2.1.14 1.46 2.36 3.6 3.2 1.78.7 2.14.56 2.53.53.39-.04 1.25-.51 1.43-1 .18-.5.18-.92.13-1.01-.05-.1-.2-.16-.42-.27-.22-.11-1.25-.62-1.45-.69-.2-.07-.34-.1-.48.11-.14.21-.55.69-.67.83-.12.14-.25.16-.46.05-.22-.11-.91-.34-1.74-1.07-.64-.57-1.07-1.28-1.2-1.49-.12-.21-.01-.33.1-.43.1-.1.21-.25.32-.38.1-.13.14-.22.21-.37.07-.14.04-.27-.02-.38-.05-.11-.48-1.16-.66-1.58-.16-.41-.33-.36-.46-.36z" fill="currentColor" stroke="none" />
            </svg>
            WHATSAPP
          </button>
        </div>
        {nav.map(([id, label], i) =>
        <button key={id} onClick={() => go(id)} style={{
          background: 'none', border: 'none', cursor: 'pointer',
          fontFamily: 'Montserrat,sans-serif', fontWeight: 700,
          fontSize: '28px', letterSpacing: '0.28em', color: '#fff',
          transform: open ? 'translateY(0)' : 'translateY(24px)',
          opacity: open ? 1 : 0,
          transition: `transform 0.5s cubic-bezier(0.22,1,0.36,1) ${i * 0.06 + 0.05}s, opacity 0.5s ease ${i * 0.06 + 0.05}s`
        }}>{label}</button>
        )}
      </div>
    </>);

}

// ── Footer ────────────────────────────────────────────────────────────────────
function Footer({ navigate }) {
  const navLinks = [['home', 'Home'], ['sobre', 'Sobre'], ['portfolio', 'Portfólio'], ['servicos', 'Serviços'], ['contato', 'Contato']];
  return (
    <footer style={{ background: '#080808', borderTop: '1px solid rgba(255,255,255,0.07)', padding: '90px 80px 44px' }}>
      <div className="footer-grid" style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: '60px', marginBottom: '64px' }}>
        {/* Brand */}
        <div>
          <div style={{ marginBottom: '24px', lineHeight: 0 }}>
            <img src="logo.png" alt="RBD Arch"
            style={{ height: 44, width: 'auto', objectFit: 'contain', display: 'block' }}
            onError={(e) => {
              e.target.style.display = 'none';
              e.target.nextElementSibling.style.display = 'flex';
            }} />
            
            <span style={{
              display: 'none', alignItems: 'baseline', gap: '3px',
              fontFamily: 'Montserrat,sans-serif'
            }}>
              <span style={{ fontWeight: 900, fontSize: '17px', letterSpacing: '0.28em', color: '#fff' }}>RBD</span>
              <span style={{ fontWeight: 200, fontSize: '17px', letterSpacing: '0.28em', color: 'rgba(255,255,255,0.6)' }}>ARCH</span>
            </span>
          </div>
          <p style={{ color: 'rgba(255,255,255,0.35)', fontSize: '13px', lineHeight: 1.9, maxWidth: '260px', fontFamily: 'Montserrat,sans-serif', fontWeight: 300 }}>
            Arquitetura e design de interiores de alto padrão para quem busca excelência em cada detalhe.
          </p>
          {/* Social icons footer */}
          <div style={{ display: 'flex', gap: '14px', marginTop: '24px' }}>
            <button onClick={openInstagram} title="Instagram @rbd_arquitetura" style={{
              width: '38px', height: '38px', border: '1px solid rgba(255,255,255,0.12)',
              background: 'none', cursor: 'pointer', color: 'rgba(255,255,255,0.4)',
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              transition: 'all 0.22s ease'
            }}
            onMouseEnter={(e) => {e.currentTarget.style.color = '#fff';e.currentTarget.style.borderColor = 'rgba(255,255,255,0.45)';}}
            onMouseLeave={(e) => {e.currentTarget.style.color = 'rgba(255,255,255,0.4)';e.currentTarget.style.borderColor = 'rgba(255,255,255,0.12)';}}>
              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
                <rect x="2" y="2" width="20" height="20" rx="5" ry="5" />
                <circle cx="12" cy="12" r="4.5" />
                <circle cx="17.5" cy="6.5" r="1" fill="currentColor" stroke="none" />
              </svg>
            </button>
            <button onClick={() => window.open('https://www.youtube.com/', '_blank')} title="YouTube" style={{
              width: '38px', height: '38px', border: '1px solid rgba(255,255,255,0.12)',
              background: 'none', cursor: 'pointer', color: 'rgba(255,255,255,0.4)',
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              transition: 'all 0.22s ease'
            }}
            onMouseEnter={(e) => {e.currentTarget.style.color = '#fff';e.currentTarget.style.borderColor = 'rgba(255,255,255,0.45)';}}
            onMouseLeave={(e) => {e.currentTarget.style.color = 'rgba(255,255,255,0.4)';e.currentTarget.style.borderColor = 'rgba(255,255,255,0.12)';}}>
              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
                <path d="M22.54 6.42a2.78 2.78 0 00-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46A2.78 2.78 0 001.46 6.42 29 29 0 001 12a29 29 0 00.46 5.58 2.78 2.78 0 001.95 1.96C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 001.95-1.96A29 29 0 0023 12a29 29 0 00-.46-5.58z" />
                <polygon points="9.75 15.02 15.5 12 9.75 8.98 9.75 15.02" fill="currentColor" stroke="none" />
              </svg>
            </button>
          </div>
        </div>

        {/* Nav */}
        <div>
          <p style={{ fontSize: '9px', letterSpacing: '0.28em', color: 'rgba(255,255,255,0.28)', marginBottom: '24px', textTransform: 'uppercase', fontFamily: 'Montserrat,sans-serif', fontWeight: 500 }}>NAVEGAÇÃO</p>
          <div style={{ display: 'flex', flexDirection: 'column', gap: '13px' }}>
            {navLinks.map(([id, label]) =>
            <button key={id} onClick={() => navigate(id)} style={{
              background: 'none', border: 'none', cursor: 'pointer',
              textAlign: 'left', padding: 0, fontFamily: 'Montserrat,sans-serif',
              fontSize: '13px', fontWeight: 300, color: 'rgba(255,255,255,0.4)',
              transition: 'color 0.2s'
            }}
            onMouseEnter={(e) => e.currentTarget.style.color = '#fff'}
            onMouseLeave={(e) => e.currentTarget.style.color = 'rgba(255,255,255,0.4)'}>
              {label}</button>
            )}
          </div>
        </div>

        {/* Contact */}
        <div>
          <p style={{ fontSize: '9px', letterSpacing: '0.28em', color: 'rgba(255,255,255,0.28)', marginBottom: '24px', textTransform: 'uppercase', fontFamily: 'Montserrat,sans-serif', fontWeight: 500 }}>CONTATO</p>
          <div style={{ display: 'flex', flexDirection: 'column', gap: '14px', color: 'rgba(255,255,255,0.4)', fontSize: '13px', lineHeight: 1.8, fontFamily: 'Montserrat,sans-serif', fontWeight: 300 }}>
            <span>Rua Jacob Holzmann, 233<br />Ed. Philadélphia, Sala 603<br />Centro — Ponta Grossa, PR</span>
            <span>contato@rbdarquitetura.com.br</span>
            <span>+55 (42) 98870-8525</span>
          </div>
        </div>
      </div>

      {/* ── Mapa ── */}
      <div className="footer-map-block" style={{
        display: 'grid', gridTemplateColumns: '1fr 1.6fr', gap: '56px',
        alignItems: 'center',
        borderTop: '1px solid rgba(255,255,255,0.06)',
        paddingTop: '56px', marginBottom: '44px'
      }}>
        {/* Texto de localização */}
        <div>
          <p style={{ fontSize: '9px', letterSpacing: '0.28em', color: 'rgba(255,255,255,0.28)', marginBottom: '24px', textTransform: 'uppercase', fontFamily: 'Montserrat,sans-serif', fontWeight: 500 }}>LOCALIZAÇÃO</p>
          <p style={{ fontFamily: 'Montserrat,sans-serif', fontWeight: 300, fontSize: '15px', lineHeight: 2, color: 'rgba(255,255,255,0.65)' }}>
            Rua Jacob Holzmann, 233<br />
            Ed. Philadélphia, Sala 603<br />
            Centro — Ponta Grossa, PR<br />
            <span style={{ color: 'rgba(255,255,255,0.35)', fontSize: '12px' }}>CEP 84035-300</span>
          </p>
          <a
            href="https://maps.google.com/?q=-25.105325,-50.158781"
            target="_blank" rel="noopener noreferrer"
            onClick={(e) => {e.preventDefault();window.open('https://maps.google.com/?q=-25.105325,-50.158781', '_blank');}}
            style={{
              display: 'inline-flex', alignItems: 'center', gap: '10px',
              marginTop: '28px', textDecoration: 'none',
              fontFamily: 'Montserrat,sans-serif', fontWeight: 500,
              fontSize: '10px', letterSpacing: '0.22em', textTransform: 'uppercase',
              color: 'rgba(255,255,255,0.35)', borderBottom: '1px solid rgba(255,255,255,0.12)',
              paddingBottom: '4px', transition: 'color 0.22s, border-color 0.22s'
            }}
            onMouseEnter={(e) => {e.currentTarget.style.color = '#fff';e.currentTarget.style.borderColor = 'rgba(255,255,255,0.5)';}}
            onMouseLeave={(e) => {e.currentTarget.style.color = 'rgba(255,255,255,0.35)';e.currentTarget.style.borderColor = 'rgba(255,255,255,0.12)';}}>
            
            <svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
              <path d="M7 1h4v4M11 1L5 7M4 2H2a1 1 0 00-1 1v7a1 1 0 001 1h7a1 1 0 001-1V8" />
            </svg>
            VER NO GOOGLE MAPS
          </a>
        </div>

        {/* Mapa embed */}
        <div style={{ position: 'relative', width: '100%', height: '300px', overflow: 'hidden' }}>
          {/* Overlay sutil para harmonizar com o tema escuro */}
          <div style={{
            position: 'absolute', inset: 0, zIndex: 1, pointerEvents: 'none',
            boxShadow: 'inset 0 0 0 1px rgba(255,255,255,0.08)'
          }} />
          <iframe
            title="RBD Arch — Localização"
            src="https://www.google.com/maps?q=-25.105325,-50.158781&output=embed"
            width="100%" height="100%"
            style={{ border: 'none', display: 'block' }}
            loading="lazy"
            referrerPolicy="no-referrer-when-downgrade" />
          
        </div>
      </div>

      <div style={{ borderTop: '1px solid rgba(255,255,255,0.06)', paddingTop: '28px', display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: '12px' }}>
        <p style={{ color: 'rgba(255,255,255,0.2)', fontSize: '10px', letterSpacing: '0.16em', fontFamily: 'Montserrat,sans-serif' }}>© 2025 RBD ARCH. TODOS OS DIREITOS RESERVADOS.</p>
        <p style={{ color: 'rgba(255,255,255,0.2)', fontSize: '10px', letterSpacing: '0.16em', fontFamily: 'Montserrat,sans-serif' }}>ARQUITETURA & INTERIORES</p>
      </div>
    </footer>);

}

Object.assign(window, { PlaceholderImage, useScrollReveal, Header, Footer });