<?php
/**
 * Template Name:faq Template
 *
 *
 */
  $number = get_theme_mod('vw_book_store_pro_faq_number');
     if($number != ''){

get_header();
get_template_part('template-parts/banner');?>
<div class="content-pages faq-section wow slideInUp delay-3000 animated" data-wow-duration="2s">
	<div class="container pb-0 pb-sm-3">
		<div class="row">
			<div class="col-md-6 faq-tablet">
		    <img class="faq-imgs" src="<?php echo esc_html(get_theme_mod('vw_book_store_pro_faq_bg_image')); ?>">
			</div>
			<div class="col-md-6 modified pb-0 pb-sm-5 ps-0 ps-sm-4">
				<h3 class="faq-heading mt-0 mt-sm-4"><?php echo esc_html(get_theme_mod('vw_book_store_pro_faq_main_heading')); ?></h3>
                <p class="para-faq"><?php echo esc_html(get_theme_mod('vw_book_store_pro_faq_sub_heading')); ?></p>
                <div class="accordion" id="accordionExample">
                  <?php
                  for( $j = 1; $j <= $number; $j++ ) {?>
                        <div class="accordion-item">
                          <div class="accordion-header" id="heading<?php echo esc_attr($j); ?>">
                            <a class="accordion-button <?php if( $j != 1 ) { echo "collapsed"; } ?>" type="button" data-bs-toggle="collapse" data-bs-target="#collapse<?php echo esc_attr($j); ?>" aria-expanded="true" aria-controls="collapse<?php echo esc_attr($j); ?>">
                                <?php echo esc_html(get_theme_mod('vw_book_store_pro_faq_button'.$j)); ?></a>
                          </div>
                          <div id="collapse<?php echo esc_attr($j);?>" class="accordion-collapse collapse <?php if( $j == 1 ) { echo "show"; } ?>" aria-labelledby="heading<?php echo esc_attr($j); ?>" data-bs-parent="#accordionExample" id="collapse<?php echo esc_attr($j);?>">
                             <div class="accordion-body">
                                <?php echo esc_html(get_theme_mod('vw_book_store_pro_faq_content'.$j)); ?>
                             </div>
                          </div>
                       </div>
                   
                   <?php } ?>
                   </div>
		</div>
	</div>
</div>
</div>

<?php } ?>

<?php get_footer(); ?>