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

<?php $elearning_school_slide_count = get_theme_mod('elearning_school_slide_count');
$elearning_school_slider_heading_single_word = get_theme_mod('elearning_school_slider_heading_single_word');
?>
<section id="home_slider" style="background-image: url('<?php echo esc_url(get_template_directory_uri()); ?>/images/slider-bg.png');">
	<?php if (! empty( $elearning_school_slider_heading_single_word ) ): ?>
		<h3 class="single-word-heading"><?php echo esc_html( $elearning_school_slider_heading_single_word ); ?></h3>
	<?php endif; ?>
	<div class="container">
		<div class="owl-carousel slider-box">
			<?php for ($i=1; $i <= $elearning_school_slide_count; $i++) {
				$elearning_school_slider_image_1 = get_theme_mod('elearning_school_slider_image_1'.$i);
				$elearning_school_slider_image_2 = get_theme_mod('elearning_school_slider_image_2'.$i);
				$elearning_school_slider_image_video_url = get_theme_mod('elearning_school_slider_image_video_url'.$i);
				$elearning_school_slider_image_video_url_3 = get_theme_mod('elearning_school_slider_image_video_url_3'.$i);
				$elearning_school_slider_image_3 = get_theme_mod('elearning_school_slider_image_3'.$i);
				$elearning_school_slider_image_4 = get_theme_mod('elearning_school_slider_image_4'.$i);
				$elearning_school_slider_short_heading = get_theme_mod('elearning_school_slider_short_heading'.$i);
				$elearning_school_slider_main_heading = get_theme_mod('elearning_school_slider_main_heading'.$i);
				$elearning_school_slider_content = get_theme_mod('elearning_school_slider_content'.$i);
				$elearning_school_slider_button_link = get_theme_mod('elearning_school_slider_button_link'.$i); 
				$elearning_school_slider_button_text = get_theme_mod('elearning_school_slider_button_text'.$i);
				$elearning_school_slider_testimonial_heading = get_theme_mod('elearning_school_slider_testimonial_heading'); 
				$elearning_school_slider_testimonial_content = get_theme_mod('elearning_school_slider_testimonial_content');
				$elearning_school_slider_testimonial_image_1 = get_theme_mod('elearning_school_slider_testimonial_image_1');
				$elearning_school_slider_testimonial_image_2 = get_theme_mod('elearning_school_slider_testimonial_image_2');
				$elearning_school_slider_testimonial_image_3 = get_theme_mod('elearning_school_slider_testimonial_image_3');
				?>
				<div class="slider_main_box">
					<div class="row">
						<div class="col-lg-8 col-md-7 align-self-center">
							<div class="slider_content_box wow fadeInDown" data-wow-duration="2s">
								<div class="slider_heading">
									<?php if (! empty( $elearning_school_slider_main_heading ) ): ?>
										<h2><?php echo esc_html( $elearning_school_slider_main_heading ); ?></h2>
									<?php endif; ?>
									<?php if ( ! empty( $elearning_school_slider_content ) ) : ?>
										<p><?php echo esc_html( $elearning_school_slider_content ); ?></p>
									<?php endif; ?>
									<div class="slider_button mt-4 mb-5">
										<?php if ( ! empty( $elearning_school_slider_button_link ) || ! empty( $elearning_school_slider_button_text ) ): ?>
											<a class="button1" href="<?php echo esc_url( $elearning_school_slider_button_link ); ?>"><?php echo esc_html( $elearning_school_slider_button_text ); ?><i class="fas fa-arrow-right ms-2"></i></a>
										<?php endif; ?>
									</div>
								</div>
							</div>
							<div class="testimonial-box wow zoomIn" data-wow-duration="2s">
								<div class="row">
									<div class="col-lg-6 col-md-6 testimonial-image align-self-center">
										<?php if ( ! empty( $elearning_school_slider_testimonial_image_1) ) : ?>
											<img src="<?php echo esc_url( $elearning_school_slider_testimonial_image_1 ); ?>">
										<?php endif; ?>
										<?php if ( ! empty( $elearning_school_slider_testimonial_image_2 ) ) : ?>
											<img class="testi-image-2" src="<?php echo esc_url( $elearning_school_slider_testimonial_image_2 ); ?>">
										<?php endif; ?>
										<?php if ( ! empty( $elearning_school_slider_testimonial_image_3 ) ) : ?>
											<img class="testi-image-3" src="<?php echo esc_url( $elearning_school_slider_testimonial_image_3 ); ?>">
										<?php endif; ?>
									</div>
									<div class="col-lg-6 col-md-6 align-self-center testimonial-content">
										<?php if (! empty( $elearning_school_slider_testimonial_heading ) ): ?>
											<h2><?php echo esc_html( $elearning_school_slider_testimonial_heading ); ?></h2>
										<?php endif; ?>
										<?php if ( ! empty( $elearning_school_slider_testimonial_content ) ) : ?>
											<p><?php echo esc_html( $elearning_school_slider_testimonial_content ); ?></p>
										<?php endif; ?>
									</div>
								</div>
									
							</div>
						</div>
						<div class="col-lg-4 col-md-5 align-self-center">
							<div class="slider-image-main wow fadeInUp" data-wow-duration="2s">
								<div class="image-box-1">
									<div class="slider-image-1">
										<?php if ( ! empty( $elearning_school_slider_image_1) ) : ?>
											<img src="<?php echo esc_url( $elearning_school_slider_image_1 ); ?>">
										<?php endif; ?>
									</div>
									<div class=" slider-image-2">
										<?php if ( ! empty( $elearning_school_slider_image_2 ) ) : ?>
											<img src="<?php echo esc_url( $elearning_school_slider_image_2 ); ?>">
											<?php if ( ! empty( $elearning_school_slider_image_video_url ) ) : ?>
												<span class="video-link"><a href="<?php echo esc_url( $elearning_school_slider_image_video_url ); ?>"><i class="fas fa-play"></i></a></span>
											<?php endif; ?>
										<?php endif; ?>
									</div>
								</div>
								<div class="image-box-2">
									<div class="slider-image-3">
										<?php if ( ! empty( $elearning_school_slider_image_3 ) ) : ?>
											<img src="<?php echo esc_url( $elearning_school_slider_image_3 ); ?>">
											<?php if ( ! empty( $elearning_school_slider_image_video_url_3 ) ) : ?>
												<span class="video-link"><a href="<?php echo esc_url( $elearning_school_slider_image_video_url_3 ); ?>"><i class="fas fa-play"></i></a></span>
											<?php endif; ?>
										<?php endif; ?>
									</div>
									<div class=" slider-image-4">
										<?php if ( ! empty( $elearning_school_slider_image_4 ) ) : ?>
											<img src="<?php echo esc_url( $elearning_school_slider_image_4 ); ?>">
										<?php endif; ?>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			<?php } ?>
		</div>
	</div>
</section>

<?php endif; ?>