import { Badge } from "@/components/ui/badge";
import { topicChips } from "@/content/tracks";
import { Section } from "@/components/layout/Section";
import { TopoProseSurface } from "@/components/layout/TopoProseSurface";

export function TopicMarquee() {
  const items = [...topicChips, ...topicChips];
  return (
    <Section id="topics" className="overflow-hidden py-12">
      <TopoProseSurface className="mx-auto mb-8 max-w-3xl text-center">
        <p className="text-xs font-semibold uppercase tracking-widest text-[#ffb300]">
          Program themes
        </p>
        <h2 className="mt-2 text-2xl font-bold text-[#0d3d26] md:text-3xl">
          Topics shaping the summit
        </h2>
      </TopoProseSurface>
      <div className="flex overflow-hidden">
        <div className="marquee flex shrink-0 gap-3">
          {items.map((topic, i) => (
            <Badge
              key={`${topic}-${i}`}
              variant="secondary"
              className="shrink-0 rounded-full border border-[#1a5c38]/15 bg-[#f0f5f2] px-4 py-2 text-sm text-[#1a5c38]"
            >
              {topic}
            </Badge>
          ))}
        </div>
      </div>
    </Section>
  );
}
