@extends('front-end.layouts.apps')

@section('title', 'ګالري')

@section('page_title', 'ګالري')

@section('main_container')
<div class="container" dir="rtl">
    {{-- Back button and header --}}
    <div class="d-flex justify-content-between align-items-center mt-3 mb-4">
        <a href="{{ url()->previous() }}" class="btn-outline-secondary rounded-pill">
            <i class="fas fa-arrow-right ms-1"></i> شاته
        </a>
        <div class="section-header" style="margin-bottom: 0;">
            <i class="fas fa-images"></i>
            <h3>ګالري</h3>
        </div>
    </div>

    {{-- Gallery grid --}}
    <div class="row">
        @forelse ($gallary as $row)
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <a class="venobox" data-gall="gallery" title="{{ $row->title ?? 'ګالري انځور' }}"
                       href="{{ asset('storage/'.$row->image) }}">
                        <img src="{{ asset('storage/'.$row->image) }}" alt="{{ $row->title ?? 'ګالري انځور' }}">
                    </a>
                </div>
            </div>
        @empty
            <div class="col-12">
                <div class="alert alert-info text-center">
                    <i class="fas fa-info-circle"></i> تر اوسه انځورونه نشته.
                </div>
            </div>
        @endforelse
    </div>

    {{-- Bottom Navigation --}}
    <nav class="bottom-nav">
        <a href="{{ url('/') }}" class="nav-item {{ request()->is('/') ? 'active' : '' }}">
            <i class="fas fa-home"></i> <span>کور</span>
        </a>
        <a href="{{ route('public.categories') }}" class="nav-item {{ request()->is('categories') || request()->is('categories*') ? 'active' : '' }}">
            <i class="fas fa-list-ul"></i> <span>کټګورۍ</span>
        </a>
        <a href="{{ route('public.poetry_search') }}" class="nav-item {{ request()->is('poetry/search') ? 'active' : '' }}">
            <i class="fas fa-search"></i> <span>لټون</span>
        </a>
    </nav>
</div>
@endsection

