<?php require BASE_PATH . '/app/Views/layouts/header.php'; ?>

<section class="page-hero">
  <div class="container">
    <span class="eyebrow">Fasilitas</span>
    <h1>Fasilitas Fakultas</h1>
  </div>
</section>

<section class="fasilitas-page">
  <div class="container">
    <?php if (empty($daftarFasilitas)): ?>
      <p style="color:var(--text-muted); text-align:center; padding:40px 0;">Belum ada data fasilitas.</p>
    <?php else: ?>
      <div class="fasilitas-grid">
        <?php foreach ($daftarFasilitas as $item): ?>
          <div class="fasilitas-card">
            <div class="fasilitas-media">
              <?php if (!empty($item['gambar'])): ?>
                <img src="<?= APP_URL . '/uploads/fasilitas/' . htmlspecialchars($item['gambar']) ?>" alt="<?= htmlspecialchars($item['nama']) ?>">
              <?php else: ?>
                <span class="fasilitas-icon"><?= htmlspecialchars($item['icon'] ?: '🏢') ?></span>
              <?php endif; ?>
            </div>
            <h3><?= htmlspecialchars($item['nama']) ?></h3>
            <?php if (!empty($item['deskripsi'])): ?>
              <p><?= htmlspecialchars($item['deskripsi']) ?></p>
            <?php endif; ?>
          </div>
        <?php endforeach; ?>
      </div>
    <?php endif; ?>
  </div>
</section>

<?php require BASE_PATH . '/app/Views/layouts/footer.php'; ?>
