<?php
/**
 * Template Name: Home Template
 */

get_header(); ?>

<main id="skip-content">
  <?php if (get_theme_mod('academic_education_lite_banner_section_setting', false) != '') { ?>
    <section id="top-banner">
      <div class="banner-content">
        <div class="container">
          <div class="row">
            <div class="col-lg-7 col-md-6 align-self-center">
              <div class="banner-inner-content py-5">
                <?php if(get_theme_mod('academic_education_lite_banner_sub_heading') != ''){ ?>
                  <h5><i class="fas fa-hand-spock me-2"></i><?php echo esc_html(get_theme_mod('academic_education_lite_banner_sub_heading')); ?></h5>
                <?php }?>
                <?php if(get_theme_mod('academic_education_lite_banner_heading') != ''){ ?>
                  <h2><?php echo esc_html(get_theme_mod('academic_education_lite_banner_heading')); ?></h2>
                <?php }?>
                <?php if(get_theme_mod('academic_education_lite_banner_key_feature1') != '' || get_theme_mod('academic_education_lite_banner_key_feature2') != '' || get_theme_mod('academic_education_lite_banner_key_feature3') != ''){ ?>
                  <div class="features">
                    <span><?php echo esc_html('Key Features:', 'academic-education-lite'); ?></span>
                    <ul>
                      <?php for ($i=1; $i < 4; $i++) { ?>
                        <?php if(get_theme_mod('academic_education_lite_banner_key_feature'.$i) != ''){ ?>
                          <li><?php echo esc_html(get_theme_mod('academic_education_lite_banner_key_feature'.$i)); ?></li>
                        <?php }?>
                      <?php } ?>
                    </ul>
                  </div>
                <?php }?>
                <div class="banner-btn">
                  <?php if(get_theme_mod('academic_education_lite_banner_btn_text1') != '' || get_theme_mod('academic_education_lite_banner_btn_url1') != ''){ ?>
                    <a href="<?php echo esc_url(get_theme_mod('academic_education_lite_banner_btn_url1')); ?>" class="started-btn me-4"><?php esc_html_e(get_theme_mod('academic_education_lite_banner_btn_text1')); ?></a>
                  <?php }?>
                  <?php if(get_theme_mod('academic_education_lite_banner_video_btn_text') != '' || get_theme_mod('academic_education_lite_banner_video_btn_url') != ''){ ?>
                    <!-- Button to open the modal -->
                    <a id="openModalButton" data-modal-src="<?php echo esc_url(get_theme_mod('academic_education_lite_banner_video_btn_url')); ?>" class="video-btn" href="#"><i class="fas fa-play me-2"></i>
                      <?php esc_html_e(get_theme_mod('academic_education_lite_banner_video_btn_text')); ?></a>
                    <!-- The modal -->
                    <div id="myModal" class="modal">
                      <!-- Modal content -->
                      <div class="modal-content">
                        <span id="closeModalButton" class="close">&times;</span>
                        <?php if( get_theme_mod('academic_education_lite_banner_video_btn_url') != ''){ ?>
                        <embed id="videoPlayer" height="369" src="<?php echo esc_url(get_theme_mod('academic_education_lite_banner_video_btn_url')); ?>"  allow="accelerometer; autoplay; classipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></embed>
                        <?php }else{ ?>
                          <h3><?php esc_html_e('Add Video Url In Customizer To Display Video Here','academic-education-lite'); ?></h3>
                        <?php } ?>
                      </div>
                    </div>
                  <?php }?>
                </div>
              </div>
            </div>
            <div class="col-lg-5 col-md-6 align-self-center">
              <div class="banner-img">
                <?php if(get_theme_mod('academic_education_lite_counter_number') != '' || get_theme_mod('academic_education_lite_counter_text') != ''){ ?>
                  <div class="counter-box">
                    <div class="row m-0">
                      <div class="col-lg-3 col-md-3 col-3 align-self-center ps-0">
                        <i class="far fa-calendar"></i>
                      </div>
                      <div class="col-lg-9 col-md-9 col-9 align-self-center px-0">
                        <?php if(get_theme_mod('academic_education_lite_counter_number') != ''){ ?>
                          <h6><?php echo esc_html(get_theme_mod('academic_education_lite_counter_number')); ?></h6>
                        <?php }?>
                        <?php if(get_theme_mod('academic_education_lite_counter_text') != ''){ ?>
                          <p><?php echo esc_html(get_theme_mod('academic_education_lite_counter_text')); ?></p>
                        <?php }?>
                      </div>
                    </div>
                  </div>
                <?php }?>
                <?php if(get_theme_mod('academic_education_lite_banner_image') != ''){ ?>
                  <img src="<?php echo esc_url(get_theme_mod('academic_education_lite_banner_image')); ?>" class="banner-img" alt="" />
                <?php } else{?>
                  <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/banner-img.png" class="banner-img" alt="" />
                <?php } ?>
                <?php if(get_theme_mod('academic_education_lite_reviewer_name') != '' || get_theme_mod('academic_education_lite_review_title') != '' || get_theme_mod('academic_education_lite_banner_review_rating') != ''){ ?>
                  <div class="review-box">
                    <?php if(get_theme_mod('academic_education_lite_reviewer_name') != ''){ ?>
                      <span class="name"><?php echo esc_html(get_theme_mod('academic_education_lite_reviewer_name')); ?></span>
                    <?php }?>
                    <?php if(get_theme_mod('academic_education_lite_review_title') != ''){ ?>
                      <h6><?php echo esc_html(get_theme_mod('academic_education_lite_review_title')); ?></h6>
                    <?php }?>
                    <?php if(get_theme_mod('academic_education_lite_banner_review_rating') != '') {?>
                      <div class="star-rating" >
                        <?php for ( $i = 1; $i <= 5; $i++ ): ?>
                          <span class="star <?php echo ( $i <= get_theme_mod('academic_education_lite_banner_review_rating') ) ? 'filled' : 'empty'; ?>"></span>
                      <?php endfor; ?>
                      </div>
                    <?php }?>
                  </div>
                <?php }?>
                <?php if(get_theme_mod('academic_education_lite_banner_team_image') != '' || get_theme_mod('academic_education_lite_team_title') != ''){ ?>
                  <div class="team-box">
                    <?php if(get_theme_mod('academic_education_lite_banner_team_image') != ''){ ?>
                      <img src="<?php echo esc_url(get_theme_mod('academic_education_lite_banner_team_image')); ?>" alt="" />
                    <?php }?>
                    <?php if(get_theme_mod('academic_education_lite_team_title') != ''){ ?>
                      <p><?php echo esc_html(get_theme_mod('academic_education_lite_team_title')); ?></p>
                    <?php }?>
                  </div>
                <?php }?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  <?php }?>

  <?php if (get_theme_mod('academic_education_lite_classes_section_setting', false) != '') { ?>
    <section id="classes-section" class="py-5 my-5">
      <div class="container">
        <div class="row">
          <div class="col-lg-5 col-md-6 align-self-center image-box">
            <?php if (get_theme_mod('academic_education_lite_classes_image') != '') {?>
              <div class="class-img">
                <img src="<?php echo esc_url(get_theme_mod('academic_education_lite_classes_image'));?>"/>
              </div>
            <?php } else {?>
              <div class="class-img">
                <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/classes-img.png"/>
              </div>
            <?php }?>
            <?php if(get_theme_mod('academic_education_lite_live_classes_btn_url') != '' ){ ?>
              <a href="<?php echo esc_url(get_theme_mod('academic_education_lite_live_classes_btn_url')); ?>" class="live-btn" target="_blank"><?php echo esc_html('Live Classes', 'academic-education-lite'); ?></a>
            <?php }?>
          </div>
          <div class="col-lg-7 col-md-6 align-self-center">
            <?php if(get_theme_mod('academic_education_lite_classes_short_heading') != ''){ ?>
              <h5 class="mb-3"><?php echo esc_html(get_theme_mod('academic_education_lite_classes_short_heading')); ?></h5>
            <?php }?>
            <?php if(get_theme_mod('academic_education_lite_classes_heading') != ''){ ?>
              <h3 class="main-heading mb-3"><?php echo esc_html(get_theme_mod('academic_education_lite_classes_heading')); ?></h3>
            <?php }?>
            <?php if(get_theme_mod('academic_education_lite_classes_content') != ''){ ?>
              <p class="main-content mb-4"><?php echo esc_html(get_theme_mod('academic_education_lite_classes_content')); ?></p>
            <?php }?>
            <div class="feature-box">
              <span class="class-title"><?php echo esc_html('Upcoming Live Classes:', 'academic-education-lite'); ?></span>
              <ul>
                <?php for ($i=1; $i <= 2 ; $i++) { ?>
                  <?php if(get_theme_mod('academic_education_lite_class_detail'.$i) != '') {?>
                    <li><?php echo esc_html(get_theme_mod('academic_education_lite_class_detail'.$i)); ?></li>
                  <?php }?>
                <?php }?>
              </ul>
            </div>
            <?php if(get_theme_mod('academic_education_lite_classes_btn_text') != '' || get_theme_mod('academic_education_lite_classes_btn_url') != ''){ ?>
              <a href="<?php echo esc_url(get_theme_mod('academic_education_lite_classes_btn_url')); ?>" class="feature-btn" target="_blank"><?php echo esc_html(get_theme_mod('academic_education_lite_classes_btn_text')); ?></a>
            <?php }?>
          </div>
        </div>
      </div>
    </section>
  <?php }?>
  <section id="page-content">
    <div class="container">
      <div class="py-5">
        <?php
          if ( have_posts() ) :
            while ( have_posts() ) : the_post();
              the_content();
            endwhile;
          endif;
        ?>
      </div>
    </div>
  </section>
</main>

<?php get_footer(); ?>