<?php
/**
 * TekDek - Navigation Renderer
 * 
 * Renders nav from $MENU config. $current_page must be set before including.
 */
if (!defined('TEKDEK')) die('Direct access not permitted.');
?>
<nav class="main-nav" role="navigation" aria-label="Main navigation">
    <ul>
        <?php foreach ($MENU as $slug => $item): ?>
            <?php if ($item['nav']): ?>
                <?php
                    $url = ($slug === 'team') ? SITE_BASE_URL . 'team.html' : page_url($slug);
                    $active = is_active($slug, $current_page);
                ?>
                <li<?= $active ?>>
                    <a href="<?= e($url) ?>">
                        <span class="nav-icon"><?= $item['icon'] ?></span>
                        <span class="nav-label"><?= e($item['title']) ?></span>
                    </a>
                </li>
            <?php endif; ?>
        <?php endforeach; ?>
    </ul>
</nav>
