<?php if ( get_theme_mod('web_hosting_lite_about_us_section_enable', true) == true ) : ?>

  <section id="about" class="pt-5">
    <div class="container">
      <div class="row">
        <?php $web_hosting_lite_about_pages = array();
          $web_hosting_lite_mod = intval( get_theme_mod( 'web_hosting_lite_about_us' ));
          if ( 'page-none-selected' != $web_hosting_lite_mod ) {
            $web_hosting_lite_about_pages[] = $web_hosting_lite_mod;
          }
          if( !empty($web_hosting_lite_about_pages) ) :
            $web_hosting_lite_args = array(
              'post_type' => 'page',
              'post__in' => $web_hosting_lite_about_pages,
              'orderby' => 'post__in'
            );
            $web_hosting_lite_query = new WP_Query( $web_hosting_lite_args );
            if ( $web_hosting_lite_query->have_posts() ) :
              $i = 1;
        ?>
        <?php  while ( $web_hosting_lite_query->have_posts() ) : $web_hosting_lite_query->the_post(); ?>
          <div class="col-lg-6 col-md-6 col-sm-6 align-self-center wow fadeInLeft">
            <?php
            if ( has_post_thumbnail() ) :
              the_post_thumbnail();
            else:
              ?>
              <div class="slider-alternate">
                <img src="<?php echo get_stylesheet_directory_uri() . '/assets/images/banner.png'; ?>">
              </div>
              <?php
            endif;
          ?>
          </div>
          <div class="col-lg-6 col-md-6 col-sm-6 align-self-center wow fadeInRight">
            <?php if ( get_theme_mod('web_hosting_lite_about_us_section_title') ) : ?>
              <h6 class="mt-4 mt-md-0"><?php echo esc_html(get_theme_mod('web_hosting_lite_about_us_section_title')) ?></h6>
            <?php endif; ?>
            <h3 class="my-3"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
            <?php echo wp_trim_words( get_the_content(), get_theme_mod('web_hosting_lite_about_excerpt_number',60) ); ?>
            <div class="counterbox">
              <div class="row">
                <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                  <?php if ( get_theme_mod('web_hosting_lite_counter_number_text1') ) : ?>
                    <h5 class="mt-4"><?php echo esc_html(get_theme_mod('web_hosting_lite_counter_number_text1'));?></h5>
                  <?php endif; ?>
                  <?php if ( get_theme_mod('web_hosting_lite_counter_text1') ) : ?>
                    <p><?php echo esc_html(get_theme_mod('web_hosting_lite_counter_text1'));?></p>
                  <?php endif; ?>
                </div>
                <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                  <?php if ( get_theme_mod('web_hosting_lite_counter_number_text2') ) : ?>
                    <h5 class="mt-4"><?php echo esc_html(get_theme_mod('web_hosting_lite_counter_number_text2'));?></h5>
                  <?php endif; ?>
                  <?php if ( get_theme_mod('web_hosting_lite_counter_text2') ) : ?>
                    <p><?php echo esc_html(get_theme_mod('web_hosting_lite_counter_text2'));?></p>
                  <?php endif; ?>
                </div>
                <div class="col-lg-4 col-md-4 col-sm-4 col-4">
                  <?php if ( get_theme_mod('web_hosting_lite_counter_number_text3') ) : ?>
                    <h5 class="mt-4"><?php echo esc_html(get_theme_mod('web_hosting_lite_counter_number_text3'));?></h5>
                  <?php endif; ?>
                  <?php if ( get_theme_mod('web_hosting_lite_counter_text3') ) : ?>
                    <p><?php echo esc_html(get_theme_mod('web_hosting_lite_counter_text3'));?></p>
                  <?php endif; ?>
                </div>
              </div>
            </div>
            <p class="about-button mt-4">
              <a href="<?php echo esc_url(get_permalink($post->ID)); ?>"><?php esc_html_e('KNOW MORE','web-hosting-lite'); ?></a>
            </p>
          </div>
        <?php $i++; endwhile; ?>
        <?php wp_reset_postdata(); else : ?>
          <div class="no-postfound"></div>
        <?php endif;
        endif;?>
        <div class="clearfix"></div>
      </div>
    </div>
  </section>

<?php endif; ?>
