@php
    $images = $section['resolved']['images'] ?? collect();
    $data = $section['data'] ?? [];
@endphp
@if($images->isNotEmpty())
<section class="v-section">
    <div class="v-container">
        <header class="v-section__header">
            <h2 class="v-section__title">{{ $data['title'] ?? 'Galeri' }}</h2>
        </header>
        <div class="v-photo-mosaic">
            @foreach($images as $image)
                <a href="{{ $image->file_url }}" class="v-photo-mosaic__item" data-lightbox="gallery"
                   @if($image->title) data-caption="{{ $image->title }}" @endif>
                    <img src="{{ $image->thumbnail_path ? asset('storage/' . $image->thumbnail_path) : $image->file_url }}"
                         alt="{{ $image->alt_text ?? $image->title ?? 'Galeri görseli' }}" loading="lazy">
                </a>
            @endforeach
        </div>
    </div>
</section>
@endif
