{% load design_system_tags wagtailcore_tags %}
<div class="design-system-container design-system-py-3w">
    <div class="design-system-grid-row design-system-grid-row--gutters">
        <div class="design-system-col-12 design-system-col-offset-md-2 design-system-col-md-8">
            {% for subblock in block.value %}
                {% if subblock.block_type == 'title' %}
                    <div class="design-system-col-12">
                        <h2>{{ subblock.value }}</h2>
                    </div>
                {% endif %}
            {% endfor %}
            <div class="design-system-accordions-group">
                {% for subblock in block.value %}
                    {% if subblock.block_type == 'accordion' %}
                        {% with forloop.counter0|lower as str_counter %}
                            {% with "accordion-"|add:accordions_id|add:"-"|add:str_counter as accordion_id %}  
                                {% design_system_accordion id=accordion_id title=subblock.value.title content=subblock.value.content|richtext %}
                            {% endwith %}
                        {% endwith %}
                    {% endif %}
                {% endfor %}
            </div>
        </div>
    </div>
</div>
