
<div class="row mx-4 g-4">
    <?php for($index = 0; $index < 2 && $index < count($noticias); $index++): ?>
        <?php
            $noticia = $noticias[$index];
            $slugDate = date('d-m-Y', strtotime($noticia->created_at));
            $noticiaUrl = route('paginas.slug', [$slugDate, $noticia->slug]);
            $titulo = html_entity_decode($noticia->title, ENT_QUOTES, 'UTF-8');
            $resumo = html_entity_decode($noticia->summary, ENT_QUOTES, 'UTF-8');
        ?>
        <div class="col-12 col-md-6">
            <a href="<?php echo e($noticiaUrl); ?>" class="text-reset text-decoration-none d-block h-100">
                <article class="card h-100 border-0 shadow-sm overflow-hidden rounded-3">
                    <div class="ratio ratio-4x3 bg-body-tertiary">
                        <img src="<?php echo e(asset($noticia->featuredPhoto)); ?>" class="object-fit-cover" alt="<?php echo e(__('Capa da notícia')); ?>: <?php echo e(strip_tags($titulo)); ?>" />
                    </div>
                    <div class="card-body px-3 pt-3 pb-4">
                        <h3 class="news-title lh-sm mb-2 mb-md-3 ps-0"><?php echo e($titulo); ?></h3>
                        <p class="card-text small text-body-secondary mb-2 mb-md-3 org-news-lead ps-0"><?php echo e($resumo); ?></p>
                        <time class="news-date small text-body-secondary d-block ps-0" datetime="<?php echo e($noticia->created_at); ?>">
                            <?php echo e(app(App\Http\Controllers\Controller::class)->formatDateToPortuguese($noticia->created_at)); ?>

                        </time>
                    </div>
                </article>
            </a>
        </div>
    <?php endfor; ?>
</div>

<div class="row mx-4 g-4 mt-1">
    <?php for($index = 2; $index < count($noticias); $index++): ?>
        <?php
            $noticia = $noticias[$index];
            $slugDate = date('d-m-Y', strtotime($noticia->created_at));
            $noticiaUrl = route('paginas.slug', [$slugDate, $noticia->slug]);
            $titulo = html_entity_decode($noticia->title, ENT_QUOTES, 'UTF-8');
            $resumo = html_entity_decode($noticia->summary, ENT_QUOTES, 'UTF-8');
        ?>
        <div class="col-12">
            <a href="<?php echo e($noticiaUrl); ?>" class="text-reset text-decoration-none d-block">
                <article class="card border-0 shadow-sm overflow-hidden rounded-3 mb-1 mb-md-0">
                    <div class="row g-0 align-items-stretch">
                        <div class="col-12 col-md-4">
                            <div class="ratio ratio-4x3 bg-body-tertiary">
                                <img src="<?php echo e(asset($noticia->featuredPhoto)); ?>" class="object-fit-cover" alt="<?php echo e(__('Capa da notícia')); ?>: <?php echo e(strip_tags($titulo)); ?>" />
                            </div>
                        </div>
                        <div class="col-12 col-md-8">
                            <div class="card-body py-3 px-3">
                                <h3 class="news-title org-news-title-compact lh-sm mb-2 ps-0"><?php echo e($titulo); ?></h3>
                                <p class="card-text small text-body-secondary mb-2 org-news-list-excerpt ps-0">
                                    <?php echo e(Str::limit(strip_tags($resumo), 160)); ?>

                                </p>
                                <time class="news-date small text-body-secondary d-block ps-0" datetime="<?php echo e($noticia->created_at); ?>">
                                    <?php echo e(app(App\Http\Controllers\Controller::class)->formatDateToPortuguese($noticia->created_at)); ?>

                                </time>
                            </div>
                        </div>
                    </div>
                </article>
            </a>
        </div>
    <?php endfor; ?>
</div>

<?php if($noticias->hasPages()): ?>
    <div class="row mt-4">
        <div class="col-12">
            <div class="d-flex justify-content-center px-2 overflow-x-auto"><?php echo $noticias->links(); ?></div>
        </div>
    </div>
<?php endif; ?>
<?php /**PATH /var/www/html/portal/resources/views/paginas/parts/org-news-grid.blade.php ENDPATH**/ ?>