<div>
@if($posts->isNotEmpty())
        @foreach($posts as $post)
            @php
                // Find the translation for the current locale.
                $translation = $post->translations->firstWhere('locale', $locale);

                // If no translation is found for the current locale, use the fallback.
                if (!$translation) {
                    $translation = $post->translations->firstWhere('locale', 'like', $fallbackLocale);
                }
            @endphp

            @if ($translation)
                <div class="bg-theme-background">
                    <div class="max-w-full sm:mx-auto mr-16 ml-2  bg-theme-background text-2xs sm:text-sm text-center text-red-700 py-2">
                    <!-- <div class="max-w-7xl mx-auto  bg-white text-2xs sm:text-sm text-center text-red-700 py-2 sm:px-6 lg:px-8"> -->

                        <span class="font-semibold pr-2">
                            <!-- Title Static Post-->
                            @if (isset($translation->title))
                                {{ $translation->title }}
                            @endif
                        </span>
                        <!-- Excerpt Static Post-->
                        @if (isset($translation->excerpt) && strlen(trim(strip_tags($translation->excerpt))) > 0)
                            {{ $translation->excerpt }}
                        @endif
                    </div>
                </div>
            @endif
        @endforeach
    @endif
</div>