function PressBar() {
  const logos = [
    { src: '/assets/press/inews.png',        alt: 'iNews' },
    { src: '/assets/press/rsvp.png',         alt: 'RSVP' },
    { src: '/assets/press/telegraph.png',    alt: 'The Daily Telegraph' },
    { src: '/assets/press/business-post.svg',alt: 'The Business Post' },
    { src: '/assets/press/rte.png',          alt: 'RTÉ Radio One' },
    { src: '/assets/press/metro.png',        alt: 'Metro' },
    { src: '/assets/press/irish-times.svg',  alt: 'The Irish Times', height: '28px' },
    { src: '/assets/press/bbc.png',          alt: 'BBC' },
    { src: '/assets/press/independent.png',  alt: 'The Independent' },
    { src: '/assets/press/daily-express.png',alt: 'Daily Express' },
    { src: '/assets/press/forbes.png',       alt: 'Forbes' },
    { src: '/assets/press/techcrunch.png',   alt: 'TechCrunch' },
  ];

  const imgStyle = (logo) => ({
    height: logo.height || '84px',
    width: 'auto',
    display: 'block',
    filter: 'grayscale(1) opacity(0.5)',
    flexShrink: 0,
  });

  const track = logos.map((logo, i) => (
    <li key={i} style={{ display: 'flex', alignItems: 'center', padding: '0 40px', flexShrink: 0 }}>
      <img src={logo.src} alt={logo.alt} style={imgStyle(logo)} />
    </li>
  ));

  return (
    <section style={{
      padding: 'clamp(48px, 7vw, 80px) 0',
      background: 'var(--bg-subtle)',
      overflow: 'hidden',
    }}>
      <p style={{
        textAlign: 'center',
        marginBottom: 'clamp(24px, 4vw, 40px)',
      }} className="eyebrow-text" >As seen in</p>

      <div style={{ overflow: 'hidden', position: 'relative' }}>
        <ul style={{
          display: 'flex',
          listStyle: 'none',
          margin: 0,
          padding: 0,
          width: 'max-content',
          animation: 'pressBarScroll 30s linear infinite',
        }}>
          {track}
          {track}
        </ul>
      </div>

      <style>{`
        @keyframes pressBarScroll {
          from { transform: translateX(0); }
          to   { transform: translateX(-50%); }
        }
      `}</style>
    </section>
  );
}

window.PressBar = PressBar;
