<?php $title = 'Photo Gallery - Ghana Anaesthesiologists Society'; ?>
<div class="d-sm-flex align-items-center justify-content-between mb-4">
    <h1 class="h3 mb-0 text-white font-weight-bold"><i class="fas fa-images mr-2"></i>Photo Gallery</h1>
    <?php if (isset($_SESSION['user_id'])): ?>
    <a href="<?= $baseUrl ?>/photos/create-album" class="glass-btn glass-btn-primary"><i class="fas fa-plus mr-1"></i>New Album</a>
    <?php endif; ?>
</div>
<div class="row">
    <?php if (!empty($albums)): ?>
        <?php foreach ($albums as $album): ?>
        <div class="col-lg-4 col-md-6 mb-4">
            <a href="<?= $baseUrl ?>/photos/album/<?= $album->id ?>" style="text-decoration: none;">
                <div class="glass-card h-100">
                    <div style="height: 180px; background: rgba(78,115,223,0.2); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;">
                        <i class="fas fa-images fa-3x" style="color: rgba(255,255,255,0.3);"></i>
                    </div>
                    <h5 class="font-weight-bold"><?= htmlspecialchars($album->title) ?></h5>
                    <p style="color: rgba(255,255,255,0.6); font-size: 0.9rem;"><?= htmlspecialchars($album->description ?? '') ?></p>
                    <span class="glass-badge"><?= $album->photo_count ?? 0 ?> photos</span>
                </div>
            </a>
        </div>
        <?php endforeach; ?>
    <?php else: ?>
    <div class="col-12"><div class="empty-state"><i class="fas fa-images"></i><p>No photo albums yet</p></div></div>
    <?php endif; ?>
</div>
