<header class="site-header">
  <div class="site-wrapper">
    <div class="site-header__inner">
      <a href="{{ "/" | relURL }}" class="site-title">{{ .Site.Title }}</a>
      {{- if .Site.Menus.main }}
      <nav aria-label="Main navigation">
        <ul class="site-nav">
          {{- range .Site.Menus.main }}
          {{- if not .Parent }}{{/* top-level items only */}}
            {{- if .HasChildren }}
            {{/* Explore dropdown — renders parent link + child list */}}
            <li class="nav-has-dropdown">
              <a href="{{ .URL }}"
                 {{- if $.IsMenuCurrent "main" . }} class="is-active"{{ end }}
                 aria-haspopup="true">{{ .Name }} <span class="nav-arrow" aria-hidden="true">▾</span></a>
              <ul class="nav-dropdown" role="menu">
                {{- range .Children }}
                <li role="none">
                  <a href="{{ .URL }}" role="menuitem">{{ .Name }}</a>
                </li>
                {{- end }}
              </ul>
            </li>
            {{- else }}
            {{/* Regular nav item */}}
            <li>
              <a href="{{ .URL }}"{{ if $.IsMenuCurrent "main" . }} class="is-active"{{ end }}>{{ .Name }}</a>
            </li>
            {{- end }}
          {{- end }}
          {{- end }}
        </ul>
      </nav>
      {{- end }}
    </div>
  </div>
</header>
