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,
  Server,
  Cloud,
  Layers,
  ArrowRight,
  CheckCircle2,
  TrendingUp,
  DollarSign,
  Shield,
  Zap,
  Globe,
  BarChart3,
  GitBranch,
  RefreshCw,
  Monitor,
  Lock,
  Cpu,
  HardDrive,
  Network,
} from 'lucide-react'

export const metadata = {
  title: 'Virtualization Services - Drish Infra',
  description:
    'Enterprise virtualization solutions — VMware, Hyper-V, KVM, and cloud-native virtualization. Maximize hardware utilization and reduce costs with our expert virtualization services.',
}

/* ══════════════════════════════════════════════════ */
/*  PAGE  –  Virtualization                           */
/*  10 Unique Sections                               */
/* ══════════════════════════════════════════════════ */
export default function VirtualizationPage() {
  return (
    <main className="min-h-screen bg-[#f8fafc] text-slate-900">
      <Header />

      {/* ─── SECTION 1 · Hero — Split with Visual ── */}
      <section className="relative overflow-hidden bg-gradient-to-br from-slate-900 via-blue-900 to-blue-800 text-white pt-14 pb-20 lg:pt-16 lg:pb-28">
        {/* hex pattern */}
        <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="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">Virtualization Services</span>
              </div>
              <h1 className="text-4xl lg:text-5xl xl:text-6xl font-extrabold leading-[1.1] mb-6">
                One Physical Server, <span className="bg-gradient-to-r from-blue-400 to-blue-500 bg-clip-text text-transparent">Infinite Possibilities</span>
              </h1>
              <p className="text-lg text-slate-300 leading-relaxed mb-8 max-w-xl">
                Consolidate hardware, slash costs, and unlock elastic scalability with enterprise-grade virtualization designed and managed by our certified architects.
              </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">
                  Get a Free Assessment <ArrowRight className="w-4 h-4" />
                </Link>
                <Link href="#platforms" 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">
                  Compare Platforms
                </Link>
              </div>
            </div>
            {/* Hero Image */}
            <div className="lg:col-span-2 block order-first lg:order-last">
              <ServiceHeroImage label="Virtualization" stats={[{ value: 'VMware', label: 'Certified' }, { value: '60%', label: 'Cost Saved' }, { value: '99.9%', label: 'Uptime' }]}>
              <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 · ROI Calculator ───────────── */}
      <ScrollReveal>
      <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">The Business Case</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">Virtualization Pays for Itself in 90 Days</h2>
              <p className="text-slate-500 leading-relaxed mb-8">
                Server virtualization reduces hardware costs by 40-60%, energy costs by 30-50%, and dramatically improves disaster recovery capabilities. Our clients see ROI within the first quarter.
              </p>
            </div>
            <div className="bg-gradient-to-br from-blue-50 to-blue-100/50 rounded-3xl border border-blue-100 p-8">
              <h3 className="font-bold text-lg mb-6 text-slate-900">Typical Savings After Virtualization</h3>
              <div className="space-y-5">
                {[
                  { label: 'Hardware Costs', before: '$120K/yr', after: '$48K/yr', saving: '60%', color: 'bg-blue-500', width: '60%' },
                  { label: 'Energy & Cooling', before: '$24K/yr', after: '$8K/yr', saving: '67%', color: 'bg-blue-500', width: '67%' },
                  { label: 'Admin Overhead', before: '4 FTE', after: '1.5 FTE', saving: '63%', color: 'bg-blue-500', width: '63%' },
                  { label: 'Downtime Cost', before: '$50K/event', after: '$0 (HA)', saving: '100%', color: 'bg-blue-600', width: '100%' },
                ].map((item, i) => (
                  <div key={i}>
                    <div className="flex justify-between text-sm mb-1.5">
                      <span className="font-medium text-slate-700">{item.label}</span>
                      <span className="font-bold text-blue-600">{item.saving} saved</span>
                    </div>
                    <div className="h-2.5 bg-blue-100 rounded-full overflow-hidden">
                      <div className={`h-full rounded-full ${item.color}`} style={{ width: item.width }} />
                    </div>
                    <div className="flex justify-between text-xs text-slate-400 mt-1">
                      <span>Before: {item.before}</span>
                      <span>After: {item.after}</span>
                    </div>
                  </div>
                ))}
              </div>
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 3 · Platform Comparison ──────── */}
      <ScrollReveal delay={100}>
      <section id="platforms" 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">Platform Comparison</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">We Support Every Major Hypervisor</h2>
            <p className="text-slate-500 max-w-2xl mx-auto">Our architects recommend the platform that fits your workload, budget, and team expertise — not the one with the biggest marketing budget.</p>
          </div>
          <div className="overflow-x-auto">
            <div className="min-w-[700px]">
              <div className="grid grid-cols-4 gap-0 border border-slate-200 rounded-2xl overflow-hidden bg-white">
                {/* Header */}
                <div className="p-4 bg-slate-50 border-b border-slate-200 font-bold text-sm text-slate-500">Feature</div>
                {['VMware vSphere', 'Microsoft Hyper-V', 'KVM / Proxmox'].map((p, i) => (
                  <div key={i} className="p-4 bg-slate-50 border-b border-slate-200 border-l text-center">
                    <p className="font-bold text-sm text-slate-900">{p}</p>
                  </div>
                ))}
                {/* Rows */}
                {[
                  { feature: 'Best For', values: ['Enterprise workloads', 'Windows-heavy orgs', 'Cost-conscious / Open-source'] },
                  { feature: 'Live Migration', values: ['vMotion ✓', 'Quick Migration ✓', 'Migration ✓'] },
                  { feature: 'HA / Failover', values: ['DRS + HA ✓', 'Failover Clustering ✓', 'Corosync/Pacemaker ✓'] },
                  { feature: 'Cost', values: ['$$$$', '$$$', '$ / Free'] },
                  { feature: 'Learning Curve', values: ['Moderate', 'Low (MS admins)', 'Steep'] },
                  { feature: 'We Support', values: ['✓ Certified', '✓ Certified', '✓ Certified'] },
                ].map((row, ri) => (
                  <div key={ri} className={`${ri % 2 === 0 ? 'bg-white' : 'bg-slate-50/50'}`}>
                    <div className="p-4 border-b border-slate-100 font-medium text-sm text-slate-700">{row.feature}</div>
                    {row.values.map((val, vi) => (
                      <div key={vi} className="p-4 border-b border-slate-100 border-l text-center text-sm text-slate-600">{val}</div>
                    ))}
                  </div>
                ))}
              </div>
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 4 · Virtualization Types ─────── */}
      <ScrollReveal>
      <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">Virtualization Types</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Every Layer, Virtualized</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-8">
            {[
              { title: 'Server Virtualization', desc: 'Run multiple OS instances on a single physical server with full hardware isolation and resource allocation.', icon: Server, color: 'from-blue-500 to-blue-600' },
              { title: 'Desktop Virtualization (VDI)', desc: 'Deliver secure, managed desktops to any device — BYOD, remote workers, or contractor access.', icon: Monitor, color: 'from-blue-500 to-blue-600' },
              { title: 'Network Virtualization (SDN)', desc: 'Decouple network services from hardware — create virtual switches, routers, and firewalls in software.', icon: Network, color: 'from-blue-500 to-blue-600' },
              { title: 'Storage Virtualization', desc: 'Pool physical storage into a single logical volume with thin provisioning, snapshots, and replication.', icon: HardDrive, color: 'from-blue-500 to-blue-600' },
              { title: 'Application Virtualization', desc: 'Package and deliver apps without installation — App-V, Citrix, and container-based isolation.', icon: Layers, color: 'from-blue-500 to-blue-600' },
              { title: 'Data Center Virtualization', desc: 'Software-defined data centers — compute, storage, and networking all orchestrated through a single control plane.', icon: Globe, color: 'from-blue-500 to-blue-600' },
            ].map((item, i) => {
              const Icon = item.icon
              return (
                <div key={i} className="group bg-white rounded-2xl border border-slate-200 p-8 hover:shadow-xl hover:-translate-y-1 transition-all duration-300">
                  <div className={`w-14 h-14 rounded-2xl bg-gradient-to-br ${item.color} flex items-center justify-center mb-5 shadow-lg group-hover:scale-110 transition-transform duration-300`}>
                    <Icon className="w-7 h-7 text-white" />
                  </div>
                  <h3 className="font-bold text-xl mb-3">{item.title}</h3>
                  <p className="text-sm text-slate-500 leading-relaxed">{item.desc}</p>
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 5 · Key Metrics ──────────────── */}
      <ScrollReveal>
      <section className="py-12 bg-gradient-to-r from-slate-900 via-blue-900 to-blue-800">
        <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: '75%', label: 'Hardware Consolidation', sub: 'Avg. physical servers eliminated' },
              { number: '$1.2M', label: 'Client Savings', sub: 'Average annual cost reduction' },
              { number: '15 min', label: 'VM Provisioning', sub: 'From request to production' },
              { number: '99.99%', label: 'VM Uptime', sub: 'Across all managed environments' },
            ].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 6 · Virtual Desktop (VDI) ────── */}
      <ScrollReveal delay={100}>
      <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="grid lg:grid-cols-2 gap-12 items-center">
            <div className="relative">
              <div className="aspect-[4/3] rounded-3xl overflow-hidden bg-gradient-to-br from-blue-100 to-blue-50 border border-blue-100 mb-6">
                <img src="/placeholder.jpg" alt="Virtual Desktop Infrastructure" className="w-full h-full object-cover" />
              </div>
              <div className="absolute -bottom-4 -right-4 bg-white rounded-2xl border border-slate-200 shadow-xl p-4 max-w-[200px]">
                <div className="flex items-center gap-2 mb-2">
                  <div className="w-2 h-2 rounded-full bg-green-500 animate-pulse" />
                  <span className="text-xs font-bold text-green-600 uppercase">VDI Active</span>
                </div>
                <p className="text-xl font-extrabold text-slate-900">5K+</p>
                <p className="text-xs text-slate-500">Virtual desktops delivered</p>
              </div>
            </div>
            <div>
              <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">VDI Solutions</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">Virtual Desktops for Every Workforce</h2>
              <p className="text-slate-500 leading-relaxed mb-8">
                Enable remote work, BYOD policies, and contractor access with secure, centrally managed virtual desktops. Access your desktop from any device, anywhere.
              </p>
              <div className="grid grid-cols-2 gap-4 mb-8">
                {[
                  'Citrix Virtual Apps & Desktops',
                  'VMware Horizon',
                  'Microsoft AVD (Azure)',
                  'Amazon WorkSpaces',
                  'Parsec / Teradici',
                  'Custom Linux VDI',
                ].map((t, i) => (
                  <div key={i} className="flex items-center gap-2 text-sm text-slate-600">
                    <CheckCircle2 className="w-4 h-4 text-blue-500 flex-shrink-0" />
                    {t}
                  </div>
                ))}
              </div>
              <div className="bg-white rounded-3xl border border-slate-200 p-8 shadow-xl">
                <h3 className="font-bold text-lg mb-6">VDI at a Glance</h3>
                {[
                  { label: 'Security', desc: 'Data never leaves the data center — zero endpoint risk', icon: Lock },
                  { label: 'Scalability', desc: 'Spin up 100 desktops in minutes for seasonal teams', icon: TrendingUp },
                  { label: 'Cost', desc: '60% cheaper than provisioning physical laptops', icon: DollarSign },
                  { label: 'Management', desc: 'One golden image, patched once, deployed everywhere', icon: RefreshCw },
                ].map((item, i) => {
                  const Icon = item.icon
                  return (
                    <div key={i} className="flex gap-4 items-start mb-5 last:mb-0">
                      <div className="w-10 h-10 rounded-xl bg-blue-50 flex items-center justify-center flex-shrink-0">
                        <Icon className="w-5 h-5 text-blue-600" />
                      </div>
                      <div>
                        <h4 className="font-bold text-sm text-slate-900">{item.label}</h4>
                        <p className="text-sm text-slate-500">{item.desc}</p>
                      </div>
                    </div>
                  )
                })}
              </div>
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 7 · Use Cases by Industry ────── */}
      <ScrollReveal>
      <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">Use Cases</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">Virtualization in Action</h2>
          </div>
          <div className="grid md:grid-cols-3 gap-8">
            {[
              { title: 'Dev & Test Environments', desc: 'Developers get self-service VM provisioning with pre-built templates. Spin up test environments in minutes, tear them down when done.', stat: '10× faster provisioning' },
              { title: 'Disaster Recovery', desc: 'VM-level replication across sites with automated failover. RPO of minutes, not hours. Test DR drills without impacting production.', stat: 'RPO < 15 minutes' },
              { title: 'Legacy App Modernization', desc: 'Run legacy apps that can\'t be containerized on modern hardware. Bridge old and new with virtualization as the compatibility layer.', stat: 'Extend app life by 5+ years' },
            ].map((uc, 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">{uc.title}</h3>
                <p className="text-sm text-slate-500 leading-relaxed mb-6">{uc.desc}</p>
                <div className="pt-4 border-t border-slate-100 text-center">
                  <p className="text-xl font-extrabold text-blue-600">{uc.stat}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 8 · Our Virtualization Process ── */}
      <ScrollReveal delay={100}>
      <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">Our Process</p>
            <h2 className="text-3xl lg:text-4xl font-extrabold mb-4">From Assessment to Production in Weeks</h2>
          </div>
          <div className="grid sm:grid-cols-2 lg:grid-cols-5 gap-6">
            {[
              { step: '01', title: 'Workload Analysis', desc: 'Profile every workload for CPU, memory, I/O, and network requirements.', icon: BarChart3 },
              { step: '02', title: 'Platform Selection', desc: 'Choose the right hypervisor based on your needs, skills, and budget.', icon: GitBranch },
              { step: '03', title: 'Architecture Design', desc: 'Design HA clusters, storage tiers, and network segmentation.', icon: Layers },
              { step: '04', title: 'Build & Migrate', desc: 'Deploy the platform and migrate workloads with zero downtime.', icon: Zap },
              { step: '05', title: 'Optimize & Support', desc: 'Tune performance, implement monitoring, and provide 24/7 support.', icon: RefreshCw },
            ].map((s, i) => {
              const Icon = s.icon
              return (
                <div key={i} className="text-center relative">
                  <div className="w-16 h-16 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">
                    <Icon className="w-7 h-7 text-white" />
                  </div>
                  <p className="text-xs font-bold text-blue-500 mb-2">Step {s.step}</p>
                  <h3 className="font-bold mb-2">{s.title}</h3>
                  <p className="text-sm text-slate-500">{s.desc}</p>
                  {i < 4 && <div className="hidden lg:block absolute top-8 right-0 w-6 h-px bg-blue-300" />}
                </div>
              )
            })}
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 9 · Client Success Stories ───── */}
      <ScrollReveal>
      <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>
              <p className="text-xs font-bold text-blue-600 uppercase tracking-wider mb-3">Success Stories</p>
              <h2 className="text-3xl lg:text-4xl font-extrabold mb-6">Real Results from Real Clients</h2>
            </div>
            <div className="space-y-6">
              {[
                { company: 'CloudFirst SaaS', result: 'Consolidated 120 physical servers to 12 hosts', saving: '$840K/year savings', detail: 'VMware vSphere cluster with automated DRS and HA across 3 data centers.' },
                { company: 'SecureBank Corp', result: 'Achieved PCI-DSS compliance with isolated VDI', saving: '100% compliance score', detail: 'Citrix VDI for 500 analysts — no data leaves the secure data center.' },
              ].map((story, 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">{story.company}</h3>
                    <span className="text-xs font-bold text-blue-600 bg-blue-50 px-3 py-1 rounded-full">{story.saving}</span>
                  </div>
                  <p className="text-sm font-semibold text-slate-700 mb-2">{story.result}</p>
                  <p className="text-sm text-slate-500">{story.detail}</p>
                </div>
              ))}
            </div>
          </div>
        </div>
      </section>
      </ScrollReveal>

      {/* ─── SECTION 10 · CTA ─────────────────────── */}
      <ScrollReveal delay={100}>
      <section className="py-12 lg:py-16 bg-gradient-to-br from-slate-900 via-blue-900 to-blue-800">
        <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">Virtualization Experts</span>
          </div>
          <h2 className="text-3xl lg:text-5xl font-extrabold text-white mb-6">
            Ready to Virtualize Your Infrastructure?
          </h2>
          <p className="text-lg text-slate-300 mb-10 max-w-2xl mx-auto">
            Get a free workload assessment and a custom virtualization roadmap — including projected ROI and TCO analysis.
          </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 an Architect
            </Link>
          </div>
          <p className="text-xs text-slate-400 mt-8">No commitment · ROI report in 48h · NDA available</p>
        </div>
      </section>
      </ScrollReveal>

      <Footer />
    </main>
  )
}
