import { ServiceHeroImage } from '@/components/ui/service-hero-image'
import { Header } from '@/components/layout/header'
import { Footer } from '@/components/layout/footer'
import { ScrollReveal } from '@/components/ui/scroll-reveal'
import Link from 'next/link'
import {
  Container,
  ArrowRight,
  CheckCircle2,
  TrendingUp,
  Shield,
  Zap,
  RefreshCw,
  Layers,
  Server,
  Activity,
  Globe,
  Lock,
  GitBranch,
  BarChart3,
  Cloud,
  Network,
  Cpu,
} from 'lucide-react'

export const metadata = {
  title: 'Docker & Kubernetes Services - Drish Infra',
  description:
    'Enterprise container orchestration with Docker and Kubernetes. Cluster design, deployment automation, security hardening, and managed Kubernetes services.',
}

export default function DockerKubernetesPage() {
  return (
    <main className="min-h-screen bg-[#f8fafc] text-slate-900">
      <Header />

      {/* ─── SECTION 1 · Hero — Container Visual ──── */}
      <section className="relative overflow-hidden bg-gradient-to-br from-slate-950 via-blue-950 to-blue-900 text-white pt-14 pb-20 lg:pt-16 lg:pb-28">
        <div className="absolute inset-0 opacity-[0.04]" style={{ backgroundImage: 'radial-gradient(circle at 1px 1px, #60a5fa 1px, transparent 0)', backgroundSize: '24px 24px' }} />
        <div className="relative max-w-7xl mx-auto px-6 lg:px-8">
          <div className="grid lg:grid-cols-5 gap-12 items-center">
            <div className="lg:col-span-3">
              <div className="w-14 h-14 rounded-2xl bg-gradient-to-br from-blue-400 to-blue-500 flex items-center justify-center mb-6 shadow-lg shadow-blue-500/30">
                <Container className="w-7 h-7 text-white" />
              </div>
              <h1 className="text-4xl lg:text-5xl xl:text-6xl font-extrabold leading-[1.1] mb-6">
                Docker & Kubernetes <span className="bg-gradient-to-r from-blue-400 to-blue-500 bg-clip-text text-transparent">at Enterprise Scale</span>
              </h1>
              <p className="text-lg text-slate-300 leading-relaxed mb-8 max-w-xl">
                Containerize your applications and orchestrate them with Kubernetes for maximum density, resilience, and portability. Our certified engineers design, build, and manage production-grade K8s clusters.
              </p>
              <div className="flex flex-wrap gap-4">
                <Link href="/contact" className="inline-flex items-center gap-2 bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-400 hover:to-blue-500 text-white font-bold text-sm px-6 py-3 rounded-xl shadow-lg shadow-blue-500/25 hover:shadow-blue-400/40 transition-all duration-300 hover:scale-105">
                  Start Container Journey <ArrowRight className="w-4 h-4" />
                </Link>
                <Link href="#architecture" className="inline-flex items-center gap-2 border border-white/20 hover:border-blue-400/40 text-white/80 hover:text-white font-semibold text-sm px-6 py-3 rounded-xl transition-all duration-300">
                  View Architecture
                </Link>
              </div>
            </div>
            {/* Hero Image */}
            <div className="lg:col-span-2 block order-first lg:order-last">
              <ServiceHeroImage label="Docker Kubernetes" stats={[{ value: '2K+', label: 'Containers' }, { value: '100+', label: 'K8s Clusters' }, { value: '99.9%', label: 'Orchestration' }]}>
              <div className="w-16 h-16 rounded-2xl bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center shadow-lg shadow-blue-500/20">
                <Container className="w-8 h-8 text-white" />
              </div>
            </ServiceHeroImage>
            </div>
          </div>
        </div>
      </section>

      {/* ─── SECTION 2 · Stats Bar ────────────────── */}
      <ScrollReveal>
      <section className="py-12 bg-gradient-to-r from-slate-950 via-blue-950 to-blue-900">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="grid grid-cols-2 md:grid-cols-4 gap-8">
            {[
              { number: '500+', label: 'K8s Clusters Managed', sub: 'Across all clients' },
              { number: '50K+', label: 'Containers Running', sub: 'In production' },
              { number: '99.99%', label: 'Cluster Uptime', sub: 'SLA-backed' },
              { number: '<2 min', label: 'Pod Restart Time', sub: 'Self-healing speed' },
            ].map((m, i) => (
              <div key={i} className="text-center">
                <p className="text-3xl lg:text-4xl font-extrabold text-white mb-1">{m.number}</p>
                <p className="text-sm font-semibold text-blue-300">{m.label}</p>
                <p className="text-xs text-slate-400 mt-1">{m.sub}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 3 · Container Services ────────── */}
      <ScrollReveal delay={100}>
      <section id="architecture" className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Our Services</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Complete Container & Orchestration Services</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
            {[
              { title: 'Docker Containerization', desc: 'Containerize existing applications with optimized Dockerfiles, multi-stage builds, and image best practices.', icon: Container },
              { title: 'Kubernetes Cluster Design', desc: 'Architecture design for HA clusters — control plane, worker nodes, networking, and storage.', icon: Layers },
              { title: 'Helm Chart Development', desc: 'Custom Helm charts for consistent, versioned, and templated deployments across environments.', icon: GitBranch },
              { title: 'Service Mesh (Istio)', desc: 'Traffic management, mTLS, canary routing, and observability with Istio or Linkerd.', icon: Network },
              { title: 'K8s Security Hardening', desc: 'Pod security policies, RBAC, network policies, and image scanning automation.', icon: Shield },
              { title: 'Managed K8s Services', desc: 'EKS, AKS, GKE management — upgrades, scaling, monitoring, and cost optimization.', icon: Cloud },
            ].map((item, i) => {
              const Icon = item.icon
              return (
                <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-lg transition-all duration-300">
                  <div className="w-11 h-11 rounded-xl bg-blue-50 flex items-center justify-center mb-4">
                    <Icon className="w-5 h-5 text-blue-600" />
                  </div>
                  <h3 className="font-bold mb-2">{item.title}</h3>
                  <p className="text-sm text-slate-500 leading-relaxed">{item.desc}</p>
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 4 · K8s Architecture ──────────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16 bg-gradient-to-b from-white to-slate-50">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Architecture</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Enterprise K8s Architecture</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6">
            {[
              { layer: 'Ingress Layer', components: ['NGINX Ingress', 'Traefik', 'AWS ALB', 'Cloudflare Tunnel'], icon: Globe },
              { layer: 'Service Mesh', components: ['Istio / Envoy', 'mTLS Encryption', 'Traffic Splitting', 'Circuit Breaking'], icon: Network },
              { layer: 'Workload Layer', components: ['Deployments', 'StatefulSets', 'DaemonSets', 'Jobs / CronJobs'], icon: Layers },
              { layer: 'Data Layer', components: ['Persistent Volumes', 'CSI Drivers', 'Operators', 'Database Helm Charts'], icon: Server },
            ].map((l, i) => {
              const Icon = l.icon
              return (
                <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-lg transition-all duration-300">
                  <div className="w-11 h-11 rounded-xl bg-blue-50 flex items-center justify-center mb-4">
                    <Icon className="w-5 h-5 text-blue-600" />
                  </div>
                  <h3 className="font-bold mb-3">{l.layer}</h3>
                  <ul className="space-y-2">
                    {l.components.map((c, j) => (
                      <li key={j} className="flex items-center gap-2 text-sm text-slate-600">
                        <div className="w-1.5 h-1.5 rounded-full bg-blue-400" />
                        {c}
                      </li>
                    ))}
                  </ul>
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 5 · Container Benefits ────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="grid lg:grid-cols-2 gap-12 items-center">
            <div className="text-center lg:text-left">
              <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Why Containers</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">The Container Advantage</h2>
            </div>
            <div className="space-y-5">
              {[
                { title: 'Portability', desc: 'Build once, run anywhere — laptop, data center, any cloud.', icon: Globe },
                { title: 'Density', desc: 'Run 10-20× more workloads on the same hardware vs VMs.', icon: Layers },
                { title: 'Self-Healing', desc: 'K8s automatically restarts failed containers and reschedules pods.', icon: RefreshCw },
                { title: 'Auto-Scaling', desc: 'HPA and VPA scale pods and nodes based on real-time demand.', icon: TrendingUp },
                { title: 'Zero-Downtime Deploys', desc: 'Rolling updates and canary deployments built into the platform.', icon: Zap },
              ].map((item, i) => {
                const Icon = item.icon
                return (
                  <div key={i} className="flex gap-4 items-start">
                    <div className="w-11 h-11 rounded-xl bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center flex-shrink-0 shadow-lg shadow-blue-500/15">
                      <Icon className="w-5 h-5 text-white" />
                    </div>
                    <div>
                      <h3 className="font-bold text-slate-900 mb-1">{item.title}</h3>
                      <p className="text-sm text-slate-500">{item.desc}</p>
                    </div>
                  </div>
                )
              })}
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 6 · Managed K8s Platforms ─────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16 bg-gradient-to-b from-white to-slate-50">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Managed Kubernetes</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">We Manage Every K8s Platform</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6">
            {[
              { name: 'Amazon EKS', desc: 'AWS managed Kubernetes with Fargate support.', cert: 'AWS EKS Certified' },
              { name: 'Azure AKS', desc: 'Azure Kubernetes with Azure AD integration.', cert: 'Azure K8s Certified' },
              { name: 'Google GKE', desc: 'Google managed K8s with Autopilot mode.', cert: 'GCP GKE Certified' },
              { name: 'Self-Managed K8s', desc: 'kubeadm, k3s, RKE2, or OpenShift clusters.', cert: 'CKA/CKAD Certified' },
            ].map((p, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-lg transition-all duration-300 text-center">
                <div className="w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center mx-auto mb-4 shadow-lg">
                  <Container className="w-6 h-6 text-white" />
                </div>
                <h3 className="font-bold mb-2">{p.name}</h3>
                <p className="text-sm text-slate-500 mb-3">{p.desc}</p>
                <span className="text-xs font-bold text-blue-600 bg-blue-50 px-3 py-1 rounded-full">{p.cert}</span>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 7 · Security ──────────────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">K8s Security</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Container Security at Every Layer</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
            {[
              { title: 'Image Security', desc: 'Base image scanning, signed images, and registry policies with Trivy and Cosign.', layer: 'Build Time' },
              { title: 'RBAC & Auth', desc: 'Fine-grained role-based access control with OIDC integration and audit logging.', layer: 'Access Time' },
              { title: 'Network Policies', desc: 'Microsegmentation with Calico or Cilium — deny-all default with explicit allows.', layer: 'Runtime' },
              { title: 'Pod Security', desc: 'Pod Security Standards (PSS) enforcement — privileged, baseline, restricted profiles.', layer: 'Runtime' },
              { title: 'Secrets Management', desc: 'External Secrets Operator with Vault, AWS SM, or Azure Key Vault integration.', layer: 'Runtime' },
              { title: 'Runtime Protection', desc: 'Falco runtime threat detection with automated response and alerting.', layer: 'Runtime' },
            ].map((item, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-6 hover:shadow-lg transition-all duration-300">
                <div className="flex items-center justify-between mb-3">
                  <h3 className="font-bold">{item.title}</h3>
                  <span className="text-[10px] font-bold text-blue-500 bg-blue-50 px-2 py-0.5 rounded-full">{item.layer}</span>
                </div>
                <p className="text-sm text-slate-500 leading-relaxed">{item.desc}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 8 · Migration to Containers ───── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16 bg-gradient-to-b from-white to-slate-50">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Containerization Journey</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">From VMs to Containers</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-5 gap-6">
            {[
              { step: '1', title: 'Assess', desc: 'Identify containerization candidates and dependencies.' },
              { step: '2', title: 'Dockerize', desc: 'Create optimized Dockerfiles with multi-stage builds.' },
              { step: '3', title: 'Orchestrate', desc: 'Design K8s manifests, Helm charts, and CI/CD integration.' },
              { step: '4', title: 'Harden', desc: 'Apply security policies, RBAC, and network segmentation.' },
              { step: '5', title: 'Operate', desc: '24/7 monitoring, scaling, and lifecycle management.' },
            ].map((s, i) => (
              <div key={i} className="text-center relative">
                <div className="w-14 h-14 rounded-2xl bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center mx-auto mb-4 shadow-lg shadow-blue-500/20">
                  <span className="text-xl font-extrabold text-white">{s.step}</span>
                </div>
                <h3 className="font-bold mb-1">{s.title}</h3>
                <p className="text-sm text-slate-500">{s.desc}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 9 · Case Studies ──────────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16">
        <div className="max-w-7xl mx-auto px-6 lg:px-8">
          <div className="text-center mb-12">
            <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Case Studies</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Container Wins</h2>
          </div>
          <div className="grid md:grid-cols-2 gap-8">
            {[
              { company: 'MicroService Corp', result: 'Migrated 200 microservices to EKS', metric: '70% Infrastructure Savings', detail: 'Replaced 150 EC2 instances with 30 EKS nodes running 200+ pods. Auto-scaling handles traffic spikes automatically.' },
              { company: 'DataPipeline Inc.', result: 'Real-time data processing on GKE', metric: '10M Events/Second', detail: 'Kafka on Kubernetes with auto-scaling consumer groups processing 10M events per second with sub-100ms latency.' },
            ].map((story, i) => (
              <div key={i} className="bg-white rounded-2xl border border-slate-200 p-8 hover:shadow-xl transition-all duration-300">
                <h3 className="font-bold text-lg mb-3">{story.company}</h3>
                <p className="text-sm font-semibold text-blue-600 mb-2">{story.result}</p>
                <p className="text-sm text-slate-500 mb-4">{story.detail}</p>
                <div className="text-center pt-4 border-t border-slate-100">
                  <p className="text-xl font-extrabold text-blue-600">{story.metric}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 10 · CTA ─────────────────────── */}
      <ScrollReveal>
      <section className="py-12 lg:py-16 bg-gradient-to-br from-slate-950 via-blue-950 to-blue-900">
        <div className="max-w-4xl mx-auto px-6 lg:px-8 text-center">
          <div className="inline-flex items-center gap-2 bg-blue-500/10 border border-blue-500/20 rounded-full px-4 py-1.5 mb-6">
            <Container className="w-3.5 h-3.5 text-blue-400" />
            <span className="text-xs font-semibold text-blue-300 uppercase tracking-wider">K8s Certified Engineers</span>
          </div>
          <h2 className="text-3xl lg:text-5xl font-extrabold text-white mb-6">
            Ready to Containerize Your Applications?
          </h2>
          <p className="text-lg text-slate-300 mb-10 max-w-2xl mx-auto">
            Get a free containerization assessment — including workload analysis, architecture design, and migration roadmap.
          </p>
          <div className="flex flex-wrap justify-center gap-4">
            <Link href="/contact" className="inline-flex items-center gap-2 bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-400 hover:to-blue-500 text-white font-bold px-8 py-4 rounded-xl shadow-lg shadow-blue-500/25 hover:shadow-blue-400/40 transition-all duration-300 hover:scale-105">
              Free Assessment <ArrowRight className="w-4 h-4" />
            </Link>
            <Link href="/contact" className="inline-flex items-center gap-2 border border-white/20 hover:border-blue-400/40 text-white/80 hover:text-white font-semibold px-8 py-4 rounded-xl transition-all duration-300">
              Talk to a K8s Engineer
            </Link>
          </div>
          <p className="text-xs text-slate-400 mt-8">No commitment · Assessment in 3 days · NDA available</p>
        </div>
      </section>
      </ScrollReveal>

      <Footer />
    </main>
  )
}
