<?php
/**
 * Template Name: Custom Home Page
 */
get_header();

?>
<!-- banner section -->
<main id="maincontent" role="main">
  <?php do_action('vw_business_lounge_before_slider'); ?>
    <?php 
      $vw_business_lounge_number = get_theme_mod('vw_business_lounge_slide_number');
      if($vw_business_lounge_number != ''){
    ?>
      <section id="slider" class="position-relative">
        <div id="carouselExampleIndicators" class="carousel slide carousel-fade wow fadeInLeft" data-bs-ride="carousel" data-type="multi" data-interval="false">
          <div class="carousel-inner" role="listbox">
            <?php for ($vw_business_lounge_i=1; $vw_business_lounge_i<=$vw_business_lounge_number; $vw_business_lounge_i++) {?>
              <div <?php if($vw_business_lounge_i == 1){echo 'class="carousel-item active"';} else{ echo 'class="carousel-item"';}?>>
                <div class="row">
                  <div class="col-xl-4 col-lg-4 col-md-5 col-12">
                    <div class="carousel-caption">
                      <div class="inner_carousel">
                        <?php if(get_theme_mod('vw_business_lounge_tagline_title'.$vw_business_lounge_i) != ''){ ?>
                          <h1 class="slide_title" class=""><?php echo esc_html(get_theme_mod('vw_business_lounge_tagline_title'.$vw_business_lounge_i)); ?></h1>
                        <?php } ?>
                         <?php if(get_theme_mod('vw_business_lounge_designation_text'.$vw_business_lounge_i) != ''){ ?>
                          <p class="slide_text mb-4"><?php echo esc_html(get_theme_mod('vw_business_lounge_designation_text'.$vw_business_lounge_i)); ?></p>
                        <?php } ?>
                        <?php if ( get_theme_mod('vw_business_lounge_banner_button_text'.$vw_business_lounge_i) != '') {?>
                          <a href="<?php echo esc_url(get_theme_mod('vw_business_lounge_banner_btn_link'.$vw_business_lounge_i,false));?>" class="slider-btn py-2 px-3"><?php echo esc_html(get_theme_mod('vw_business_lounge_banner_button_text'.$vw_business_lounge_i));?><i class="<?php echo esc_attr(get_theme_mod('vw_business_lounge_banner_button_icon'.$vw_business_lounge_i, 'fa-solid fa-paper-plane')); ?> ms-2"></i><span class="screen-reader-text"><?php esc_html_e( 'icon','vw-business-lounge');?></span>
                          </a>
                        <?php }?>
                      </div>
                    </div>
                  </div>
                  <div class="col-xl-8 col-lg-8 col-md-7 col-12">
                    <?php if ( get_theme_mod('vw_business_lounge_banner_background_image_sec',true) != "" ) {?>
                    <div class="slider-carousel">
                      <div class="slide-overlay"></div>
                        <img class="slider-carousel-img" src="<?php echo esc_url(get_theme_mod('vw_business_lounge_banner_background_image_sec'.$vw_business_lounge_i)); ?>" alt="<?php echo esc_attr(get_theme_mod('vw_business_lounge_slide_title'.$vw_business_lounge_i, true)); ?>" title="#slidecaption<?php echo esc_html($vw_business_lounge_i); ?>">
                    </div>
                    <?php } ?>
                  </div>
                </div>
              </div>
            <?php } ?>
          </div>
          <div class="business-title">
            <?php if(get_theme_mod('vw_business_lounge_slider_title') != ''){ ?>
              <span class="main-heading1" class=""><?php echo esc_html(get_theme_mod('vw_business_lounge_slider_title')); ?></span>
            <?php } ?>
          </div>
          <div class="lounge-title">
            <?php if(get_theme_mod('vw_business_lounge_slider_title_next') != ''){ ?>
              <span class="main-heading2" class=""><?php echo esc_html(get_theme_mod('vw_business_lounge_slider_title_next')); ?></span>
            <?php } ?>
          </div>
          <?php if( get_theme_mod( 'vw_business_lounge_display_slider_icons', true) == true ) { ?>
            <a class="carousel-control-prev" data-bs-target="#carouselExampleIndicators" role="button" data-bs-slide="prev">
              <span class="carousel-control-prev-icon" aria-hidden="true"><i class="<?php echo esc_attr(get_theme_mod('vw_business_lounge_slider_prev_icon','fa-solid fa-arrow-left')); ?>"></i></span>
              <span class="sr-only"><?php esc_html_e('Previous','vw-business-lounge'); ?></span>
            </a>
            <a class="carousel-control-next" data-bs-target="#carouselExampleIndicators" role="button" data-bs-slide="next">
              <span class="carousel-control-next-icon" aria-hidden="true"><i class="<?php echo esc_attr(get_theme_mod('vw_business_lounge_slider_next_icon','fa-solid fa-arrow-right')); ?>"></i></span>
              <span class="sr-only"><?php esc_html_e('Next','vw-business-lounge'); ?></span>
            </a>  
          <?php }?>
            <div class="slider-indicator carousel-indicators text-center carousel slide"  class="carousel slide" data-bs-ride="carousel">
              <?php for ($vw_business_lounge_i=1; $vw_business_lounge_i<=$vw_business_lounge_number; $vw_business_lounge_i++) {?>
                  <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="<?php echo esc_html($vw_business_lounge_i-1); ?>" <?php if ($vw_business_lounge_i == 1) { echo 'class="indicator active"'; } ?> >
                    <?php if( get_theme_mod('vw_business_lounge_banner_background_image_sec'.$vw_business_lounge_i)) { ?>
                      <img src="<?php echo esc_url(get_theme_mod('vw_business_lounge_banner_background_image_sec'.$vw_business_lounge_i)); ?>" alt="Slider Image">
                    <?php }?>
                 </button>
               <?php }?>
            </div>
        </div>
        <div class="clearfix"></div>
      </section>
    <?php }?>
  <?php do_action('vw_business_lounge_after_slider'); ?>

  <!-- Lounge Section -->
  <section id="lounge-sec" class="wow fadeInRight pt-3">
    <div class="container-fluid">
      <div class="row">
        <?php for ($vw_business_lounge_j=1; $vw_business_lounge_j <= 4; $vw_business_lounge_j++) { ?>
          <div class="lounge-card col-xl-3 col-lg-3 col-md-6 col-sm-12 p-0 align-self-center">
            <div class="image-overlay"></div>
            <?php if ( get_theme_mod('vw_business_lounge_featured_background_image_sec'.$vw_business_lounge_j) != "" ) { ?>
              <img class="featured-img" src="<?php echo esc_url(get_theme_mod('vw_business_lounge_featured_background_image_sec'.$vw_business_lounge_j)); ?>" alt="<?php echo esc_attr(get_theme_mod('vw_business_lounge_featured_title'.$vw_business_lounge_j, true)); ?>" title="#slidecaption<?php echo esc_html($vw_business_lounge_j); ?>">
            <?php } ?>
            <div class="featured-content">
              <h2>
                <a href="<?php echo esc_url(get_theme_mod('vw_business_lounge_book_title_url'.$vw_business_lounge_j,false));?>"><?php echo esc_html(get_theme_mod('vw_business_lounge_feature_featured_tagline_title'.$vw_business_lounge_j,''));?></a>
              </h2>
              <?php if ($vw_business_lounge_j === 4) { ?>
                <?php if(get_theme_mod('vw_business_lounge_featured_text'.$vw_business_lounge_j) != '') { ?>
                  <p class="featured-para mb-0 pb-3"><?php echo esc_html(get_theme_mod('vw_business_lounge_featured_text'.$vw_business_lounge_j)) ?></p>
                <?php } ?>
                <?php if(get_theme_mod('vw_business_lounge_icon_url'.$vw_business_lounge_j) != '') { ?>
                  <a href="<?php echo esc_url(get_theme_mod('vw_business_lounge_icon_url'.$vw_business_lounge_j,false));?>" class="featured-icon"><i class="<?php echo esc_attr(get_theme_mod('vw_business_lounge_featured_icon','fa-solid fa-angle-right')); ?>"></i>
                  </a>
                <?php } ?>
              <?php } ?>
            </div>
          </div>
        <?php } ?>
      </div>
    </div>
  </section>

  <div id="content-vw" class="entry-content pt-5">
    <div class="container">
      <?php while (have_posts()) : the_post(); ?>
        <?php the_content(); ?>
      <?php endwhile; // end of the loop. 
      ?>
    </div>
  </div> 
</main>

<?php get_footer(); ?> 