"use client";
import { motion } from "motion/react";
import Image from "next/image";
import Link from "next/link";
interface TeamMember {
id: string;
name: string;
role: string;
imageUrl: string;
socialLinks: string;
}
const teamMembers: TeamMember[] = [
{
id: "1",
name: "James",
role: "CEO & Founder",
imageUrl:
"https://res.cloudinary.com/harshitproject/image/upload/v1746774430/member-four.png",
socialLinks: "https://twitter.com/harshitlog",
},
{
id: "2",
name: "Charlotte",
role: "CTO",
imageUrl:
"https://res.cloudinary.com/harshitproject/image/upload/v1746774430/member-five.png",
socialLinks: "https://twitter.com/harshitlog",
},
{
id: "3",
name: "Alexander",
role: "Lead Designer",
imageUrl:
"https://res.cloudinary.com/harshitproject/image/upload/v1746774430/member-one.png",
socialLinks: "https://twitter.com/harshitlog",
},
{
id: "4",
name: "Olivia",
role: "CEO & Founder",
imageUrl:
"https://res.cloudinary.com/harshitproject/image/upload/v1746774430/member-three.png",
socialLinks: "https://twitter.com/harshitlog",
},
{
id: "5",
name: "Clark",
role: "Visual Designer",
imageUrl:
"https://res.cloudinary.com/harshitproject/image/upload/v1746774431/member-two.png",
socialLinks: "https://twitter.com/harshitlog",
},
];
export function Team3() {
return (
<section className="relative overflow-hidden py-24 sm:py-32 ">
<div className="mx-auto max-w-6xl px-6 lg:px-8">
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.6 }}
className="mx-auto max-w-2xl text-center"
>
<h2 className="text-3xl font-bold tracking-tight dark:text-white text-black sm:text-4xl">
Meet Our Team
</h2>
<p className="mt-4 text-lg leading-8 text-gray-400">
We're a dynamic group of individuals who are passionate about
what we do.
</p>
</motion.div>
<div className="relative mt-16 sm:mt-20">
<motion.div
initial={{ opacity: 0 }}
whileInView={{ opacity: 1 }}
viewport={{ once: true }}
transition={{ duration: 0.6, delay: 0.2 }}
className="flex flex-wrap justify-center items-center gap-6"
>
{teamMembers.map((member, index) => (
<motion.div
key={member.id}
initial={{ scale: 0 }}
whileInView={{ scale: 1 }}
viewport={{ once: true }}
transition={{
duration: 0.6,
delay: 0.3 + index * 0.1,
}}
className="relative w-40 h-40 md:w-48 md:h-48 rounded-full overflow-hidden hover:scale-140 duration-300 hover:z-10"
>
<div className="relative w-full h-full ">
<Image
src={member.imageUrl}
alt={member.name}
fill
className="object-cover"
/>
<div className="absolute inset-0 bg-black/40 opacity-0 hover:opacity-100 transition-opacity duration-300 flex items-center justify-center">
<Link
href={member.socialLinks}
className="flex flex-col text-center p-4"
>
<span className="text-white font-semibold text-lg underline">
{member.name}
</span>
<span className="text-white/80 text-sm">
{member.role}
</span>
</Link>
</div>
</div>
</motion.div>
))}
</motion.div>
</div>
</div>
</section>
);
}