<!-- <header>
    <div class="top-bar py-2">
        <div class="container d-flex justify-content-between align-items-center">
            <nav class="contact-info" aria-label="Contactinformatie">
                {{ if .Site.Params.telefoon }}
                    <a href="tel:{{ .Site.Params.telefoon_link | urlize }}" class="me-lg-5 text-white text-decoration-none" aria-label="Bel ons op {{ .Site.Params.telefoon_link }}">
                        <i class="bi bi-telephone-fill fs-6 align-middle" aria-hidden="true"></i> 
                        <span class="ms-1">{{ .Site.Params.telefoon | markdownify }}</span>
                    </a>
                {{ end }}
                
                {{ if .Site.Params.email }}
                    <a href="mailto:{{ .Site.Params.email }}" class="text-white text-decoration-none d-none d-lg-inline-block" aria-label="Stuur een e-mail naar {{ .Site.Params.email }}">
                        <i class="bi bi-envelope-fill fs-6 align-middle" aria-hidden="true"></i> 
                        <span class="ms-1">{{ .Site.Params.email }}</span>
                    </a>
                {{ end }}
            </nav>

            {{ if .Site.Params.google_rating }}
                <div class="google-reviews d-flex align-items-center" aria-label="Google beoordeling: {{ .Site.Params.google_rating }} van de 5 sterren">
                    <span class="fw-bold me-1 text-white" aria-hidden="true">G {{ .Site.Params.google_rating }}</span> 
                    <span class="text-warning" aria-hidden="true">
                        {{ range (seq (int .Site.Params.google_rating)) }}★{{ end }}
                    </span>
                </div>
            {{ end }}
        </div>
    </div>
</header> -->

<nav class="navbar navbar-expand-lg navbar-light bg-white py-3 sticky-top" aria-label="Hoofdmenu">        
    <div class="container">
        <a class="navbar-brand d-flex align-items-center" href="/" aria-label="Van Emous Mantelzorgwoningen Home">
            {{ if .Site.Params.logo }}
                <img src="{{ .Site.Params.logo | relURL }}" alt="Van Emous Logo" height="60" class="me-2" loading="lazy">
            {{ end }}
        </a>
        
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" 
                aria-controls="navbarNav" aria-expanded="false" aria-label="Wissel navigatiemenu">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav ms-auto align-items-center">
                {{ $currentPage := . }}
                {{ range .Site.Menus.main }}
                    {{ if .HasChildren }}
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle px-3 {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}" 
                            href="#" id="navbarDropdown{{ .Identifier }}" role="button" data-bs-toggle="dropdown" 
                            aria-expanded="false" aria-haspopup="true">
                                {{ .Pre | safeHTML }} {{ .Name }}
                            </a>
                            <ul class="dropdown-menu" aria-labelledby="navbarDropdown{{ .Identifier }}">
                                {{ range .Children }}
                                    <li>
                                        <a class="dropdown-item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}" 
                                            href="{{ .URL | relURL }}"
                                            {{ if $currentPage.IsMenuCurrent "main" . }}aria-current="page"{{ end }}>
                                            {{ .Name }}
                                        </a>
                                    </li>
                                {{ end }}
                            </ul>
                        </li>
                    {{ else }}
                        <li class="nav-item">
                            <a class="nav-link px-3 {{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{ end }}" 
                                href="{{ .URL | relURL }}"
                                {{ if $currentPage.IsMenuCurrent "main" . }}aria-current="page"{{ end }}>
                                {{ .Pre | safeHTML }} {{ .Name }}
                            </a>
                        </li>
                    {{ end }}
                {{ end }}

                <li class="nav-item ms-lg-3 d-flex align-items-center justify-content-end cta-wrapper">
                    <a href="/advies" class="btn btn-cta" role="button" type="button" data-bs-toggle="modal" data-bs-target="#contactModal">
                        Vrijblijvend advies
                    </a>
                </li>
            </ul>
        </div>
    </div>
</nav>

