'use client'; import { useRef, type ReactNode } from 'react'; // Adapted from React Bits' SpotlightCard (reactbits.dev, MIT) — a soft glow // that follows the cursor, recoloured to the brand's dorado instead of the // original's plain white. Pure CSS custom properties + a `before:` pseudo // element, so no separate stylesheet is needed. export function TarjetaSpotlight({ children, className = '', spotlightColor = 'rgba(196, 148, 46, 0.16)', // dorado, low alpha }: { children: ReactNode; className?: string; spotlightColor?: string; }) { const ref = useRef(null); const handleMouseMove = (e: React.MouseEvent) => { const el = ref.current; if (!el) return; const rect = el.getBoundingClientRect(); el.style.setProperty('--spot-x', `${e.clientX - rect.left}px`); el.style.setProperty('--spot-y', `${e.clientY - rect.top}px`); }; return (
{children}
); }