"use client";

import { Copy, Layers, ShieldAlert, Coins } from "lucide-react";
import { useLanguage } from "@/components/language-provider";
import { Section, SectionHeading } from "@/components/ui/section";

const ICONS = [Copy, ShieldAlert, Coins];

export function Problem() {
  const { t } = useLanguage();
  return (
    <Section id="problem" className="bg-slate-50 dark:bg-ink-soft/40">
      <div className="container-x">
        <SectionHeading
          eyebrow={t.problem.eyebrow}
          title={t.problem.title}
          subtitle={t.problem.subtitle}
        />

        <div className="grid gap-6 md:grid-cols-3">
          {t.problem.points.map((p, i) => {
            const Icon = ICONS[i];
            return (
              <div key={p.title} className="card card-hover">
                <div className="flex h-11 w-11 items-center justify-center rounded-xl bg-rose-500/15 text-rose-600 dark:text-rose-300">
                  <Icon className="h-5 w-5" />
                </div>
                <h3 className="mt-4 text-lg font-semibold text-slate-900 dark:text-white">{p.title}</h3>
                <p className="mt-2 text-sm leading-relaxed text-slate-600 dark:text-slate-400">{p.body}</p>
              </div>
            );
          })}
        </div>

        <div className="mt-12 grid grid-cols-3 gap-6 rounded-2xl border border-slate-200 bg-white p-8 dark:border-white/10 dark:bg-white/[0.02]">
          {[t.problem.stat1, t.problem.stat2, t.problem.stat3].map((s, i) => (
            <div key={i} className="text-center">
              <div className="text-4xl font-bold gradient-text">{s.value}</div>
              <div className="mt-2 text-sm text-slate-600 dark:text-slate-400">{s.label}</div>
            </div>
          ))}
        </div>
      </div>
    </Section>
  );
}
