<?php
/**
 *
 * @package Luzuk Premium
 */
if(get_theme_mod('feature_area_disable') != 'on' ){?>
	<?php 
	if( get_theme_mod('feature_areaTpadding',true) ) {
		$feature_areaTpadding = 'padding-top:'.esc_attr(get_theme_mod('feature_areaTpadding')).';';
	}
	if( get_theme_mod('feature_areaBpadding',true) ) {
		$feature_areaBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('feature_areaBpadding')).';';
	}
	if( get_theme_mod('feature_areahighightposition',true) ) {
		$feature_areahighightposition = 'padding-bottom:'.esc_attr(get_theme_mod('feature_areahighightposition')).';';
	}
	
	?>	
	<div class="feature-area text-center" id="feature" style="<?php echo esc_attr($feature_areaTpadding); ?>" "<?php echo esc_attr($feature_areaBpadding); ?>">	
		<div class="container">
		
		<div class="featurebox">
			<div class="feature-box">
				
					<?php
					$showStatic = true;
					for( $i = 1; $i < 4; $i++ ){
						$feature_page_id = get_theme_mod('feature_page_icon'.$i); 
						if(!empty($feature_page_id)){
							$showStatic = false;
							break;
						}
					}
					$feature_page_id = get_theme_mod('feature_page');	
					$feature_subheading = get_theme_mod('feature_subheading', 'Feature');
					$feature_maintitle = get_theme_mod('feature_maintitle', 'WHY CHOOSE US');

					?>
					<div class="container">
				<?php if($feature_maintitle || $feature_subheading){ ?>
				    <div class="row justify-content-center">
				        <div class="section-title-area">
				        	<?php if($feature_subheading){ ?> 
					          <div class="section-subheding">
					            <?php echo ($feature_subheading);  ?>
					          </div>
				          <?php }?>
					          <div class="section-title">
					            <h2><?php echo ($feature_maintitle);  ?></h2>
					          </div>
				        </div>
				    </div>
				<?php }?>
			</div>
					<div class="clearfix"></div>
					<div class="highlight-fs"></div>
						<div class="featurerightbox">
							<div class="feature-post-wrap">
									<?php
									$cols = get_theme_mod('feature_npp_count', 7);
									$cols++;
							// echo '$cold: '.$cols;
									switch($cols){
										case 1:
										$colCls = 'col-md-12 col-sm-12 col-xs-12';
										break;
										case 2:
										$colCls = 'col-md-6 col-sm-6 col-xs-6';
										break;
										case 3:
										case 5:
										case 6:
										case 9:
										$colCls = 'col-md-4 col-sm-6 col-xs-6';
										break;
										default: 
										$colCls = 'col-md-3 col-sm-6 col-xs-6';
										break;
									}
									$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
									?>
									<div class="row feature-post-boxes">
										<?php
										for( $i = 1; $i <= $cols; $i++ ){
											if($showStatic === false){
												$feature_page_title = get_theme_mod('feature_page_title_'.$i, 'Safety & Security');
												$feature_page_id = get_theme_mod('feature_page'.$i);
												$feature_page_icon = get_theme_mod('feature_page_icon'.$i);
												if($feature_page_icon){

													?>
													<div class="<?php echo $colCls;?> feature_boxsection">
												<div class="feature-post wow zoomIn">
												<div class="feature-icon_border">
															<div class="feature-icon">
																<span class="<?php echo $feature_page_icon; ?>"></span>
															</div>
												</div>
															<div class="clearfix"></div>
															<h4 class="fs-title"><?php echo $feature_page_title; ?></h4>

														</div>

												</div>
													<?php
												}	
											}else{?>
											<div class="<?php echo $colCls;?> feature_boxsection">
									
													<div class="feature-post wow zoomIn">
													<div class="feature-icon_border">
														<div class="feature-icon">
															<span class="fa fa-money"></span>
														</div>
													</div>
														<div class="clearfix"></div>
													</div>
													<h4 class="fs-title">Reasonable Price</h4>

											</div>
											<?php }

										}?>
										<div class="clearfix"></div>
									</div>
								</div>
						</div>
				<div class="clearfix"></div>
			</div>
			<div class="clearfix"></div>
		</div>
		</div>
		<div class="clearfix"></div>
	</div>
	<script>
	jQuery.noConflict();
	$(function(){
		function fstitleHeight(){
			var ht = 0;
			$('#feature h4.fs-title').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#feature h4.fs-title').height(ht+'px');
		}
		fstitleHeight();
	});
	$( window ).resize(function(){
		fstitleHeight();
	});
</script>
<script>
	jQuery.noConflict();
	$(function(){
		function featurepostHeight(){
			var ht = 0;
			$('#feature .feature-post').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#feature .feature-post').height(ht+'px');
		}
		featurepostHeight();
	});
	$( window ).resize(function(){
		featurepostHeight();
	});
</script>
<?php }