"use client"

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import HeroSplitKpi from '@/components/sections/hero/HeroSplitKpi';
import TextAbout from '@/components/sections/about/TextAbout';
import FeatureCardTwentyOne from '@/components/sections/feature/FeatureCardTwentyOne';
import MetricCardFourteen from '@/components/sections/metrics/MetricCardFourteen';
import TestimonialCardSix from '@/components/sections/testimonial/TestimonialCardSix';
import FaqSplitText from '@/components/sections/faq/FaqSplitText';
import ContactCenter from '@/components/sections/contact/ContactCenter';
import FooterCard from '@/components/sections/footer/FooterCard';
import { Leaf, Globe, Microscope, Heart, Twitter, Facebook, Instagram } from "lucide-react";

export default function TurtleSciencePage() {
  return (
    <ThemeProvider
      defaultButtonVariant="elastic-effect"
      defaultTextAnimation="entrance-slide"
      borderRadius="sharp"
      contentWidth="smallMedium"
      sizing="medium"
      background="circleGradient"
      cardStyle="elevated"
      primaryButtonStyle="double-inset"
      secondaryButtonStyle="glass"
      headingFontWeight="semibold"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay
          brandName="Turtle Science"
          navItems={[
            { name: "About", id: "about" },
            { name: "Species", id: "species" },
            { name: "Anatomy", id: "anatomy" },
            { name: "Conservation", id: "testimonials" },
            { name: "FAQ", id: "faq" }
          ]}
          button={{
            text: "Learn More",            href: "#contact"
          }}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroSplitKpi
          title="Discover the Fascinating World of Turtles"
          description="Explore the incredible biology, evolution, and conservation of one of Earth's most ancient and remarkable reptiles. Learn how turtles have survived for over 200 million years."
          tag="Science Education"
          tagIcon={Leaf}
          kpis={[
            { value: "200M+", label: "Years of Evolution" },
            { value: "350+", label: "Known Species" },
            { value: "7", label: "Continents" }
          ]}
          enableKpiAnimation={true}
          imageSrc="https://img.b2bpic.net/free-photo/crab-walking-water-sand_209690-267.jpg"
          imageAlt="Turtle in natural habitat"
          imagePosition="right"
          buttons={[
            { text: "Explore Species", href: "#species" },
            { text: "Learn Conservation", href: "#testimonials" }
          ]}
        />
      </div>

      <div id="about" data-section="about">
        <TextAbout
          title="Turtles are living fossils that have remained virtually unchanged for millions of years, representing a crucial chapter in the story of life on Earth. Their ancient lineage and remarkable adaptations make them essential subjects for understanding evolution and biodiversity."
          useInvertedBackground="invertDefault"
          buttons={[
            { text: "Explore Features", href: "#species" },
            { text: "Read More", href: "#anatomy" }
          ]}
        />
      </div>

      <div id="species" data-section="species">
        <FeatureCardTwentyOne
          title="Turtle Species Around the World"
          description="Turtles are incredibly diverse, with species adapted to nearly every aquatic and terrestrial environment on Earth. From tiny freshwater turtles to massive sea turtles, each species exhibits unique characteristics shaped by millions of years of evolution."
          tag="Biodiversity"
          tagIcon={Globe}
          imageSrc="https://img.b2bpic.net/free-photo/closeup-shot-baby-pond-turtle-shore_181624-15862.jpg"
          imageAlt="Various turtle species in natural habitats"
          mediaPosition="left"
          useInvertedBackground="noInvert"
          accordionItems={[
            {
              id: "1",              title: "Sea Turtles",              content: "Ocean-dwelling turtles that migrate thousands of miles and are found in tropical and subtropical waters worldwide. Sea turtles include the Green, Hawksbill, Loggerhead, and Leatherback species."
            },
            {
              id: "2",              title: "Freshwater Turtles",              content: "Adaptable turtles found in rivers, lakes, and wetlands across North America, Europe, Asia, and Africa. They demonstrate remarkable camouflage and hunting abilities in aquatic ecosystems."
            },
            {
              id: "3",              title: "Tortoises",              content: "Land-dwelling turtles with sturdy legs and dome-shaped shells, perfectly adapted for terrestrial life. Tortoises are found on every continent except Antarctica and Australia."
            },
            {
              id: "4",              title: "Box Turtles",              content: "Highly terrestrial with high-domed shells and hinged plastrons that allow them to close completely. Found primarily in North America, they are masters of self-defense."
            }
          ]}
          buttons={[
            { text: "Learn More", href: "#anatomy" }
          ]}
        />
      </div>

      <div id="anatomy" data-section="anatomy">
        <FeatureCardTwentyOne
          title="Turtle Anatomy and Biology"
          description="Understanding turtle anatomy reveals how these remarkable creatures are perfectly suited to their environments. The shell, skeletal structure, and internal organs work together in a sophisticated biological system refined over millions of years."
          tag="Biology"
          tagIcon={Microscope}
          imageSrc="https://img.b2bpic.net/free-photo/macro-photography-face-tortoise-with-background-out-focus_181624-35388.jpg"
          imageAlt="Detailed turtle anatomy diagram"
          mediaPosition="right"
          useInvertedBackground="invertDefault"
          accordionItems={[
            {
              id: "1",              title: "The Shell",              content: "The shell consists of the carapace (upper) and plastron (lower), made of bone covered by keratin plates called scutes. It provides protection and houses internal organs, weighing 5-60% of body weight depending on species."
            },
            {
              id: "2",              title: "Skeleton and Movement",              content: "Turtles have a unique skeletal structure with ribs fused to the carapace. Their limbs are adapted for swimming or walking, with webbed feet in aquatic species and sturdy legs in terrestrial species."
            },
            {
              id: "3",              title: "Respiration",              content: "Turtles breathe through lungs and can hold their breath for extended periods. Some aquatic turtles can extract oxygen from water through specialized tissues, allowing year-round underwater living."
            },
            {
              id: "4",              title: "Temperature Regulation",              content: "As reptiles, turtles are ectothermic (cold-blooded) and regulate body temperature through behavior. They bask in the sun to warm up and seek shade or water to cool down."
            },
            {
              id: "5",              title: "Senses",              content: "Turtles have excellent vision, acute hearing, and a sophisticated olfactory system. They navigate using the Earth's magnetic field and possess color vision in many species."
            }
          ]}
          buttons={[
            { text: "Explore Metrics", href: "#metrics" }
          ]}
        />
      </div>

      <div id="metrics" data-section="metrics">
        <MetricCardFourteen
          title="Turtle Impact and Importance in Global Ecosystems"
          tag="Statistics"
          useInvertedBackground="noInvert"
          metrics={[
            {
              id: "1",              value: "200M",              description: "Years of continuous evolution makes turtles one of the oldest reptile groups on Earth, predating dinosaurs."
            },
            {
              id: "2",              value: "1B+",              description: "Individual turtles exist in oceans and freshwater systems, playing vital roles in maintaining ecosystem balance and aquatic food chains."
            },
            {
              id: "3",              value: "90%",              description: "Decline in sea turtle populations in the last century due to human activities including fishing, pollution, and habitat loss."
            },
            {
              id: "4",              value: "350+",              description: "Recognized turtle species worldwide, ranging in size from 4 inches to over 6 feet in length and adapted to diverse habitats."
            }
          ]}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardSix
          testimonials={[
            {
              id: "1",              name: "Dr. Sarah Mitchell",              handle: "Sea Turtle Biologist",              testimonial: "Turtles are sentinels of ocean health. Their populations directly reflect the state of our marine ecosystems and the urgency of conservation action.",              imageSrc: "https://img.b2bpic.net/free-photo/industrial-factory-worker-standing-high-metal-construction-production-plant_342744-443.jpg",              imageAlt: "Dr. Sarah Mitchell"
            },
            {
              id: "2",              name: "James Chen",              handle: "Wildlife Conservationist",              testimonial: "Every turtle species tells a story of adaptation and survival. Protecting them means preserving millions of years of evolutionary success.",              imageSrc: "https://img.b2bpic.net/free-photo/technologist-reading-production-reports-tablet-computer-factory_342744-1203.jpg",              imageAlt: "James Chen"
            },
            {
              id: "3",              name: "Dr. Maria Rodriguez",              handle: "Marine Educator",              testimonial: "Teaching people about turtles changes hearts and minds. When children understand these creatures, they become advocates for ocean conservation.",              imageSrc: "https://img.b2bpic.net/free-photo/astronaut-does-explanation-starship-videocall-with-command-center_482257-126334.jpg",              imageAlt: "Dr. Maria Rodriguez"
            },
            {
              id: "4",              name: "Dr. Michael Park",              handle: "Evolution Researcher",              testimonial: "Turtles represent a masterpiece of evolution. Studying them provides insights into adaptation, longevity, and resilience that benefit all science.",              imageSrc: "https://img.b2bpic.net/free-photo/medium-shot-smiley-scientist_23-2148969947.jpg",              imageAlt: "Dr. Michael Park"
            },
            {
              id: "5",              name: "Emily Thompson",              handle: "Habitat Restoration Lead",              testimonial: "Restoring turtle habitats means restoring entire ecosystems. A single conservation project can impact hundreds of species and countless organisms.",              icon: Leaf
            },
            {
              id: "6",              name: "Dr. Alex Kumar",              handle: "Climate Impact Researcher",              testimonial: "Climate change poses unprecedented challenges to turtles. Understanding their resilience helps us predict and mitigate broader environmental impacts."
            }
          ]}
          animationType="slide-up"
          title="Conservation Voices"
          description="Hear from marine biologists, conservationists, and educators passionate about protecting turtles and their habitats for future generations."
          textboxLayout="default"
          useInvertedBackground="invertDefault"
          speed={40}
          topMarqueeDirection="left"
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqSplitText
          sideTitle="Frequently Asked Questions About Turtles"
          sideDescription="Get answers to common questions about turtle biology, behavior, conservation, and how you can help protect these incredible creatures."
          textPosition="left"
          useInvertedBackground="noInvert"
          animationType="smooth"
          faqs={[
            {
              id: "1",              title: "How long do turtles live?",              content: "Lifespan varies greatly by species. Aquatic turtles typically live 20-40 years, while sea turtles can live 50+ years. Some tortoises exceed 100 years, with the oldest recorded individuals reaching 150+ years."
            },
            {
              id: "2",              title: "Can turtles leave their shells?",              content: "No, turtles cannot leave their shells. The shell is fused to the vertebral column and ribcage, making it an integral part of their skeleton. The shell grows with the turtle throughout its life."
            },
            {
              id: "3",              title: "What do turtles eat?",              content: "Diet varies by species. Most turtles are omnivores, eating plants, insects, small fish, and carrion. Some species are primarily herbivorous (eating algae and vegetation), while others are more carnivorous (hunting small animals)."
            },
            {
              id: "4",              title: "How are turtles affected by climate change?",              content: "Climate change impacts turtle survival through rising sea levels, ocean acidification, changing food sources, temperature-dependent sex determination in eggs, and extreme weather events. Sea turtles and freshwater species are particularly vulnerable."
            },
            {
              id: "5",              title: "What are the main threats to turtles?",              content: "Major threats include habitat loss and pollution, fishing nets and plastic ingestion, climate change, predation of eggs and hatchlings, and illegal wildlife trade. Human activities are the primary driver of turtle population decline."
            },
            {
              id: "6",              title: "How can I help protect turtles?",              content: "Support marine conservation organizations, reduce plastic use, avoid releasing balloons, properly dispose of fishing line, support sustainable seafood practices, protect nesting beaches, and educate others about turtle conservation."
            }
          ]}
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactCenter
          tag="Get Involved"
          title="Join the Turtle Conservation Movement"
          description="Sign up to receive updates on turtle research, conservation efforts, and how you can make a difference in protecting these ancient creatures and their habitats."
          tagIcon={Heart}
          useInvertedBackground="invertDefault"
          inputPlaceholder="Enter your email"
          buttonText="Subscribe"
          termsText="We respect your privacy. Your information helps us send you relevant conservation updates and project opportunities."
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterCard
          logoText="Turtle Science"
          copyrightText="© 2025 Turtle Science Project | Dedicated to Education and Conservation"
          socialLinks={[
            { icon: Twitter, href: "https://twitter.com", ariaLabel: "Twitter" },
            { icon: Facebook, href: "https://facebook.com", ariaLabel: "Facebook" },
            { icon: Instagram, href: "https://instagram.com", ariaLabel: "Instagram" }
          ]}
        />
      </div>
    </ThemeProvider>
  );
}