@php
    $faqs = getLandingContents('faq');
@endphp

<!-- faq section start -->
<section class="td-faq">
    <div class="container td-faq-wrapper">
        <div class="section-title">
            <h2>{{ $data['faq_title'] }}</h2>
        </div>
        <div class="td-faq-container">
            <div class="td-faq-container-box">
                <div class="accordion" id="accordionExample">
                    @foreach ($faqs as $index => $faq)
                        <div class="accordion-item td-faq-accordion wow img-custom-anim-left" data-wow-duration="1.5s"
                            data-wow-delay="0.0s">
                            <h2 class="accordion-header" id="heading{{ $index }}">
                                <button class="accordion-button {{ $index !== 0 ? 'collapsed' : '' }}" type="button"
                                    data-bs-toggle="collapse" data-bs-target="#collapse{{ $index }}"
                                    aria-expanded="{{ $index === 0 ? 'true' : 'false' }}"
                                    aria-controls="collapse{{ $index }}">
                                    <img src="{{ asset('/') }}/frontend/default/img/icon/faq-icon.png"
                                        alt="">
                                    {{ $faq->title }}
                                </button>
                            </h2>
                            <div id="collapse{{ $index }}"
                                class="accordion-collapse collapse {{ $index === 0 ? 'show' : '' }}""
                                aria-labelledby="heading{{ $index }}" data-bs-parent="#accordionExample">
                                <div class="accordion-body">
                                    {{ $faq->description }}
                                </div>
                            </div>
                        </div>
                    @endforeach
                </div>
            </div>
        </div>
    </div>
    <div class="td-faq-element">
        <img class="d-none d-md-block" src="{{ asset('/') }}/frontend/default/img/elements/accordion-element.png"
            alt="">
    </div>
</section>
<!-- faq section end -->
