import { useLanguage } from "../contexts/LanguageContext";
import { Reveal } from "../components/Reveal";
import { Card, CardContent } from "@/components/ui/card";
import { Check, Landmark } from "lucide-react";

export default function Waqf() {
  const { t } = useLanguage();

  return (
    <div className="container mx-auto px-4 py-10">
      {/* Intro green panel */}
      <Reveal>
        <section className="rounded-2xl bg-[#14573A] text-white p-8 md:p-12 mb-10">
          <h1 className="text-2xl md:text-3xl font-bold mb-5">{t.waqf.introTitle}</h1>
          <p className="leading-loose text-primary-foreground/90 max-w-4xl">
            {t.waqf.intro}
          </p>
        </section>
      </Reveal>

      {/* Ways to contribute */}
      <Reveal>
        <h2 className="text-xl font-bold text-foreground mb-6">{t.waqf.waysTitle}</h2>
      </Reveal>
      <div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-12">
        {t.waqf.ways.map((w, i) => (
          <Reveal key={i} delay={(i % 2) * 0.08} className="h-full">
            <Card className="h-full">
              <CardContent className="p-6 flex items-start gap-4">
                <div className="w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0">
                  <Landmark className="w-5 h-5" />
                </div>
                <div>
                  <h3 className="text-base font-bold text-foreground mb-1">{w.name}</h3>
                  <p className="text-sm text-muted-foreground leading-relaxed">{w.desc}</p>
                </div>
              </CardContent>
            </Card>
          </Reveal>
        ))}
      </div>

      {/* Fields + features */}
      <Reveal>
        <div className="grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12">
          <div>
            <h3 className="text-lg font-bold text-primary mb-4">{t.waqf.fieldsTitle}</h3>
            <ul className="space-y-3">
              {t.waqf.fields.map((item, i) => (
                <li key={i} className="flex items-start gap-3">
                  <Check className="w-5 h-5 text-primary shrink-0 mt-0.5" />
                  <span className="text-foreground/90 leading-relaxed">{item}</span>
                </li>
              ))}
            </ul>
          </div>
          <div>
            <h3 className="text-lg font-bold text-primary mb-4">{t.waqf.featuresTitle}</h3>
            <div className="space-y-4">
              {t.waqf.features.map((f, i) => (
                <div key={i}>
                  <h4 className="text-base font-bold text-foreground mb-1">{f.name}</h4>
                  <p className="text-sm text-muted-foreground leading-relaxed">{f.desc}</p>
                </div>
              ))}
            </div>
          </div>
        </div>
      </Reveal>
    </div>
  );
}
