<div class="faq-sec">
    <div class="container">
        <div class="row g-4">
            <div class="col-lg-4 col-md-5 col-12">
                <div class="qut-frm wow fadeInLeft" data-wow-delay="0s">
                    <div class="tt-bx text-start">
                        <div class="tt text-white">Request a <span>Quote</span></div>
                        <p class="text-start mx-0 text-white">Fill in all the required details to consult with us and avail our services.</p>
                    </div>
                    <form id="enq_pop_form2" method="post">
                        <div id="enq_pop_up1"></div>
                        <span class="text-danger cat_error_message"></span>
                        <span class="text-success cat_success_message"></span>

                        <!-- <script src="https://www.google.com/recaptcha/api.js" async defer></script> -->

                        <div class="form-group">
                            <input class="form-control" type="text" name="name" placeholder="Full Name*" onkeyup="validateOnlyTextField(this)" value=""
                                pattern="[a-zA-Z\s]+" required="">
                        </div>

                        <div class="form-group">
                            <input class="form-control" type="email" name="email" value="" placeholder="Email ID*" required="">
                        </div>

                        <div class="form-group">
                            <input type="hidden" class="countryName countryName" name="countryName" value="">
                            <input class="form-control" value="" type="tel" name="mobile" placeholder="Mobile Number*" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" minlength="10" maxlength="10" required="" autocomplete="off">
                        </div>

                        <div class="form-group">
                            <input class="form-control" type="text" name="location" value="" placeholder="Your Location*" required="">
                        </div>

                        <div class="form-group">
                            <textarea class="form-control" name="message" placeholder="Your Message*" required=""></textarea>
                        </div>

                        <div class="form-group" style="margin-bottom: 0;">
                            <div class="g-recaptcha" data-sitekey="<?= site_key; ?>"></div>
                        </div>
                        <button type="submit" name="submit_enq1" class="main-btn">Submit <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></button>
                    </form>
                </div>
            </div>

            <div class="col-lg-8 col-md-7 col-12">
                <div class="tt-bx text-start">
                    <div class="tt">Know more <span>from FAQs</span></div>
                    <p class="text-start mx-0">Have questions about our products or services? Explore our FAQs to find detailed answers! Whether it’s about our precision Laboratory Equipment, Weighing Scales, Moisture Analyzers, or Water Purifier Systems, we’ve got you covered. Get the insights you need on performance, maintenance, and more. Let AADISH Mechatronics provide clarity and help you make informed decisions.</p>
                </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 IS NULL OR category_id='' ORDER BY slno desc");
                    $companyName = isset($admin_res['companyName']) ? $admin_res['companyName'] : 'Your Company';

                    while ($faq_res = mysqli_fetch_array($faq_sql)) { ?>
                        <div class="accordion-item">
                            <div class="accordion-header">
                                <button
                                    class="accordion-button <?= $i === 1 ? '' : 'collapsed'; ?>"
                                    type="button"
                                    data-bs-toggle="collapse"
                                    data-bs-target="#collapse<?= htmlspecialchars($faq_res['slno']); ?>"
                                    aria-expanded="<?= $i === 1 ? 'true' : 'false'; ?>"
                                    aria-controls="collapse<?= htmlspecialchars($faq_res['slno']); ?>">
                                    <?= htmlspecialchars(str_ireplace('{companyName}', $companyName, $faq_res['question'])); ?>
                                </button>
                            </div>
                            <div
                                id="collapse<?= htmlspecialchars($faq_res['slno']); ?>"
                                class="accordion-collapse collapse <?= $i === 1 ? 'show' : ''; ?>"
                                data-bs-parent="#accordionExample">
                                <div class="accordion-body">
                                    <p><?= htmlspecialchars(str_ireplace('{companyName}', $companyName, $faq_res['answer'])); ?></p>
                                </div>
                            </div>
                        </div>
                    <?php $i++;
                    } ?>

                </div>
            </div>
        </div>
    </div>
</div>