{{-- resources/views/cepros/show.blade.php --}}
@extends('layouts.app')

@section('title', 'Detalles del Centro Educativo')

@section('content')
    <div class="container">
        <h1 class="mb-4 text-white"><i class="bi bi-building-fill me-2"></i> Detalles del Centro Educativo</h1>

        <div class="row justify-content-center">
            <div class="col-md-8">
                <div class="card bg-dark shadow-lg text-white" style="border-radius: 15px; overflow: hidden;">
                    <div class="card-body p-0">
                        <div style="background: url('https://via.placeholder.com/800x200/343a40/6c757d?Text=Perfil+CEPRO') center/cover; height: 200px; display: flex; align-items: center; justify-content: center;">
                            <i class="bi bi-building-fill display-1 text-white opacity-75"></i>
                        </div>
                        <div class="p-4">
                            <h2 class="card-title mb-3 text-center">{{ $cepro->nom_cepro }}</h2>
                            <hr class="my-4 bg-secondary">
                            <h5 class="card-subtitle mb-3 text-white"><i class="bi bi-info-circle-fill me-1"></i> Información del Centro Educativo</h5>

                            <div class="mb-3 text-white">
                                <i class="bi bi-geo-alt-fill me-2"></i> <strong>Provincia:</strong> {{ $cepro->prov_cepro ?? 'No especificada' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-layer-group-fill me-2"></i> <strong>Nivel:</strong> {{ $cepro->nivel ?? 'No especificado' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-calendar-check-fill me-2"></i> <strong>Creado en:</strong> {{ $cepro->created_at ? $cepro->created_at->format('d/m/Y H:i') : 'No especificado' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-arrow-repeat me-2"></i> <strong>Actualizado en:</strong> {{ $cepro->updated_at ? $cepro->updated_at->format('d/m/Y H:i') : 'No especificado' }}
                            </div>

                            <hr class="my-4 bg-secondary">
                            <div class="d-flex justify-content-end">
                                <a href="{{ route('cepros.index') }}" class="btn btn-secondary btn-sm shadow-sm"><i class="bi bi-arrow-left-circle me-2"></i> Volver a la Lista</a>
                                <a href="{{ route('cepros.edit', $cepro) }}" class="btn btn-primary btn-sm ms-2 shadow-sm"><i class="bi bi-pencil-square me-2"></i> Editar Centro</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection