@php
    $partners = $data['partners'] ?? collect();
@endphp

@if($partners->count())
<div class="site-section overflow-hidden">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="text-center mb-12 reveal">
            <h2 class="section-title mx-auto">{{ $section->title ?? 'شركاؤنا' }}</h2>
        </div>

        <div class="relative overflow-hidden reveal">
            <div class="partners-track">
                @for($i = 0; $i < 2; $i++)
                    @foreach($partners as $partner)
                        @if($partner->logo)
                            <div class="shrink-0 w-36 h-20 flex items-center justify-center grayscale hover:grayscale-0 opacity-60 hover:opacity-100 transition-all duration-300">
                                <img src="{{ $partner->logo->url }}"
                                     alt="{{ $partner->name }}"
                                     class="max-w-full max-h-full object-contain">
                            </div>
                        @else
                            <div class="shrink-0 px-6 py-3 rounded-lg bg-white/5 border border-white/10 flex items-center justify-center">
                                <span class="text-white/40 text-sm font-medium">{{ $partner->name }}</span>
                            </div>
                        @endif
                    @endforeach
                @endfor
            </div>
        </div>
    </div>
</div>
@endif
