<?php $__env->startSection("title", env("APP_NAME") . " - Parques e Jardins da Cidade de Angra dos Reis"); ?>
<?php $__env->startSection('content'); ?>
<div class="container my-4">
    <div class="row mb-4">
        <div class="col-12 my-3">
            <?php echo $__env->make('servicos.parts.breadcrumb', ['current' => __('Parques e Jardins')], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
        </div>
    </div>

    <div class="container py-4">
        <div class="alert alert-info mt-4">
            <div class="d-flex align-items-center">
                <i class="fas fa-map-marker-alt fa-2x me-3"></i>
                <div>
                    <h3 class="h5 mb-1">Onde visitar</h3>
                    <p class="mb-0">Consulte os endereços e telefones listados por bairros abaixo.</p>
                </div>
            </div>
        </div>
    </div>

    <div class="row" id="escolasContainer">
        <?php $__currentLoopData = $parques; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $parque): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="col-md-6 col-lg-4 mb-4 escola-card" 
             data-nome="<?php echo e(strtolower($parque->nome)); ?>" 
             data-bairro="<?php echo e(strtolower($parque->endereco->bairro)); ?>"
             data-recursos="">
            <div class="card h-100 shadow-sm">
                <img src="<?php echo e(asset($parque->foto)); ?>" class="card-img-top" alt="<?php echo e($parque->escola); ?>" style="height: 180px; object-fit: cover;">
                <div class="card-body">
                    <h5 class="card-title"><?php echo e($parque->nome); ?></h5>
                    <p class="card-text">
                        <i class="fas fa-map-marker-alt text-muted me-1 text-danger"></i>
                        <?php echo e($parque->endereco->bairro); ?>

                    </p>
                </div>
                <div class="card-footer bg-white">
                    <a class="btn btn-sm btn-primary w-100" href="<?php echo e(route("servicos.parquesJardins.parquesJardinsDetalhes", $parque->slug)); ?>"><i class="fas fa-info-circle me-1"></i> Detalhes</a>
                </div>

                <div class="modal fade" id="modalEscolaMunicipal<?php echo e($parque->id); ?>" tabindex="-1" aria-hidden="true">
                    <div class="modal-dialog modal-fullscreen">
                        <div class="modal-content bg-dark">
                            <div class="modal-header border-0">
                                <button type="button" class="btn-close btn-close-white ms-auto" data-bs-dismiss="modal" aria-label="Fechar"></button>
                            </div>
                            <div class="modal-body p-0 d-flex flex-column">
                                <!-- Seção superior com informações da escola -->
                                <div class="flex-grow-1 overflow-auto p-4">
                                    <div class="card shadow-sm border-0 mx-auto" style="max-width: 800px;">
                                        <!-- Foto melhorada com overlay e efeito hover -->
                                        <div class="position-relative overflow-hidden" style="height: 300px;">
                                            <img src="<?php echo e(asset($parque->foto ?? 'pmar/assets/img/icons/centro_referencia.png')); ?>" 
                                                 class="img-fluid w-100 h-100 object-fit-cover transition-transform"
                                                 alt="<?php echo e($parque->escola); ?>"
                                                 style="transition: transform 0.3s ease;">

                                            <!-- Overlay escuro para melhor legibilidade do texto -->
                                            <div class="top-0 start-0 w-100 h-100 bg-dark bg-opacity-25"></div>

                                            <!-- Badge de recursos especiais -->
                                            <?php if($parque->possuiRecursosMultifuncionais): ?>
                                            <span class="position-absolute top-0 end-0 m-2 badge bg-info bg-opacity-90 text-white">
                                                <i class="fas fa-universal-access me-1"></i> Recursos Especiais
                                            </span>
                                            <?php endif; ?>

                                            <!-- Nome do centro de referencia sobre a imagem -->
                                            <div class="position-absolute bottom-0 start-0 p-3 text-white">
                                                <h2 class="card-title mb-0 text-shadow"><?php echo e($parque->tipoCentroReferencia); ?> - <?php echo e($parque->nome); ?></h2>
                                                <p class="mb-0 text-shadow text-white"><?php echo e($parque->endereco->bairro); ?> <?php echo e($parque->endereco->complemento != "" ? ', ' . $parque->endereco->complemento : ''); ?> - Angra dos Reis/RJ</p>
                                            </div>
                                        </div>

                                        <!-- Corpo do card -->
                                        <div class="card-body pb-2">
                                            <div class="mb-2">
                                                <div>
                                                    <p class="card-text mb-0">
                                                        <i class="fas fa-map-marker-alt text-danger mt-1 me-2 fs-5"></i> <strong>Endereço:</strong> <?php echo e($parque->endereco->logradouro); ?>, <?php echo e($parque->endereco->numero); ?> - CEP: <?php echo e($parque->endereco->cep ?? 'Não informado'); ?>

                                                    </p>

                                                </div>
                                            </div>

                                            <div class="mb-2">

                                                <div>
                                                    <p class="card-text mb-0">
                                                        <i class="fas fa-envelope text-primary mt-1 me-2 fs-5"></i> <strong>E-mail:</strong> 
                                                        <?php if($parque->email): ?>
                                                        <a href="mailto:<?php echo e($parque->email); ?>" class="text-decoration-none"><?php echo e($parque->email); ?></a>
                                                        <?php else: ?>
                                                        <span class="badge bg-secondary bg-opacity-10 text-secondary">Não informado</span>
                                                        <?php endif; ?>
                                                    </p>
                                                </div>
                                            </div>

                                            <div class="mb-3">
                                                <div>
                                                    <p class="card-text mb-0">
                                                        <i class="fas fa-phone-alt text-success mt-1 me-2 fs-5"></i> <strong>Telefone:</strong> 
                                                        <?php if($parque->telefone): ?>
                                                        <a href="tel:+55<?php echo e($parque->telefone); ?>" class="text-decoration-none">
                                                            <?php echo e(preg_replace('/(\d{2})(\d{4,5})(\d{4})/', '($1) $2-$3', $parque->telefone)); ?>

                                                        </a>
                                                        <?php else: ?>
                                                        <span class="badge bg-secondary bg-opacity-10 text-secondary">Não informado</span>
                                                        <?php endif; ?>
                                                    </p>
                                                    <?php if($parque->informacoes != ""): ?>
                                                    <hr>
                                                    <p class="my-3"><?php echo $parque->informacoes; ?><p>
                                                        <?php endif; ?>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <!-- Seção do mapa com altura fixa de 300px -->
                                <div class="border-top border-secondary" style="height: 300px; flex-shrink: 0;">
                                    <?php if($parque->endereco->latitude && $parque->endereco->longitude): ?>
                                    <iframe 
                                        width="100%" 
                                        height="100%" 
                                        frameborder="0" 
                                        scrolling="no" 
                                        marginheight="0" 
                                        marginwidth="0" 
                                        src="https://maps.google.com/maps?q=<?php echo e($parque->endereco->latitude); ?>,<?php echo e($parque->endereco->longitude); ?>&z=17&output=embed"
                                        style="border: none;"
                                        allowfullscreen>
                                    </iframe>
                                    <?php else: ?>
                                    <div class="h-100 d-flex justify-content-center align-items-center bg-light bg-opacity-10 text-white">
                                        <i class="fas fa-map-marker-alt fa-3x me-3"></i>
                                        <h4 class="mb-0">Localização não disponível</h4>
                                    </div>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>

    <div id="noResults" class="row d-none">
        <div class="col-12">
            <div class="alert alert-warning text-center py-4">
                <i class="fas fa-school fa-3x mb-3"></i>
                <h4>Nenhuma centro de referencia encontrado</h4>
                <p class="mb-0">Tente ajustar os filtros de pesquisa</p>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.pmar.theme', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/portal/resources/views/servicos/parquesJardins/supj.blade.php ENDPATH**/ ?>