"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
import HeroLogoBillboard from '@/components/sections/hero/HeroLogoBillboard';
import FeatureCardOne from '@/components/sections/feature/FeatureCardOne';
import TestimonialCardTen from '@/components/sections/testimonial/TestimonialCardTen';
import TextSplitAbout from '@/components/sections/about/TextSplitAbout';
import ContactCTA from '@/components/sections/contact/ContactCTA';
import FooterCard from '@/components/sections/footer/FooterCard';
import Link from 'next/link';

export default function HomePage() {
  const navItems = [
    { name: 'Home', id: '/' },
    { name: 'Services', id: '/services' },
    { name: 'About', id: '/about' },
    { name: 'Reviews', id: '/reviews' },
    { name: 'Contact', id: '/contact' }
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="bounce-effect"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="smallMedium"
      sizing="mediumLargeSizeLargeTitles"
      background="none"
      cardStyle="gradient-radial"
      primaryButtonStyle="primary-glow"
      secondaryButtonStyle="glass"
      headingFontWeight="bold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleCentered
          brandName="Nick and Sons Plumbing"
          navItems={navItems}
          button={{ text: "Call Now", href: "tel:123-456-7890" }}
          className="py-4 lg:py-6"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroLogoBillboard
          logoText="Nick and Sons Plumbing"
          description="Nick and Sons Plumbing delivers pro-level workmanship, clear communication, and integrity-first service—from quick fixes to upgrades and remodel support."
          buttons={[
            { text: "Request an Estimate", href: "/contact" },
            { text: "Call Now", href: "tel:123-456-7890" }
          ]}
          buttonAnimation="reveal-blur"
          mediaAnimation="opacity"
          imageSrc="https://img.b2bpic.net/free-photo/man-kneeling-down-touching-sink-inspecting-pipes_259150-58251.jpg"
          imageAlt="Professional plumber working in a luxury kitchen"
          frameStyle="card"
          className="py-20 lg:py-28 text-foreground"
          logoClassName="font-extrabold text-5xl md:text-7xl lg:text-8xl xl:text-9xl"
          descriptionClassName="text-lg md:text-xl lg:text-2xl mt-4 max-w-2xl mx-auto"
          buttonContainerClassName="flex flex-wrap justify-center gap-4 mt-8"
          buttonClassName="min-w-[180px]"
          buttonTextClassName="font-semibold"
        />
      </div>

      <div id="why-us" data-section="why-us">
        <FeatureCardOne
          title="Why Homeowners Choose Us"
          description="We're built on principles of fast response, pro-level skill, integrity, clear communication, fair pricing, and 'above-and-beyond' service."
          features={[
            { title: "Pro-Level Skill", description: "We solve problems other plumbers miss—and we do it efficiently.", imageSrc: "https://img.b2bpic.net/free-vector/plumber-services-logo-design-template_742173-26552.jpg", imageAlt: "Icon representing skill" },
            { title: "Integrity You Can Feel", description: "Customers call out our honesty, professionalism, and respect in the home.", imageSrc: "https://img.b2bpic.net/free-vector/handshake-circles-set_78370-9465.jpg", imageAlt: "Icon representing integrity" },
            { title: "Above-and-Beyond Service", description: "If we see a second issue while fixing the first, we handle it the right way—no shortcuts.", imageSrc: "https://img.b2bpic.net/free-vector/check-mark-stars_78370-4435.jpg", imageAlt: "Icon representing above and beyond service" }
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          cardClassName="p-6 md:p-8 flex flex-col items-center text-center"
          cardTitleClassName="text-xl font-bold mt-4 mb-2"
          cardDescriptionClassName="text-base text-foreground/80"
          mediaClassName="h-24 w-24 object-contain"
        />
      </div>

      <div id="services-preview" data-section="services-preview">
        <FeatureCardOne
          title="Plumbing Services Built for Real Life"
          description="From quick repairs to home upgrades, we keep your systems reliable and your home protected."
          features={[
            { title: "Leak Detection & Repairs", description: "Under-sink, pipe leaks, hidden drips.", imageSrc: "https://img.b2bpic.net/free-photo/male-worker-operating-machinery-factory_107420-96043.jpg", imageAlt: "Illustration of a leaking pipe" },
            { title: "Kitchen Plumbing", description: "Faucets, sinks, garbage disposals, drain issues.", imageSrc: "https://img.b2bpic.net/free-photo/household-repair-middle-aged-man-inspecting-pipe-touching-hand-sink-stylish-modern-kitchen_259150-58265.jpg", imageAlt: "Illustration of a kitchen sink and faucet" },
            { title: "Bathroom Plumbing", description: "Showers, valves, toilets, remodel support.", imageSrc: "https://img.b2bpic.net/free-photo/male-plumber-working-fix-problems-client-s-house_23-2150990698.jpg", imageAlt: "Illustration of a showerhead and toilet" },
            { title: "Water Line & Appliance Hookups", description: "Fridge water dispensers, washing machines.", imageSrc: "https://img.b2bpic.net/free-photo/portrait-handsome-male-technician-doing-work-report-broken-fridge-home-kitchen_662251-2719.jpg", imageAlt: "Illustration of a water line connection" },
            { title: "Drain Clearing", description: "Kitchen drains and clogs handled fast.", imageSrc: "https://img.b2bpic.net/free-photo/top-view-plumber-checking-kitchen-fixtures_1098-17864.jpg", imageAlt: "Illustration of a clogged drain" },
            { title: "Water Quality Upgrades", description: "Water softeners and related installs.", imageSrc: "https://img.b2bpic.net/free-photo/water-filter-with-blue-cap-blue-background_185193-165389.jpg", imageAlt: "Illustration of a water filtration system" },
            { title: "Recirculating Pumps", description: "Comfort upgrades for faster hot water.", imageSrc: "https://img.b2bpic.net/free-photo/view-plumber-working-fix-problems_23-2150990693.jpg", imageAlt: "Illustration of a water heater with pump" },
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          cardClassName="p-6 md:p-8"
          cardTitleClassName="text-lg font-semibold mt-4 mb-2"
          cardDescriptionClassName="text-sm text-foreground/70"
          mediaClassName="h-20 w-20 object-contain mx-auto"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
          <TestimonialCardTen
            title="Homeowners Don’t Just “Recommend”—They Keep Calling Us Back."
            description="We're proud that customers mention the same things again and again: professionalism, thorough work, strong communication, and integrity."
            testimonials={[
              { id: "1", title: "“Communicative, professional, quality work, priced fairly.”", quote: "The team was incredibly communicative and professional throughout the entire process. The quality of work was exceptional, and it was all priced fairly. Highly recommend!", name: "Sarah Johnson", role: "Homeowner", imageSrc: "https://img.b2bpic.net/free-photo/smiling-businessman-standing-airport_107420-85035.jpg", imageAlt: "Sarah Johnson" },
              { id: "2", title: "“Shows up, gets the job done… Integrity is 100%.”", quote: "Nick and Sons Plumbing truly delivers. They show up on time, get the job done right, and their integrity is 100%. A plumber you can trust.", name: "Michael Chen", role: "Satisfied Client", imageSrc: "https://img.b2bpic.net/free-photo/smiling-man-sitting-cafe-table-gesturing_1262-1141.jpg", imageAlt: "Michael Chen" },
              { id: "3", title: "“Fixed it in less than 10 minutes and explained the process.”", quote: "I had a persistent leak that was driving me crazy. Nick and Sons came, fixed it in less than 10 minutes, and clearly explained what caused it. Fantastic service!", name: "Emily Rodriguez", role: "Local Resident", imageSrc: "https://img.b2bpic.net/free-photo/smiling-middle-aged-attractive-woman-showing-thumb-up-outdoors_1262-12526.jpg", imageAlt: "Emily Rodriguez" },
              { id: "4", title: "“Found a second leak while fixing the first.”", quote: "They truly go above and beyond. While fixing an obvious leak, they proactively found a second, smaller one I hadn't even noticed and fixed that too. Saved me future headaches.", name: "David Kim", role: "Property Owner", imageSrc: "https://img.b2bpic.net/free-photo/smiling-african-american-man-posing-library_74855-1619.jpg", imageAlt: "David Kim" },
              { id: "5", title: "“Solved plumbing problems multiple other plumbers could not.”", quote: "I had tried several other plumbers for a complex issue, and Nick and Sons was the only one who could actually solve it. Their expertise is unmatched.", name: "Jessica Lee", role: "Grateful Customer", imageSrc: "https://img.b2bpic.net/free-photo/smiling-businessman-standing-airport_107420-85035.jpg", imageAlt: "Jessica Lee" }
            ]}
            textboxLayout="default"
            useInvertedBackground={false}
            testimonialTitleClassName="text-2xl font-semibold leading-tight"
            quoteClassName="mt-4 text-lg text-foreground/80"
            nameClassName="font-bold"
            roleClassName="text-sm text-foreground/70"
          />
      </div>
      
      <div id="how-it-works" data-section="how-it-works">
        <FeatureCardOne
          title="How It Works"
          description="Our simple, transparent process ensures you get reliable plumbing service without the hassle."
          features={[
            { title: "1) Reach Out", description: "Call, text, or send a quick description of your plumbing issue.", imageSrc: "https://img.b2bpic.net/free-vector/office-scenes-composition-with-woman-sitting-computer-with-profiles_1284-63421.jpg", imageAlt: "Illustration of a phone and message bubble" },
            { title: "2) Clear Plan", description: "We confirm the issue, walk you through options, and quote clearly.", imageSrc: "https://img.b2bpic.net/free-vector/strategy-plan-strategic-planning-business-concept-flat-line-art-icons_126523-2184.jpg", imageAlt: "Illustration of a clipboard and pen" },
            { title: "3) Done Right", description: "Professional work, clean finish, and no loose ends.", imageSrc: "https://img.b2bpic.net/free-photo/male-plumber-working-with-client-fix-kitchen-problems_23-2150990689.jpg", imageAlt: "Illustration of a checkmark and happy homeowner" }
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          buttons={[{ text: "Request Estimate", href: "/contact" }]}
          cardClassName="p-6 md:p-8 flex flex-col items-center text-center"
          cardTitleClassName="text-xl font-bold mt-4 mb-2"
          cardDescriptionClassName="text-base text-foreground/80"
          mediaClassName="h-24 w-24 object-contain"
        />
      </div>

      <div id="about-teaser" data-section="about-teaser">
        <TextSplitAbout
          title="A Family Standard of Work"
          description={["Nick and Sons Plumbing is built on a simple promise: show up, do it right, and treat people well. Homeowners consistently mention our thoroughness, courtesy, and trustworthiness—because that’s how we work, every time."]}
          buttons={[{ text: "Meet Nick & The Team →", href: "/about" }]}
          buttonAnimation="reveal-blur"
          useInvertedBackground={false}
          className="py-20 lg:py-28"
          titleClassName="text-4xl md:text-5xl lg:text-6xl font-extrabold"
          descriptionClassName="text-lg md:text-xl text-foreground/80 max-w-xl"
          buttonClassName="mt-8"
          buttonTextClassName="font-semibold"
        />
      </div>

      <div id="contact-cta" data-section="contact-cta">
        <ContactCTA
          tag="Ready for Trusted Plumbing?"
          title="Ready for a Plumber You Can Trust?"
          description="Whether it’s a leak, upgrade, or a “something’s not right” problem—Nick and Sons Plumbing is the call you feel good making."
          buttons={[
            { text: "Call Now", href: "tel:123-456-7890" },
            { text: "Request Estimate", href: "/contact" }
          ]}
          buttonAnimation="bounce-effect"
          background={{ variant: "radial-gradient" }}
          useInvertedBackground={false}
          className="py-20 lg:py-28 text-white"
          titleClassName="text-4xl md:text-5xl lg:text-6xl font-extrabold text-white"
          descriptionClassName="text-lg md:text-xl lg:text-2xl mt-4 text-white/90 max-w-2xl mx-auto"
          buttonContainerClassName="flex flex-wrap justify-center gap-4 mt-8"
          buttonClassName="min-w-[180px]"
          buttonTextClassName="font-semibold"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterCard
          logoText="Nick and Sons Plumbing"
          copyrightText="© 2024 | Nick and Sons Plumbing. All rights reserved."
          className="py-16"
          cardClassName="max-w-7xl mx-auto px-6 lg:px-8 bg-card rounded-xl shadow-lg"
          logoClassName="text-3xl font-bold text-foreground"
          copyrightTextClassName="text-sm text-foreground/70"
        />
      </div>
    </ThemeProvider>
  );
}