"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from "@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen";
import HeroCentered from "@/components/sections/hero/HeroCentered";
import FeatureCardNineteen from "@/components/sections/feature/FeatureCardNineteen";
import ProductCardOne from "@/components/sections/product/ProductCardOne";
import PricingCardThree from "@/components/sections/pricing/PricingCardThree";
import MetricCardThree from "@/components/sections/metrics/MetricCardThree";
import TestimonialCardTen from "@/components/sections/testimonial/TestimonialCardTen";
import ContactCenter from "@/components/sections/contact/ContactCenter";
import FooterMedia from "@/components/sections/footer/FooterMedia";
import {
  TrendingUp,
  BarChart3,
  AlertCircle,
  Sparkles,
  Calculator,
  Zap,
  DollarSign,
  Users,
  Target,
  Star,
  Mail,
  Award,
} from "lucide-react";

export default function HomePage() {
  const navItems = [
    { name: "Features", id: "features" },
    { name: "Pricing", id: "pricing" },
    { name: "About", id: "about" },
    { name: "Blog", id: "blog" },
    { name: "Contact", id: "contact" },
  ];

  const footerColumns = [
    {
      title: "Product",      items: [
        { label: "Features", href: "#features" },
        { label: "Pricing", href: "#pricing" },
        { label: "Security", href: "#" },
        { label: "Status", href: "#" },
      ],
    },
    {
      title: "Company",      items: [
        { label: "About Us", href: "/about" },
        { label: "Blog", href: "#" },
        { label: "Careers", href: "#" },
        { label: "Press", href: "#" },
      ],
    },
    {
      title: "Support",      items: [
        { label: "Help Center", href: "#" },
        { label: "Contact", href: "#contact" },
        { label: "Terms", href: "#" },
        { label: "Privacy", href: "#" },
      ],
    },
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="bounce-effect"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="small"
      sizing="mediumLarge"
      background="fluid"
      cardStyle="soft-shadow"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="glass"
      headingFontWeight="medium"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen
          navItems={navItems}
          brandName="GradeOptim"
          bottomLeftText="Optimize Your Grades"
          bottomRightText="hello@gradeoptim.com"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroCentered
          background={{ variant: "downward-rays-static" }}
          avatars={[
            {
              src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-portrait-photo-of-a-diverse-high-schoo-1772509352756-543065f9.png",              alt: "Student 1"},
            {
              src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-portrait-photo-of-another-diverse-high-1772509352585-6fe6b092.png",              alt: "Student 2"},
            {
              src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-portrait-of-a-high-school-student-age--1772509352219-ffad60d3.png",              alt: "Student 3"},
          ]}
          avatarText="Trusted by 5000+ high school students"
          title="Master Your Grades with Predictive Analytics"
          description="Transform your academic performance with AI-powered insights, precise GPA forecasting, and intelligent study time allocation. GradeOptim helps high school students optimize their grades and achieve their academic goals."
          buttons={[
            { text: "Start Free Trial", href: "https://app.gradeoptim.com/signup" },
            { text: "View Demo", href: "#features" },
          ]}
          buttonAnimation="slide-up"
          marqueeItems={[
            { type: "text-icon", text: "GPA Forecasting", icon: TrendingUp },
            { type: "text-icon", text: "Weighted Grades", icon: BarChart3 },
            { type: "text-icon", text: "Risk Scoring", icon: AlertCircle },
            { type: "text-icon", text: "AI Recommendations", icon: Sparkles },
            { type: "text-icon", text: "Exam Predictor", icon: Calculator },
          ]}
          showMarqueeCard={true}
        />
      </div>

      <div id="features" data-section="features">
        <FeatureCardNineteen
          title="Powerful Academic Tools"
          description="Everything you need to take control of your academic performance and achieve your goals"
          tag="Core Features"
          tagIcon={Zap}
          textboxLayout="default"
          useInvertedBackground={false}
          features={[
            {
              id: 1,
              tag: "Calculation",              title: "Weighted Grade Calculator",              subtitle: "Precise grade calculations tailored to your syllabus",              description:
                "Input your custom grading scale, assignment weights, and individual grades. GradeOptim instantly calculates your weighted GPA with perfect accuracy, accounting for different assignment categories, weights, and your institution's specific grading scale.",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-clean-interface-mockup-showing-weighte-1772509353351-5d519432.png",              imageAlt: "Weighted Grade Calculator Interface"},
            {
              id: 2,
              tag: "Prediction",              title: "GPA Forecasting Engine",              subtitle: "Predict your final GPA with AI precision",              description:
                "Leverage predictive analytics to forecast your end-of-semester GPA. Based on current performance and historical trends, our AI engine provides confidence intervals and identifies at-risk courses before it's too late.",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-predictive-analytics-visualization-sho-1772509353363-a61eeaaa.png",              imageAlt: "GPA Forecasting Chart"},
            {
              id: 3,
              tag: "Simulation",              title: "Assignment Weight Simulator",              subtitle: "Test different grade scenarios instantly",              description:
                "Explore how different assignment weights and grades impact your final score. Experiment with 'what-if' scenarios to understand exactly what grades you need in remaining assignments to achieve your target GPA.",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-predictive-analytics-visualization-sho-1772509353363-a61eeaaa.png",              imageAlt: "Assignment Simulator Interface"},
            {
              id: 4,
              tag: "Intelligence",              title: "Final Exam Score Predictor",              subtitle: "Calculate the exact score you need on your final exam",              description:
                "Get precise final exam requirements instantly. Enter your current grade, target GPA, and final exam weight to discover the minimum score needed to achieve your academic goals. Perfect for strategic exam planning.",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-final-exam-score-predictor-tool-interf-1772509353708-028da21d.png",              imageAlt: "Exam Score Predictor"},
          ]}
          buttons={[{ text: "Explore Features", href: "#pricing" }]}
        />
      </div>

      <div id="products" data-section="products">
        <ProductCardOne
          title="Advanced Analytics Dashboard"
          description="Visualize your academic performance with comprehensive data visualization tools"
          tag="Analytics Suite"
          tagIcon={BarChart3}
          textboxLayout="default"
          useInvertedBackground={false}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          products={[
            {
              id: "1",              name: "Performance Trend Graphs",              price: "Included",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-predictive-analytics-visualization-sho-1772509353363-a61eeaaa.png",              imageAlt: "Performance Trends"},
            {
              id: "2",              name: "Risk Scoring System",              price: "Premium",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-risk-assessment-dashboard-showing-low--1772509353224-4890197a.png",              imageAlt: "Risk Assessment"},
            {
              id: "3",              name: "AI Recommendation Engine",              price: "Premium",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/an-ai-powered-recommendation-engine-inte-1772509353241-88fb0cf9.png",              imageAlt: "AI Recommendations"},
          ]}
        />
      </div>

      <div id="metrics" data-section="metrics">
        <MetricCardThree
          title="Trusted by Students Worldwide"
          description="See the impact GradeOptim has made on student success"
          tag="Impact"
          tagIcon={Award}
          textboxLayout="default"
          useInvertedBackground={false}
          animationType="slide-up"
          metrics={[
            { id: "1", icon: Users, title: "Active Users", value: "5,000+" },
            { id: "2", icon: TrendingUp, title: "Avg GPA Improvement", value: "+0.35" },
            { id: "3", icon: Target, title: "Goal Achievement Rate", value: "92%" },
            { id: "4", icon: Zap, title: "Active Predictions", value: "15,000+" },
          ]}
        />
      </div>

      <div id="pricing" data-section="pricing">
        <PricingCardThree
          title="Simple, Transparent Pricing"
          description="Choose the plan that fits your academic needs. Upgrade or downgrade anytime, no hidden fees."
          tag="Pricing"
          tagIcon={DollarSign}
          textboxLayout="default"
          useInvertedBackground={false}
          animationType="slide-up"
          plans={[
            {
              id: "free",              price: "Free",              name: "Starter",              buttons: [
                { text: "Get Started", href: "https://app.gradeoptim.com/signup" },
                { text: "Learn More", href: "#faq" },
              ],
              features: [
                "Basic GPA calculator",                "Single custom grading scale",                "Grade tracking for 1 semester",                "Email support"],
            },
            {
              id: "premium",              badge: "Most Popular",              badgeIcon: Sparkles,
              price: "$8.99/mo",              name: "Premium",              buttons: [
                { text: "Start Free Trial", href: "https://app.gradeoptim.com/signup" },
                { text: "Chat to Sales", href: "#contact" },
              ],
              features: [
                "All Starter features",                "Unlimited custom grading scales",                "Predictive GPA forecasting",                "Performance trend graphs",                "Risk scoring system",                "AI recommendation engine",                "Exam score predictor",                "Priority email support"],
            },
            {
              id: "family",              price: "$24.99/mo",              name: "Family Plan",              buttons: [
                { text: "Start Free Trial", href: "https://app.gradeoptim.com/signup" },
                { text: "Contact Sales", href: "#contact" },
              ],
              features: [
                "All Premium features",                "Up to 4 student accounts",                "Parental monitoring dashboard",                "Student progress reports",                "Academic goal tracking",                "24/7 priority support"],
            },
          ]}
          carouselMode="buttons"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardTen
          title="Real Stories from Real Students"
          description="See how GradeOptim helped students achieve their academic goals"
          tag="Testimonials"
          tagIcon={Star}
          textboxLayout="default"
          useInvertedBackground={false}
          testimonials={[
            {
              id: "1",              title: "Raised my GPA from 3.4 to 3.8",              quote:
                "GradeOptim's GPA forecasting showed me exactly which classes needed attention. I improved my study strategy and raised my GPA by 0.4 points in one semester. The risk scoring was incredibly helpful for identifying problem areas early.",              name: "Sarah Johnson",              role: "High School Junior",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-portrait-photo-of-a-diverse-high-schoo-1772509352756-543065f9.png",              imageAlt: "Sarah Johnson"},
            {
              id: "2",              title: "Finally understand what grades I need",              quote:
                "The final exam predictor took so much stress out of exam season. Instead of guessing, I knew exactly what score I needed. I scored a 94 on my calculus final because I had a clear target to aim for.",              name: "Marcus Chen",              role: "High School Senior",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-portrait-photo-of-another-diverse-high-1772509352585-6fe6b092.png",              imageAlt: "Marcus Chen"},
            {
              id: "3",              title: "The AI recommendations saved me hours",              quote:
                "Getting personalized study time allocation recommendations was game-changing. Instead of studying randomly, I now focus my time where it matters most. My grades improved and I actually have more free time!",              name: "Jessica Rodriguez",              role: "High School Sophomore",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-portrait-of-a-high-school-student-age--1772509352219-ffad60d3.png",              imageAlt: "Jessica Rodriguez"},
            {
              id: "4",              title: "A tool we recommend to all our students",              quote:
                "As an academic advisor, I've seen GradeOptim help dozens of students. It demystifies GPA calculation and empowers students to take control of their academic journey. We now recommend it to every student who comes through our office.",              name: "Dr. Michael Thompson",              role: "Academic Advisor",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-professional-portrait-of-an-educator-o-1772509352613-4f9da576.png",              imageAlt: "Dr. Michael Thompson"},
            {
              id: "5",              title: "Perfect for college prep students",              quote:
                "My daughter uses GradeOptim to track her college prep classes. It's helped her stay motivated knowing exactly where she stands and what she needs to do to hit her target GPA for college applications.",              name: "Patricia Lee",              role: "Parent",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-portrait-of-an-academic-professional-a-1772509352142-e2efd922.png",              imageAlt: "Patricia Lee"},
            {
              id: "6",              title: "Transformed my study habits",              quote:
                "I went from being a C student to a B+ student using GradeOptim's tools. The weighted grade calculator showed me which assignments matter most, and I focused my energy accordingly. This app is absolutely worth the investment!",              name: "Alex Kim",              role: "High School Freshman",              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-diverse-high-school-student-portrait-a-1772509352406-d4f9c570.png",              imageAlt: "Alex Kim"},
          ]}
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactCenter
          tag="Get In Touch"
          tagIcon={Mail}
          title="Stay Updated with Academic Tips"
          description="Subscribe to our newsletter for exclusive study strategies, feature updates, and special promotions for GradeOptim users."
          background={{ variant: "downward-rays-static" }}
          useInvertedBackground={false}
          inputPlaceholder="your.email@school.com"
          buttonText="Subscribe"
          termsText="We respect your privacy. Unsubscribe anytime. By subscribing, you agree to receive educational content and product updates from GradeOptim."
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterMedia
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3APzrAl8FUR6Sq885GZcTzaJsFb/a-subtle-modern-educational-background-i-1772509353273-4ef8c2ce.png"
          imageAlt="Academic Success Background"
          logoText="GradeOptim"
          copyrightText="© 2025 GradeOptim. All rights reserved."
          columns={footerColumns}
        />
      </div>
    </ThemeProvider>
  );
}