{% set lastNavItem = sulu_navigation_root_tree('main', 2)|last %}
<div class="nav-wrapper">
<div class="menu position-fixed top-0 w-100 bg-white d-flex align-items-center shadow-sm">
<div class="container">
<div class="row d-flex align-items-center">
<div class="col-2">
<a href="{{ sulu_content_root_path() }}">
<img class="header-logo" src="{{ webspaceSettings.content.headerLogo.url|default('/website/images/placeholder-image.png') }}" alt="Logo">
</a>
</div>
<div class="col-10 d-flex justify-content-end">
<ul class="desktop-navbar d-none w-100 m-0 d-xl-inline-flex justify-content-end align-items-center">
{% for item in sulu_navigation_root_tree('main', 4)|slice(0, -1) %}
{% if item.title == 'Kontakt' %}
<li class="custom-dropdown-menu d-flex align-items-center position-relative">
<a class="{{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}"
href="{{ sulu_content_path(item.url) }}"
{% if item.nodeType == 4 %}target="_blank" rel="noopener"{% endif %}>
<span>{{ item.title }}</span>
<i class="custom-dropdown-menu-icon fa-solid fa-chevron-down"></i>
</a>
<div class="custom-dropdown-menu-wrapper top-space-relative">
<ul class="custom-dropdown-menu-item shadow">
<a class="d-block px-4 py-3 dropdown-link" href="{{ sulu_content_path(item.url) }}#contact-form">Kontaktformular</a>
<a class="d-block px-4 py-3 dropdown-link" href="{{ sulu_content_path(item.url) }}#contact-persons">Ansprechpartner</a>
</ul>
</div>
</li>
{% else %}
{% if item.children|length > 0 %}
<li class="custom-dropdown-menu d-flex align-items-center">
<a class="{{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}" href="{{ sulu_content_path(item.url) }}">
<span>{{ item.title }}</span>
<i class="custom-dropdown-menu-icon fa-solid fa-chevron-down"></i>
</a>
<div class="custom-dropdown-menu-wrapper top-space w-100 ">
<div class="custom-dropdown-menu-item shadow py-3">
<div class="container">
<div class="row g-3">
{% for child in item.children %}
<div class="col-lg-3 col-6">
<ul class="list-unstyled">
<li>
<a class="noto-sans-bold d-inline-flex {{ active_route(app.request.attributes.get( '_route' ), child.template) ? 'active' }}" href="{{ sulu_content_path(child.url) }}">
{{ child.title }}
</a>
</li>
{% if (child.children|length > 0) %}
{% for subchild in child.children %}
<li><a class="d-inline-flex {{ active_route(app.request.attributes.get( '_route' ), subchild.template) ? 'active' }}" href="{{ sulu_content_path(subchild.url) }}">{{ subchild.title }}</a></li>
{% endfor %}
{% endif %}
</ul>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</li>
{% else %}
<li>
<a {% if item.nodeType == 4 %}target="_blank" rel="noopener"{% endif %} class="{{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}" href="{{ sulu_content_path(item.url, item.webspaceKey) }}" title="{{ item.title }}">
{{ item.title }}
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
<li class="me-0">
<a class="nav-button py-0" href="{{ sulu_content_path(lastNavItem.url, lastNavItem.webspaceKey) }}">
<span class="button fw-normal btn-nav d-inline-flex align-items-center justify-content-center darker-blue">
<span>{{ lastNavItem.title|default('Mehr erfahren') }}</span>
</span>
</a>
</li>
</ul>
<div data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample" class="hamburger-menu d-xl-none d-inline-flex">
<i class="fa-solid fa-bars fa-2x"></i>
</div>
</div>
</div>
</div>
</div>
<div class="offcanvas offcanvas-end d-flex flex-column justify-content-between" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
<div class="px-3 navbar-mobile-header shadow-sm">
<div class="d-flex align-items-center justify-content-between">
<a href="{{ sulu_content_root_path() }}">
<img class="header-logo" src="{{ webspaceSettings.content.headerLogo.url|default('/website/images/placeholder-image.png') }}" alt="Logo">
</a>
<i data-bs-dismiss="offcanvas" aria-label="Close" class="navbar-close-button fa-solid fa-xmark fa-2x"></i>
</div>
</div>
<div class="navbar-mobile-body">
<ul class="ul-body">
{% for item in sulu_navigation_root_tree('main', 4)|slice(0, -1) %}
<li>
{% if item.title == 'Kontakt' %}
<a class="d-inline-flex align-items-center contact-collapse-mobile-button" data-bs-toggle="collapse" href="#contactCollapse" role="button" aria-expanded="false" aria-controls="contactCollapse">
<span class="me-2">{{ item.title }}</span>
<i class="arrow-right fa-solid fa-angle-down"></i>
</a>
<div class="collapse" id="contactCollapse">
<ul class="ms-4 list-unstyled">
<li>
<a class="d-inline-flex noto-sans-bold {{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}" href="{{ sulu_content_path(item.url) }}">Übersicht</a>
</li>
<li data-bs-dismiss="offcanvas" class="collapse-contact-accordion-button">
<a class="d-inline-flex" href="{{ sulu_content_path(item.url) }}#contact-form">Kontaktformular</a>
</li>
<li data-bs-dismiss="offcanvas" class="collapse-contact-accordion-button">
<a class="d-inline-flex" href="{{ sulu_content_path(item.url) }}#contact-persons">Ansprechpartner</a>
</li>
</ul>
</div>
{% else %}
{% if (item.children|length > 0) %}
<a class="d-inline-flex align-items-center services-collapse-mobile-button" data-bs-toggle="collapse" href="#menuAccordion" role="button" aria-expanded="false" aria-controls="menuAccordion">
<span class="me-2">{{ item.title }}</span>
<i class="arrow-right fa-solid fa-angle-down"></i>
</a>
<div class="ms-4 collapse" id="menuAccordion">
{% if (item.title == 'Leistungen') %}
<ul class="list-unstyled">
<li data-bs-dismiss="offcanvas" class="collapse-services-accordion-button">
<a class="noto-sans-bold d-inline-flex {{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}" href="{{ sulu_content_path(item.url) }}">Übersicht</a>
</li>
</ul>
{% endif %}
{% for item in sulu_navigation_root_tree('main', 4)|slice(0, -1) %}
{% for child in item.children %}
<ul class="list-unstyled">
<li data-bs-dismiss="offcanvas" class="collapse-services-accordion-button">
<a class="noto-sans-bold d-inline-flex {{ active_route(app.request.attributes.get( '_route' ), child.template) ? 'active' }}" href="{{ sulu_content_path(child.url) }}">
{{ child.title }}
</a>
</li>
{% if (child.children|length > 0) %}
{% for subchild in child.children %}
<li data-bs-dismiss="offcanvas" class="collapse-services-accordion-button"><a class="d-inline-flex {{ active_route(app.request.attributes.get( '_route' ), subchild.template) ? 'active' }}" href="{{ sulu_content_path(subchild.url) }}">{{ subchild.title }}</a></li>
{% endfor %}
{% endif %}
</ul>
{% endfor %}
{% endfor %}
</div>
{% else %}
<a
id="item-{{ item.id }}"
class="d-inline-flex {{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}"
href="{{ sulu_content_path(item.url) }}"
{% if item.nodeType == 4 %}target="_blank" rel="noopener"{% endif %}
>
{{ item.title }}
</a>
{% endif %}
{% endif %}
</li>
{% endfor %}
</ul>
<a class="navbar-mobile-button nav-button" href="{{ sulu_content_path(lastNavItem.url, lastNavItem.webspaceKey) }}">
<span class="button fw-normal btn-nav d-inline-flex align-items-center justify-content-center darker-blue w-100">
{{ include('@components/icons/person-circle.html.twig', {
color: 'text-yellow'
}) }}
<span class="ms-2">{{ lastNavItem.title|default('Mehr erfahren') }}</span>
</span>
</a>
</div>
</div>
</div>