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

<?= $this->section('content') ?>
<div class="breadcrumb-area pt-60 pb-60 bg-gray">
    <div class="container text-center">
        <h2 class="fw-bold">Kontak Kami</h2>
        <p>SMKN 1 Sukalarang (Negla)</p>
    </div>
</div>

<div class="contact-area pt-80 pb-80">
    <div class="container">
        <?php if (session()->get('isLoggedIn')) : ?>
            <div class="row justify-content-center mb-4">
                <div class="col-md-12 text-end">
                    <a href="<?= base_url('admin/kontak') ?>" class="btn btn-warning shadow-sm">
                        <i class="fa fa-edit"></i> Edit Info Kontak
                    </a>
                </div>
            </div>
        <?php endif; ?>

        <div class="row">
            <div class="col-lg-5 mb-5">
                <div class="contact-info-area shadow-sm p-4 rounded-4 bg-white border-top border-success border-5">
                    <h3 class="fw-bold mb-4">Informasi Sekolah</h3>
                    
                    <div class="single-contact-info d-flex align-items-center mb-4">
                        <div class="contact-icon text-success me-3"><i class="fa fa-map-marker fa-2x"></i></div>
                        <div><h6 class="fw-bold mb-0">Alamat</h6><p class="mb-0 small"><?= $kontak['alamat'] ?></p></div>
                    </div>

                    <div class="single-contact-info d-flex align-items-center mb-4">
                        <div class="contact-icon text-success me-3"><i class="fa fa-phone fa-2x"></i></div>
                        <div><h6 class="fw-bold mb-0">Telepon</h6><p class="mb-0 small"><?= $kontak['telepon'] ?></p></div>
                    </div>

                    <div class="single-contact-info d-flex align-items-center mb-4">
                        <div class="contact-icon text-success me-3"><i class="fa fa-envelope-o fa-2x"></i></div>
                        <div><h6 class="fw-bold mb-0">Email</h6><p class="mb-0 small"><?= $kontak['email'] ?></p></div>
                    </div>

                    <div class="single-contact-info d-flex align-items-center">
                        <div class="contact-icon text-danger me-3">
                            <i class="fa fa-instagram fa-2x"></i>
                        </div>
                        <div class="contact-text">
                            <h6 class="fw-bold mb-0">Instagram</h6>
                            <p class="mb-0 small">@<?= $kontak['instagram'] ?></p>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-lg-7">
                <div class="map-area shadow-sm rounded-4 overflow-hidden border">
                    <?= $kontak['maps_iframe'] ?>
                </div>
            </div>
        </div>
    </div>
</div>
<?= $this->endSection() ?>