"use client"; import { useState } from "react"; import Image from "next/image"; const faqs = [ { question: "What types of properties do you offer?", answer: "We offer a wide range of properties including luxury apartments, premium villas, and sustainable eco-homes designed to blend with nature." }, { question: "How can I book a site visit?", answer: "You can book a site visit by clicking the 'Book a Visit' button on our website or by contacting our sales team directly through the contact form." }, { question: "Do you provide assistance with home loans?", answer: "Yes, we have tie-ups with leading banks and financial institutions to help you secure the best home loan rates and assist with the documentation process." }, { question: "Are your projects RERA registered?", answer: "Absolutely. All our projects are fully compliant with RERA regulations and we ensure complete transparency in all our dealings." }, { question: "What amenities are included in your projects?", answer: "Our projects feature world-class amenities such as swimming pools, clubhouses, landscaped gardens, 24/7 security, and dedicated fitness centers." } ]; const carouselImages = [ { src: "/1-f63fe3ad.png", label: "Building Exterior" }, { src: "/hero-image.jpg", label: "Luxury Amenities" }, { src: "/1-f63fe3ad.png", label: "Modern Architecture" } ]; export default function FAQ() { const [openIndex, setOpenIndex] = useState(null); const [activeCard, setActiveCard] = useState(0); const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); const [isHovering, setIsHovering] = useState(false); const toggleFAQ = (index: number) => { setOpenIndex(openIndex === index ? null : index); }; const nextCard = () => { setActiveCard((prev) => (prev + 1) % carouselImages.length); }; const handleMouseMove = (e: React.MouseEvent) => { const rect = e.currentTarget.getBoundingClientRect(); const x = e.clientX - rect.left; const centerX = rect.width / 2; // Calculate offset: negative for left, positive for right const offsetX = (x - centerX) / centerX; // Range: -1 to 1 setMousePosition({ x: offsetX * 30, y: 0 }); // Move up to 30px left or right }; const handleMouseEnter = () => { setIsHovering(true); }; const handleMouseLeave = () => { setIsHovering(false); setMousePosition({ x: 0, y: 0 }); }; return (
{/* Left Column: Stacked Card Carousel */}
{carouselImages.map((image, index) => { const offset = index - activeCard; const isActive = index === activeCard; return (
0 ? 'z-20' : 'z-10' }`} style={{ transform: ` translateY(${offset * 20}px) translateX(${offset * 10 + (isActive && isHovering ? mousePosition.x : 0)}px) scale(${isActive ? 1 : 0.9 - Math.abs(offset) * 0.05}) rotateZ(${offset * 2}deg) `, opacity: Math.abs(offset) > 1 ? 0 : 1 - Math.abs(offset) * 0.3, pointerEvents: isActive ? 'auto' : 'none', transition: isHovering ? 'transform 0.2s ease-out' : 'transform 0.5s ease-out' }} >
{image.label}

{image.label}

Click to explore more

); })}
{/* Navigation Dots */}
{carouselImages.map((_, index) => (
{/* Right Column: FAQ Content */}

Frequently Asked Questions

Everything you need to know about our properties and services.

{faqs.map((faq, index) => (

{faq.answer}

))}
); }