<?php

/**
 * Template Name: Custom Home Page
 */

get_header();

?>
<main id="maincontent" role="main">
<?php 
  $book_publisher_agency_number = get_theme_mod('book_publisher_agency_slide_number');
  if($book_publisher_agency_number != ''){
?>
  <?php if( get_theme_mod( 'book_publisher_agency_slider_hide_show', true) == 1 || get_theme_mod( 'book_publisher_agency_resp_slider_hide_show', true) == 1) { ?>
    <section id="slider" class="position-relative">
      <div id="carouselExampleIndicators" class="carousel slide <?php if ( get_theme_mod('book_publisher_agency_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 ($book_publisher_agency_i=1; $book_publisher_agency_i<=$book_publisher_agency_number; $book_publisher_agency_i++) {?>
            <div <?php if($book_publisher_agency_i == 1){echo 'class="carousel-item active"';} else{ echo 'class="carousel-item"';}?>>
              <div class="container">
                <div class="row">
                  <div class="col-xl-6 col-lg-5 col-md-12 col-12 inner_carousel-col">
                    <?php
                      $book_publisher_agency_slider_animation = get_theme_mod('book_publisher_agency_slider_animation', '')
                    ?>
                    <div class="carousel-caption wow <?php echo($book_publisher_agency_slider_animation)?> delay-1000" data-wow-duration="2s">
                      <div class="inner_carousel">
                        <?php if(get_theme_mod('book_publisher_agency_designation_small_text'.$book_publisher_agency_i) != ''){ ?>
                          <span class="slider-small-text"><?php echo esc_html(get_theme_mod('book_publisher_agency_designation_small_text'.$book_publisher_agency_i)); ?></span>
                        <?php } ?>
                        <?php if(get_theme_mod('book_publisher_agency_tagline_title'.$book_publisher_agency_i) != ''){ ?>
                          <h2 class="slide_splice" class=""><?php echo esc_html(get_theme_mod('book_publisher_agency_tagline_title'.$book_publisher_agency_i)); ?></h2>
                        <?php } ?>
                         <?php if(get_theme_mod('book_publisher_agency_designation_text'.$book_publisher_agency_i) != ''){ ?>
                          <p class="slide_desc"><?php echo esc_html(get_theme_mod('book_publisher_agency_designation_text'.$book_publisher_agency_i)); ?></p>
                        <?php } ?>
                        <div class="d-flex gap-4 justify-content-lg-start justify-content-md-start justify-content-center">
                          <?php if ( get_theme_mod('book_publisher_agency_slider_button_label1'.$book_publisher_agency_i,'READ MORE') != '' ) {?>
                            <div class ="slider-btn1">
                              <a href="<?php echo esc_url(get_theme_mod('book_publisher_agency_slider_button_url1'.$book_publisher_agency_i,false));?>"><?php echo esc_html(get_theme_mod('book_publisher_agency_slider_button_label1'.$book_publisher_agency_i,'READ MORE'));?><span class="screen-reader-text"><?php esc_html_e( 'READ MORE','book-publisher-agency');?></span></a>
                            </div>
                          <?php }?>
                          <?php if ( get_theme_mod('book_publisher_agency_banner_button_label2'.$book_publisher_agency_i,'CONTACT US') != '' ) {?>
                            <div class ="slider-btn2">
                              <a href="<?php echo esc_url(get_theme_mod('book_publisher_agency_top_button_url2'.$book_publisher_agency_i,false));?>"><?php echo esc_html(get_theme_mod('book_publisher_agency_banner_button_label2'.$book_publisher_agency_i,'CONTACT US'));?><span class="screen-reader-text"><?php esc_html_e( 'CONTACT US','book-publisher-agency');?></span></a>
                            </div>
                          <?php }?>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-xl-6 col-lg-7 col-12 slider-carousel">
                    <?php if ( get_theme_mod('book_publisher_agency_banner_background_image_sec',true) != "" ) {?>
                      <img class="slider-carousel-img" src="<?php echo esc_url(get_theme_mod('book_publisher_agency_banner_background_image_sec'.$book_publisher_agency_i)); ?>" alt="<?php echo esc_attr(get_theme_mod('book_publisher_agency_slide_title'.$book_publisher_agency_i, true)); ?>" title="#slidecaption<?php echo esc_html($book_publisher_agency_i); ?>">
                    <?php } ?>
                  </div>
                </div>
              </div>
            </div>
          <?php } ?>
        </div>
        <?php if(get_theme_mod('book_publisher_agency_slider_arrow_hide_show', true)){?>
            <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" id="prev" data-bs-slide="prev">
            <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_slider_prev_icon','fas fa-chevron-left')); ?>"></i>
            <span class="screen-reader-text"><?php echo esc_html( __( 'Previous', 'book-publisher-agency' ) ); ?></span>
            </button>
            <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next" id="next">
            <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_slider_next_icon','fas fa-chevron-right')); ?>"></i>
            <span class="screen-reader-text"><?php echo esc_html( __( 'Next', 'book-publisher-agency' ) ); ?></span>
            </button>
          <?php }?>
      </div>
      <div class="clearfix"></div>
    </section>
  <?php }}?>
<?php do_action('book_publisher_agency_after_slider'); ?>

<!-- contact section -->
<div id="contact-section">
  <div class="container container-class"> 
    <?php if(get_theme_mod('book_publisher_agency_contact_text') != ''){ ?>
      <div class="row">
        <div class="col-xl-5 col-lg-4 col-md-5 p-0 text-lg-start text-md-center text-sm-center text-center">
          <div id="contact-details" class="">
            <div class="contact-jhelp-text">
              <?php if(get_theme_mod('book_publisher_agency_contact_text') != ''){ ?>
                <h3 class="contact-help-text"><?php echo esc_html(get_theme_mod('book_publisher_agency_contact_text')); ?></h3>
              <?php } ?>
              <div class="row">
                <div class="col-xl-6 col-lg-6 col-md-12 col-sm-6 col-12 mb-lg-0 mb-md-2 mb-2 text-lg-start text-md-center text-sm-end text-center contact-col-sec1">
                  <?php if(get_theme_mod('book_publisher_agency_phone_icon') != '' || get_theme_mod('book_publisher_agency_phone_number') != ''){ ?>
                    <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_phone_icon','me-2 fa-solid fa-phone')); ?>"></i> <a href="tel:<?php echo esc_attr( get_theme_mod('book_publisher_agency_phone_number','') ); ?>"><?php echo esc_html(get_theme_mod('book_publisher_agency_phone_number',''));?></a>
                  <?php } ?>
                </div>
                <div class="col-xl-6 col-lg-6 col-md-12 col-sm-6 col-12 text-lg-start text-md-center text-sm-start text-center contact-col-sec1">
                  <?php if(get_theme_mod('book_publisher_agency_email_address_icon') != '' || get_theme_mod('book_publisher_agency_email_address') != ''){ ?>
                    <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_email_address_icon','me-2 fa-solid fa-envelope-open-text')); ?>"></i><a href="mailto:<?php echo esc_attr(get_theme_mod('book_publisher_agency_email_address',''));?>"><?php echo esc_html(get_theme_mod('book_publisher_agency_email_address',''));?></a>
                  <?php } ?>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="col-xl-7 col-lg-8 col-md-7 p-0 partners-details-sec">
          <?php if( get_theme_mod('book_publisher_agency_trusted_text') != '' || get_theme_mod('book_publisher_agency_book') != '' || get_theme_mod('book_publisher_agency_creative') != '' || get_theme_mod('book_publisher_agency_lakebook') != '' || get_theme_mod('book_publisher_agency_publish') != ''){ ?>
            <div id="partners-details">
              <div class="row">
                <div class="col-xl-3 col-lg-4 col-md-4 align-self-center">
                  <?php if(get_theme_mod('book_publisher_agency_trusted_text') != ''){ ?>
                    <p class="trusted-help-text"><?php echo esc_html(get_theme_mod('book_publisher_agency_trusted_text')); ?></p>
                  <?php } ?>
                </div>
                <div class="col-xl-9 col-lg-8 col-md-8 align-self-center ">
                  <div class="d-flex justify-content-end text-icon-contact align-self-center">
                    <?php if(get_theme_mod('book_publisher_agency_book_icon') != '' || get_theme_mod('book_publisher_agency_book') != ''){ ?>
                      <div class="d-flex flex-column text-center">
                        <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_book_icon','mb-2 fa-solid fa-book')); ?>"></i>
                        <p class="mb-0"><?php echo esc_html(get_theme_mod('book_publisher_agency_book',''));?></p>
                      </div>
                    <?php } ?>

                    <?php if(get_theme_mod('book_publisher_agency_creative_icon') != '' || get_theme_mod('book_publisher_agency_creative') != ''){ ?>
                      <div class="d-flex flex-column text-center">
                        <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_creative_icon','mb-2 fa-solid fa-book-open-reader')); ?>"></i>
                        <p class="mb-0"><?php echo esc_html(get_theme_mod('book_publisher_agency_creative',''));?></p>
                      </div>
                    <?php } ?>

                    <?php if(get_theme_mod('book_publisher_agency_lakebook_icon') != '' || get_theme_mod('book_publisher_agency_lakebook') != ''){ ?>
                      <div class="d-flex flex-column text-center">
                        <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_lakebook_icon','mb-2 fa-solid fa-book-open')); ?>"></i>
                        <p class="mb-0"><?php echo esc_html(get_theme_mod('book_publisher_agency_lakebook',''));?></p>
                      </div>
                    <?php } ?>

                    <?php if(get_theme_mod('book_publisher_agency_publish_icon') != '' || get_theme_mod('book_publisher_agency_publish') != ''){ ?>
                      <div class="d-flex flex-column text-center">
                        <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_publish_icon','mb-2 fa-solid fa-book-journal-whills')); ?>"></i>
                        <p class="mb-0"><?php echo esc_html(get_theme_mod('book_publisher_agency_publish',''));?></p>
                      </div>
                    <?php } ?>
                  </div>
                </div>
              </div>
            </div>
          <?php } ?>
        </div>
      </div>
    <?php }?>
  </div>
</div>

<!-- Featured Section -->
  <?php if( get_theme_mod('book_publisher_agency_featured_section',true) != ''){ ?>
    <section id="featured-sec" class=" pt-3">
      <div class="container">
        <?php
          $book_publisher_agency_featured_animation = get_theme_mod('book_publisher_agency_featured_animation', '')
        ?>
        <div class="row py-lg-4 py-md-4 py-sm-0 py-2 wow <?php echo($book_publisher_agency_featured_animation)?> delay-1000" data-wow-duration="2s">
          <div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 align-self-center text-lg-start text-md-start text-sm-start text-center">
            <?php if(get_theme_mod('book_publisher_agency_section_title1') != ''){ ?>
              <p class="services-para mb-2"><?php echo esc_html(get_theme_mod('book_publisher_agency_section_title1')) ?></p>
            <?php }?>
            <?php if(get_theme_mod('book_publisher_agency_feature_courses_tagline_title') != '') {?>
              <h4 class="featured-top-heading mb-lg-0 mb-md-0 mb-sm-0 mb-4"><?php echo esc_html(get_theme_mod('book_publisher_agency_feature_courses_tagline_title')) ?></h4>
            <?php }?>
          </div>
          <?php if( get_theme_mod('book_publisher_agency_featured_button_label') != ''){?>
            <div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 text-lg-end align-self-center text-lg-end text-md-end text-sm-end text-center">
              <?php if( get_theme_mod('book_publisher_agency_featured_button_label', true) != '' && get_theme_mod('book_publisher_agency_featured_button_url', true)){ ?>
                <a class="featured-btn" href="<?php echo esc_html(get_theme_mod('book_publisher_agency_featured_button_url')); ?>"><?php echo esc_html(get_theme_mod('book_publisher_agency_featured_button_label')); ?></a>
              <?php } ?>
            </div>
          <?php }?>
        </div>
        <div class="row">
          <?php for ($book_publisher_agency_j=1; $book_publisher_agency_j <= 2; $book_publisher_agency_j++) {?>
            <div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 py-4 align-self-center">
              <?php if ( get_theme_mod('book_publisher_agency_featured_title'.$book_publisher_agency_j) != "" || get_theme_mod('book_publisher_agency_featured_background_image_sec'.$book_publisher_agency_j,true) != "" ) {?>
                <div class="text-lg-end text-md-center text-sm-center text-center">
                  <img class="featured-img" src="<?php echo esc_url(get_theme_mod('book_publisher_agency_featured_background_image_sec'.$book_publisher_agency_j)); ?>" alt="<?php echo esc_attr(get_theme_mod('book_publisher_agency_featured_title'.$book_publisher_agency_j, true)); ?>" title="#slidecaption<?php echo esc_html($book_publisher_agency_j); ?>">
                </div>
               <?php } ?>
               <?php
                $book_publisher_agency_featured_animation1 = get_theme_mod('book_publisher_agency_featured_animation1', '')
              ?>
              <div class="wow <?php echo($book_publisher_agency_featured_animation1)?> delay-1000" data-wow-duration="2s">
                <?php if(get_theme_mod('book_publisher_agency_feature_featured_tagline_title'.$book_publisher_agency_j) != '' ) {?>
                  <div class="featured-content">
                    <?php if ( get_theme_mod('book_publisher_agency_feature_featured_tagline_title'.$book_publisher_agency_j,'') != '' ) {?>
                      <h4>
                        <a href="<?php echo esc_url(get_theme_mod('book_publisher_agency_book_title_url1'.$book_publisher_agency_j,false));?>"><?php echo esc_html(get_theme_mod('book_publisher_agency_feature_featured_tagline_title'.$book_publisher_agency_j,''));?><span class="screen-reader-text"><?php esc_html_e( 'Book Title','book-publisher-agency');?></span></a>
                      </h4>
                    <?php }?>
                    <?php if(get_theme_mod('book_publisher_agency_featured_title1'.$book_publisher_agency_j) != ''){ ?>
                      <p class="featured-para mb-0"><?php echo esc_html(get_theme_mod('book_publisher_agency_featured_title1'.$book_publisher_agency_j)) ?></p>
                    <?php }?>
                  </div>
                <?php }?>
              </div>
            </div>
          <?php }?>
        </div>
      </div>
    </section>
  <?php }?>
<?php do_action( 'book_publisher_agency_after_service' ); ?>

  <div id="content-vw" class="entry-content py-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(); ?>


          