import { ServerCog, Shield, Cpu, Network, Workflow } from "lucide-react";

export const Infrastructure = () => {
  const Features = [
    {
      icon: Network,
      image: "/images/location.jpg",
      title: "Premium Datacenter",
      description:
        "Enterprise-grade infrastructure hosted in tier-1 datacenters with redundant power and cooling",
    },
    {
      icon: Shield,
      image: "/images/high-performance.jpg",
      title: "DDoS Protection",
      description:
        "Advanced layer 7 protection against DDoS attacks with automatic mitigation systems",
    },
    {
      icon: Cpu,
      image: "/images/hardware.jpg",
      title: "High Performance",
      description:
        "Latest generation AMD Ryzen processors and NVMe storage for optimal gaming experience",
    },
  ];

  const FeatureCard = ({ icon: Icon, image, title, description }) => {
    return (
      <div className="bg-slate-900 rounded-md border border-gray-900">
        <div className="relative h-48">
          <img
            src={image}
            alt={title}
            className="w-full h-full object-cover rounded-t-md"
          />
          <div className="absolute inset-0 bg-gradient-to-t from-gray-900 via-gray-900/50 to-transparent" />
          <div className="absolute bottom-4 left-4 bg-slate-950 p-3 rounded-md border border-gray-900">
            <Icon className="w-6 h-6 text-blue-500" />
          </div>
        </div>
        <div className="p-5">
          <h3 className="text-xl font-semibold text-white mb-2">{title}</h3>
          <p className="text-gray-400">{description}</p>
        </div>
      </div>
    );
  };

  return (
    <section className="bg-slate-950 py-24">
      <div className="container max-w-screen-xl mx-auto px-4">
        {/* Hero */}
        <div className="flex flex-col md:flex-row items-center justify-between gap-12 mb-16">
          <div className="flex-1 order-2 md:order-1">
            <div className="bg-slate-950 rounded-md">
              <img
                src="/images/datacenter.jpg"
                alt="Infrastructure Overview"
                className="rounded-md w-full h-auto"
              />
            </div>
          </div>

          <div className="flex-1 text-white order-1 md:order-2">
            {/* <div className="inline-flex items-center px-4 py-2 rounded-md bg-slate-900 border border-gray-900 mb-6">
              <ServerCog className="w-5 h-5 text-blue-500 mr-2" />
              <span className="text-sm font-semibold">Tier-1 Datacenter</span>
            </div> */}

            <h1 className="text-4xl md:text-5xl font-bold mb-6 leading-tight">
              Enterprise-Grade{" "}
              <span className="text-blue-500">Infrastructure</span>
            </h1>

            <p className="text-xl text-gray-300 mb-8 leading-relaxed">
              Experience gaming without limits. Our infrastructure is built to
              deliver exceptional performance, reliability, and security for
              your gaming needs. Powered by the latest hardware and protected by
              enterprise security solutions.
            </p>

            <div className="flex flex-wrap gap-4">
              <a
                href="/specs"
                className="bg-blue-600 hover:bg-blue-700 text-white px-8 py-3 rounded-md font-medium transition-all duration-200 border border-transparent"
              >
                <span className="flex items-center gap-2">
                  <Workflow className="w-5 h-5" />
                  View Our Specs
                </span>
              </a>
            </div>
          </div>
        </div>

        {/* Features Grid */}
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2 md:gap-8">
          {Features.map((card, index) => (
            <FeatureCard
              key={index}
              icon={card.icon}
              image={card.image}
              title={card.title}
              description={card.description}
            />
          ))}
        </div>
      </div>
    </section>
  );
};

export default Infrastructure;
