@php($d = $d ?? [])
<section class="vs-section vs-faq" id="faq">
    <div class="vs-container vs-faq-wrap">
        <div class="vs-head" data-aos="fade-up"><h2 class="vs-h2">{{ $d['heading'] ?? '' }}</h2></div>
        <div class="vs-accordion" x-data="{ open:0 }">
            @foreach(($d['items'] ?? []) as $i => $f)
                <div class="vs-acc-item" data-aos="fade-up" data-aos-delay="{{ $i * 50 }}">
                    <button class="vs-acc-q" @click="open = open==={{ $i+1 }} ? 0 : {{ $i+1 }}"
                            :class="{ 'is-open': open==={{ $i+1 }} }">
                        <span>{{ $f['q'] ?? '' }}</span>
                        <i class="fas fa-plus vs-acc-icon" :class="{ 'is-open': open==={{ $i+1 }} }"></i>
                    </button>
                    <div class="vs-acc-a" x-show="open==={{ $i+1 }}" x-collapse @if($i!==0) style="display:none" @endif>
                        <p>{{ $f['a'] ?? '' }}</p>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
</section>
