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

<?php $medical_coach_slide_count = get_theme_mod('medical_coach_slide_count'); ?>

<section id="home_slider">
	<div class="owl-carousel">
		<?php for ($i=1; $i <= $medical_coach_slide_count; $i++) {
			
			$medical_coach_slider_image = get_theme_mod('medical_coach_slider_image'.$i);
			$medical_coach_slider_short_heading = get_theme_mod('medical_coach_slider_short_heading'.$i);
			$medical_coach_slider_heading = get_theme_mod('medical_coach_slider_heading'.$i);

			$medical_coach_button_text = get_theme_mod('medical_coach_button_text'.$i);
			$medical_coach_button_link = get_theme_mod('medical_coach_button_link'.$i);?>

			<div class="slider_main_box">
				<?php if ( ! empty( $medical_coach_slider_image ) ) : ?>
					<img src="<?php echo esc_url( $medical_coach_slider_image ); ?>">
					<div class="slider_content_box wow zoomIn" data-wow-duration="2s">
						<?php if ( ! empty( $medical_coach_slider_short_heading ) ) : ?>
							<h5><?php echo esc_html( $medical_coach_slider_short_heading ); ?></h5>
						<?php endif; ?>
						<?php if ( ! empty( $medical_coach_slider_heading ) ): ?>
							<h3><?php echo esc_html( $medical_coach_slider_heading ); ?></h3>
						<?php endif; ?>
						<?php if ( ! empty( $medical_coach_button_text ) || ! empty( $medical_coach_button_link ) ): ?>
							<a class="slider-btn" href="<?php echo esc_url( $medical_coach_button_link ); ?>"><?php echo esc_html( $medical_coach_button_text ); ?></a>
						<?php endif; ?>
					</div>
				<?php endif; ?>
			</div>
		<?php } ?>
	</div>
</section>

<?php endif; ?>