<?php $items = array_values(array_filter($s['items'], fn($item) => $item['image'] || $item['title'])) ?>
<?php if ($items): ?>
    <?php if ($s['title']): ?><p class="eyebrow mb-8 text-center"><?= e($s['title']) ?></p><?php endif ?>
    <div class="flex flex-wrap items-center justify-center gap-x-12 gap-y-8">
        <?php foreach ($items as $item): ?>
            <a href="<?= e(section_link($item['link']) ?: '#') ?>" class="transition <?= $s['grayscale'] === '1' ? 'opacity-50 grayscale hover:opacity-100 hover:grayscale-0' : 'hover:opacity-80' ?>">
                <?php if ($item['image']): ?>
                    <img src="<?= e(upload_url($item['image'])) ?>" alt="<?= e($item['title']) ?>" class="h-8 w-auto sm:h-10" loading="lazy">
                <?php else: ?>
                    <span class="font-display text-2xl font-bold tracking-tight text-ink"><?= e($item['title']) ?></span>
                <?php endif ?>
            </a>
        <?php endforeach ?>
    </div>
<?php endif ?>
