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

<section class="page-hero">
  <div class="container">
    <span class="eyebrow">Galeri</span>
    <h1>Galeri Foto</h1>
  </div>
</section>

<section class="galeri-page">
  <div class="container">
    <?php if (empty($daftarAlbum)): ?>
      <p style="color:var(--text-muted); text-align:center; padding:40px 0;">Belum ada album foto.</p>
    <?php else: ?>
      <div class="album-grid">
        <?php foreach ($daftarAlbum as $album): ?>
          <a href="<?= APP_URL ?>/galeri-foto/<?= $album['id'] ?>" class="album-card">
            <div class="album-cover">
              <?php if (!empty($album['cover'])): ?>
                <img src="<?= APP_URL . '/uploads/galeri/' . htmlspecialchars($album['cover']) ?>" alt="<?= htmlspecialchars($album['judul']) ?>">
              <?php endif; ?>
            </div>
            <h3><?= htmlspecialchars($album['judul']) ?></h3>
            <span class="album-count"><?= (int) $album['jumlah_foto'] ?> Foto</span>
          </a>
        <?php endforeach; ?>
      </div>
    <?php endif; ?>
  </div>
</section>

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