{{--
    The site's brand lock-up: the academy logo, optionally followed by a second
    logo separated by a hairline rule (a parent company or co-brand).

    Links to the homepage in the reader's current language, so the brand mark is
    never the control that silently switches locale.

    @param string $textClass  colour for the wordmark beside the logo
--}}
@php
    $textClass = $textClass ?? 'text-white';
    $secondary = $settings->navbar_secondary_logo_path ?? null;
    $academyName = app()->getLocale() === 'ar'
        ? ($academy->name_ar ?: $academy->name)
        : ($academy->name ?: $academy->name_ar);
@endphp

<a href="{{ website_url() }}" class="flex items-center gap-3 group shrink-0" aria-label="{{ $academyName }}">
    @if ($academy->logo_path)
        <img src="{{ asset('storage/'.$academy->logo_path) }}"
             alt="{{ $academyName }}"
             class="h-11 w-auto max-w-[9rem] object-contain transition-transform group-hover:scale-105">
    @else
        <span class="text-lg font-bold {{ $textClass }}">{{ $academyName }}</span>
    @endif

    @if ($secondary)
        <span class="h-8 w-px bg-current opacity-25" aria-hidden="true"></span>
        <img src="{{ asset('storage/'.$secondary) }}" alt="" aria-hidden="true"
             class="h-9 w-auto max-w-[9rem] object-contain">
    @endif
</a>
