<?php $navItems = ugfx_nav_items(); ?>
<header class="ugfx-topbar sticky-top">
    <nav class="navbar navbar-expand-xl navbar-dark ugfx-nav">
        <div class="container-xxl">
            <a class="navbar-brand ugfx-brand" href="index.php">
                <span class="ugfx-brand-mark">UGFX</span>
                <span class="ugfx-brand-text"><?= htmlspecialchars($ugfx['site_name']) ?></span>
            </a>
            <button class="navbar-toggler ugfx-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#ugfxNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="ugfxNav">
                <ul class="navbar-nav ms-auto align-items-xl-center gap-xl-2">
                    <?php foreach ($navItems as $item): ?>
                        <li class="nav-item">
                            <a class="nav-link <?= ugfx_is_active($item['href'], $currentPage) ?>" href="<?= htmlspecialchars($item['href']) ?>"><?= htmlspecialchars($item['label']) ?></a>
                        </li>
                    <?php endforeach; ?>
                    <li class="nav-item ms-xl-2">
                        <a class="btn ugfx-btn-primary btn-sm" href="listen-live.php"><i class="bi bi-broadcast"></i> Listen</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</header>
