{% for x in (1..categories_uuids.size) %}
{% assign number_of_videos = 0 %}
{% assign y = x | minus: 1 %}
{% assign category_uuid = categories_uuids | slice: y %}
{% for course in courses.in_catalog %}
{% assign course_categories = course.categories | map: 'id' %}
{% if course.properties.webinar %}
{% for cat in course_categories %}
{% if category_uuid contains cat %}
{% assign number_of_videos = number_of_videos | plus: 1 %}
{% include "cards_course" %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% if number_of_videos <= 3 %}
{% endif %}
{% endfor %}