import Image from "next/image";
import { Mail, MapPin, Phone, Check } from "lucide-react";
import ContactHeader from "./contactHeader";
import Form from "./form";
import { useTranslations } from "next-intl";

export function Contact() {
  const t = useTranslations();
  const contactInfo = [
    {
      icon: Mail,
      title:t("contact.form.email"),
      detail: t("contact.form.emailAddress"),
    },
    {
      icon: MapPin,
      title: t("contact.form.location"),
      detail: t("contact.form.address"),
    },
    {
      icon: Phone,
      title: t("contact.form.phone"),
      detail: "+998-77-372-21-21",
    },
  ];

  return (
    <section className="relative min-h-175 w-full py-16 md:py-40">
      {/* Background Image */}
      <div className="absolute inset-0 z-0">
        <Image
          src="/images/img5.webp"
          alt="Contact background"
          fill
          className="object-cover"
          priority
        />
        {/* Radial Gradient Overlay */}
        <div
          className="absolute inset-0"
          style={{
            background:
              "radial-gradient(ellipse at bottom center, #d2610a 0%, #1e1d1ce9 70% , #1e1d1ce9 70%)",
          }}
        />
      </div>

      {/* Content */}
      <div className="relative z-10 mx-auto max-w-4xl px-4 sm:px-6 lg:px-8">
        <ContactHeader />

        <Form />

        {/* Contact Info */}
        <div className="mt-12 grid grid-cols-1 gap-8 md:grid-cols-3">
          {contactInfo.map((info) => (
            <div
              key={info.title}
              className="flex flex-col items-center text-center"
            >
              <div className="mb-3 flex h-14 w-14 items-center justify-center rounded-xl bg-[#2c2b2a]">
                <info.icon className="h-6 w-6 text-red-600" />
              </div>
              <h3 className="font-almarai text-sm font-bold tracking-wider text-white">
                {info.title}
              </h3>
              <p className="font-almarai mt-1 text-sm text-gray-400">{info.detail}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}
