import React, { useRef, useState, useEffect } from 'react'; export const AnimatedSection = ({ children, className = '', delay = 0 }) => { const ref = useRef(null); const [isVisible, setIsVisible] = useState(false); useEffect(() => { const observer = new IntersectionObserver( ([entry]) => { if (entry.isIntersecting) { setIsVisible(true); observer.disconnect(); } }, { threshold: 0.1, rootMargin: '0px 0px -40px 0px' } ); if (ref.current) observer.observe(ref.current); return () => observer.disconnect(); }, []); return (