"use client"; import React, { useEffect, useRef } from "react"; import Link from "next/link"; import Image from "next/image"; interface FeatureItem { title: string; desc: string; icon: string; image: string; imageAlt: string; defaultActive?: boolean; delay: number; } /* SVG icons matching the original icon font shapes */ const IdeaIcon = () => ( ); const GrowthIcon = () => ( ); const TeamIcon = () => ( ); const ArrowIcon = () => ( ); const features: FeatureItem[] = [ { title: "Comprehensive digital development", desc: "Expert web, app development and e-commerce solutions.", icon: "/assets/images/services/feature/comprehensive.png", image: "/assets/images/services/feature/1-1.webp", imageAlt: "Comprehensive Digital Development", delay: 0, }, { title: "Strategic online growth solutions", desc: "Strategic SEO and digital marketing for growth.", icon: "/assets/images/services/feature/strategic.png", image: "/assets/images/services/feature/1-2.webp", imageAlt: "Strategic Online Growth Solutions", defaultActive: true, delay: 200, }, { title: "Creative design and branding excellence", desc: "Creative graphic design and branding strategy services.", icon: "/assets/images/services/feature/creative.png", image: "/assets/images/services/feature/1-3.webp", imageAlt: "Creative Design and Branding Excellence", delay: 400, }, ]; const FeaturesSection = () => { const itemRefs = useRef<(HTMLDivElement | null)[]>([]); useEffect(() => { const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { const el = entry.target as HTMLElement; const delay = parseInt(el.dataset.wowDelay || "0"); setTimeout(() => { el.style.opacity = "1"; el.style.transform = "translateY(0)"; el.style.visibility = "visible"; }, delay); observer.unobserve(el); } }); }, { threshold: 0.1 } ); itemRefs.current.forEach((el) => { if (el) observer.observe(el); }); return () => observer.disconnect(); }, []); return ( Strategic Digital Services Innovation & Growth {features.map((feature, index) => ( { itemRefs.current[index] = el; }} className={`fo-item${feature.defaultActive ? " fo-item--active" : ""}`} data-wow-delay={String(feature.delay)} style={{ opacity: 0, transform: "translateY(40px)", transition: `opacity 1.5s ease ${feature.delay}ms, transform 1.5s ease ${feature.delay}ms`, visibility: "hidden", }} > {/* Hover overlay card — slides down from top */} {/* Circle icon badge above the hover card */} {feature.title} {/* */} {/* Main card */} {/* Top dark section */} {/* Mobile only icon */} {feature.title} {/* */} {feature.desc} {/* Bottom white section with image + floating icon */} ))} ); }; export default FeaturesSection;
{feature.desc}