"use client";
import { useTranslator } from "@/contexts/TranslatorContext";
import { motion } from "framer-motion";
import React from "react";
import {
  Target,
  Eye,
  Flag,
  ShieldCheck,
  HandHeart,
  Users,
  Mail,
} from "lucide-react";

const TigersCompany = () => {
  let { translations } = useTranslator();
  const orbitContent = {
    left: [
      {
        title: translations?.about_orbit?.mission?.title || "مهمتنا",
        description:
          translations?.about_orbit?.mission?.description ||
          "كلام عن مهمتنا كلام عن مهمتنا كلام عن مهمتنا",
        icon: Flag,
      },
      {
        title: translations?.about_orbit?.services?.title || "خدماتنا",
        description:
          translations?.about_orbit?.services?.description ||
          "كلام عن خدماتنا كلام عن خدماتنا كلام عن خدماتنا",
        icon: ShieldCheck,
      },
      {
        title: translations?.about_orbit?.values?.title || "قيم نمنحها",
        description:
          translations?.about_orbit?.values?.description ||
          "كلام عن قيم نمنحها كلام عن قيم نمنحها",
        icon: HandHeart,
      },
    ],
    right: [
      {
        title: translations?.about_orbit?.goals?.title || "اهدافنا",
        description:
          translations?.about_orbit?.goals?.description ||
          "كلام عن اهدافنا كلام عن اهدافنا كلام عن اهدافنا",
        icon: Target,
      },
      {
        title: translations?.about_orbit?.vision?.title || "رؤيتنا",
        description:
          translations?.about_orbit?.vision?.description ||
          "كلام عن رؤيتنا كلام عن رؤيتنا كلام عن رؤيتنا",
        icon: Eye,
      },
      {
        title: translations?.about_orbit?.who?.title || "من نكون",
        description:
          translations?.about_orbit?.who?.description ||
          "كلام عن من نكون كلام عن من نكون كلام عن من نكون",
        icon: Users,
      },
    ],
    bottom: {
      title: translations?.about_orbit?.message?.title || "رسالتنا",
      description:
        translations?.about_orbit?.message?.description ||
        "كلام عن رسالتنا كلام عن رسالتنا كلام عن رسالتنا",
      icon: Mail,
    },
  };

  return (
    <motion.div
      className="flex justify-center md:py-20 sm:pt-44 pt-12 px-4 sm:px-6"
      initial="hidden"
      whileInView="visible"
      viewport={{ once: true, margin: "-100px" }}
      variants={{
        hidden: { opacity: 0 },
        visible: {
          opacity: 1,
          transition: {
            staggerChildren: 0.2,
          },
        },
      }}
    >
      <motion.div
        className="w-full max-w-[1290px] mx-auto bg-white overflow-hidden"
        variants={{
          hidden: { opacity: 0, scale: 0.95 },
          visible: {
            opacity: 1,
            scale: 1,
            transition: { duration: 0.6, ease: "easeOut" },
          },
        }}
      >
        <div className="lg:hidden flex flex-col items-center gap-8 py-6">
          <div className="relative w-[260px] h-[260px]">
            <div className="absolute inset-0 rounded-full border border-[#2B1F51]" />
            <div className="absolute inset-[10%] rounded-full bg-white shadow-[0_0_41.1px_6px_rgba(130,115,179,0.10)]" />
            <img
              src="/images/pages/center-about.png"
              alt="About orbit center"
              className="absolute inset-[18%] w-[64%] h-[64%] object-contain"
            />
            <div className="absolute -top-4 left-1/2 -translate-x-1/2 h-12 w-12 rounded-full bg-[#8273B3] flex items-center justify-center">
              <Target className="h-6 w-6 text-white" />
            </div>
            <div className="absolute top-1/2 -right-4 -translate-y-1/2 h-12 w-12 rounded-full bg-[#8273B3] flex items-center justify-center">
              <Eye className="h-6 w-6 text-white" />
            </div>
            <div className="absolute bottom-0 left-1/2 -translate-x-1/2 h-12 w-12 rounded-full bg-[#8273B3] flex items-center justify-center">
              <Mail className="h-6 w-6 text-white" />
            </div>
            <div className="absolute top-1/2 -left-4 -translate-y-1/2 h-12 w-12 rounded-full bg-[#8273B3] flex items-center justify-center">
              <ShieldCheck className="h-6 w-6 text-white" />
            </div>
          </div>

          <div className="grid grid-cols-1 sm:grid-cols-2 gap-6 w-full">
            {[...orbitContent.left, ...orbitContent.right].map(
              (item, index) => (
                <div
                  key={`mobile-item-${index}`}
                  className="rounded-2xl border border-[#ECE7FA] p-4 text-right"
                >
                  <div className="flex items-center justify-end gap-2">
                    <h3 className="text-lg font-semibold text-[#2B1F51]">
                      {item.title}
                    </h3>
                    <item.icon className="h-5 w-5 text-[#8273B3]" />
                  </div>
                  <p className="text-sm text-gray-600 mt-2">
                    {item.description}
                  </p>
                </div>
              ),
            )}
          </div>

          <div className="rounded-2xl border border-[#ECE7FA] p-4 text-center w-full">
            <h3 className="text-lg font-semibold text-[#2B1F51]">
              {orbitContent.bottom.title}
            </h3>
            <p className="text-sm text-gray-600 mt-2">
              {orbitContent.bottom.description}
            </p>
          </div>
        </div>

        <div className="relative h-[824px] w-full hidden lg:block">
          <div className="absolute left-[453px] top-[126px] h-[384px] w-[384px] rounded-full bg-white shadow-[0_0_41.1px_6px_rgba(130,115,179,0.10)]" />
          <img
            src="/images/pages/center-about.png"
            alt="About orbit center"
            className="absolute left-[477px] top-[160px] h-[315px] w-[335px] object-contain shadow-[0_0_76.6px_rgba(43,31,81,0.20)]"
          />
          <div className="absolute left-[368px] top-[41px] h-[554px] w-[554px] rounded-full border border-[#2B1F51] shadow-[0_0_20px_1px_rgba(0,0,0,0.05)]" />

          <div className="absolute left-[449px] top-[47px] h-[76px] w-[76px] rounded-full bg-white" />
          <div className="absolute left-[764px] top-[47px] h-[76px] w-[76px] rounded-full bg-white" />
          <div className="absolute left-[882px] top-[260px] h-[76px] w-[76px] rounded-full bg-white" />
          <div className="absolute left-[794px] top-[482px] h-[76px] w-[76px] rounded-full bg-white" />
          <div className="absolute left-[607px] top-[557px] h-[76px] w-[76px] rounded-full bg-white" />
          <div className="absolute left-[331px] top-[260px] h-[76px] w-[76px] rounded-full bg-white" />
          <div className="absolute left-[419px] top-[482px] h-[76px] w-[76px] rounded-full bg-white" />

          <div className="absolute left-[449px] top-[47px] h-[76px] w-[76px] rounded-full bg-[#8273B3] flex items-center justify-center">
            <Flag className="h-[44px] w-[44px] text-white" />
          </div>
          <div className="absolute left-[764px] top-[47px] h-[76px] w-[76px] rounded-full bg-[#8273B3] flex items-center justify-center">
            <Target className="h-[42px] w-[42px] text-white" />
          </div>
          <div className="absolute left-[882px] top-[260px] h-[76px] w-[76px] rounded-full bg-[#8273B3] flex items-center justify-center">
            <Eye className="h-[48px] w-[48px] text-white" />
          </div>
          <div className="absolute left-[794px] top-[482px] h-[76px] w-[76px] rounded-full bg-[#8273B3] flex items-center justify-center">
            <Users className="h-[44px] w-[44px] text-white" />
          </div>
          <div className="absolute left-[607px] top-[557px] h-[76px] w-[76px] rounded-full bg-[#8273B3] flex items-center justify-center">
            <Mail className="h-[44px] w-[44px] text-white" />
          </div>
          <div className="absolute left-[331px] top-[260px] h-[76px] w-[76px] rounded-full bg-[#8273B3] flex items-center justify-center">
            <ShieldCheck className="h-[46px] w-[46px] text-white" />
          </div>
          <div className="absolute left-[419px] top-[482px] h-[76px] w-[76px] rounded-full bg-[#8273B3] flex items-center justify-center">
            <HandHeart className="h-[44px] w-[44px] text-white" />
          </div>

          <div className="absolute left-[1128px] top-0 text-right text-[36px] font-bold text-[#2B1F51] font-[Cairo]">
            {orbitContent.right[0].title}
          </div>
          <div className="absolute left-[900px] top-[54px] w-[350px] text-right text-[14px] font-light text-black font-[Cairo]">
            {orbitContent.right[0].description}
          </div>

          <div className="absolute left-[1207px] top-[209px] text-right text-[36px] font-bold text-[#2B1F51] font-[Cairo]">
            {orbitContent.right[1].title}
          </div>
          <div className="absolute left-[1025px] top-[263px] w-[265px] text-right text-[14px] font-light text-black font-[Cairo]">
            {orbitContent.right[1].description}
          </div>

          <div className="absolute left-[1105px] top-[510px] text-right text-[36px] font-bold text-[#2B1F51] font-[Cairo]">
            {orbitContent.right[2].title}
          </div>
          <div className="absolute left-[900px] top-[564px] w-[350px] text-right text-[14px] font-light text-black font-[Cairo]">
            {orbitContent.right[2].description}
          </div>

          <div className="absolute left-[40px] top-0 text-[36px] font-bold text-[#2B1F51] font-[Cairo]">
            {orbitContent.left[0].title}
          </div>
          <div className="absolute left-[40px] top-[54px] w-[350px] text-[14px] font-light text-black font-[Cairo]">
            {orbitContent.left[0].description}
          </div>

          <div className="absolute left-0 top-[209px] text-[36px] font-bold text-[#2B1F51] font-[Cairo]">
            {orbitContent.left[1].title}
          </div>
          <div className="absolute left-0 top-[263px] w-[260px] text-[14px] font-light text-black font-[Cairo]">
            {orbitContent.left[1].description}
          </div>

          <div className="absolute left-[40px] top-[510px] text-[36px] font-bold text-[#2B1F51] font-[Cairo]">
            {orbitContent.left[2].title}
          </div>
          <div className="absolute left-[40px] top-[564px] w-[350px] text-[14px] font-light text-black font-[Cairo]">
            {orbitContent.left[2].description}
          </div>

          <div className="absolute left-[591px] top-[734px] text-center text-[36px] font-bold text-[#2B1F51] font-[Cairo]">
            {orbitContent.bottom.title}
          </div>
          <div className="absolute left-[438px] top-[788px] w-[414px] text-center text-[14px] font-light text-black font-[Cairo]">
            {orbitContent.bottom.description}
          </div>
        </div>
      </motion.div>
    </motion.div>
  );
};

export default TigersCompany;
