<div>

<script type="application/ld+json" wire:ignore>
@verbatim
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Eggfirst Ad agency",
  "url": "https://www.eggfirst.com/work",
  "logo": "https://eggfirst.com/uploads/logo/logo.svg",
  "sameAs": [
    "https://www.facebook.com/EggfirstAdvertisingandDigitalAgency/",
    "https://x.com/eggfirst",
    "https://www.instagram.com/eggfirstofficial/",
    "https://www.youtube.com/channel/UC7RVYq2hwerxvbi5-RAJ3tw",
    "https://www.linkedin.com/company/eggfirst-advertising-and-digital-marketing-agency"
  ]
}
@endverbatim
</script>

    <!-- HERO -->
    <section class="bg-white w-full relative overflow-hidden">
        <div class="mx-auto px-6 lg:px-20 pt-16 pb-12">
            <div class="grid grid-cols-1 xl:grid-cols-12 gap-20">
                <div class="xl:col-span-6">
                    <h1
                        class="font-extrabold text-black
                    text-[46px] sm:text-[64px] lg:text-[72px] xl:text-[80px]
                    leading-[0.98]">
                        Built on<br>Insight.<br>Proven by<br>Impact.
                    </h1>
                </div>
                <div class="xl:col-span-6">
                    <p class="text-black/75 text-[16px] lg:text-[18px] leading-[1.85] max-w-xl text-justify">
                        Our work blends deep consumer understanding with sharp strategy and fearless creativity 
                        to solve real business challenges. From brands rooted in Bharat to leaders shaping the
                        future, each idea is designed to connect meaningfully, perform consistently 
                        and leave a lasting mark where it matters most.
                    </p>
                </div>
            </div>
        </div>
    </section>
    
<section class="bg-white mx-auto px-6 lg:px-20 py-16 text-black">

    <!-- ================= FILTER BAR ================= -->
    <div class="relative border-b border-black/10 pb-4">

        <div class="flex items-center gap-8 text-sm">
            <span class="font-semibold text-black/70">Sort by:</span>

            <div class="flex gap-8">
                <button wire:click="setFilter('recommended')"
                    class="relative pb-1 font-semibold
                    {{ $activeFilter === 'recommended' ? 'text-black' : 'text-black/40 hover:text-black' }}">
                    Recommended
                    @if ($activeFilter === 'recommended')
                        <span class="absolute -bottom-[5px] left-0 w-full h-[2px] bg-black"></span>
                    @endif
                </button>

                <button wire:click="setFilter('latest')"
                    class="relative pb-1 font-semibold
                    {{ $activeFilter === 'latest' ? 'text-black' : 'text-black/40 hover:text-black' }}">
                    Latest
                    @if ($activeFilter === 'latest')
                        <span class="absolute -bottom-[5px] left-0 w-full h-[2px] bg-black"></span>
                    @endif
                </button>
            </div>
        </div>

        <!-- ================= CENTER MESSAGE ================= -->
        @if (
            ($activeFilter === 'recommended' && $recommended->isEmpty()) ||
            ($activeFilter === 'latest' && (!$latest || $latest->isEmpty()))
        )
            <div class="flex justify-center items-center py-16">
                <div class="text-center">
                    <p class="text-[18px] font-semibold text-black">No Message</p>
                    <p class="mt-1 text-sm text-black/50">Nothing to show for this filter</p>
                </div>
            </div>
        @endif

    </div>

    {{-- ================= 2x2 GRID ================= --}}
    @if ($activeFilter === 'recommended')
        <div class="grid grid-cols-1 md:grid-cols-2 gap-10 mt-16">
            @foreach($recommended as $work)
                <x-work-card :work="$work" />
            @endforeach
        </div>
    @endif

    @if ($activeFilter === 'latest')
        <div class="grid grid-cols-1 md:grid-cols-2 gap-10 mt-16">
            @foreach($latest as $work)
                <x-work-card :work="$work" />
            @endforeach
        </div>
    @endif

</section>

</div>
