@php $navBase = request()->routeIs('website.show') ? '' : route('website.show', ['slug' => $academy->slug]); @endphp
<nav class="site-nav site-nav--floating" id="site-navbar">
    <div class="max-w-7xl mx-auto px-4 sm:px-6">
        <div class="flex items-center justify-between h-16">
            <a href="{{ $navBase }}#section-hero" class="flex items-center gap-3 group">
                @if($academy->logo_path)
                    <img src="{{ asset('storage/' . $academy->logo_path) }}" alt="{{ $academy->name_ar }}" class="h-9 w-9 rounded-lg object-contain transition-transform group-hover:scale-110">
                @endif
                <span class="text-base font-bold text-white">{{ $academy->name_ar }}</span>
            </a>

            <div class="hidden lg:flex items-center gap-1">
                @foreach($sections->take(6) as $navSection)
                    <a href="{{ $navBase }}#section-{{ $navSection->section_key->value }}" class="px-3 py-1.5 text-sm font-medium text-white/80 hover:text-white rounded-lg hover:bg-white/10 transition-all">
                        {{ $navSection->title ?? $navSection->section_key->label() }}
                    </a>
                @endforeach
            </div>

            <div class="flex items-center gap-2">
                <a href="{{ $settings->navbar_cta_link ?? ($navBase . '#section-contact') }}" class="hidden sm:inline-flex site-btn site-btn--primary text-sm !py-1.5 !px-4 !rounded-full">
                    {{ $settings->navbar_cta_text ?? 'سجّل الآن' }}
                </a>
                <button type="button" class="lg:hidden p-2 rounded-lg text-white/80 hover:text-white hover:bg-white/10 transition-colors" onclick="document.getElementById('mobile-menu').classList.toggle('hidden')" aria-label="القائمة">
                    <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
                </button>
            </div>
        </div>
    </div>
    @include('website.navbars._mobile_menu')
</nav>
