@extends('front.layout.pages-layout')
@section('pageTitle', $pageTitle)
@section('meta_tags') {!! SEO::generate() !!} @endsection
@section('content')

<section class="section">
    <div class="container">
        <div class="row">
            <div class="col-12">
                <div class="d-flex justify-content-between align-items-center mb-4 flex-wrap">
                    <!-- Title -->
                    <h3 class="mb-0">Photo Gallery Room</h3>
                    <!-- Breadcrumb -->
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb bg-transparent mb-0 px-0">
                            <li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
                            <li class="breadcrumb-item active" aria-current="page">Photo Gallery</li>
                        </ol>
                    </nav>
                </div>
                <hr>
            </div>
        </div>
        <div class="row mt-5 shadow-sm card-radius">
            @forelse($albums as $album)
            <div class="col-md-6 col-lg-3 mb-4">
                <div class="card h-100 border-0">
                    <a href="{{ route('photo_gallery_album', $album->slug) }}">
                        <img src="{{ $album->cover_photo ? asset('/images/albums/' . $album->cover_photo) : asset('/front/images/programs/logo/no_album_cover.png') }}"
                            alt="{{ $album->title }}"
                            class="card-img-top card-radius"
                            style="height: 200px; object-fit: cover;">
                    </a>
                    <div class="card-body text-center">
                        <h6 class="card-title mb-0 text-dark">
                            <a href="{{ route('photo_gallery_album', $album->slug) }}" class="text-dark text-decoration-none">
                                {{ $album->title }}
                            </a>
                        </h6>
                    </div>
                </div>
            </div>

            @empty
            <div class="col-12">
                <p>No albums found.</p>
            </div>
            @endforelse
        </div>
    </div>
</section>

@endsection