<div class="menu-overlay" id="menu-overlay" aria-hidden="true"></div>
<aside class="sidebar" id="sidebar" aria-label="Documentation navigation">
  <header class="sidebar-header">
    <a href="{{ '/' | relative_url }}" class="site-title">{{ site.title }}</a>
  </header>
  
  <nav class="sidebar-nav">
{% for section in site.data.navigation %}
{% if section.url %}
    <a href="{{ section.url | relative_url }}" 
       class="nav-section-link{% if page.url == section.url %} active{% endif %}">
      {{ section.title }}
    </a>
{% else %}
    {% assign section_has_active = false %}
    {% for item in section.items %}
      {% if page.url == item.url %}
        {% assign section_has_active = true %}
        {% break %}
      {% endif %}
    {% endfor %}
    <details class="nav-section"{% if section_has_active %} open{% elsif section.collapsed != true %} open{% endif %}>
      <summary class="nav-section-title">{{ section.title }}</summary>
      <ul class="nav-list">
        {% for item in section.items %}
          <li class="nav-item">
            <a href="{{ item.url | relative_url }}"
               {% if page.url == item.url %}class="active"{% endif %}>
              {{ item.title }}
            </a>
          </li>
        {% endfor %}
      </ul>
    </details>
{% endif %}
{% endfor %}
  </nav>
  {% include sidebar-footer.html %}
</aside>
