@extends('layouts.main')

@section('content')
<section class="bg-gradient-to-r from-blue-950 via-blue-900 to-blue-700 text-white">
    <div class="max-w-7xl mx-auto px-4 py-20">
        <p class="text-blue-200 font-semibold mb-3">Dokumentasi</p>
        <h1 class="text-4xl md:text-5xl font-extrabold mb-4">Galeri Kegiatan</h1>
        <p class="text-lg text-blue-100 max-w-3xl leading-8">
            Arsip visual kegiatan PPNI DPK Rumah Sakit BaliMéd Denpasar.
        </p>
    </div>
</section>

<section class="max-w-7xl mx-auto px-4 py-16">
    <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
        @forelse($galleries as $gallery)
            <div class="bg-white rounded-3xl shadow-sm overflow-hidden border border-slate-100">
                <img src="{{ asset($gallery->image) }}" alt="{{ $gallery->title }}" class="w-full h-52 object-cover">
                <div class="p-4">
                    <h3 class="font-bold text-blue-900">{{ $gallery->title }}</h3>
                    @if($gallery->description)
                        <p class="text-sm text-slate-600 mt-2">{{ $gallery->description }}</p>
                    @endif
                </div>
            </div>
        @empty
            <div class="col-span-2 md:col-span-4 text-center text-slate-500">
                Belum ada galeri dipublikasikan.
            </div>
        @endforelse
    </div>

    <div class="mt-8">
        {{ $galleries->links() }}
    </div>
</section>
@endsection