'use client' import { useEffect, useRef } from 'react' import { gsap } from 'gsap' import { ScrollTrigger } from 'gsap/ScrollTrigger' import Image from 'next/image' if (typeof window !== 'undefined') { gsap.registerPlugin(ScrollTrigger) } interface Feature { title: string description: string image: string icon: string } const features: Feature[] = [ { title: "Close-Up Magic", description: "Intimate table-to-table performances that break the ice and create unforgettable moments for your guests.", image: "https://images.eventpeppers.com/sites/default/files/imagecache/lightbox-preview/images/13234/michael-peskov-magier-taschendieb-450253.jpeg", icon: "✨" }, { title: "Stage Shows", description: "Grand illusions and interactive performances that captivate entire audiences with wonder and amazement.", image: "https://images.eventpeppers.com/sites/default/files/imagecache/lightbox-preview/images/13234/michael-peskov-magier-taschendieb-450255.jpeg", icon: "🎭" }, { title: "Pickpocket Act", description: "Masterful sleight of hand that entertains while teaching guests how to protect themselves from real pickpockets.", image: "https://images.eventpeppers.com/sites/default/files/imagecache/lightbox-preview/images/13234/michael-peskov-magier-taschendieb-450254.jpeg", icon: "🎩" }, { title: "Corporate Events", description: "Professional entertainment that elevates business gatherings and creates memorable experiences for clients.", image: "https://images.eventpeppers.com/sites/default/files/imagecache/lightbox-preview/images/13234/michael-peskov-magier-taschendieb-450256.jpeg", icon: "💼" } ] export default function FeatureCards() { const containerRef = useRef(null) useEffect(() => { const container = containerRef.current if (!container) return // Check for reduced motion const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches const ctx = gsap.context(() => { const cards = gsap.utils.toArray('.feature-card') cards.forEach((card, i) => { const image = card.querySelector('.feature-image') const content = card.querySelector('.feature-content') if (prefersReducedMotion) { // Simple fade for reduced motion gsap.from(card, { opacity: 0, y: 30, duration: 0.6, delay: i * 0.1, scrollTrigger: { trigger: card, start: 'top 80%', toggleActions: 'play none none reverse' } }) } else { // Full animation with perspective and clip-mask gsap.set(card, { rotateX: 15, rotateY: 5, transformPerspective: 1000, transformOrigin: 'center center' }) gsap.set(image, { clipPath: 'inset(0 0 100% 0)' }) gsap.set(content, { opacity: 0, y: 50 }) const tl = gsap.timeline({ scrollTrigger: { trigger: card, start: 'top 75%', toggleActions: 'play none none reverse' } }) tl.to(card, { rotateX: 0, rotateY: 0, duration: 0.8, ease: 'power2.out' }) .to(image, { clipPath: 'inset(0 0 0% 0)', duration: 0.6, ease: 'power2.out' }, '-=0.6') .to(content, { opacity: 1, y: 0, duration: 0.6, ease: 'power2.out' }, '-=0.4') // Hover effects const handleMouseEnter = () => { gsap.to(card, { rotateX: -5, rotateY: 5, scale: 1.02, duration: 0.3, ease: 'power2.out' }) gsap.to(image, { scale: 1.1, duration: 0.3, ease: 'power2.out' }) } const handleMouseLeave = () => { gsap.to(card, { rotateX: 0, rotateY: 0, scale: 1, duration: 0.3, ease: 'power2.out' }) gsap.to(image, { scale: 1, duration: 0.3, ease: 'power2.out' }) } card.addEventListener('mouseenter', handleMouseEnter) card.addEventListener('mouseleave', handleMouseLeave) } }) }, container) return () => ctx.revert() }, []) return (

Magical Experiences

From intimate gatherings to grand celebrations, discover the perfect magical experience for your event.

{features.map((feature, i) => (
{feature.title}
{feature.icon}

{feature.title}

{feature.description}

))}
) }