<section class="w-full py-20" style="background-color: {{ trim($d['bg_color'] ?? '') ?: '#ffffff' }}">
    <div class="max-w-5xl mx-auto px-6">
        @if(!empty($d['title']))
            <h2 class="text-2xl md:text-3xl font-bold text-slate-900 mb-12 text-center">{{ $d['title'] }}</h2>
        @endif
        <div class="flex flex-wrap items-center justify-center gap-12 grayscale opacity-70 hover:opacity-100 transition-opacity">
            @foreach($d['items'] ?? [] as $item)
                @if(!empty($item['image']))
                    @php $imgUrl = str_starts_with($item['image'], 'http') || str_starts_with($item['image'], '/') ? $item['image'] : asset('storage/'.$item['image']); @endphp
                    @if(!empty($item['url']))
                        <a href="{{ $item['url'] }}" target="_blank" rel="noopener" class="block h-12 w-auto max-w-[140px] object-contain">
                            <img src="{{ $imgUrl }}" alt="{{ $item['name'] ?? 'Logo' }}" class="h-full w-auto object-contain">
                        </a>
                    @else
                        <img src="{{ $imgUrl }}" alt="{{ $item['name'] ?? 'Logo' }}" class="h-12 w-auto max-w-[140px] object-contain">
                    @endif
                @endif
            @endforeach
        </div>
    </div>
</section>
