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

<?php $medical_coach_features_count = get_theme_mod('medical_coach_features_count');
$medical_coach_features_title = get_theme_mod('medical_coach_features_title');
$medical_coach_features_sub_title = get_theme_mod('medical_coach_features_sub_title'); ?>

<section id="home_features" class="wow fadeInDown" data-wow-duration="2s">
	<div class="container">
		<?php if ( ! empty( $medical_coach_features_title ) ): ?>
			<h4><?php echo esc_html( $medical_coach_features_title ); ?></h4>
			<hr class="main-heading">
		<?php endif; ?>
		<?php if ( ! empty( $medical_coach_features_sub_title ) ): ?>
			<h3><?php echo esc_html( $medical_coach_features_sub_title ); ?></h3>
		<?php endif; ?>
		<div class="row m-0">
			<?php for ($i=1; $i <= $medical_coach_features_count; $i++) {
				$medical_coach_features_icon = get_theme_mod('medical_coach_features_icon'.$i);
				$medical_coach_features_heading = get_theme_mod('medical_coach_features_heading'.$i);
				$medical_coach_features_content = get_theme_mod('medical_coach_features_content'.$i);
				$medical_coach_features_btn_text = get_theme_mod('medical_coach_features_btn_text'.$i);
				$medical_coach_features_btn_link = get_theme_mod('medical_coach_features_btn_link'.$i);
				?>
				
				<div class="col-lg-3 col-md-6">
					<?php if ( ! empty( $medical_coach_features_icon ) || ! empty( $medical_coach_features_heading ) || ! empty( $medical_coach_features_content ) || ! empty( $medical_coach_features_btn_link ) || ! empty( $medical_coach_features_btn_text ) ) : ?>
						<div class="features_main_box">
							<?php if ( ! empty( $medical_coach_features_icon ) ) : ?>
								<i class="<?php echo esc_attr( $medical_coach_features_icon ); ?>" aria-hidden="true"></i>
							<?php endif; ?>
							<?php if ( ! empty( $medical_coach_features_heading ) ): ?>
								<h5><?php echo esc_html( $medical_coach_features_heading ); ?></h5>
								<hr>
							<?php endif; ?>
							<?php if ( ! empty( $medical_coach_features_content ) ): ?>
								<p><?php echo esc_html( $medical_coach_features_content ); ?></p>
							<?php endif; ?>
							<?php if ( ! empty( $medical_coach_features_btn_link ) || ! empty( $medical_coach_features_btn_text ) ): ?>
								<a href="<?php echo esc_url( $medical_coach_features_btn_link ); ?>"><?php echo esc_html( $medical_coach_features_btn_text ); ?></a>
							<?php endif; ?>
						</div>
					<?php endif; ?>
				</div>
			<?php } ?>
		</div>
	</div>
</section>

<?php endif; ?>