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

<?php $slide_count = get_theme_mod('cargo_ships_slide_count'); ?>

<section id="home_slider">
	<div class="owl-carousel">
		<?php for ($i=1; $i <= $slide_count; $i++) {
			
			$cargo_ships_slider_image = get_theme_mod('cargo_ships_slider_image'.$i);
			$cargo_ships_slider_short_heading = get_theme_mod('cargo_ships_slider_short_heading'.$i);
			$cargo_ships_slider_heading = get_theme_mod('cargo_ships_slider_heading'.$i);
			$cargo_ships_slider_heading_link = get_theme_mod('cargo_ships_slider_heading_link'.$i); 
			$cargo_ships_slider_content = get_theme_mod('cargo_ships_slider_content'.$i); 
			$cargo_ships_slider_button1_text = get_theme_mod('cargo_ships_slider_button1_text'.$i);
			$cargo_ships_slider_button1_link = get_theme_mod('cargo_ships_slider_button1_link'.$i); 
			$cargo_ships_slider_button2_text = get_theme_mod('cargo_ships_slider_button2_text'.$i); 
			$cargo_ships_slider_button2_link = get_theme_mod('cargo_ships_slider_button2_link'.$i);  ?>

			<div class="slider_main_box">
				<?php if ( ! empty( $cargo_ships_slider_image ) ) : ?>
					<img src="<?php echo esc_url( $cargo_ships_slider_image ); ?>">
					<div class="slider_content_box wow zoomIn" data-wow-duration="2s">
						<?php if ( ! empty( $cargo_ships_slider_short_heading ) ) : ?>
							<h5><?php echo esc_html( $cargo_ships_slider_short_heading ); ?></h5>
						<?php endif; ?>
						<?php if ( ! empty( $cargo_ships_slider_heading_link ) || ! empty( $cargo_ships_slider_heading ) ): ?>
							<h3><a href="<?php echo esc_url( $cargo_ships_slider_heading_link ); ?>"><?php echo esc_html( $cargo_ships_slider_heading ); ?></a></h3>
						<?php endif; ?>
						<?php if ( ! empty( $cargo_ships_slider_content ) ) : ?>
							<p><?php echo esc_html( $cargo_ships_slider_content ); ?></p>
						<?php endif; ?>
						<?php if ( ! empty( $cargo_ships_slider_button1_text ) || ! empty( $cargo_ships_slider_button1_link ) ): ?>
							<a class="slider-btn" href="<?php echo esc_url( $cargo_ships_slider_button1_link ); ?>"><?php echo esc_html( $cargo_ships_slider_button1_text ); ?></a>
						<?php endif; ?>
						<?php if ( ! empty( $cargo_ships_slider_button2_link ) || ! empty( $cargo_ships_slider_button2_text ) ): ?>
							<a class="slider-btn" href="<?php echo esc_url( $cargo_ships_slider_button2_link ); ?>"><?php echo esc_html( $cargo_ships_slider_button2_text ); ?></a>
						<?php endif; ?>
					</div>
				<?php endif; ?>
			</div>
		<?php } ?>
	</div>
</section>

<?php endif; ?>