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

<?= $this->section('content') ?>
<div class="row justify-content-center align-items-center" style="min-height: 80vh;">
    <div class="col-lg-8 text-center">
        
        <!-- Header -->
        <div class="header-title mb-4">
            <h6 class="fw-bold mb-1">LAYANAN PENGADUAN DAN ASPIRASI ONLINE</h6>
            <h3 class="fw-bold mb-0 text-uppercase"><?= $pengaturan['nama_instansi'] ?></h3>
        </div>

        <!-- Card Main Menu -->
        <div class="card form-card p-5">
            <div class="card-body">
                <p class="fs-5 mb-5 text-secondary">
                    Selamat datang di layanan pengaduan dan aspirasi online.<br>
                    Kami siap menampung dan melayani Anda dengan sepenuh hati.
                </p>

                <div class="d-grid gap-3 col-md-8 mx-auto">
                    <!-- Tombol Buat Pengaduan -->
                    <a href="<?= base_url('pengaduan/buat') ?>" class="btn btn-outline-custom py-3 rounded-pill fw-bold">
                        BUAT PENGADUAN & ASPIRASI
                    </a>
                    
                    <!-- Tombol Cek Status (Trigger Modal) -->
                    <button type="button" class="btn btn-outline-custom py-3 rounded-pill fw-bold" data-bs-toggle="modal" data-bs-target="#modalCekStatus">
                        CEK STATUS PENGADUAN
                    </button>
                </div>

                <div class="mt-5">
                    <span class="text-muted fs-6">Terima kasih</span>
                </div>
            </div>
        </div>
        
    </div>
</div>

<!-- Modal Pop-up Cek Status -->
<div class="modal fade" id="modalCekStatus" tabindex="-1" aria-labelledby="modalCekStatusLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content" style="border-radius: 15px;">
      <div class="modal-header border-0 pb-0">
        <h5 class="modal-title fw-bold" id="modalCekStatusLabel">Cek Status Pengaduan</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body pb-4">
        <form action="<?= base_url('pengaduan/cek') ?>" method="POST">
            <div class="mb-3">
                <label class="form-label text-muted">Masukkan Kode Akses (ID Pengaduan) Anda:</label>
                <input type="text" class="form-control form-control-lg text-center fw-bold" name="kode_akses" placeholder="Contoh: ID-A1B2C" required style="text-transform: uppercase;">
            </div>
            <button type="submit" class="btn btn-dark w-100 py-2 rounded-pill fw-bold">Lacak Progres</button>
        </form>
      </div>
    </div>
  </div>
</div>
<?= $this->endSection() ?>