import { MapPin, Layers, Camera } from "lucide-react";
import { Seo } from "@/components/Seo";
import { PageHero } from "@/components/PageHero";
import { Reveal } from "@/components/Reveal";
import { useQuote } from "@/components/QuoteModal";
import { useContent } from "@/lib/content";

export default function Projects() {
  const { openQuote } = useQuote();
  const { IMAGES } = useContent();
  return (
    <>
      <Seo
        title="Our Solar Projects in Chennai | Rooftop Solar Installations | DHIYAA SOLAR ENERGY"
        description="Real rooftop solar installations by DHIYAA SOLAR ENERGY across Chennai — residential, commercial, industrial and solar pump projects."
      />
      <PageHero
        eyebrow="Our Work"
        title="Our Solar Projects"
        subtitle="Real installations by our team across Chennai and Tamil Nadu."
        image={IMAGES.projects[1].src}
      />
      <section className="mx-auto max-w-7xl px-4 py-16 sm:px-6" data-testid="projects-grid">
        <div className="grid gap-8 md:grid-cols-2">
          {IMAGES.projects.map((p, i) => (
            <Reveal key={p.src} delay={i * 0.1}>
              <div className="group overflow-hidden rounded-2xl border border-slate-100 bg-white shadow-lg" data-testid={`project-detail-${i}`}>
                <div className="relative overflow-hidden">
                  <img src={p.src} alt={`${p.type} — ${p.location}`} className="aspect-[4/3] w-full object-cover transition-transform duration-700 group-hover:scale-105" />
                  <span className="absolute left-4 top-4 rounded-full bg-brand-orange px-3.5 py-1 text-[11px] font-bold uppercase tracking-wider text-white">
                    {p.type}
                  </span>
                </div>
                <div className="p-6">
                  <p className="flex items-center gap-2 font-heading text-lg font-bold text-brand-navy">
                    <MapPin className="h-4 w-4 text-brand-orange" /> {p.location}
                  </p>
                  <p className="mt-2 flex items-start gap-2 text-sm text-slate-600">
                    <Layers className="mt-0.5 h-4 w-4 shrink-0 text-brand-blue" /> Scope: {p.scope}
                  </p>
                  <p className="mt-1.5 text-sm text-slate-500">{p.detail}</p>
                </div>
              </div>
            </Reveal>
          ))}
        </div>
        <Reveal className="mt-12">
          <div className="flex flex-col items-center gap-3 rounded-2xl border border-dashed border-brand-blue/30 bg-brand-sky p-10 text-center">
            <Camera className="h-10 w-10 text-brand-blue/50" />
            <h3 className="font-heading text-xl font-bold text-brand-navy">More Projects Coming Soon</h3>
            <p className="max-w-md text-sm text-slate-500">
              We add project photographs only from actual completed installations — new residential, commercial,
              industrial and solar pump projects will be showcased here shortly.
            </p>
          </div>
        </Reveal>
        <Reveal className="mt-10 text-center">
          <button onClick={() => openQuote()} className="rounded-full bg-brand-orange px-8 py-4 font-heading text-sm font-bold uppercase tracking-wider text-white transition-colors hover:bg-brand-orangedark" data-testid="projects-quote-btn">
            Start Your Project
          </button>
        </Reveal>
      </section>
    </>
  );
}
