"use client"

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
import HeroBillboardDashboard from '@/components/sections/hero/HeroBillboardDashboard';
import FeatureBento from '@/components/sections/feature/FeatureBento';
import FeatureHoverPattern from '@/components/sections/feature/featureHoverPattern/FeatureHoverPattern';
import MetricSplitMediaAbout from '@/components/sections/about/MetricSplitMediaAbout';
import TestimonialCardSix from '@/components/sections/testimonial/TestimonialCardSix';
import PricingCardThree from '@/components/sections/pricing/PricingCardThree';
import FaqDouble from '@/components/sections/faq/FaqDouble';
import ContactCTA from '@/components/sections/contact/ContactCTA';
import FooterBaseCard from '@/components/sections/footer/FooterBaseCard';
import { Building2, Home, Users, BarChart3, Send, Mail, CheckCircle, Target, Zap, TrendingUp, MessageCircle, User, Sparkles, Crown, Shield, Brain, Lock, Award, Star, DollarSign, HelpCircle, Rocket } from 'lucide-react';

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="icon-arrow"
      defaultTextAnimation="background-highlight"
      borderRadius="rounded"
      contentWidth="medium"
      sizing="medium"
      background="none"
      cardStyle="gradient-bordered"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="layered"
      headingFontWeight="semibold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen
          navItems={[
            { name: "Features", id: "features" },
            { name: "Pricing", id: "pricing" },
            { name: "Results", id: "results" },
            { name: "FAQ", id: "faq" },
            { name: "Contact", id: "contact" }
          ]}
          brandName="RealtimeAI"
          bottomLeftText="Real Estate Automation"
          bottomRightText="hello@realtimeai.com"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardDashboard
          title="Automate Your Real Estate Business with AI"
          description="Intelligent agents that handle lead generation, property management, client communication, and market analysis—so you can focus on closing deals."
          tag="AI-Powered Automation"
          tagIcon={Sparkles}
          buttons={[
            { text: "Start Free Trial", href: "#contact" },
            { text: "Watch Demo", href: "https://www.youtube.com/watch?v=example" }
          ]}
          background={{ variant: "radial-gradient" }}
          dashboard={{
            title: "Real Estate Command Center",            logoIcon: Building2,
            imageSrc: "https://img.b2bpic.net/free-photo/technology-concept-with-futuristic-element_23-2151910940.jpg",            searchPlaceholder: "Search properties, leads, or market data...",            buttons: [
              { text: "Dashboard", href: "#features" },
              { text: "Export Report", href: "#" }
            ],
            sidebarItems: [
              { icon: Home },
              { icon: Users },
              { icon: BarChart3 }
            ],
            stats: [
              {
                title: "Leads Generated",                values: [1240, 1850, 2340],
                description: "This month"
              },
              {
                title: "Properties Listed",                values: [85, 127, 156],
                description: "Active listings"
              },
              {
                title: "Avg. Response Time",                values: [4.2, 2.8, 1.5],
                valueSuffix: "min",                description: "To client inquiries"
              }
            ],
            chartTitle: "Lead Quality Score",            chartData: [
              { value: 65 },
              { value: 78 },
              { value: 72 },
              { value: 85 },
              { value: 92 }
            ],
            listTitle: "Recent Agent Actions",            listItems: [
              {
                icon: Send,
                title: "Auto-sent 42 property alerts",                status: "Completed"
              },
              {
                icon: Mail,
                title: "Processed 15 lead inquiries",                status: "In Progress"
              },
              {
                icon: CheckCircle,
                title: "Updated 28 property listings",                status: "Completed"
              }
            ]
          }}
        />
      </div>

      <div id="features-bento" data-section="features-bento">
        <FeatureBento
          title="Intelligent AI Capabilities"
          description="Our AI agents handle every aspect of your real estate business with precision and speed"
          tag="Core Features"
          tagIcon={Zap}
          textboxLayout="default"
          animationType="slide-up"
          useInvertedBackground="invertDefault"
          features={[
            {
              title: "Lead Generation & Qualification",              description: "Automatically identify, qualify, and nurture leads across all channels",              bentoComponent: "icon-info-cards",              items: [
                {
                  icon: Target,
                  label: "Lead Scoring",                  value: "99% Accuracy"
                },
                {
                  icon: Zap,
                  label: "Auto-Response",                  value: "< 2 minutes"
                },
                {
                  icon: TrendingUp,
                  label: "Conversion Rate",                  value: "+340%"
                }
              ]
            },
            {
              title: "24/7 Client Communication",              description: "Never miss a lead with AI-powered email and chat responses",              bentoComponent: "chat",              aiIcon: MessageCircle,
              userIcon: User,
              exchanges: [
                {
                  userMessage: "Is this property still available?",                  aiResponse: "Yes! This 3-bed home in downtown is still on the market. Would you like a virtual tour?"
                },
                {
                  userMessage: "What's the square footage?",                  aiResponse: "The property is 2,400 sq ft with 2.5 baths. Perfect for families. Shall I send you the full listing details?"
                },
                {
                  userMessage: "How much is the monthly mortgage?",                  aiResponse: "For $450k at current rates, you're looking at ~$2,850/month. I can connect you with our mortgage specialist!"
                }
              ],
              placeholder: "Ask anything about properties..."
            },
            {
              title: "Smart Document Processing",              description: "Automate contracts, disclosures, and paperwork with intelligent extraction",              bentoComponent: "timeline",              heading: "Document Processing Workflow",              subheading: "AI-powered automation from upload to signature",              items: [
                {
                  label: "Upload Document",                  detail: "Extract key fields automatically"
                },
                {
                  label: "Review & Verify",                  detail: "AI highlights critical information"
                },
                {
                  label: "Sign & Archive",                  detail: "Secure digital signature workflow"
                }
              ],
              completedLabel: "Completed"
            },
            {
              title: "Market Intelligence & Insights",              description: "Real-time market analysis and property valuation with AI insights",              bentoComponent: "animated-bar-chart"
            }
          ]}
        />
      </div>

      <div id="features-hover" data-section="features-hover">
        <FeatureHoverPattern
          title="Why Agents Choose RealtimeAI"
          description="Built by real estate professionals for real estate professionals"
          tag="Competitive Advantages"
          tagIcon={Crown}
          textboxLayout="default"
          animationType="slide-up"
          useInvertedBackground="noInvert"
          features={[
            {
              icon: Zap,
              title: "Lightning-Fast Setup",              description: "Get started in minutes, not weeks. Seamless integration with your existing tools and workflows."
            },
            {
              icon: Shield,
              title: "Enterprise Security",              description: "Bank-level encryption, GDPR-compliant, and SOC 2 certified. Your client data is protected."
            },
            {
              icon: TrendingUp,
              title: "Proven ROI",              description: "Agents see 3-5x increase in leads and 40% reduction in manual work within the first month."
            },
            {
              icon: Users,
              title: "Dedicated Support",              description: "24/7 customer success team ready to help. Real estate experts who understand your business."
            },
            {
              icon: Brain,
              title: "Continuous Learning",              description: "AI improves over time, learning from your business patterns and market trends."
            },
            {
              icon: Lock,
              title: "Always Compliant",              description: "Automatic compliance with Fair Housing Act, NAR rules, and state regulations."
            }
          ]}
        />
      </div>

      <div id="about" data-section="about">
        <MetricSplitMediaAbout
          tag="Success Story"
          tagIcon={Award}
          title="From Chaos to Automation: How Urban Properties Scaled 10x"
          description="Urban Properties, a mid-sized brokerage with 23 agents, was drowning in manual tasks. Lead follow-ups were slow, documents scattered across email, and client communication fell through the cracks. Within 90 days of implementing RealtimeAI, they transformed their entire operation."
          metrics={[
            {
              value: "340%",              title: "Increase in lead conversions"
            },
            {
              value: "48hrs",              title: "Avg. time from lead to scheduled tour"
            }
          ]}
          imageSrc="https://img.b2bpic.net/free-photo/successful-business-team-watching-content-computer-monitor-together-discussing-project-sitting-workplace-pointing-display-business-communication-teamwork-concept_74855-12016.jpg"
          imageAlt="Urban Properties team success"
          useInvertedBackground="invertDefault"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardSix
          title="What Real Estate Agents Say"
          description="Join hundreds of successful agents using RealtimeAI to transform their business"
          tag="Testimonials"
          tagIcon={Star}
          textboxLayout="default"
          animationType="slide-up"
          useInvertedBackground="noInvert"
          testimonials={[
            {
              id: "1",              name: "Sarah Mitchell",              handle: "Top Agent, Luxury Properties Co.",              testimonial: "RealtimeAI literally changed my business. I went from spending 20 hours a week on emails and scheduling to having actual time to show properties. My sales are up 45% and I'm less stressed than ever.",              imageSrc: "https://img.b2bpic.net/free-photo/front-view-business-woman-suit_23-2148603018.jpg",              imageAlt: "Sarah Mitchell"
            },
            {
              id: "2",              name: "David Chen",              handle: "Brokerage Owner, Metropolitan Realty",              testimonial: "The ROI was immediate. My 15-person team is now handling 3x the volume without adding headcount. This tool paid for itself in the first month. I recommend it to every broker I meet.",              imageSrc: "https://img.b2bpic.net/free-photo/front-view-professional-business-woman-suit_23-2148603020.jpg",              imageAlt: "David Chen"
            },
            {
              id: "3",              name: "Jessica Rodriguez",              handle: "Senior Agent, Coastal Homes Inc.",              testimonial: "As someone who's been in real estate for 12 years, I was skeptical about AI. But RealtimeAI doesn't feel robotic—it captures my tone and personality. Clients don't even realize they're talking to automation. It's incredible.",              imageSrc: "https://img.b2bpic.net/free-photo/portrait-business-woman-office_1398-6.jpg",              imageAlt: "Jessica Rodriguez"
            },
            {
              id: "4",              name: "Michael Torres",              handle: "Team Lead, Southwest Properties Group",              testimonial: "The document processing alone saves us 15 hours per week. No more scanning, typing, or filing contracts manually. Everything is organized and accessible in seconds. This is enterprise-grade tech at a fraction of the cost.",              imageSrc: "https://img.b2bpic.net/free-photo/modern-businesswoman_23-2148012909.jpg",              imageAlt: "Michael Torres"
            },
            {
              id: "5",              name: "Amanda Pierce",              handle: "New Agent, Success Real Estate",              testimonial: "As a new agent, I was overwhelmed. RealtimeAI gave me systems and processes that usually take years to develop. I'm closing deals at the pace of agents with 10 years of experience.",              imageSrc: "https://img.b2bpic.net/free-photo/medium-shot-woman-working-as-real-estate-agent_23-2151065041.jpg",              imageAlt: "Amanda Pierce"
            },
            {
              id: "6",              name: "Robert Williams",              handle: "Veteran Broker, Classic Homes Realty",              testimonial: "The market intelligence features alone are worth the subscription. Real-time pricing, competition analysis, and neighborhood insights—it's like having a research team working 24/7. Phenomenal product.",              imageSrc: "https://img.b2bpic.net/free-photo/happy-professional_1098-12931.jpg",              imageAlt: "Robert Williams"
            }
          ]}
          speed={40}
        />
      </div>

      <div id="pricing" data-section="pricing">
        <PricingCardThree
          title="Simple, Transparent Pricing"
          description="Start free, scale as you grow. No hidden fees, cancel anytime."
          tag="Pricing Plans"
          tagIcon={DollarSign}
          textboxLayout="default"
          animationType="slide-up"
          useInvertedBackground="invertDefault"
          plans={[
            {
              id: "1",              price: "Free",              name: "Starter Plan",              buttons: [
                { text: "Get Started", href: "#contact" },
                { text: "Learn More", href: "#" }
              ],
              features: [
                "Up to 50 leads per month",                "Basic AI responses",                "Email integration",                "Community support",                "7-day trial of premium features"
              ]
            },
            {
              id: "2",              badge: "Most Popular",              badgeIcon: Zap,
              price: "$299/mo",              name: "Professional Plan",              buttons: [
                { text: "Start Free Trial", href: "#contact" },
                { text: "Chat with Sales", href: "#contact" }
              ],
              features: [
                "Unlimited leads & responses",                "Advanced AI with personality training",                "Email, chat, & SMS automation",                "Document processing (50/mo)",                "Market intelligence dashboard",                "Priority email support",                "Custom integrations"
              ]
            },
            {
              id: "3",              price: "$799/mo",              name: "Enterprise Plan",              buttons: [
                { text: "Contact Sales", href: "#contact" },
                { text: "Schedule Demo", href: "#contact" }
              ],
              features: [
                "Everything in Professional, plus:",                "Unlimited document processing",                "Advanced analytics & reporting",                "Team collaboration tools",                "White-label options",                "Dedicated account manager",                "24/7 phone support",                "Custom AI training"
              ]
            }
          ]}
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqDouble
          title="Frequently Asked Questions"
          description="Everything you need to know about RealtimeAI for real estate"
          tag="Support"
          tagIcon={HelpCircle}
          textboxLayout="default"
          useInvertedBackground="noInvert"
          animationType="smooth"
          faqs={[
            {
              id: "1",              title: "How does RealtimeAI integrate with my existing CRM?",              content: "We support seamless integration with all major CRM platforms including Salesforce, Zillow, HubSpot, and Follow Up Boss. Our API also allows custom integrations. Setup takes less than 5 minutes and our team handles the technical details."
            },
            {
              id: "2",              title: "Is my client data secure and compliant?",              content: "Absolutely. We use bank-level AES-256 encryption, maintain SOC 2 Type II certification, and are fully GDPR and Fair Housing Act compliant. Your data is never used to train our models without explicit consent, and we offer HIPAA compliance options for specialized use cases."
            },
            {
              id: "3",              title: "Can I customize the AI's personality to match my brand?",              content: "Yes! You can train the AI on sample emails and conversations to match your tone, style, and brand voice. The more samples you provide, the better it learns. You can also set specific guardrails and preferred responses for different scenarios."
            },
            {
              id: "4",              title: "How quickly can I see results?",              content: "Most agents see measurable improvements within the first week—faster response times and better lead engagement. Significant increases in conversions and closed deals typically appear within 30-60 days as the system learns your business patterns."
            },
            {
              id: "5",              title: "What if I don't want to use certain AI features?",              content: "You have complete control. Enable or disable any feature at any time. Many agents use just the lead qualification feature initially, then gradually activate document processing, market intelligence, and other tools as they get comfortable."
            },
            {
              id: "6",              title: "Do you offer training and onboarding?",              content: "Yes. All plans include access to our onboarding portal with video tutorials, best practices guides, and live group training sessions. Professional and Enterprise plans also get dedicated onboarding support from our real estate experts."
            },
            {
              id: "7",              title: "What's your refund policy?",              content: "We offer a 30-day money-back guarantee with no questions asked. We're confident you'll see value, but if you don't, you can get a full refund within the first 30 days."
            },
            {
              id: "8",              title: "Can multiple agents use the same account?",              content: "Yes. Our Professional and Enterprise plans support multiple team members. You can manage permissions, set usage limits per agent, and track performance across your entire team from a single dashboard."
            }
          ]}
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactCTA
          tag="Ready to Transform Your Business?"
          tagIcon={Rocket}
          title="Start Your Free Trial Today"
          description="No credit card required. Get instant access to all features and see exactly how RealtimeAI can revolutionize your real estate business. Join hundreds of successful agents."
          buttons={[
            { text: "Start Free Trial", href: "https://app.realtimeai.com/signup" },
            { text: "Schedule Demo Call", href: "https://calendly.com/realtimeai" }
          ]}
          background={{ variant: "gradient-bars" }}
          useInvertedBackground="invertDefault"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBaseCard
          logoText="RealtimeAI"
          columns={[
            {
              title: "Product",              items: [
                { label: "Features", href: "#features-bento" },
                { label: "Pricing", href: "#pricing" },
                { label: "Security", href: "/security" },
                { label: "API Docs", href: "https://docs.realtimeai.com" }
              ]
            },
            {
              title: "Company",              items: [
                { label: "About Us", href: "/about" },
                { label: "Blog", href: "/blog" },
                { label: "Careers", href: "/careers" },
                { label: "Contact", href: "#contact" }
              ]
            },
            {
              title: "Resources",              items: [
                { label: "Help Center", href: "https://help.realtimeai.com" },
                { label: "Webinars", href: "/webinars" },
                { label: "Case Studies", href: "/case-studies" },
                { label: "Community", href: "https://community.realtimeai.com" }
              ]
            },
            {
              title: "Legal",              items: [
                { label: "Privacy Policy", href: "/privacy" },
                { label: "Terms of Service", href: "/terms" },
                { label: "Compliance", href: "/compliance" },
                { label: "Fair Housing", href: "/fair-housing" }
              ]
            }
          ]}
          copyrightText="© 2025 RealtimeAI. All rights reserved. Automating real estate, one agent at a time."
        />
      </div>
    </ThemeProvider>
  );
}