{% block element_faq %}
{% set firstItem = element.config.groups.value[0].name %}
{% set groups = element.config.groups.value %}
<section class="nd-cms-el-faq faq lg:theme-grid boxed-layout my-4">
<div class="flex w-full flex-col overflow-hidden lg:flex-row lg:grid-gap-11 lg:col-span-10 lg:col-start-2 xl:col-span-8 xl:col-start-3">
{% if groups | length > 1 %}
{% block element_faq_ul_style %}
<ul class="faq-select nav nav-tabs ml-10 flex md:flex-col flex-nowrap grid-gap-4 overflow-x-scroll flex-shrink-0 lg:w-[300px] md:mr-10 lg:mr-0 lg:block lg:overflow-visible">
{% for group in groups %}
{% set name = 'FAQ_' ~ loop.index %}
<li class="custom-select-ul-child flex items-center grid-gap-4 text-base leading-8 text-black first:pl-8 last:pr-8 md:first:pl-0 md:last:pr-0">
<a class="tab-trigger border-b border-transparent whitespace-nowrap text-base py-2 text-black font-bold w-full flex grid-gap-4 justify-between items-center lg:whitespace-normal {% if loop.first %}active{% endif %}"
href="#{{ name }}_tab"
id="{{ name }}-tab"
data-toggle="tab"
role="tab"
aria-control="{{ name }}_tab"
aria-selected="true">
{{ group.name }}
</a>
{% if not loop.last %}
<span class="seperator md:hidden">•</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}
{% endif %}
{% block element_faq_margin_top %}
<div class="faq-container tab-content mt-5 w-full sm:inline-block lg:mt-0 {% if groups | length > 1 %}xl:col-span-9{% else %}xl:col-span-6 xl:col-start-4{% endif %}">
{% endblock %}
{% for group in groups %}
{% set name = 'FAQ_' ~ loop.index %}
<div class="faq-subject-container tab-pane fade {% if loop.first %}active show{% endif %} grid grid-gap-y-4"
id="{{ name }}_tab"
role="tabpanel"
aria-labelledby="{{ name }}-tab">
{% for key, qa in group.qa %}
{% if qa.answer and qa.question %}
{% block element_faq_style %}
<div class=" border-b border-grey-400 py-2 mb-10 mx-10 lg:mx-0"
x-data="{ id: {{ key }}, get expanded() { return this.active === this.id }, set expanded(value) { this.active = value ? this.id : null } }">
<div class="faq-question question-btn text-base font-bold text-black cursor-pointer leading-8 w-full flex"
x-on:click="expanded = !expanded"
:aria-expanded="expanded">
<span x-show="!expanded"
aria-hidden="true"
class="block w-6 h-6">+</span>
<span x-show="expanded"
aria-hidden="true"
class="block w-6 h-6">-</span>
{{ qa.question }}
</div>
<div class="faq-answer wysiwyg"
x-show="expanded" x-collapse.duration.500ms>
<div class="pt-3">
{{ qa.answer|raw }}
</div>
</div>
</div>
{% endblock %}
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</section>
{% endblock %}