    <?= $this->extend('layout/landing') ?>

    <?= $this->section('title') ?>
    <title>SEARCH &mdash; KUA WAY BUNGUR</title>
    <?= $this->endSection() ?>

    <?= $this->section('css') ?>
    <?= $this->endSection() ?>

    <?= $this->section('content') ?>

    <div style="width: 100%; height: 150px;background-color: #1e1f1e;box-shadow: 2px 2px 3px #000;">
        <div style="padding-top: 40px;padding-bottom: 50px" class="d-flex flex-column align-items-center">
            <div class="d-flex align-items-center justify-content-center">
                <h3 style="font-weight: bold;text-transform: uppercase" class=" text-white">Search</h3>
            </div>
            <div class="d-flex align-items-center justify-content-center ">
                <a style="hover:none;" href="<?= base_url('/') ?>"><i class="fa fa-home"></i>&nbsp;Home</a>
                &nbsp;<span class="text-white">
                    /
                </span> &nbsp;<span class="text-white">Search</span>
            </div>
        </div>
    </div>

    <section class="whats-news-area pt-50 pb-20 gray-bg">
        <div class="container">
            <h1>Hasil Pencarian</h1>

            <div class="row">
                <div class="col-lg-6">
                    <!-- Most Recent Area -->
                    <div class="most-recent-area">
                        <!-- Section Tittle -->
                        <div class="small-tittle mb-20">
                            <h4>Berita</h4>
                        </div>

                        <?php foreach ($beritaHasil as $beritaUmum) : ?>
                        <!-- Single -->
                        <div class="most-recent-single">
                            <div class="most-recent-images">
                                <img style="height: 79px;width:85px;"
                                    src="<?= base_url() ?>foto_berita/<?= $beritaUmum->gambar ?>" alt=""
                                    loading="lazy" />
                            </div>
                            <div class="most-recent-capt">
                                <h4>
                                    <a
                                        href="<?= base_url('news/view/' . $beritaUmum->id_berita) ?>"><?= $beritaUmum->judul ?></a>
                                </h4>
                                <p><?php
                                        $Name = '';
                                        foreach ($user as $userdata) {
                                            if ($userdata->id_admin == $beritaUmum->id_admin) {
                                                $Name = $userdata->nama_admin;
                                                break;
                                            }
                                        }
                                        echo $Name;
                                        ?> |
                                    <?= date('d-m-Y', strtotime($beritaUmum->tanggal)) ?></p>
                            </div>
                        </div>
                        <?php endforeach; ?>
                    </div>
                </div>
                <div class="col-lg-6">
                    <!-- Most Recent Area -->
                    <div class="most-recent-area">
                        <!-- Section Tittle -->
                        <div class="small-tittle mb-20">
                            <h4>Agenda</h4>
                        </div>

                        <?php foreach ($agendaHasil as $agenda) : ?>
                        <!-- Single -->
                        <div class="most-recent-single">
                            <div class="most-recent-images">
                                <img style="height: 79px;width:85px;"
                                    src="<?= base_url() ?>foto_berita/<?= $agenda->gambar ?>" alt="" loading="lazy" />
                            </div>
                            <div class="most-recent-capt">
                                <h4>
                                    <a
                                        href="<?= base_url('news/view/' . $agenda->id_agenda) ?>"><?= $agenda->tema ?></a>
                                </h4>
                                <p><?php
                                        $Name = '';
                                        foreach ($user as $userdata) {
                                            if ($userdata->id_admin == $agenda->id_admin) {
                                                $Name = $userdata->nama_admin;
                                                break;
                                            }
                                        }
                                        echo $Name;
                                        ?> |
                                    <?= date('d-m-Y', strtotime($agenda->tanggal)) ?> |
                                    <?= date('h:i', strtotime($agenda->waktu)) ?></p>
                            </div>
                        </div>
                        <?php endforeach; ?>
                    </div>
                </div>

            </div>
        </div>
    </section>
    <?= $this->endSection() ?>

    <?= $this->section('js') ?>
    <?= $this->endSection() ?>