

<main class="main">
    <div class="page-header text-center" style="background-image: url('/public/front/assets/images/page-header-bg.jpg')">
        <div class="container">
            <h1 class="page-title"><?= $this->Get_Lang->gl("faq", $langId) ?><span></span></h1>
        </div><!-- End .container -->
    </div><!-- End .page-header -->
    <nav aria-label="breadcrumb" class="breadcrumb-nav">
        <div class="container">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="/"><?= $this->Get_Lang->gl("home_Page", $langId) ?></a></li>
                <li class="breadcrumb-item active" aria-current="page"><?= $this->Get_Lang->gl("faq", $langId) ?></li>
            </ol>
        </div><!-- End .container -->
    </nav><!-- End .breadcrumb-nav -->

    <div class="page-content">
        <div class="container">
            <?php foreach ($faq as $key => $value) { 
            $faqs = $this->db->query("SELECT $question, $answer FROM faq WHERE categoryId = '$value->caId'")->result_object(); ?>
            <h2 class="title text-center mb-3"><?=$value->theTitle?></h2>
            <div class="accordion accordion-rounded" id="accordion-<?=$key+1?>">
                <?php foreach ($faqs as $key2 => $value2) { ?>
                <div class="card card-box card-sm bg-light">
                    <div class="card-header" id="heading-<?=$key+1?><?=$key2+1?>">
                        <h2 class="card-title">
                            <a role="button" data-toggle="collapse" href="#collapse-<?=$key+1?><?=$key2+1?>" aria-expanded="true" aria-controls="collapse-<?=$key+1?><?=$key2+1?>">
                                <?php if(isset($value2->theTitle)) { if($value2->theTitle) { echo  $value2->theTitle; } } ?>
                            </a>
                        </h2>
                    </div><!-- End .card-header -->
                <div id="collapse-<?=$key+1?><?=$key2+1?>" class="collapse <?php if($key == 0 && $key2 == 0) {echo 'show';} ?>" aria-labelledby="heading-<?=$key+1?><?=$key2+1?>" data-parent="#accordion-<?=$key+1?>">
                        <div class="card-body">
                            <?php if(isset($value2->theText)) { if($value2->theText) { echo  $value2->theText; } } ?>
                        </div>
                    </div>
                </div>
                <?php } ?>

            </div>
            <?php } ?>
            
    </div>

    <div class="cta cta-display bg-image pt-4 pb-4" style="background-image: url(/public/front/assets/images/backgrounds/cta/bg-7.jpg);">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-10 col-lg-9 col-xl-7">
                    <div class="row no-gutters flex-column flex-sm-row align-items-sm-center">
                        <div class="col">
                            <h3 class="cta-title text-white"><?= $this->Get_Lang->gl("If_You_Have_More_Questions", $langId) ?></h3><!-- End .cta-title -->
<!--                            <p class="cta-desc text-white">Quisque volutpat mattis eros</p>-->
                            <!-- End .cta-desc -->
                        </div><!-- End .col -->

                        <div class="col-auto">
                            <a href="/contact1" class="btn btn-outline-white"><span><?= $this->Get_Lang->gl("contact_us", $langId) ?></span><i class="icon-long-arrow-right"></i></a>
                        </div><!-- End .col-auto -->
                    </div><!-- End .row no-gutters -->
                </div><!-- End .col-md-10 col-lg-9 -->
            </div><!-- End .row -->
        </div><!-- End .container -->
    </div><!-- End .cta -->
</main><!-- End .main -->
<script>
    $(".menu li").removeClass("active");
    $(".menu li.faq_link").addClass("active");
</script>