{% set navpages = build_main_nav(document).pages|filter(page => page.visible) %}
{# Menu Desktop #}
<nav class="flex items-center justify-end flex-1 mt-5">
<ul class="flex flex-row items-center justify-around text-xl uppercase gap-x-5 xl:gap-x-10">
{% for page in navpages %}
<li class="relative flex items-center group">
<a class="pt-2 relative pb-2 text-sm tracking-widest flex items-center space-x-2 font-headline {{ page.active or document.href == page.document.href ? 'font-medium' : 'font-normal' }}" href="{{ page.href }}" target="{{ page.target }}">
{# prettier-ignore #}
{# {% include 'icons/' ~ page.customSetting('mainNavigationIcon') ~ '.svg.twig' ignore missing with {
class: 'h-5 w-5 inline-block text-primary flex-shrink-0'
} %} #}
<span class="mt-1">{{ page.label }}</span>
{% if page.pages %}
<span>{% include 'icons/arrow-right.svg.twig' with { class: 'w-4 rotate-90' } %}</span>
<div class="absolute bottom-0 z-10 hidden w-6 h-6 -mb-px overflow-hidden -translate-x-1/2 group-hover:block left-1/2">
{# <div class="w-6 h-6 origin-bottom-left transform rotate-45 bg-neutral-50 "></div> #}
</div>
{% endif %}
</a>
{% if page.pages %}
{% include 'layout/navigation/megamenu.html.twig' with { page: page } only %}
{% endif %}
</li>
{% endfor %}
<li class="flex items-center">
<a class="flex items-center px-4 pt-4 pb-4 space-x-3 bg-primary" href="{{ path('search_index', { 'form[q]': 'search.keywords.news' | trans }) }}" name="{{ 'search' | trans }}">
{% include 'icons/search.svg.twig' ignore missing with {
class: 'h-5 w-5 inline-block text-white flex-shrink-0'
} %}
</a>
</li>
</ul>
</nav>