<?php
/**
 * Banner Section
 * 
 * @package chemical_laboratory
 */
$chemical_laboratory_slider = get_theme_mod( 'chemical_laboratory_slider_setting',false );
$chemical_laboratory_args = array(
  'post_type' => 'post',
  'post_status' => 'publish',
  'category_name' =>  get_theme_mod('chemical_laboratory_blog_slide_category'),
  'posts_per_page' => 3,
); ?>
<?php if ( $chemical_laboratory_slider ){?>
  <div class="banner">
    <div class="owl-carousel">
      <?php $chemical_laboratory_arr_posts = new WP_Query( $chemical_laboratory_args );
      if ( $chemical_laboratory_arr_posts->have_posts() ) :
        while ( $chemical_laboratory_arr_posts->have_posts() ) :
          $chemical_laboratory_arr_posts->the_post();
          ?>
          <div class="banner_inner_box">
            <div class="banner_img">
              <?php
                if ( has_post_thumbnail() ) :
                  the_post_thumbnail( 'full' );
                else:
                  ?>
                  <img src="<?php echo get_stylesheet_directory_uri() . '/images/slide.png'; ?>">
                  <?php
                endif;
              ?>
            </div>

            <div class="banner_box wow zoomIn" data-wow-duration="2s">
              <div class="container">
                <?php if ( get_theme_mod('chemical_laboratory_slider_text_extra') ) : ?>
                  <p class="slide-extra-head">
                    <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/icon.png">
                    <?php echo esc_html( get_theme_mod('chemical_laboratory_slider_text_extra') ); ?>
                  </p>
                <?php endif; ?>
                <h3 class="my-2"><?php the_title(); ?></h3>
                <p class="mb-0 content"><?php echo wp_trim_words( get_the_content(), 20 ); ?></p>
                <div class="slide-btns">
                  <p class="mt-4">
                    <a href="<?php echo esc_url(get_permalink($post->ID)); ?>"><?php esc_html_e('Our Services','chemical-laboratory'); ?><i class="fas fa-chevron-right"></i></a>
                  </p>               
                </div>
              </div>
            </div>
          </div>
        <?php
      endwhile;
      wp_reset_postdata();
      endif; ?>
    </div>
    <div class="review-box">
      <?php if ( get_theme_mod('chemical_laboratory_right_image_box_3_text') != '' || get_theme_mod('chemical_laboratory_right_image_box_3_count') != '' ) { ?>
          <div class="image-box wow zoomIn" data-wow-duration="2s">
            <div class="review-content">
                    <p class="mb-0 count"><?php echo esc_html(get_theme_mod('chemical_laboratory_right_image_box_3_count', '')); ?></p>
                    <p class="mb-0 mt-0 text"><?php echo esc_html(get_theme_mod('chemical_laboratory_right_image_box_3_text', '')); ?></p>
            </div>
            <div class="image-team">
                <?php if ( get_theme_mod( 'chemical_laboratory_slider_team_image_1' ) ) { ?>
                    <img class="team-img-small-1" src="<?php echo esc_url( get_theme_mod( 'chemical_laboratory_slider_team_image_1' ) ); ?>">
                <?php } ?>
                <?php if ( get_theme_mod( 'chemical_laboratory_slider_team_image_2' ) ) { ?>
                    <img class="team-img-small-2" src="<?php echo esc_url( get_theme_mod( 'chemical_laboratory_slider_team_image_2' ) ); ?>">
                <?php } ?>
                <?php if ( get_theme_mod( 'chemical_laboratory_slider_team_image_3' ) ) { ?>
                    <img class="team-img-small-3" src="<?php echo esc_url( get_theme_mod( 'chemical_laboratory_slider_team_image_3' ) ); ?>">
                <?php } ?>
                <?php if ( get_theme_mod( 'chemical_laboratory_slider_team_image_4' ) ) { ?>
                    <img class="team-img-small-4" src="<?php echo esc_url( get_theme_mod( 'chemical_laboratory_slider_team_image_4' ) ); ?>">
                <?php } ?>
            </div>
          </div>
      <?php } ?>
    </div>
  </div>
<?php } ?>
  