2026-03-30 20:20:21 +06:00
import {
Accordion ,
AccordionContent ,
AccordionItem ,
AccordionTrigger ,
} from "@/components/ui/accordion" ;
2026-05-01 22:55:38 +06:00
import { motion , useInView , useScroll , useSpring } from "framer-motion" ;
2026-05-01 23:10:53 +06:00
import { ArrowUpRight , ShieldQuestion , Sparkles } from "lucide-react" ;
2026-05-01 22:55:38 +06:00
import { useRef , useState } from "react" ;
2026-03-30 20:20:21 +06:00
const faqs = [
{
question : "What services does TechZaa offer?" ,
answer :
2026-05-01 22:55:38 +06:00
"We provide comprehensive technology solutions including web development, mobile app development, AI/ML solutions, and cloud infrastructure services." ,
category : "Services" ,
2026-03-30 20:20:21 +06:00
} ,
{
question : "How long does a typical project take?" ,
answer :
2026-05-01 22:55:38 +06:00
"Timelines vary: simple sites take 4-6 weeks, while enterprise apps take 3-6 months. We prioritize agile delivery and constant feedback." ,
category : "Process" ,
2026-03-30 20:20:21 +06:00
} ,
{
question : "What is your development process?" ,
answer :
2026-05-01 22:55:38 +06:00
"We follow an agile methodology: Discovery, UI/UX Design, Development Sprints, QA, Deployment, and 24/7 Ongoing Support." ,
category : "Workflow" ,
2026-03-30 20:20:21 +06:00
} ,
{
2026-05-01 22:55:38 +06:00
question : "Do you provide maintenance?" ,
2026-03-30 20:20:21 +06:00
answer :
2026-05-01 22:55:38 +06:00
"Yes. Our maintenance packages include security updates, performance optimization, and feature enhancements to keep you ahead." ,
category : "Support" ,
2026-03-30 20:20:21 +06:00
} ,
{
question : "How do you handle project pricing?" ,
answer :
2026-05-01 22:55:38 +06:00
"Flexible models: fixed-price, time & materials, or dedicated teams. We ensure 100% transparency with no hidden costs." ,
category : "Billing" ,
2026-03-30 20:20:21 +06:00
} ,
] ;
export default function FAQSection() {
2026-05-01 22:55:38 +06:00
const [ activeItem , setActiveItem ] = useState < string | undefined > ( undefined ) ;
const containerRef = useRef ( null ) ;
const isInView = useInView ( containerRef , { once : true , amount : 0.2 } ) ;
// Progress bar for reading engagement
const { scrollYProgress } = useScroll ( {
target : containerRef ,
offset : [ "start end" , "end start" ] ,
} ) ;
const scaleX = useSpring ( scrollYProgress , { stiffness : 100 , damping : 30 } ) ;
2026-03-30 20:20:21 +06:00
return (
2026-04-30 22:36:40 +06:00
< section
2026-05-01 22:55:38 +06:00
ref = { containerRef }
2026-05-01 23:10:53 +06:00
className = "pb-20 overflow-hidden transition-colors duration-500"
2026-04-30 22:36:40 +06:00
>
2026-05-01 23:10:53 +06:00
< div className = "mx-auto px-6 max-w-6xl" >
< div className = "flex flex-col gap-10" >
< div className = "flex flex-col items-center" >
2026-05-01 22:55:38 +06:00
< div className = "flex items-center gap-2 mb-6" >
< div className = "p-2 bg-primary rounded-lg text-primary-foreground" >
< ShieldQuestion size = { 20 } / >
< / div >
2026-05-01 23:10:53 +06:00
< span className = "text-sm font-bold uppercase text-primary/80" >
2026-04-30 22:36:40 +06:00
Got Questions ?
< / span >
< / div >
2026-03-30 20:20:21 +06:00
2026-05-01 23:10:53 +06:00
< h2 className = "text-4xl md:text-5xl font-bold" >
Clear Answers { " " }
< span className = "text-transparent bg-clip-text bg-gradient-to-r from-primary to-primary-foreground" >
2026-05-01 22:55:38 +06:00
For Big Ideas .
< / span >
< / h2 >
2026-04-30 22:36:40 +06:00
2026-05-01 23:10:53 +06:00
< p className = "text-muted-foreground max-w-lg text-center mt-5" >
Everything you need to know about working with TechZaa . Can 't find
what you' re looking for ? Reach out to our team .
2026-05-01 22:55:38 +06:00
< / p >
< / div >
{ /* Bottom Section: Interactive Accordion */ }
< Accordion
type = "single"
collapsible
onValueChange = { setActiveItem }
className = "w-full space-y-4"
2026-04-30 22:36:40 +06:00
>
2026-05-01 22:55:38 +06:00
{ faqs . map ( ( faq , index ) = > (
< motion.div
key = { index }
initial = { { opacity : 0 , y : 20 } }
animate = { isInView ? { opacity : 1 , y : 0 } : { } }
transition = { { delay : index * 0.1 , duration : 0.5 } }
>
< AccordionItem
value = { ` item- ${ index } ` }
className = { `
group border-none rounded-3xl transition-all duration-500 px-2
${
activeItem === ` item- ${ index } `
2026-05-01 23:10:53 +06:00
? "bg-primary/20 shadow-[0_20px_50px_rgba(0,0,0,0.05)] scale-[1.01]"
: "bg-accent"
2026-05-01 22:55:38 +06:00
}
` }
2026-03-30 20:20:21 +06:00
>
2026-05-01 22:55:38 +06:00
< AccordionTrigger className = "flex items-center justify-between p-6 hover:no-underline gap-4" >
< div className = "flex items-center gap-6 text-left" >
< span
className = { `
hidden sm:flex items-center justify-center w-10 h-10 rounded-full border text-xs font-bold transition-all duration-500
${
activeItem === ` item- ${ index } `
? "bg-primary border-primary text-primary-foreground rotate-[360deg]"
: "border-border text-muted-foreground"
}
` }
>
{ activeItem === ` item- ${ index } ` ? (
< Sparkles size = { 14 } / >
) : (
` 0 ${ index + 1 } `
) }
< / span >
< div className = "flex flex-col gap-1" >
< span className = "text-[10px] uppercase tracking-widest font-bold text-primary opacity-0 group-data-[state=open]:opacity-100 transition-opacity" >
{ faq . category }
< / span >
< span className = "text-lg md:text-xl font-semibold tracking-tight" >
{ faq . question }
< / span >
< / div >
< / div >
< / AccordionTrigger >
< AccordionContent className = "px-6 pb-8 md:pl-[104px]" >
< div className = "text-muted-foreground text-base md:text-lg leading-relaxed max-w-2xl border-l-2 border-primary/20 pl-6" >
2026-04-30 22:36:40 +06:00
{ faq . answer }
2026-05-01 23:10:53 +06:00
2026-05-01 22:55:38 +06:00
< / div >
< / AccordionContent >
< / AccordionItem >
< / motion.div >
) ) }
< / Accordion >
2026-04-30 22:36:40 +06:00
< / div >
2026-03-30 20:20:21 +06:00
< / div >
< / section >
) ;
}