'use client'; import React from 'react'; import Image from 'next/image'; import { usePathname } from 'next/navigation'; import { Badge, Container, Heading } from '@/components/ui'; import { Button } from '@/components/ui/Button'; export interface HeroSectionProps { title: string; badge?: string; subtitle?: string; backgroundImage?: any; alignment?: 'left' | 'center'; ctaLabel?: string; ctaHref?: string; } // CSS animations replace Framer Motion for better LCP export const HeroSection: React.FC = (props) => { const { title, badge, subtitle, backgroundImage, alignment, ctaLabel, ctaHref } = props; const bgSrc = backgroundImage?.sizes?.card?.url || backgroundImage?.url; const pathname = usePathname(); return (
{bgSrc && (
{title {/* Cinematic Color Grading Overlay */}
{/* Dramatic Vignette & Fade to content */}
{/* Top Fade for Header Navigation Readability */}
)}
{badge && (
{badge}
)}
{title}
{subtitle && (

{subtitle}

)} {ctaLabel && ctaHref && (
)}
); };