"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import HeroLogoBillboard from '@/components/sections/hero/HeroLogoBillboard';
import TestimonialAboutCard from '@/components/sections/about/TestimonialAboutCard';
import FeatureCardTwentyThree from '@/components/sections/feature/FeatureCardTwentyThree';
import MetricCardSeven from '@/components/sections/metrics/MetricCardSeven';
import TestimonialCardThirteen from '@/components/sections/testimonial/TestimonialCardThirteen';
import ContactFaq from '@/components/sections/contact/ContactFaq';
import FooterLogoEmphasis from '@/components/sections/footer/FooterLogoEmphasis';
import { Phone, ShieldCheck, Sparkles } from "lucide-react";

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="text-stagger"
      defaultTextAnimation="entrance-slide"
      borderRadius="pill"
      contentWidth="small"
      sizing="mediumLargeSizeLargeTitles"
      background="circleGradient"
      cardStyle="gradient-bordered"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="medium"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay
          navItems={[
            { name: "Services", id: "services" },
            { name: "About Us", id: "about" },
            { name: "Testimonials", id: "testimonials" },
            { name: "Contact", id: "contact" }
          ]}
          brandName="Josiah & Sons"
          button={{ text: "Call Us Now", href: "tel:+1-713-555-1234" }}
          className="py-4 px-6 md:px-8"
          buttonClassName="font-medium"
          buttonTextClassName="text-lg"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroLogoBillboard
          logoText="Josiah & Sons Plumbers"
          description="Your trusted plumbing experts in Houston, Texas. Reliable, efficient, and always on time. We handle all your plumbing needs with professionalism and care."
          buttons={[
            { text: "Schedule Service", href: "#contact" },
            { text: "Our Services", href: "#services" }
          ]}
          background={{ variant: "downward-rays-static-grid" }}
          imageSrc="https://img.b2bpic.net/free-photo/portrait-attractive-hispanic-handyman-writing-work-estimate-before-fixing-kitchen-sink_662251-2690.jpg"
          imageAlt="Professional plumber working on a pipe."
          mediaAnimation="blur-reveal"
          frameStyle="card"
          ariaLabel="Hero section: Josiah & Sons Plumbers - Your trusted Houston plumbing experts."
          descriptionClassName="text-lg md:text-xl lg:text-2xl"
          buttonClassName="px-6 py-3 md:px-8 md:py-4 text-base md:text-lg"
          buttonTextClassName="font-semibold"
        />
      </div>

      <div id="about" data-section="about">
        <TestimonialAboutCard
          tag="About Us"
          tagIcon={Sparkles}
          title="Serving Houston Homes and Businesses with Integrity Since 1995."
          description="Josiah & Sons has been a cornerstone of reliable plumbing services in the Houston area for nearly three decades. Our commitment to quality, transparent pricing, and unparalleled customer service sets us apart. We believe in building lasting relationships through trust and exceptional workmanship."
          subdescription="Your local plumbing experts, always ready to serve."
          icon={ShieldCheck}
          imageSrc="https://img.b2bpic.net/free-photo/portrait-happy-auto-repairman-looking-camera-while-his-customers-are-standing-background_637285-7790.jpg"
          imageAlt="Team of friendly plumbers smiling."
          mediaAnimation="opacity"
          useInvertedBackground={true}
          className="py-16 md:py-24"
          cardClassName="rounded-2xl shadow-lg"
          titleClassName="text-3xl md:text-4xl lg:text-5xl font-bold"
          descriptionClassName="text-base md:text-lg"
          subdescriptionClassName="text-sm md:text-base text-accent"
          iconBoxClassName="bg-primary-cta text-primary-cta-text rounded-full p-4 -translate-x-1/2 -translate-y-1/2 top-0 left-0"
          iconClassName="h-8 w-8"
        />
      </div>

      <div id="services" data-section="services">
        <FeatureCardTwentyThree
          features={[
            { id: "leak-repair", title: "Emergency Leak Repair", tags: ["24/7 Service", "Fast Response"], imageSrc: "https://img.b2bpic.net/free-photo/man-fixing-kitchen-sink_53876-13430.jpg", imageAlt: "Burst pipe leaking water." },
            { id: "drain-cleaning", title: "Drain Cleaning & Unclogging", tags: ["Clog Removal", "Pipe Maintenance"], imageSrc: "https://img.b2bpic.net/free-photo/top-view-plumber-checking-kitchen-fixtures_1098-17864.jpg", imageAlt: "Plumber cleaning a clogged drain." },
            { id: "water-heater", title: "Water Heater Services", tags: ["Installation", "Repair"], imageSrc: "https://img.b2bpic.net/free-photo/worker-repairing-water-heater_23-2149334231.jpg", imageAlt: "New water heater installation." },
            { id: "faucet-installation", title: "Faucet & Fixture Installation", tags: ["Upgrades", "Repairs"], imageSrc: "https://img.b2bpic.net/free-photo/high-angle-man-cleaning-sink_23-2149535089.jpg", imageAlt: "Shiny new kitchen faucet." }
          ]}
          animationType="slide-up"
          title="Our Comprehensive Plumbing Services"
          description="From minor leaks to major installations, our skilled technicians are equipped to handle all your plumbing needs quickly and effectively."
          textboxLayout="default"
          useInvertedBackground={false}
          className="py-16 md:py-24"
          textBoxTitleClassName="text-3xl md:text-4xl lg:text-5xl font-bold"
          textBoxDescriptionClassName="text-lg md:text-xl"
          itemClassName="rounded-lg overflow-hidden shadow-md"
          mediaWrapperClassName="h-60 w-full"
          cardClassName="p-4 bg-card"
          cardTitleClassName="text-xl font-semibold"
          tagsContainerClassName="flex flex-wrap gap-2 text-sm"
          arrowClassName="text-primary-cta"
        />
      </div>
      
      <div id="metrics" data-section="metrics">
        <MetricCardSeven
          metrics={[
            { id: "satisfaction", value: "98%", title: "Customer Satisfaction", items: ["Rated 5-Stars on Google", "Trusted by thousands of homes"] },
            { id: "experience", value: "25+", title: "Years of Expertise", items: ["Serving Houston since 1995", "Certified & Licensed Plumbers"] },
            { id: "emergency", value: "24/7", title: "Emergency Service", items: ["Rapid Response Time", "Available holidays and weekends"] },
            { id: "coverage", value: "Houston", title: "Local Coverage Area", items: ["Serving all Houston neighborhoods", "Community-focused service"] }
          ]}
          carouselMode="auto"
          animationType="depth-3d"
          title="Why Choose Josiah & Sons?"
          description="Our commitment to excellence, customer satisfaction, and local expertise makes us Houston's preferred plumbing partner."
          textboxLayout="default"
          useInvertedBackground={true}
          className="py-16 md:py-24"
          textBoxTitleClassName="text-3xl md:text-4xl lg:text-5xl font-bold"
          textBoxDescriptionClassName="text-lg md:text-xl"
          cardClassName="rounded-2xl shadow-xl p-8 bg-card"
          valueClassName="text-8xl md:text-9xl font-extrabold text-accent"
          metricTitleClassName="text-2xl font-semibold"
          featuresClassName="pt-4 border-t border-accent mt-4"
          featureItemClassName="flex items-center gap-2 text-foreground"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardThirteen
          testimonials={[
            { id: "1", name: "Sarah Johnson", handle: "Homeowner", testimonial: "Josiah & Sons Plumbers saved us from a major pipe burst! Their response was incredibly fast, and the repair was done efficiently and professionally. Highly recommend their emergency service!", rating: 5, imageSrc: "https://img.b2bpic.net/free-photo/young-businesswoman-portrait-office_1262-1506.jpg", imageAlt: "Sarah Johnson, Homeowner" },
            { id: "2", name: "Michael Chen", handle: "Business Owner", testimonial: "We've used Josiah & Sons for all our commercial plumbing needs for years. Their team is reliable, knowledgeable, and always delivers top-notch service. Fantastic partners for any business.", rating: 5, imageSrc: "https://img.b2bpic.net/free-photo/smiling-man-sitting-cafe-table-gesturing_1262-1141.jpg", imageAlt: "Michael Chen, Business Owner" },
            { id: "3", name: "Emily Rodriguez", handle: "Property Manager", testimonial: "As a property manager, having a dependable plumbing service is crucial. Josiah & Sons Plumbers are always our first call. They handle everything from routine maintenance to complex installations flawlessly.", rating: 5, imageSrc: "https://img.b2bpic.net/free-photo/young-businesswoman-portrait-office_1262-1506.jpg", imageAlt: "Emily Rodriguez, Property Manager" },
            { id: "4", name: "David Kim", handle: "Real Estate Agent", testimonial: "I confidently refer all my clients to Josiah & Sons Plumbers. Their professionalism and quality of work always exceed expectations. They truly are the best in Houston!", rating: 5, imageSrc: "https://img.b2bpic.net/free-photo/smiling-man-sitting-cafe-table-gesturing_1262-1141.jpg", imageAlt: "David Kim, Real Estate Agent" }
          ]}
          showRating={true}
          carouselMode="auto"
          animationType="slide-up"
          title="What Our Houston Clients Say"
          description="Hear directly from our satisfied customers about the quality and reliability of Josiah & Sons Plumbers."
          textboxLayout="default"
          useInvertedBackground={false}
          className="py-16 md:py-24"
          textBoxTitleClassName="text-3xl md:text-4xl lg:text-5xl font-bold"
          textBoxDescriptionClassName="text-lg md:text-xl"
          cardClassName="rounded-2xl shadow-md p-6 bg-card"
          testimonialClassName="text-foreground text-base italic"
          nameClassName="font-semibold text-primary-cta"
          handleClassName="text-sm text-accent"
          ratingClassName="text-yellow-500"
          imageWrapperClassName="h-12 w-12 rounded-full overflow-hidden"
          imageClassName="object-cover"
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactFaq
          faqs={[
            { id: "1", title: "What areas do you serve in Houston?", content: "We proudly serve all neighborhoods within the greater Houston area, including surrounding communities. Contact us to confirm service availability in your specific location." },
            { id: "2", title: "Do you offer emergency plumbing services?", content: "Yes, we provide 24/7 emergency plumbing services. Our team is always on standby to address urgent plumbing issues anytime, day or night." },
            { id: "3", title: "What types of payment do you accept?", content: "We accept all major credit cards, debit cards, and checks. Payment plans can be discussed for larger projects upon request." },
            { id: "4", title: "Are your plumbers licensed and insured?", content: "Absolutely. All our plumbers are fully licensed, bonded, and insured, ensuring you receive the highest quality and safest service possible." }
          ]}
          ctaTitle="Need Immediate Plumbing Help?"
          ctaDescription="Don't hesitate! Contact Josiah & Sons Plumbers for reliable service in Houston."
          ctaButton={{ text: "Call Us Now", href: "tel:+1-713-555-1234" }}
          ctaIcon={Phone}
          useInvertedBackground={true}
          animationType="slide-up"
          accordionAnimationType="smooth"
          showCard={true}
          ariaLabel="Contact Us & Frequently Asked Questions"
          className="py-16 md:py-24"
          ctaPanelClassName="rounded-2xl shadow-lg bg-primary-cta text-primary-cta-text p-8 flex flex-col items-center text-center"
          ctaIconClassName="h-16 w-16 mb-4 text-primary-cta-text"
          ctaTitleClassName="text-3xl font-bold mb-2 text-primary-cta-text"
          ctaDescriptionClassName="text-lg mb-6 text-primary-cta-text"
          ctaButtonClassName="bg-secondary-cta text-secondary-cta-text hover:bg-opacity-90 px-8 py-4 rounded-full font-semibold"
          faqsPanelClassName="rounded-2xl shadow-lg bg-card p-8"
          accordionClassName="border-b border-accent last:border-b-0 py-4"
          accordionTitleClassName="font-semibold text-lg"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterLogoEmphasis
          columns={[
            { items: [{ label: "Home", href: "#hero" }, { label: "Services", href: "#services" }, { label: "About Us", href: "#about" }] },
            { items: [{ label: "Testimonials", href: "#testimonials" }, { label: "Contact", href: "#contact" }, { label: "Privacy Policy", href: "/privacy" }, { label: "Terms of Service", href: "/terms" }] }
          ]}
          logoText="Josiah & Sons Plumbers"
          ariaLabel="Site footer with navigation and company information."
          className="bg-background-accent text-foreground py-12 md:py-16"
          containerClassName="max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8"
          logoClassName="text-4xl font-extrabold mb-8 text-foreground"
          itemClassName="text-foreground hover:text-primary-cta transition-colors duration-200"
          iconClassName="text-primary-cta h-5 w-5"
        />
      </div>
    </ThemeProvider>
  );
}
