"use client"; import { useState, useRef } from "react"; import { motion } from "framer-motion"; import { Star, Quote, Sparkles } from "lucide-react"; export default function Testimonials() { const containerRef = useRef(null); // Testimonials database const reviews = [ { name: "Aishwarya Krishnan", role: "Culinary Critic, Madras Digest", quote: "My Dosa Place is not merely a restaurant; it is a culinary sanctuary. The ghee roast dosa had the exact golden ghee crunch that I've only ever tasted in heritage kitchens. The visual focus onto our set table completes this extraordinary sensory theatre.", rating: 5, }, { name: "Dr. Raghavan Pillai", role: "Heritage Historian", quote: "Dining here felt like attending a grand royal feast in a Chola palace. The attention to traditional serving etiquette, the stone-paved floor, and the hand-ground masalas are a testament to true preservation of culture.", rating: 5, }, { name: "Siddharth Malhotra", role: "Luxury Connoisseur", quote: "The WebGL 3D interface was impressive, but the real-life experience surpassed it. The Chef's storytelling through spices, the live flute tunes, and the incredible banana-leaf thali is unmatched. A true 5-star experience.", rating: 5, }, ]; // 3D Card Hover Tilt logic (programmatic per card) const Card = ({ review }: { review: typeof reviews[0] }) => { const cardRef = useRef(null); const [rotateX, setRotateX] = useState(0); const [rotateY, setRotateY] = useState(0); const handleMouseMove = (e: React.MouseEvent) => { const card = cardRef.current; if (!card) return; const rect = card.getBoundingClientRect(); const width = rect.width; const height = rect.height; const mouseX = e.clientX - rect.left - width / 2; const mouseY = e.clientY - rect.top - height / 2; // Calculate rotation angles (max 12 degrees) const rX = -(mouseY / (height / 2)) * 10; const rY = (mouseX / (width / 2)) * 10; setRotateX(rX); setRotateY(rY); }; const handleMouseLeave = () => { setRotateX(0); setRotateY(0); }; return (
{/* Decorative Corner Borders */}
{/* Background Ambient Glow */}
{/* Quote Icon */}
{Array.from({ length: review.rating }).map((_, i) => ( ))}
{/* Review Text */}

"{review.quote}"

{/* Reviewer Details */}
{review.name} {review.role}
); }; return (
{/* Background Graphic elements */}
{/* Title */}
H O N O R E D P A T R O N S

GUEST CRITICS & DIARIES

{/* Reviews Cards Grid */}
{reviews.map((review, idx) => ( ))}
); }