'use client' import { motion, AnimatePresence } from 'framer-motion' import { useState, useEffect } from 'react' import Link from 'next/link' import Image from 'next/image' const heroSlots = [ { srcs: [ 'https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?q=80&w=2070&auto=format&fit=crop', 'https://images.unsplash.com/photo-1566665797739-1674de7a421a?q=80&w=2070&auto=format&fit=crop', 'https://images.unsplash.com/photo-1590490360182-c33d57733427?q=80&w=2070&auto=format&fit=crop', ], rotate: -12, top: '15%', left: '22%', size: 'w-48 h-64 md:w-64 md:h-80', delay: 0.2 }, { srcs: [ 'https://images.unsplash.com/photo-1544124499-58912cbddaad?q=80&w=2127&auto=format&fit=crop', 'https://images.unsplash.com/photo-1520250497591-112f2f40a3f4?q=80&w=2127&auto=format&fit=crop', 'https://images.unsplash.com/photo-1571896349842-33c89424de2d?q=80&w=2127&auto=format&fit=crop', ], rotate: 10, top: '10%', left: '58%', size: 'w-52 h-64 md:w-72 md:h-80', delay: 0.4 }, { srcs: [ 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=2073&auto=format&fit=crop', 'https://images.unsplash.com/photo-1519046904884-53103b34b206?q=80&w=2073&auto=format&fit=crop', 'https://images.unsplash.com/photo-1506929199020-feee17651703?q=80&w=2073&auto=format&fit=crop', ], rotate: -8, top: '65%', left: '18%', size: 'w-48 h-60 md:w-64 md:h-72', delay: 0.6 }, { srcs: [ 'https://images.unsplash.com/photo-1536935338218-422119932906?q=80&w=1964&auto=format&fit=crop', 'https://images.unsplash.com/photo-1618773928121-c32242e63f39?q=80&w=1964&auto=format&fit=crop', 'https://images.unsplash.com/photo-1560185007-cde436f6a4d0?q=80&w=1964&auto=format&fit=crop', ], rotate: 15, top: '72%', left: '62%', size: 'w-52 h-64 md:w-72 md:h-88', delay: 0.8 } ] function FloatingSlot({ slot, idx }: { slot: typeof heroSlots[0], idx: number }) { const [currentIdx, setCurrentIdx] = useState(0) useEffect(() => { const interval = setInterval(() => { setCurrentIdx((prev) => (prev + 1) % slot.srcs.length) }, 4000 + idx * 500) return () => clearInterval(interval) }, [slot.srcs.length, idx]) return ( ) } export default function Hero({ lang, dict }: { lang: string, dict: any }) { return (
{/* BACKGROUND TEXT */}

{dict.hero.title}

{/* FLOATING SLOTS */} {heroSlots.map((slot, idx) => ( ))} {/* BOTTOM CONTENT */}
{dict.hero.desc} {dict.hero.explore}
) }