<nav
  id="header"
  class="fixed w-full bg-white/90 backdrop-blur-sm z-50 border-b border-gray-100"
>
  <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
    <div class="flex justify-between h-16 items-center">
      <div class="flex items-center">
        <!-- Logo -->
        <span class="text-2xl font-['Roboto'] text-primary">logo</span>
      </div>
      <div class="hidden md:flex items-center space-x-8">
        {% for link in sections.navigation.items %}
        <a href="{{ link.url }}" class="text-gray-700 hover:text-primary"
          >{{ link.label }}</a
        >
        {% endfor %} {% if sections.navigation.ctaItems and
        sections.navigation.ctaItems|length > 0 %} {% for ctaItem in
        sections.navigation.ctaItems %}
        <a
          href="{{ ctaItem.url }}"
          class="bg-primary text-white px-6 py-2 !rounded-button hover:bg-primary/90 whitespace-nowrap"
          >{{ ctaItem.label }}
        </a>
        {% endfor %} {% endif %}
      </div>
      <!-- Mobile menu button -->
      <div class="md:hidden flex items-center">
        <button
          id="mobile-menu-button"
          class="text-gray-700 hover:text-primary focus:outline-none"
        >
          <i class="ri-menu-line h-6 w-6 text-2xl"></i>
        </button>
      </div>
    </div>
  </div>
  <!-- Mobile menu -->
  <div id="mobile-menu" class="md:hidden hidden">
    <div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
      {% for link in sections.navigation.items %}
      <a
        href="{{ link.url }}"
        class="mobile-nav-link block text-gray-600 hover:text-primary px-6 py-2"
        >{{ link.label }}</a
      >
      {% endfor %} {% if sections.navigation.ctaItems and
      sections.navigation.ctaItems|length > 0 %} {% for ctaItem in
      sections.navigation.ctaItems %}
      <a
        href="{{ ctaItem.url }}"
        class="block w-full bg-primary text-white px-6 py-2 !rounded-button hover:bg-primary/90 whitespace-nowrap text-center"
      >
        {{ ctaItem.label }}
      </a>
      {% endfor %} {% endif %}
    </div>
  </div>
  <script>
    document
      .getElementById("mobile-menu-button")
      .addEventListener("click", function () {
        var mobileMenu = document.getElementById("mobile-menu");
        mobileMenu.classList.toggle("hidden");
      });
    document.querySelectorAll(".mobile-nav-link").forEach((link) => {
      link.addEventListener("click", function () {
        document.getElementById("mobile-menu").classList.add("hidden");
      });
    });
  </script>
</nav>
