{% assign blocks = include.blocks %}


<section class="banner-joinus overflow-x-hidden">
    <div class="container">
        <div class="card-deck">
            {% for block in blocks %}
            {% capture thecycle %}{% cycle 'odd', 'even' %}{% endcapture %}
            <div class="col-sm my-3 my-md-5 px-3">
                <div class="card h-100">
                      {% if block.image %}
                      <div class="mb-auto text-center py-4 px-3" >
                          <img src="{{block.image | relative_url}}" alt="{{block.title}}" class="img-fluid">
                      </div>
                      {% endif %}

                      <div class="card-body d-flex flex-column">
                          <h1 class="text-center px-2 px-md-4 mt-auto">{{block.title}}</h1>
                          {% if block.text != nil%}
                          <div class="flex-fill font-serif mt-1 mb-1 alternateblock__text text-center px-2 px-md-4">{{block.text | markdownify }}</div>
                          {% endif %}
                          {% if block.buttons != nil%}
                              <div class="px-2 px-md-4 text-center">
                                  {% for button in block.buttons %}
                                      <a href="{{button.url | escape }}" class="{{button.class}} mr-3 mt-2">{{button.label}}</a>
                                  {% endfor %}
                              </div>
                          {% endif %}
                      </div>
                </div>
            </div>
            {% endfor %}
        </div>
    </div>
</section>

