"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from "@/components/navbar/NavbarStyleApple/NavbarStyleApple";
import HeroBillboardRotatedCarousel from "@/components/sections/hero/HeroBillboardRotatedCarousel";
import ProductCardTwo from "@/components/sections/product/ProductCardTwo";
import FaqDouble from "@/components/sections/faq/FaqDouble";
import FooterBaseCard from "@/components/sections/footer/FooterBaseCard";
import { Zap, CheckCircle, HelpCircle } from "lucide-react";

export default function CommunitiesPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="elastic-effect"
      defaultTextAnimation="background-highlight"
      borderRadius="soft"
      contentWidth="medium"
      sizing="medium"
      background="noise"
      cardStyle="glass-depth"
      primaryButtonStyle="primary-glow"
      secondaryButtonStyle="layered"
      headingFontWeight="bold"
    >
      {/* Navbar */}
      <div id="nav" data-section="nav">
        <NavbarStyleApple
          brandName="FitnessaCollective"
          navItems={[
            { name: "Home", id: "home" },
            { name: "Trainers", id: "trainers" },
            { name: "Events", id: "events" },
            { name: "Communities", id: "communities" },
            { name: "About", id: "about" },
          ]}
        />
      </div>

      {/* Communities Hero Section */}
      <div id="hero" data-section="hero" className="mx-auto px-4 md:px-6">
        <HeroBillboardRotatedCarousel
          title="Join Vibrant Fitness Communities in Mumbai"
          description="Connect with like-minded fitness enthusiasts through running clubs, yoga groups, CrossFit teams, and wellness communities. Build lasting friendships while pursuing your fitness goals."
          background={{ variant: "rotated-rays-animated-grid" }}
          tag="Community Connection"
          tagIcon={Zap}
          tagAnimation="blur-reveal"
          buttons={[
            {
              text: "Explore Communities",
              href: "/communities",
            },
            {
              text: "Join a Club",
              href: "/communities",
            },
          ]}
          buttonAnimation="slide-up"
          carouselItems={[
            {
              id: "carousel-community-1",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/an-active-diverse-fitness-community-gath-1773869258456-f9a868c5.png?_wi=2",
              imageAlt: "Active diverse fitness community gathered together",
            },
            {
              id: "carousel-community-2",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-vibrant-running-club-gathering-in-mumb-1773869258095-cec51798.png?_wi=4",
              imageAlt: "Vibrant running club gathering in Mumbai",
            },
            {
              id: "carousel-community-3",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-serene-yoga-session-in-a-premium-minim-1773869258752-f7368676.png?_wi=4",
              imageAlt: "Serene yoga session in premium fitness studio",
            },
            {
              id: "carousel-community-4",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/an-intense-crossfit-training-session-wit-1773869258530-13cf5455.png?_wi=4",
              imageAlt: "Intense CrossFit training with community members",
            },
            {
              id: "carousel-community-5",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-holistic-wellness-experience-showing-a-1773869257943-ea686a20.png?_wi=3",
              imageAlt: "Holistic wellness community gathering",
            },
            {
              id: "carousel-community-6",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-large-group-of-diverse-fitness-communi-1773869258894-94aadcab.png?_wi=2",
              imageAlt: "Large diverse fitness community group photo",
            },
          ]}
          autoPlay={true}
          autoPlayInterval={5000}
          ariaLabel="Communities hero carousel showcasing fitness communities in Mumbai"
        />
      </div>

      {/* Featured Communities Section */}
      <div id="communities-featured" data-section="communities-featured" className="mx-auto px-4 md:px-6">
        <ProductCardTwo
          title="Featured Running Clubs & Fitness Communities"
          description="Discover popular fitness communities across Mumbai. From casual joggers to serious marathoners, yoga enthusiasts to CrossFit warriors—find your perfect community match."
          tag="Active Communities"
          tagIcon={CheckCircle}
          tagAnimation="blur-reveal"
          buttons={[
            {
              text: "Browse All Communities",
              href: "/communities",
            },
          ]}
          buttonAnimation="slide-up"
          products={[
            {
              id: "community-1",
              brand: "Morning Runners",
              name: "Mumbai Dawn Joggers",
              price: "Free - ₹500/month",
              rating: 5,
              reviewCount: "342 members",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-vibrant-running-club-gathering-in-mumb-1773869258095-cec51798.png?_wi=5",
              imageAlt: "Mumbai Dawn Joggers running community",
            },
            {
              id: "community-2",
              brand: "Yoga Collective",
              name: "Urban Zen Circle",
              price: "Free - ₹800/month",
              rating: 5,
              reviewCount: "218 members",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-serene-yoga-session-in-a-premium-minim-1773869258752-f7368676.png?_wi=5",
              imageAlt: "Urban Zen Circle yoga community",
            },
            {
              id: "community-3",
              brand: "CrossFit Alliance",
              name: "Elite Mumbai CrossFit",
              price: "Free - ₹1,200/month",
              rating: 5,
              reviewCount: "156 members",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/an-intense-crossfit-training-session-wit-1773869258530-13cf5455.png?_wi=5",
              imageAlt: "Elite Mumbai CrossFit community",
            },
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="scale-rotate"
          textboxLayout="split"
          useInvertedBackground={false}
        />
      </div>

      {/* Communities FAQ Section */}
      <div id="faq" data-section="faq" className="mx-auto px-4 md:px-6">
        <FaqDouble
          title="Join Communities - Frequently Asked Questions"
          description="Learn how to find and join fitness communities, connect with members, organize meetups, and make the most of your community experience."
          tag="Help & Support"
          tagIcon={HelpCircle}
          tagAnimation="blur-reveal"
          faqs={[
            {
              id: "faq-communities-1",
              title: "How do I find fitness communities near me?",
              content: "Use our community search filter by location, fitness interest, and pace level. You'll see all active communities in your area with member counts and upcoming meetups.",
            },
            {
              id: "faq-communities-2",
              title: "How do I join a community?",
              content: "Click 'Join Community' on any community page. You'll be added to the member list and receive updates about runs, events, and social activities.",
            },
            {
              id: "faq-communities-3",
              title: "Are communities free to join?",
              content: "Most communities are free. Some premium communities may charge a small monthly membership fee to support organizing events and maintaining the community infrastructure.",
            },
            {
              id: "faq-communities-4",
              title: "Can I start my own running club?",
              content: "Yes! Visit the 'Create Community' section to start your own club. Set pace levels, meeting times, and routes. Invite friends and grow your community organically.",
            },
            {
              id: "faq-communities-5",
              title: "How often do communities organize meetups?",
              content: "Frequency varies by community. Most run clubs meet 2-4 times weekly. Check individual community details for their specific schedule.",
            },
            {
              id: "faq-communities-6",
              title: "Can I connect with community members outside events?",
              content: "Yes, each community has a messaging feature. Connect with members, share tips, organize additional meetups, and build friendships within the community.",
            },
          ]}
          textboxLayout="default"
          useInvertedBackground={true}
          faqsAnimation="slide-up"
          animationType="smooth"
        />
      </div>

      {/* Footer */}
      <div id="footer" data-section="footer">
        <FooterBaseCard
          logoText="FitnessaCollective"
          columns={[
            {
              title: "Platform",
              items: [
                {
                  label: "Find Trainers",
                  href: "/trainers",
                },
                {
                  label: "Discover Events",
                  href: "/events",
                },
                {
                  label: "Join Communities",
                  href: "/communities",
                },
                {
                  label: "Dashboard",
                  href: "#",
                },
              ],
            },
            {
              title: "Company",
              items: [
                {
                  label: "About Us",
                  href: "#",
                },
                {
                  label: "Careers",
                  href: "#",
                },
                {
                  label: "Blog",
                  href: "#",
                },
                {
                  label: "Press",
                  href: "#",
                },
              ],
            },
            {
              title: "Support",
              items: [
                {
                  label: "Help Center",
                  href: "#",
                },
                {
                  label: "Contact Us",
                  href: "#",
                },
                {
                  label: "Safety Guidelines",
                  href: "#",
                },
                {
                  label: "Community Standards",
                  href: "#",
                },
              ],
            },
            {
              title: "Legal",
              items: [
                {
                  label: "Privacy Policy",
                  href: "#",
                },
                {
                  label: "Terms of Service",
                  href: "#",
                },
                {
                  label: "Cookie Policy",
                  href: "#",
                },
                {
                  label: "Accessibility",
                  href: "#",
                },
              ],
            },
          ]}
          copyrightText="© 2025 FitnessaCollective. All rights reserved. Transforming Mumbai's fitness culture."
        />
      </div>
    </ThemeProvider>
  );
}