import React, { useState, useRef, useLayoutEffect } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; gsap.registerPlugin(ScrollTrigger); const servicesData = [ { id: 1, category: 'IT Infrastructure', title: 'Windows 11 Transition', description: 'Seamless upgrades for your entire fleet. We handle compatibility checks, data backup, and deployment so your workflow never stutters.', icon: 'desktop_windows', image: 'https://lh3.googleusercontent.com/aida-public/AB6AXuBMpd_cFINnFibfNErBs8OVAAyDQYTRXix88YH91QImuGi11XGwlY_QUB2R9htcC1h_fTXUeftdEieGT-oi5p5TBjpAyW-86mSsXu-rqhRTBsJlAGuE37bxJES4DUayktXIToEcF-M4PyXdyyTPIYtpYrxK18b2-sPwMzuzCL0LpgJwd5EoYxAkrJQ7W4eBrIG2e9Cw9sY0dJpXJy-TRgwBG0nk-S7W4Y0s3U9w--AzE4fcUimeGMqWwdCncU5tnETmkrkDNFiCyKSA' }, { id: 2, category: 'Security', title: 'Web Services & Security', description: 'From hosting to rigorous penetration testing. Secure your digital storefront with enterprise-grade protection and 99.9% uptime.', icon: 'security', image: 'https://lh3.googleusercontent.com/aida-public/AB6AXuCxibXNCB5mU7MdWE5znMWnQUc9-d2ZoYF7LXK1CMssnvaFz2ZsGzyxXMbqDmely-UfxapqILD5-Exeo1wlQZKg8T2MK4vjlyAMaehoJoqTy2hHh8rxj46i8CKb4-ILL2JswBc98nJt_Fo1DfcDH0dHH5Zz6H4R2Jm1deViSW8Sp2zNp1sTc4eRHy1URiSRQFcr1C8rca6dKiuNDuyDiUmmesqHobXGItaBeFjJC-0OatWpKbr0zF-Y5qvk9Yl5FY2KUcDY9AcTfelu' }, { id: 3, category: 'Consulting', title: 'Performance Upgrades', description: 'Is your hardware holding you back? We analyze bottlenecks and implement strategic upgrades to memory, storage, and networks.', icon: 'speed', image: 'https://lh3.googleusercontent.com/aida-public/AB6AXuBs2fGGwp4EkMarA9Uvy7IOqyW0Pzxzt-94Bsr8Tkbem4uHPq-vMEmGgKuEmds2zKwPrw2nVcvL3MjjKYWieLSLh5pVUbbK6T9aDxt2xhvo4trARZobhzoQCJfI-r6aGW_aqfwC5XxOr9VA3YdnNnYEgkfW_TWrUWYa6mD8X0KdVG3sLimA8p7qWxIqUzFFV82twn60rP4OwLdIsc6t1OGnJzjemxL1Aw05aDo6Ckfr0a1oZ2kD4xKeTkG--zUhezvXB9I03l6f3b46' } ]; const categories = ['All', 'IT Infrastructure', 'Web Development', 'Consulting', 'Security']; const Services: React.FC = () => { const [activeCategory, setActiveCategory] = useState('All'); const containerRef = useRef(null); const imagesRef = useRef<(HTMLDivElement | null)[]>([]); // Reset refs on render to handle filtering updates imagesRef.current = []; const filteredServices = activeCategory === 'All' ? servicesData : servicesData.filter(s => s.category === activeCategory || (activeCategory === 'Web Development' && s.category === 'Security')); useLayoutEffect(() => { const ctx = gsap.context(() => { imagesRef.current.forEach((imgWrapper) => { if (!imgWrapper) return; gsap.to(imgWrapper, { yPercent: 30, ease: "none", scrollTrigger: { trigger: imgWrapper.closest('.group'), start: "top bottom", end: "bottom top", scrub: true } }); }); }, containerRef); return () => ctx.revert(); }, [filteredServices]); return (
Core Offerings

Different paths to explore all guided by one expert team.

{categories.map((cat) => ( ))}
{filteredServices.map((service) => ( {/* Image Container */}
{/* Parallax Wrapper */}
{ if (el) imagesRef.current.push(el); }} className="w-full h-[140%] -mt-[20%]" > {service.title}
{service.icon}

{service.title}

{service.description}

Learn More arrow_forward
))}
); }; export default Services;