<nav class="flex-l flex-wrap-l">
  {% for item in menu.get_items %}
    {% if item.link matches "/^((?!search).)*$/" %}
      <section class="w-20-l">
        <h1 class="mv0 mb2-l f3 normal b-l">
          <a class="dib gray hover-light-gray no-underline" href="{{ item.link }}">{{ item.title }}</a>
        </h1>

        {% if item.get_children %}
          {% for subitem in item.get_children %}
            <div class="dn db-l">
              <a class="dib light-gray hover-white" href="{{ subitem.link }}">{{ subitem.title }}</a>
            </div>

            {% if loop.last and item.title == "Membership" %}
              {% if not user %}
                <div>
                  <a class="dib light-gray hover-white" href="{{ join_link }}">Join</a>
                </div>
              {% endif %}
            {% endif %}
          {% endfor %}
        {% endif %}
      </section>
    {% endif %}
  {% endfor %}
</nav>

<nav class="flex-l flex-wrap-l">
  {% for item in menu.get_items %}
    {% if item.link matches "/^((?!search).)*$/" %}
      <section class="w-20-l">
        <h1 class="mv0 mb2-l f3 normal b-l">
          <a class="dib gray hover-light-gray no-underline" href="{{ item.link }}">{{ item.title }}</a>
        </h1>

        {% if item.get_children %}
          {% for subitem in item.get_children %}
            <div class="dn db-l">
              <a class="dib light-gray hover-white" href="{{ subitem.link }}">{{ subitem.title }}</a>
            </div>

            {% if loop.last and item.title == "Membership" %}
              {% if not user %}
                <div class="dn db-l">
                  <a class="dib light-gray hover-white" href="{{ join_link }}">Join</a>
                </div>
              {% endif %}
            {% endif %}
          {% endfor %}
        {% endif %}
      </section>
    {% endif %}
  {% endfor %}
</nav>

Hide "Join" link in footer on small screens
Hide "Join" link in footer on small screens
