@php
    $marqueeRaw = trans('navbar.top_marquee_chain');
    $marqueeSegments = array_values(array_filter(array_map('trim', explode('|', (string) $marqueeRaw))));
    if (empty($marqueeSegments)) {
        $marqueeSegments = [strip_tags((string) ($generalSettings['site_name'] ?? 'Ilmonastery'))];
    }
    $marqueeDup = array_merge($marqueeSegments, $marqueeSegments);
@endphp

<div
    class="premium-top-marquee"
    role="region"
    aria-label="{{ trans('navbar.top_marquee_aria') }}"
    aria-roledescription="marquee"
>
    <div class="premium-top-marquee__mask">
        <div class="premium-top-marquee__track">
            @foreach ($marqueeDup as $seg)
                <span class="premium-top-marquee__item">{{ $seg }}</span>
                <span class="premium-top-marquee__sep" aria-hidden="true">·</span>
            @endforeach
        </div>
    </div>
</div>
