{% assign available_events = 0 %}
{% for training_event in training_events.available %}
    {% if training_event.title contains cat %}
        {% assign available_events = available_events | plus: 1 %}
    {% endif %}
  {% endfor %}

<div class="custom-events-wrapper">
    <div class="welcome-content-wrapper">
        <div class="introduction yellow-text">
            Próxima sesiones
        </div>
    </div>
    <div class="np-dashboard-resources">
      {% if available_events > 0 %}
        <div class="row row-with-thumbnails">
          {% for training_event in training_events.available %}
            {% if training_event.title contains cat %}
                <div class="col-xs-12 col-sm-6 col-lg-4 np-stretch-content">
                {% include "cards_training_event" with training_event %}
                </div>
            {% endif %}
          {% endfor %}
        </div>
      {% else %}
        {% include "training_events_zero_state" %}
      {% endif %}
    </div>
</div>

<style>
.custom-events-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}
</style>