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

get_header(); ?>

<main id="skip-content">
  <?php if (get_theme_mod('academic_tutor_banner_section_setting', false) != '') { ?>
    <section id="top-banner" class="banner-bg">
            <div class="container slider-box">
              <div class="row slide-index">
                <div class="col-xl-6 col-lg-6 col-md-7 slide-contentt">
                  <div class="banner-content">
                    <?php if(get_theme_mod('academic_tutor_banner_extra_heading') != ''){ ?>
                      <p class="extra-head"><?php echo esc_html(get_theme_mod('academic_tutor_banner_extra_heading')); ?></p>
                    <?php }?>
                    <?php if(get_theme_mod('academic_tutor_banner_heading') != ''){ ?>
                      <h2><?php echo esc_html(get_theme_mod('academic_tutor_banner_heading')); ?></h2>
                    <?php }?>
                    <?php if(get_theme_mod('academic_tutor_banner_content') != ''){ ?>
                      <p><?php echo esc_html(get_theme_mod('academic_tutor_banner_content')); ?></p>
                    <?php }?>
                    <?php if(get_theme_mod('academic_tutor_banner_btn_text') != '' || get_theme_mod('academic_tutor_banner_btn_url') != ''){?>
                      <div class="banner-btn">
                        <a href="<?php echo esc_url(get_theme_mod('academic_tutor_banner_btn_url')); ?>"><?php echo esc_html(get_theme_mod('academic_tutor_banner_btn_text')); ?></a>
                        <i class="fas fa-chevron-circle-right"></i> 
                      </div>
                    <?php }?>
                  </div>
                </div>
                <div class="col-xl-6 col-lg-6 col-md-5 slide-imgg">
                    <?php if(get_theme_mod('academic_tutor_banner_main_image') != ''){ ?>
                      <div class="icon-img3">
                        <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_main_image')); ?>" alt="" />
                      </div>
                    <?php } else{?>
                      <div class="icon-img3">
                        <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/slider.png" alt="" />
                      </div>
                    <?php } ?>
                  <div class="client-box">
                    <div class="review-box">
                      <?php if(get_theme_mod('academic_tutor_banner_review_head') != ''){ ?>
                        <h5 class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_review_head')); ?></h5>
                      <?php }?>
                      <?php if(get_theme_mod('academic_tutor_banner_review_text') != ''){ ?>
                        <p><?php echo esc_html(get_theme_mod('academic_tutor_banner_review_text')); ?></p>
                      <?php }?>
                      <div class="client-img">
                        <?php if(get_theme_mod('academic_tutor_banner_review_img1') != ''){ ?>
                          <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_review_img1')); ?>" alt="" />
                        <?php }?>
                        <?php if(get_theme_mod('academic_tutor_banner_review_img2') != ''){ ?>
                          <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_review_img2')); ?>" alt="" />
                        <?php }?>
                        <?php if(get_theme_mod('academic_tutor_banner_review_img3') != ''){ ?>
                          <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_review_img3')); ?>" alt="" />
                        <?php }?>
                        <?php if(get_theme_mod('academic_tutor_banner_review_img4') != ''){ ?>
                          <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_review_img4')); ?>" alt="" />
                        <?php }?>
                      </div>
                    </div>
                  </div>
                  <div class="active-box">
                    <div class="class-icon">
                      <i class="fas fa-place-of-worship"></i>
                    </div>
                    <div class="class-box">
                      <?php if(get_theme_mod('academic_tutor_banner_class_count') != ''){ ?>
                        <h5 class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_class_count')); ?></h5>
                      <?php }?>
                      <?php if(get_theme_mod('academic_tutor_banner_class_text') != ''){ ?>
                        <p class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_class_text')); ?></p>
                      <?php }?>
                    </div>
                  </div>
                  <div class="admission-box">
                    <div class="admission-icon">
                      <i class="fas fa-comment-dollar"></i>
                    </div>
                    <div class="free-box">
                      <?php if(get_theme_mod('academic_tutor_banner_admission_count') != ''){ ?>
                        <h5 class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_admission_count')); ?></h5>
                      <?php }?>
                      <?php if(get_theme_mod('academic_tutor_banner_admission_text') != ''){ ?>
                        <p class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_admission_text')); ?></p>
                      <?php }?>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="slide-one">
              <?php if(get_theme_mod('academic_tutor_banner_one_word') != ''){ ?>
                <p><?php echo esc_html(get_theme_mod('academic_tutor_banner_one_word')); ?></p>
              <?php }?>
            </div>
            <div class="icon-1"><img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/img/Icon3.png"></div>
            <div class="icon-2"><img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/img/Icon1.png"></div>
            <div class="icon-3"><img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/img/Icon2.png"></div>
    </section>
  <?php }?>

  <?php if (get_theme_mod('academic_tutor_service_section_setting', false) != '') { ?>
    <section id="service-section" class="py-5">
      <div class="container">
        <div class="row">
          <div class="col-xl-6 col-lg-4 col-md-5">
            <div class="row">
              <div class="col-xl-4 col-lg-12">
                <div class="courses-box">
                  <div class="courses-icon">
                    <i class="fas fa-book"></i>
                  </div>
                  <div class="certified-box">
                    <?php if(get_theme_mod('academic_tutor_banner_courses_count') != ''){ ?>
                      <h5 class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_courses_count')); ?></h5>
                    <?php }?>
                    <?php if(get_theme_mod('academic_tutor_banner_courses_text') != ''){ ?>
                      <p class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_courses_text')); ?></p>
                    <?php }?>
                  </div>
                </div>
                <div class="about-img">
                  <?php if(get_theme_mod('academic_tutor_banner_about_img1') != ''){ ?>
                    <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_about_img1')); ?>" alt="" />
                  <?php }?>
                  <?php if(get_theme_mod('academic_tutor_banner_about_img2') != ''){ ?>
                    <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_about_img2')); ?>" alt="" />
                  <?php }?>
                  <?php if(get_theme_mod('academic_tutor_banner_about_img3') != ''){ ?>
                    <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_about_img3')); ?>" alt="" />
                  <?php }?>
                </div>
              </div>
              <div class="col-xl-8 col-lg-12">
                <div class="about-single-img">
                  <?php if(get_theme_mod('academic_tutor_banner_about_img4') != ''){ ?>
                    <img src="<?php echo esc_url(get_theme_mod('academic_tutor_banner_about_img4')); ?>" alt="" />
                  <?php }?>
                  <div class="experience-box">
                    <div class="experience-icon">
                      <i class="fas fa-chart-bar"></i>
                    </div>
                    <div class="free-box">
                      <?php if(get_theme_mod('academic_tutor_banner_experience_count') != ''){ ?>
                        <h5 class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_experience_count')); ?></h5>
                      <?php }?>
                      <?php if(get_theme_mod('academic_tutor_banner_experience_text') != ''){ ?>
                        <p class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_experience_text')); ?></p>
                      <?php }?>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="col-xl-6 col-lg-8 col-md-7">
            <div class="service-head">
              <?php if(get_theme_mod('academic_tutor_service_short_heading') != ''){ ?>
                <p class="short-heading"><?php echo esc_html(get_theme_mod('academic_tutor_service_short_heading')); ?></p>
              <?php }?>
              <?php if(get_theme_mod('academic_tutor_service_heading') != ''){ ?>
                <h3 class="main-heading"><?php echo esc_html(get_theme_mod('academic_tutor_service_heading')); ?></h3>
              <?php }?>
              <?php if(get_theme_mod('academic_tutor_about_content') != ''){ ?>
                <p class="about-text"><?php echo esc_html(get_theme_mod('academic_tutor_about_content')); ?></p>
              <?php }?>
              <?php
              $academic_tutor_service_count = get_theme_mod('academic_tutor_service_number', 5);
              $academic_tutor_service_count = max(1, min(5, $academic_tutor_service_count));

              for ($i = 1; $i <= $academic_tutor_service_count; $i++) {

                  $academic_tutor_service_point = get_theme_mod('academic_tutor_about_points' . $i);

                  if (!empty($academic_tutor_service_point)) {
                      echo '<p class="bullets"><i class="fas fa-check me-2"></i> ' . esc_html($academic_tutor_service_point) . '</p>';
                  }
              }
              ?>
              <div class="admin-partition">
                <div class="admin-box">
                  <div class="admin-img">
                    <?php if(get_theme_mod('academic_tutor_about_admin_img') != ''){ ?>
                      <img src="<?php echo esc_url(get_theme_mod('academic_tutor_about_admin_img')); ?>" alt="" />
                    <?php }?>
                  </div>
                  <div class="author-box">
                    <?php if(get_theme_mod('academic_tutor_banner_admin_count') != ''){ ?>
                      <h5 class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_admin_count')); ?></h5>
                    <?php }?>
                    <?php if(get_theme_mod('academic_tutor_banner_admin_text') != ''){ ?>
                      <p class="mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_banner_admin_text')); ?></p>
                    <?php }?>
                  </div>
                </div>
                <div class="cursive-text">
                  <?php if(get_theme_mod('academic_tutor_about_cursive_text') != ''){ ?>
                    <p class="about-cursive-text mb-0"><?php echo esc_html(get_theme_mod('academic_tutor_about_cursive_text')); ?></p>
                  <?php }?>
                </div>
              </div>
              <?php if(get_theme_mod('academic_tutor_banner_about_btn_text') != '' || get_theme_mod('academic_tutor_about_btn_url') != ''){?>
                <div class="about-btn">
                  <a href="<?php echo esc_url(get_theme_mod('academic_tutor_about_btn_url')); ?>"><?php echo esc_html(get_theme_mod('academic_tutor_banner_about_btn_text')); ?></a>
                  <i class="fas fa-chevron-circle-right"></i> 
                </div>
              <?php }?>
            </div>
          </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(); ?>