@extends('layouts.site')

@section('meta')
    <meta name="description" content="Certificate not found - Invalid verification code">
@endsection

@section('content')
{{-- Hero Section --}}
<div class="bg-gradient-to-r from-red-500 to-red-600 shadow-lg">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div class="flex items-center gap-6">
            <div class="hidden md:flex w-20 h-20 rounded-xl shadow-lg bg-white/20 items-center justify-center flex-shrink-0">
                <i class="fas fa-exclamation-triangle text-white text-3xl"></i>
            </div>
            <div>
                <h1 class="text-3xl md:text-4xl font-serif font-bold text-white">Certificate Not Found</h1>
                <p class="text-red-100 mt-2">The verification code provided could not be matched to any certificate.</p>
            </div>
        </div>
    </div>
</div>

{{-- Breadcrumb --}}
<div class="bg-gray-50 border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3">
        <nav class="flex items-center space-x-2 text-sm text-gray-600" aria-label="Breadcrumb">
            <a href="{{ url('/') }}" class="hover:text-green-600 transition flex items-center">
                <i class="fas fa-home mr-1"></i>Home
            </a>
            <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
            <a href="{{ route('public.training.index') }}" class="hover:text-green-600 transition">Training Programs</a>
            <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
            <span class="text-gray-900 font-medium">Certificate Not Found</span>
        </nav>
    </div>
</div>

<section class="bg-gray-50 py-12">
    <div class="container mx-auto px-4">
        <div class="max-w-lg mx-auto text-center">
            <div class="bg-white rounded-2xl shadow-lg p-8">
                {{-- Error Icon --}}
                <div class="w-24 h-24 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-6">
                    <i class="fas fa-exclamation-triangle text-red-500 text-4xl"></i>
                </div>

                <h1 class="text-2xl font-bold text-gray-800 mb-3">Certificate Not Found</h1>
                <p class="text-gray-600 mb-6">
                    We couldn't find a certificate with this verification code. 
                    The certificate may be invalid, revoked, or the code may have been entered incorrectly.
                </p>

                {{-- Possible Reasons --}}
                <div class="bg-gray-50 rounded-lg p-4 mb-6 text-left">
                    <h3 class="font-semibold text-gray-800 mb-3">Possible Reasons:</h3>
                    <ul class="space-y-2 text-sm text-gray-600">
                        <li class="flex items-start gap-2">
                            <i class="fas fa-times-circle text-red-500 mt-1"></i>
                            The verification code was entered incorrectly
                        </li>
                        <li class="flex items-start gap-2">
                            <i class="fas fa-times-circle text-red-500 mt-1"></i>
                            The certificate has been revoked
                        </li>
                        <li class="flex items-start gap-2">
                            <i class="fas fa-times-circle text-red-500 mt-1"></i>
                            The certificate may be fraudulent
                        </li>
                    </ul>
                </div>

                {{-- Try Again Form --}}
                <div class="mb-6">
                    <h3 class="font-medium text-gray-800 mb-3">Try Another Code</h3>
                    <form action="#" 
                          method="GET"
                          onsubmit="event.preventDefault(); window.location.href='{{ url('/training/certificates/verify') }}/' + encodeURIComponent(document.getElementById('code').value)">
                        <div class="flex gap-3">
                            <input type="text" 
                                   id="code"
                                   name="code"
                                   required
                                   placeholder="Enter verification code"
                                   class="flex-1 px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500">
                            <button type="submit" 
                                    class="px-6 py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition">
                                Verify
                            </button>
                        </div>
                    </form>
                </div>

                {{-- Actions --}}
                <div class="flex flex-col sm:flex-row gap-3">
                    <a href="{{ route('public.training.index') }}" 
                       class="flex-1 text-center px-6 py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition">
                        <i class="fas fa-list mr-2"></i>
                        Browse Programs
                    </a>
                    <a href="{{ route('home') }}" 
                       class="flex-1 text-center px-6 py-3 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition">
                        <i class="fas fa-home mr-2"></i>
                        Go Home
                    </a>
                </div>
            </div>

            {{-- Contact Info --}}
            <div class="mt-6 text-sm text-gray-500">
                <p>
                    If you believe this is an error, please 
                    <a href="mailto:training@example.com" class="text-green-600 hover:underline">
                        contact us
                    </a>
                </p>
            </div>
        </div>
    </div>
</section>
@endsection
