import type { Metadata } from 'next';
import { Hero } from '@/components/hero';
import { ProcessSteps } from '@/components/process-steps';
import { ServiceCard } from '@/components/service-card';
import { TrustPanel } from '@/components/trust-panel';
import { Testimonial } from '@/components/testimonial';
import { CTASection } from '@/components/cta-section';
import { getAllServices } from '@/data/services';
import testimonials from '@/data/testimonials.json';

export const metadata: Metadata = {
  title: 'Hampton, Brown & Associates, PC - Professional Tax Planning & Financial Services',
  description: 'Expert federal income and estate tax services, financial planning, and goal-oriented strategies in Corpus Christi. Helping clients achieve their economic goals through proactive planning.',
  keywords: 'CPA, tax planning, tax preparation, Corpus Christi, financial planning, business advisory, estate tax, federal tax',
  openGraph: {
    title: 'Hampton, Brown & Associates, PC - Professional Tax Services',
    description: 'Expert federal income and estate tax services and financial planning in Corpus Christi',
    images: ['/images/home-hero.jpg'],
  },
};

export default function HomePage() {
  const services = getAllServices();
  const featuredTestimonials = testimonials.slice(0, 3);

  return (
    <main>
      <Hero
        title="Achieving Your Economic Goals Through Strategic Planning"
        subtitle="At Hampton, Brown & Associates, we assist our clients with their tax and accounting needs and achieving economic goals. Our primary tool is providing Federal income and estate tax services and financial planning in a manner that permits our clients to control the tax impact on their economic environment to the maximum extent possible."
        ctaText="Schedule a Consultation"
        ctaHref="/contact"
        imageSrc="/images/BannerHamptonBrown.png"
        imageAlt="Hampton, Brown & Associates professional banner with company branding"
      />

      <ProcessSteps />

      <section className="py-16 bg-sand">
        <div className="container mx-auto px-4 lg:px-6">
          <div className="text-center mb-12">
            <h2 className="text-3xl font-bold tracking-tight text-ink sm:text-4xl mb-4">
              Our Services
            </h2>
            <p className="text-lg text-slate max-w-3xl mx-auto">
              Public accounting, federal income tax, estate tax planning, financial planning, and advisory services
            </p>
          </div>
          <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
            {services.map((service) => (
              <ServiceCard
                key={service.id}
                title={service.title}
                description={service.description}
                image={service.image}
                imageAlt={`${service.title} service`}
                href={`/services/${service.slug}`}
                features={service.features.slice(0, 3)}
              />
            ))}
          </div>
        </div>
      </section>

      <TrustPanel />

      <section className="py-16 bg-cloud">
        <div className="container mx-auto px-4 lg:px-6">
          <div className="text-center mb-12">
            <h2 className="text-3xl font-bold tracking-tight text-ink sm:text-4xl mb-4">
              Client Commitment
            </h2>
            <p className="text-lg text-slate max-w-3xl mx-auto">
              We ask for the assistance and cooperation from clients to permit us to be as effective as possible in helping clients accomplish their goals
            </p>
          </div>
          <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
            {featuredTestimonials.map((testimonial) => (
              <Testimonial
                key={testimonial.id}
                quote={testimonial.quote}
                author={testimonial.author}
                role={testimonial.role}
                rating={testimonial.rating}
              />
            ))}
          </div>
        </div>
      </section>

      <CTASection
        title="Ready to Achieve Your Economic Goals?"
        description="If you are willing to become involved in goal setting, commit the time and resources necessary to proceed towards your goals, and be part of an effective communication effort, then you are exactly the type of client that our firm wishes to attract, serve and retain."
        primaryCta={{
          text: "Schedule a Consultation",
          href: "/contact"
        }}
        secondaryCta={{
          text: "Learn About Our Planning Process",
          href: "/about"
        }}
      />
    </main>
  );
}
