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

get_header(); 

?>

<main role="main" id="skip_content">
  <?php do_action( 'home_repair_service_above_slider' ); ?>

  <?php 
    $home_repair_service_number = get_theme_mod('home_repair_service_slide_number');
    if($home_repair_service_number != ''){
  ?>
  <?php if ( get_theme_mod( 'home_repair_service_slider_hide', false ) ) { ?>
    <section id="slider" class="mw-100 m-auto p-0 position-relative">
      <div id="carouselExampleIndicators" class="carousel slide <?php if ( get_theme_mod('home_repair_service_slide_remove_fade',true) == 1 ) { ?> carousel-fade <?php } ?>" data-bs-ride="carousel" data-type="multi" data-interval="false">
        <div class="carousel-inner" role="listbox">
          <?php for ($home_repair_service_i=1; $home_repair_service_i<=$home_repair_service_number; $home_repair_service_i++) {?>
            <div <?php if($home_repair_service_i == 1){echo 'class="carousel-item active "';} else{ echo 'class="carousel-item"';}?>>
              <?php if ( get_theme_mod('home_repair_service_slider_bg_image',true) != "" ) {?>
                <img class="slider-banner-img" src="<?php echo esc_url(get_theme_mod('home_repair_service_slider_bg_image'.$home_repair_service_i)); ?>">
              <?php } ?>
              <div class="container">
                <div class="row">
                  <div class="col-xxl-11 col-xl-11 col-lg-11 col-md-10 col-12 slider-left">
                    <div class="carousel-caption wow bounceInRight">
                      <div class="inner_carousel text-start">
                        <?php if(get_theme_mod('home_repair_service_slider_title'.$home_repair_service_i) != ''){ ?>
                          <h1 class="slider-title mb-2 pb-0 text-capitalize"><?php echo esc_html(get_theme_mod('home_repair_service_slider_title'.$home_repair_service_i)); ?></h1>
                        <?php } ?>
                        <?php if(get_theme_mod('home_repair_service_slider_desc_text'.$home_repair_service_i) != ''){ ?>
                          <p class="slider-desc mb-2 text-capitalize"><?php echo esc_html(get_theme_mod('home_repair_service_slider_desc_text'.$home_repair_service_i)); ?></p>
                        <?php } ?>
                        <?php if ( get_theme_mod('home_repair_service_slider_btn_text'.$home_repair_service_i) != '' ) {?>
                          <div class ="slider-btn pt-2">
                            <a class="text-uppercase" href="<?php echo esc_url(get_theme_mod('home_repair_service_slider_btn_url'.$home_repair_service_i,false));?>"><?php echo esc_html(get_theme_mod('home_repair_service_slider_btn_text'.$home_repair_service_i));?><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_slider_btn_icon','fa-solid fa-arrow-right-long')); ?> ps-2"></i></a>
                          </div>
                        <?php }?>
                      </div>
                    </div>
                  </div>
                  <div class="col-xxl-1 col-xl-1 col-lg-1 col-md-1 col-12 slider-right">
                    <div class="main-social-box">
                      <div class="social-icon">
                        <?php if(get_theme_mod('home_repair_service_facebook_url') != ''){ ?>
                          <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_facebook_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_facebook_icon','fab fa-facebook-f')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Facebook', 'home-repair-service'); ?></span></a>
                        <?php }?>
                        <?php if(get_theme_mod('home_repair_service_twitter_url') != ''){ ?>
                          <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_twitter_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_twitter_icon','fab fa-twitter')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Twitter', 'home-repair-service'); ?></span></a>
                        <?php }?>
                        <?php if(get_theme_mod('home_repair_service_instagram_url') != ''){ ?>
                          <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_instagram_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_instagram_icon','fab fa-instagram')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Instagram', 'home-repair-service'); ?></span></a>
                        <?php }?>
                        <?php if(get_theme_mod('home_repair_service_pinterest_url') != ''){ ?>
                          <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_pinterest_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_pinterest_icon','fab fa-pinterest-p')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Youtube', 'home-repair-service'); ?></span></a>
                        <?php }?>
                      </div>
                      <div class="slider-arrow">
                        <a class="carousel-control-prev" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev" role="button">
                          <span class="carousel-control-prev-icon w-auto h-auto" aria-hidden="true"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_slider_previous_icon','fa-solid fa-arrow-left-long')); ?>" ></i></span>
                          <span class="screen-reader-text"><?php esc_html_e( 'Previous','home-repair-service' );?></span>
                        </a>
                        <a class="carousel-control-next" data-bs-target="#carouselExampleIndicators" data-bs-slide="next" role="button">
                          <span class="carousel-control-next-icon w-auto h-auto" aria-hidden="true"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_slider_next_icon','fa-solid fa-arrow-right-long')); ?>" ></i></span>
                          <span class="screen-reader-text"><?php esc_html_e( 'Next','home-repair-service' );?></span>
                        </a> 
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <?php if(get_theme_mod('home_repair_service_contact_sec_breadcrumb',false) == 1){ ?>
                <div class="contact-sec">
                  <div class="container">
                    <div class="row">
                      <div class="col-xxl-4 col-xl-4 col-lg-3 col-md-3 col-12 contact-info align-self-center">
                        <div class="phone-sec py-0 py-lg-0 py-md-2 ">
                          <?php if( get_theme_mod( 'home_repair_service_phone_text') != '') { ?>
                            <div class="row">
                              <div class="col-xxl-1 col-xl-1 col-lg-2 col-md-2 col-sm-4 col-3 p-0 align-self-center contact-icon">
                                <p class="mb-0 py-2 text-center"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_phone_icon','fa-solid fa-headphones-simple')); ?>"></i></p>
                              </div>
                              <div class="col-xxl-11 col-xl-11 col-lg-10 col-md-10 col-sm-8 col-9 ps-3">            
                                <p class="call text-capitalize"><?php echo esc_html( get_theme_mod('home_repair_service_phone_text') ); ?></p>
                                <p><a class="call1" href="tel:<?php echo esc_attr( get_theme_mod('home_repair_service_phone_number')); ?>"><?php echo esc_html( get_theme_mod('home_repair_service_phone_number') ); ?><span class="screen-reader-text"><?php echo esc_html( get_theme_mod('home_repair_service_phone_number') ); ?></span></a></p>        
                              </div>
                            </div>
                          <?php }?>
                        </div>
                      </div>
                      <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-4 col-12 contact-info align-self-center">
                        <div class="mail-sec py-0 py-lg-0 py-md-2 ">
                          <?php if( get_theme_mod( 'home_repair_service_email_address_text') != '') { ?>
                            <div class="row">
                              <div class="col-xxl-1 col-xl-1 col-lg-2 col-md-2 col-sm-4 col-3 p-0 align-self-center contact-icon">
                                <p class="mb-0 py-2 text-center"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_email_icon','fa-solid fa-envelope-open-text')); ?>"></i></p>
                              </div>
                              <div class="col-xxl-11 col-xl-11 col-lg-10 col-md-10 col-sm-8 col-9 ps-3">            
                                <p class="email text-capitalize"><?php echo esc_html( get_theme_mod('home_repair_service_email_address_text') ); ?></p>
                                <p><a class="email1" href="mailto:<?php echo esc_attr( get_theme_mod('home_repair_service_email_address1')); ?>"><?php echo esc_html( get_theme_mod('home_repair_service_email_address1') ); ?><span class="screen-reader-text"><?php echo esc_html( get_theme_mod('home_repair_service_email_address1') ); ?></span></a></p>        
                              </div>
                            </div>
                          <?php }?>
                        </div>
                      </div>
                      <div class="col-xxl-4 col-xl-4 col-lg-5 col-md-5 col-12 contact-info align-self-center">
                        <div class="time-sec py-0 py-lg-0 py-md-2 ">
                          <?php if( get_theme_mod( 'home_repair_service_time_text') != '') { ?>
                            <div class="row">
                              <div class="col-xxl-1 col-xl-1 col-lg-2 col-md-2 col-sm-4 col-3 p-0 align-self-center contact-icon">
                                <p class="mb-0 py-2 text-center"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_time_icon','fa-solid fa-clock')); ?>"></i></p>
                              </div>
                              <div class="col-xxl-11 col-xl-11 col-lg-10 col-md-10 col-sm-8 col-9 ps-3">            
                                <p class="time text-capitalize"><?php echo esc_html( get_theme_mod('home_repair_service_time_text') ); ?></p>
                                <p class="time1 text-capitalize"><?php echo esc_html( get_theme_mod('home_repair_service_add_time') ); ?></p>        
                              </div>
                            </div>
                          <?php }?>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              <?php }?>
            </div>
          <?php } ?>
        </div>
      </div>  
      <?php if(get_theme_mod('home_repair_service_video_button_text') != '' || get_theme_mod('home_repair_service_video_button_url') != ''){ ?>
        <div class="video-btn wow bounceInLeft">
          <a id="openBtn">
           <i class="<?php echo esc_attr(get_theme_mod('home_repair_service_video_button_icon','fas fa-play')); ?>"></i>
          </a>
          <p class="video-text align-self-center mb-0 ms-3"><?php echo esc_html( get_theme_mod('home_repair_service_video_button_text','Our Video') ); ?></p>
          <div class="overlay" id="videoOverlay">
            <div class="popup">
              <span class="close-btn"><i class="fas fa-times"></i></span>
              <iframe width="100%" height="100%" src="<?php echo esc_url(get_theme_mod('home_repair_service_video_button_url'));?>" frameborder="0" allowfullscreen></iframe>
            </div>
          </div>
        </div>
      <?php }?>
      <div class="clearfix"></div>
    </section>
  <?php }}?>
  <?php do_action( 'home_repair_service_below_slider' ); ?>

  <!-- Team Section -->
  <?php if( get_theme_mod( 'home_repair_service_section_title') != '' || get_theme_mod( 'home_repair_service_section_small_text') != '') { ?>
    <section id="team-sec" class="py-5 mb-5">
      <div class="container wow zoomIn">
        <div class="heading-box text-center">
          <?php if( get_theme_mod( 'home_repair_service_section_title') != '') { ?>
            <h2 class="section-heading pb-2 text-capitalize position-relative"><?php echo esc_html(get_theme_mod('home_repair_service_section_title'));?></h2>  
          <?php } ?>
          <?php if(get_theme_mod('home_repair_service_section_small_text') != ''){ ?>
            <p class="section-text pt-2 mb-3"><?php echo esc_html(get_theme_mod('home_repair_service_section_small_text')); ?></p>
          <?php } ?>
        </div>
        <div class="row">
          <?php for ($home_repair_service_j=1; $home_repair_service_j<=3; $home_repair_service_j++) {?>
            <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-4 col-12 align-self-center">
              <div class="team-main-box position-relative">
                <?php if ( get_theme_mod('home_repair_service_team_image'.$home_repair_service_j) != '') {?>
                  <img class="team-img position-absolute" src="<?php echo esc_url(get_theme_mod('home_repair_service_team_image'.$home_repair_service_j)); ?>">
                <?php } ?>
                <div class="team-content text-center position-absolute">
                  <?php if(get_theme_mod('home_repair_service_member_name'.$home_repair_service_j) != ''){ ?>
                    <p class="member-name text-uppercase"><?php echo esc_html(get_theme_mod('home_repair_service_member_name'.$home_repair_service_j)); ?></p>
                  <?php } ?>
                  <?php if(get_theme_mod('home_repair_service_add_designation'.$home_repair_service_j) != ''){ ?>
                    <p class="designation"><?php echo esc_html(get_theme_mod('home_repair_service_add_designation'.$home_repair_service_j)); ?></p>
                  <?php } ?>
                  <div class="team-social-icon">
                    <?php if(get_theme_mod('home_repair_service_team_facebook_url'.$home_repair_service_j) != ''){ ?>
                      <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_team_facebook_url'.$home_repair_service_j)); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_team_facebook_icon'.$home_repair_service_j,'fab fa-facebook-f')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Facebook', 'home-repair-service'); ?></span></a>
                    <?php }?>
                    <?php if(get_theme_mod('home_repair_service_team_twitter_url'.$home_repair_service_j) != ''){ ?>
                      <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_team_twitter_url'.$home_repair_service_j)); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_team_twitter_icon'.$home_repair_service_j,'fab fa-twitter')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Twitter', 'home-repair-service'); ?></span></a>
                    <?php }?>
                    <?php if(get_theme_mod('home_repair_service_team_instagram_url'.$home_repair_service_j) != ''){ ?>
                      <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_team_instagram_url'.$home_repair_service_j)); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_team_instagram_icon'.$home_repair_service_j,'fab fa-instagram')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Instagram', 'home-repair-service'); ?></span></a>
                    <?php }?>
                    <?php if(get_theme_mod('home_repair_service_team_pinterest_url'.$home_repair_service_j) != ''){ ?>
                      <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_team_pinterest_url'.$home_repair_service_j)); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_team_pinterest_icon'.$home_repair_service_j,'fab fa-pinterest-p')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Youtube', 'home-repair-service'); ?></span></a>
                    <?php }?>
                  </div>
                </div>
              </div>
            </div>
          <?php }?>
        </div>
      </div>
    </section>
  <?php }?>

  <div class="container front-page-content mt-4">
    <?php while ( have_posts() ) : the_post(); ?>
      <div class="new-text"><?php the_content(); ?></div>
    <?php endwhile; // end of the loop. ?>
  </div>
</main>

<?php get_footer(); ?>