{% set gemeinschaft_section = get_section(path="gemeinschaft/_index.md") %}

<div class="container is-fluid">
  <div class="columns">
    {% for gemeinschaft_section_path in gemeinschaft_section.subsections %}
      {% set gemeinschaft_subsection = get_section(path=gemeinschaft_section_path) %}
      <section class="column">
        <div class="card p-0 m-0 is-shadowless is-radiusless is-overlay is-flex is-flex-direction-column is-fullheight is-justify-content-space-between">
          <div class="card-content p-0 m-0">
            <h1 class="title is-6 is-mega-menu-title">
              <p> {{ gemeinschaft_subsection.title }} </p>
              <p class="is-4">{{ gemeinschaft_subsection.description }}</p>
            </h1>

            {% for page in gemeinschaft_subsection.pages %}
              <a class="navbar-item" href="{{ page.permalink }}">
                <div class="navbar-content">{{ page.title }}</div>
              </a>
            {% endfor %}
          </div>
          {% if gemeinschaft_subsection.extra.products %}
            <div class="card-footer">
              {% for product in gemeinschaft_subsection.extra.products %}
                <a class="card-footer-item" href="{{ product.link }}">
                  <span class="icon-text">
                    <span>{{ product.name }}</span>
                    <span class="icon"><i class="fa-solid fa-up-right-from-square"></i></span>
                  </span>
                </a>
              {% endfor %}
            </div>
          {% endif %}
        </div>
      </section>
    {% endfor %}
  </div>
</div>