<section class="clans">
    <div class="container">
        <h2 class="section-title">Daftar Klan</h2>
        <div class="grid">
            <?php foreach($teams as $team): ?>
            <a href="?page=team&id=<?php echo $team['id']; ?>" class="item">
                <div class="logo-wrapper">
                    <img src="assets/img/teams/<?php echo $team['id']; ?>.png" 
                         onerror="this.src='https://ui-avatars.com/api/?name=<?php echo urlencode($team['name']); ?>&background=222&color=d4af37&bold=true'" 
                         alt="<?php echo $team['name']; ?>">
                </div>
                <span class="name"><?php echo $team['name']; ?></span>
            </a>
            <?php endforeach; ?>
        </div>
    </div>
</section>