{% if mobile %}
<div class="overflow-x-scroll whitespace-nowrap md:max-w-[689px] hidden-scrollbar -mx-4 mb-6">
    {% set gallery_items_count = section.content|length %}
    {% for item in section.content %}
    <div class="inline-block align-top {{ gallery_items_count == 2 ? 'w-1/2' : '' }}">
        <a href="{{item.url}}" class="fancybox relative text-white h-48 {{ gallery_items_count == 2 ? 'w-full' : 'w-44 md:w-56' }} md:h-56 block" data-fancybox="gallery_widget_{{section.id}}" title="Ingrandisci immagine">
            <img class="gallery_image_mobile h-48 {{ gallery_items_count == 2 ? 'w-full' : 'w-44 md:w-56' }} md:h-56 object-cover" loading="lazy" fetchpriority="low" src="{{item.url}}?w=160&h=120" alt="Galleria immagini"/>
        </a>
    </div>
    {% endfor %}
</div>
{% else %}
    {% include "templates/components/single/swiper_gallery.twig" with {'id': gallery_id} %}
{% endif %}
