@extends('layouts.app') @section('title', $search ? "Search: {$search}" : 'All Videos') @section('content')
{{-- Page Header --}}

@if($search) Search Results @else All Videos @endif

@if($search)

Showing results for: "{{ $search }}"

Clear search
@endif @if(isset($month) && $month)

Filtered by: {{ $months[$month] ?? $month }}

Clear month filter
@endif
{{-- Search Bar (prominent) --}}
{{-- Category Filter Pills --}} @if(isset($categories) && $categories->isNotEmpty())
All @foreach($categories as $category) {{ $category->name }} ({{ $category->videos_count }}) @endforeach
@endif {{-- Active Category Banner --}} @if(isset($activeCategory) && $activeCategory)

Category: {{ $activeCategory->name }}

Clear category
@endif {{-- Filter & Sort Controls --}}
{{-- Month Filter --}} @if(isset($months) && $months->isNotEmpty())
@if($search) @endif @if($sort) @endif
@endif {{-- Sort Dropdown --}}
@if($search) @endif @if(isset($month) && $month) @endif
{{-- Play All & Shuffle Buttons --}} @if(isset($allMatchingVideos) && $allMatchingVideos->isNotEmpty())
@endif {{-- Results Count (pushed right) --}}

{{ $videos->total() }} {{ Str::plural('video', $videos->total()) }} found

{{-- Inline Player (hidden by default) --}} {{-- Video Grid --}} @if($videos->isEmpty())
@if($search)

No videos found for "{{ $search }}"

Try a different search term or browse all videos.

Browse All Videos @else

No videos available

Check back soon for new content!

@endif
@else
{{-- Pinned: Today's Devotional --}} @if(isset($todaysVideo) && $todaysVideo && $videos->currentPage() === 1)
TODAY
{{ $todaysVideo->title }}
{{ $todaysVideo->formatted_duration }}

{{ $todaysVideo->title }}

@endif @foreach($videos as $video) @if(isset($todaysVideo) && $todaysVideo && $video->id === $todaysVideo->id && $videos->currentPage() === 1) @continue @endif
{{-- Thumbnail --}}
{{ $video->title }} {{-- Hover overlay --}}
{{-- Duration badge --}}
{{ $video->formatted_duration }}
{{-- Info --}}

{{ $video->title }}

@endforeach
{{-- Pagination --}} @if($videos->hasPages())
{{ $videos->appends(request()->query())->links() }}
@endif @endif
@endsection @push('scripts') @endpush @push('styles') @endpush