<nav class="navbar">
    <div class="container nav-wrapper">
        <a class="logo" href="<?php echo h(app_url('home')); ?>">
            <span class="brand-logo" aria-hidden="true">
                <img src="assets/img/logo.webp" alt="">
            </span>
            <span>UK TRAIL RUN 2026</span>
        </a>

        <button class="menu-toggle" id="menu-toggle" type="button" aria-expanded="false" aria-controls="nav-menu" aria-label="<?php echo tr('Toggle navigation', 'Buka tutup navigasi'); ?>">
            <span></span>
            <span></span>
            <span></span>
        </button>

        <div class="nav-panel" id="nav-menu">
            <ul class="nav-links">
                <li><a href="<?php echo h(app_url('home')); ?>"><?php echo tr('Home', 'Beranda'); ?></a></li>
                <li class="nav-item nav-item--dropdown">
                    <a class="nav-dropdown-toggle" href="<?php echo h(app_url('results')); ?>" aria-haspopup="true">
                        <?php echo tr('Race', 'Lomba'); ?>
                        <svg viewBox="0 0 24 24" aria-hidden="true">
                            <path d="m6 9 6 6 6-6"></path>
                        </svg>
                    </a>

                    <ul class="nav-dropdown-menu" aria-label="<?php echo tr('Race menu', 'Menu lomba'); ?>">
                        <li><a href="<?php echo h(app_url('home')); ?>#route"><?php echo tr('Route & Map', 'Rute & Peta'); ?></a></li>
                        <li><a href="<?php echo h(app_url('results')); ?>"><?php echo tr('Results', 'Hasil'); ?></a></li>
                    </ul>
                </li>
                <!-- <li><a href="<?php echo h(app_url('tracking')); ?>"><?php echo tr('Tracking', 'Pelacakan'); ?></a></li> -->
                <li class="nav-item nav-item--dropdown">
                    <a class="nav-dropdown-toggle" href="<?php echo h(app_url('contact')); ?>" aria-haspopup="true">
                        <?php echo tr('Informations', 'Informasi'); ?>
                        <svg viewBox="0 0 24 24" aria-hidden="true">
                            <path d="m6 9 6 6 6-6"></path>
                        </svg>
                    </a>

                    <ul class="nav-dropdown-menu" aria-label="<?php echo tr('Informations menu', 'Menu informasi'); ?>">
                        <li><a href="<?php echo h(app_url('contact')); ?>"><?php echo tr('Contact', 'Kontak'); ?></a></li>
                        <li><a href="<?php echo h(app_url('rules')); ?>"><?php echo tr('Rules & Regulations', 'Peraturan Lomba'); ?></a></li>
                        <li><a href="<?php echo h(app_url('merchandise')); ?>"><?php echo tr('Racepack & Merchandise', 'Racepack & Merchandise'); ?></a></li>
                    </ul>
                </li>
                <li><a href="<?php echo h(app_url('about')); ?>"><?php echo tr('About Us', 'Tentang Kami'); ?></a></li>
            </ul>

            <div class="nav-actions">
                <a href="<?php echo app_url('registration'); ?>" class="btn btn--nav"><?php echo tr('REGISTER', 'DAFTAR'); ?></a>

                <div class="language-switch" aria-label="<?php echo tr('Language switcher', 'Pilihan bahasa'); ?>">
                    <a href="<?php echo h(lang_switch_url('en')); ?>" class="language-switch__link <?php echo current_lang() === 'en' ? 'is-active' : ''; ?>" <?php echo current_lang() === 'en' ? 'aria-current="true"' : ''; ?>>EN</a>
                    <span aria-hidden="true">/</span>
                    <a href="<?php echo h(lang_switch_url('id')); ?>" class="language-switch__link <?php echo current_lang() === 'id' ? 'is-active' : ''; ?>" <?php echo current_lang() === 'id' ? 'aria-current="true"' : ''; ?>>ID</a>
                </div>
            </div>
        </div>
    </div>
</nav>
