@php $navBase = request()->routeIs('website.show') ? '' : route('website.show', ['slug' => $academy->slug]); @endphp
<nav class="site-nav site-nav--solid" id="site-navbar">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="flex items-center justify-between h-20">
            <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-10 w-10 rounded-lg object-contain transition-transform group-hover:scale-110">
                @endif
                <span class="text-lg font-bold text-white">{{ $academy->name_ar }}</span>
            </a>

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

            <div class="flex items-center gap-3">
                <a href="{{ $settings->navbar_cta_link ?? ($navBase . '#section-contact') }}" class="hidden sm:inline-flex site-btn site-btn--primary text-sm !py-2 !px-4">
                    {{ $settings->navbar_cta_text ?? 'سجّل الآن' }}
                </a>
                @auth
                    <a href="{{ route('dashboard') }}" class="hidden sm:inline-flex items-center gap-1 px-3 py-2 text-sm font-medium text-white/80 hover:text-white rounded-lg hover:bg-white/10 transition-all">
                        {{ __('لوحة التحكم') }}
                    </a>
                @endauth
                <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-6 h-6" 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>
