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

get_header(); 

$diet_consultant_banner_backgroud_image = get_theme_mod('diet_consultant_banner_background_image');
?>

<main id="skip-content">
  <?php if(get_theme_mod('diet_consultant_banner_main_heading') != '' || get_theme_mod('diet_consultant_banner_button_text') != '' || get_theme_mod('diet_consultant_banner_button_url') != '' || get_theme_mod('diet_consultant_banner_main_text') != '' || get_theme_mod('diet_consultant_banner_left_text') != '' || get_theme_mod('diet_consultant_banner_small_image') != '' || get_theme_mod('diet_consultant_banner_center_image') != '' || get_theme_mod('diet_consultant_banner_right_heading') != '' || get_theme_mod('diet_consultant_banner_right_text') != '' ){ ?>
    <section id="top-slider" class="py-5" style="background-image: url( <?php echo esc_url( $diet_consultant_banner_backgroud_image ); ?> ) ">
      <div class="container">
        <div class="heading-box text-center mb-4">
          <?php if(get_theme_mod('diet_consultant_banner_main_heading') != ''){ ?>
            <h2 class="main-heading mb-3"><?php echo esc_html(get_theme_mod('diet_consultant_banner_main_heading')); ?></h2>
          <?php }?>
          <?php if(get_theme_mod('diet_consultant_banner_button_url') != '' || get_theme_mod('diet_consultant_banner_button_text') != ''){ ?>
            <div class="slide-btn">
              <a href="<?php echo esc_html(get_theme_mod('diet_consultant_banner_button_url')); ?>"><?php echo esc_html(get_theme_mod('diet_consultant_banner_button_text')); ?></a>
            </div>
          <?php }?>
        </div>
        <div class="slier-main-box row">
          <div class="col-lg-4 col-md-4 col-sm-12 col-12 text-end align-self-center slide-content">
            <?php if(get_theme_mod('diet_consultant_banner_main_text') != ''){ ?>
              <h3 class="main-text text-lg-end mb-5"><?php echo esc_html(get_theme_mod('diet_consultant_banner_main_text')); ?></h3>
            <?php }?>
            <?php if(get_theme_mod('diet_consultant_banner_left_text') != '' || get_theme_mod('diet_consultant_banner_small_image') != ''){ ?>
              <div class="img-text-box">
                <?php if(get_theme_mod('diet_consultant_banner_left_text') != ''){ ?>
                  <p class="img-text-content m-0"><?php echo esc_html(get_theme_mod('diet_consultant_banner_left_text')); ?></p>
                <?php }?>
                <?php if(get_theme_mod('diet_consultant_banner_small_image') != ''){ ?>
                  <img src="<?php echo esc_url( get_theme_mod( 'diet_consultant_banner_small_image' )); ?>" alt="Left Box Image">
                <?php }?>
              </div>
            <?php }?>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-12 col-12 banner-center-img">
            <?php if(get_theme_mod('diet_consultant_banner_center_image') != ''){ ?>
              <img src="<?php echo esc_url( get_theme_mod( 'diet_consultant_banner_center_image' )); ?>" alt="Banner Left Image">
            <?php }?>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-12 col-12 banner-right">
            <?php if(get_theme_mod('diet_consultant_banner_right_heading') != '' || get_theme_mod('diet_consultant_banner_right_text') != ''){ ?>
              <div class="right-text-box">
                <?php if(get_theme_mod('diet_consultant_banner_right_heading') != ''){ ?>
                <h5 class="right-text-heading "><?php echo esc_html(get_theme_mod('diet_consultant_banner_right_heading')); ?></h5>
                <?php }?>
                <?php if(get_theme_mod('diet_consultant_banner_right_text') != ''){ ?>
                <p class="right-text-content m-0"><?php echo esc_html(get_theme_mod('diet_consultant_banner_right_text')); ?></p>
                <?php }?>
              </div>
            <?php }?>
          </div> 
        </div>
      </div>
    </section>
  <?php }?>
  <section class="featured py-5">
    <div class="container">
      <div class="row">
        <div class="col-lg-6 col-md-6 col-sm-12 col-12 about-image align-self-center">
          <div class="row">
            <div class="col-lg-7 col-md-7 col-sm-12 col-12 about-left-image1">
              <?php if(get_theme_mod('diet_consultant_about_us_image1') != ''){ ?>
                <img src="<?php echo esc_url( get_theme_mod( 'diet_consultant_about_us_image1' )); ?>">
              <?php }?>
              <?php if(get_theme_mod('diet_consultant_about_us_image_heading') != ''){ ?>
                <h4 class="image-heading mt-4"><?php echo esc_html(get_theme_mod('diet_consultant_about_us_image_heading')); ?></h4>
              <?php }?>
            </div>
            <div class="col-lg-5 col-md-5 col-sm-12 col-12 about-left-image2">
              <?php if(get_theme_mod('diet_consultant_about_us_image2') != ''){ ?>
                <img src="<?php echo esc_url( get_theme_mod( 'diet_consultant_about_us_image2' )); ?>">
              <?php }?>
            </div>
          </div>
        </div>
        <div class="col-lg-6 col-md-6 col-sm-6 col-12 align-self-center">
          <div class="ser-heading text-start mb-4">
            <?php if(get_theme_mod('diet_consultant_about_us_heading') != ''){ ?>
              <h3 class="main-heading "><?php echo esc_html(get_theme_mod('diet_consultant_about_us_heading')); ?></h3>
            <?php }?>
            <?php if(get_theme_mod('diet_consultant_about_us_content') != ''){ ?>
              <p class="main-heading mb-4"><?php echo esc_html(get_theme_mod('diet_consultant_about_us_content')); ?></p>
            <?php }?>
            <div class="row">
              <div class="col-lg-5 col-md-5 col-sm-12 col-12 align-self-center">
                <?php if(get_theme_mod('diet_consultant_about_us_right_heading') != '' || get_theme_mod('diet_consultant_about_us_right_text') != ''){ ?>
                  <div class="about-text-box">
                    <?php if(get_theme_mod('diet_consultant_about_us_right_heading') != ''){ ?>
                    <h5 class="about-text-heading "><?php echo esc_html(get_theme_mod('diet_consultant_about_us_right_heading')); ?></h5>
                    <?php }?>
                    <?php if(get_theme_mod('diet_consultant_about_us_right_text') != ''){ ?>
                    <p class="right-text-content m-0"><?php echo esc_html(get_theme_mod('diet_consultant_about_us_right_text')); ?> safee</p>
                    <?php }?>
                  </div>
                <?php }?>
              </div>
              <div class="col-lg-7 col-md-7 col-sm-112 col-12 align-self-center">
                <div class="row">
                  <?php for ($i=0; $i <6 ; $i++) { ?>
                    <?php if(get_theme_mod('diet_consultant_about_us_list_heading'.$i) != ''){ ?>
                      <div class="col-lg-6 col-md-6 col-sm-6 col-6">
                        <p class="tick-box"><i class="fas fa-check"></i><?php echo esc_html(get_theme_mod('diet_consultant_about_us_list_heading' .$i)); ?></p>
                      </div>
                    <?php } ?>
                  <?php } ?>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <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(); ?>