<div class="faq_section">
    <div class="container">
        <div class="title_1">FAQs</div>
        <div class="maxWidth">
            <p>Have questions? We have the answers</p>
        </div>
        <div class="clearfix"></div>

        <div class="accordion" id="accordionExample">
            <?php $i = 1;

            $faq_sql = mysqli_query($GLOBALS['dbconn'], "select answer, slno, question from faq_tbl where category_id='$cat_res[catID]' order by slno ASC");

            while ($faq_res = mysqli_fetch_array($faq_sql)) { ?>
                <div class="accordion-item wow fadeInLeft" data-wow-delay=".<?= $i; ?>s">
                    <h5 class="accordion-header" id="heading_<?= $faq_res['slno']; ?>">
                        <span class="accordion-button <?= $i == 1 ? '' : 'collapsed' ?>" role="button" data-bs-toggle="collapse" data-bs-target="#faq_<?= $faq_res['slno']; ?>" aria-expanded="true" aria-controls="heading_<?= $faq_res['slno']; ?>"><?= str_ireplace('{companyName}', $admin_res['companyName'], $faq_res['question']); ?></span>
                    </h5>
                    <div id="faq_<?= $faq_res['slno']; ?>" class="accordion-collapse <?= $i == 1 ? 'in' : ''; ?> collapse <?= $i == 1 ? 'show' : '' ?>" aria-labelledby="heading_<?= $faq_res['slno']; ?>" data-bs-parent="#accordionExample">
                        <div class="accordion-body">
                            <p><?= str_ireplace('{companyName}', $admin_res['companyName'], $faq_res['answer']); ?></p>
                        </div>
                    </div>
                </div>
            <?php $i++;
            } ?>


        </div>

        <div class="text-center">
            <a class="read_more bgButton" href="#" data-bs-toggle="modal" data-bs-target="#myModal" title="Consult with Astrologer">
                <span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z"></path>
                    </svg> Consult with Astrologer</span></a>
        </div>
    </div>

</div>