import { Target, Eye, Award, Handshake, Lightbulb, HeartHandshake, Leaf } from "lucide-react";
import { Seo } from "@/components/Seo";
import { PageHero } from "@/components/PageHero";
import { Reveal } from "@/components/Reveal";
import { Marquee } from "@/components/Marquee";
import { useQuote } from "@/components/QuoteModal";
import { useContent } from "@/lib/content";

const VALUE_ICONS = [Award, Handshake, Lightbulb, HeartHandshake, Leaf];

export default function About() {
  const { openQuote } = useQuote();
  const { IMAGES, ABOUT } = useContent();
  return (
    <>
      <Seo
        title="About Us | DHIYAA SOLAR ENERGY — Solar Company in Chromepet, Chennai"
        description="DHIYAA SOLAR ENERGY is a solar energy solutions company based in Chromepet, Chennai, providing solar power and solar pumping solutions for residential, commercial, industrial and agricultural applications."
      />
      <PageHero
        eyebrow="About Us"
        title="Your Trusted Solar Energy Partner"
        subtitle="A solar energy solutions company based in Chromepet, Chennai, Tamil Nadu — serving residential, commercial, industrial and agricultural customers."
        image={IMAGES.hero[1]}
      />

      <section className="mx-auto max-w-7xl px-4 py-16 sm:px-6" data-testid="about-intro">
        <div className="grid items-center gap-12 lg:grid-cols-2">
          <Reveal>
            <p className="text-xs font-bold uppercase tracking-[0.25em] text-brand-orange">Who We Are</p>
            <h2 className="mt-3 font-heading text-3xl font-extrabold tracking-tight text-brand-navy">About DHIYAA SOLAR ENERGY</h2>
            <div className="mt-4 space-y-4 text-slate-600 leading-relaxed">
              {ABOUT.paragraphs.map((p, i) => (
                <p key={i}>{p}</p>
              ))}
            </div>
          </Reveal>
          <Reveal delay={0.15}>
            <img src={IMAGES.projects[1]?.src} alt="DHIYAA SOLAR ENERGY rooftop installation in Madipakkam, Chennai" className="w-full rounded-3xl object-cover shadow-2xl" />
          </Reveal>
        </div>
      </section>

      <section className="bg-brand-sky py-16" data-testid="mission-vision">
        <div className="mx-auto grid max-w-7xl gap-6 px-4 sm:px-6 md:grid-cols-2">
          <Reveal>
            <div className="h-full rounded-2xl border-l-4 border-brand-orange bg-white p-8 shadow-sm">
              <Target className="h-9 w-9 text-brand-orange" />
              <h3 className="mt-4 font-heading text-xl font-bold text-brand-navy">Our Mission</h3>
              <p className="mt-2 text-slate-600 leading-relaxed">{ABOUT.mission}</p>
            </div>
          </Reveal>
          <Reveal delay={0.1}>
            <div className="h-full rounded-2xl border-l-4 border-brand-green bg-white p-8 shadow-sm">
              <Eye className="h-9 w-9 text-brand-green" />
              <h3 className="mt-4 font-heading text-xl font-bold text-brand-navy">Our Vision</h3>
              <p className="mt-2 text-slate-600 leading-relaxed">{ABOUT.vision}</p>
            </div>
          </Reveal>
        </div>
      </section>

      <Marquee items={ABOUT.values.map((v) => v.title)} />

      <section className="mx-auto max-w-7xl px-4 py-16 sm:px-6" data-testid="values-section">
        <Reveal>
          <p className="text-xs font-bold uppercase tracking-[0.25em] text-brand-orange">What Drives Us</p>
          <h2 className="mt-3 font-heading text-3xl font-extrabold tracking-tight text-brand-navy">Our Core Values</h2>
        </Reveal>
        <div className="mt-10 grid gap-5 sm:grid-cols-2 lg:grid-cols-5">
          {ABOUT.values.map((v, i) => {
            const Icon = VALUE_ICONS[i % VALUE_ICONS.length];
            return (
              <Reveal key={v.title + i} delay={i * 0.07}>
                <div className="h-full rounded-2xl border border-slate-100 bg-white p-6 text-center transition-all hover:-translate-y-1 hover:shadow-lg">
                  <span className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-brand-green/10 text-brand-green">
                    <Icon className="h-6 w-6" />
                  </span>
                  <h3 className="mt-3 font-heading text-base font-bold text-brand-navy">{v.title}</h3>
                  <p className="mt-1.5 text-[13px] leading-relaxed text-slate-600">{v.desc}</p>
                </div>
              </Reveal>
            );
          })}
        </div>
        <Reveal className="mt-12 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-all hover:bg-brand-orangedark" data-testid="about-quote-btn">
            Get Free Quote
          </button>
        </Reveal>
      </section>
    </>
  );
}
