type QA = { q: string; a: string };

export default function FAQ({ items }: { items: QA[] }) {
  return (
    <section className="container py-14">
      <h2 className="text-2xl font-semibold tracking-tight">FAQ</h2>
      <div className="mt-6 grid gap-4">
        {items.map((x, i) => (
          <details key={i} className="rounded-2xl border p-5">
            <summary className="cursor-pointer text-base font-medium">{x.q}</summary>
            <p className="mt-2 text-sm text-muted-foreground">{x.a}</p>
          </details>
        ))}
      </div>
    </section>
  );
}
