<?php

if(get_theme_mod('feature_area_disable') != 'on' ){	?>
	 	
<div class="feature-area" id="feature" >
		<div class="feaoly"></div>
	<?php
			// width 
			$c_width = get_theme_mod('fea_c_width', 'container-fluid');

		  if ($c_width === 'container') {
			    $c_alignment = 'container';
				} elseif ($c_width === 'container-fluid') {
				    $c_alignment = 'container-fluid';
				} else {
				    $text_alignment = 'container'; // Default to 'container' if the setting is invalid
				}

			// Alignment
			$heading_alignment = get_theme_mod('fea_maintitle_align', 'left');

			if ($heading_alignment === 'left') {
				  $text_alignment = 'left';
				} elseif ($heading_alignment === 'center') {
				    $text_alignment = 'center';
				} elseif ($heading_alignment === 'right') {
				    $text_alignment = 'right';
				} else {
				    $text_alignment = 'right'; // Default to 'left' if the setting is invalid
				}

		//Sub Heading Style
		$subheading_case = get_theme_mod('fea_subtitle_case', 'uppercase');

		if ($subheading_case === 'uppercase') {
				$text_case = 'uppercase';
			} elseif ($subheading_case === 'lowercase') {
			    $text_case = 'lowercase';
			} elseif ($subheading_case === 'capitalize') {
			    $text_case = 'capitalize';
			} else {
			    $text_case = 'capitalize'; // Default to 'left' if the setting is invalid
			}
		 

		//Main Heading Style
		$heading_case = get_theme_mod('fea_maintitle_case', 'capitalize');

		if ($heading_case === 'uppercase') {
				$text_case = 'uppercase';
			} elseif ($heading_case === 'lowercase') {
			    $text_case = 'lowercase';
			} elseif ($heading_case === 'capitalize') {
			    $text_case = 'capitalize';
			} else {
			    $text_case = 'capitalize'; // Default to 'left' if the setting is invalid
			}
		 
?>

	<?php
	  $showStatic = true;
	  for( $i = 1; $i < 9; $i++ ){
	    $feature_page_id = get_theme_mod('feature_page_icon'.$i); 
	    if(!empty($feature_page_id)){
	      $showStatic = false;
	      break;
	    }
	  }
	?>
		
		<div class="<?php echo esc_attr($c_width); ?> cf-ps">
			<?php
				$fea_subtitle = get_theme_mod('fea_subtitle', 'Why we stand out');
				$fea_heading = get_theme_mod('fea_heading', 'Why Choose Us ');
				$fea_txt = get_theme_mod('fea_txt', "We believe in the perfection with structure ");

			?>
			<div class="section-title">
            <div class="titlebx" style="text-align: <?php echo esc_attr($text_alignment); ?>;">
               <h2 style="text-transform: <?php echo esc_attr($subheading_case); ?>;"><?php echo ($fea_subtitle); ?></h2>
              <h3 style="text-transform: <?php echo esc_attr($heading_case); ?>;"><?php echo ($fea_heading); ?></h3>
              <p ><?php echo ($fea_txt); ?></p>
            </div>
        </div>

			
				<div class="feature-single-area">  
						<div class="row mr-0">		
						<?php
						$cols = get_theme_mod('feature_npp_count', 5);
						$cols++;
									// echo '$cold: '.$cols;
						switch($cols){
							case 1:
							$colCls = 'col-lg-12 col-md-12 col-sm-12 col-xs-12';
							break;
							case 2:	
							$colCls = 'col-lg-6 col-md-6 col-sm-6 col-xs-6';
							break;
							case 3:
							case 5:
							case 6:
							case 9:
							case 11:
							case 13:
							case 15:
							$colCls = 'col-lg-4 col-md-6 col-sm-6 col-xs-6';
							break;
							default: 
							$colCls = 'col-lg-3 col-md-6 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');
						?>
							 						
	        	<?php
	          		for( $i = 1; $i <= $cols; $i++ ){
	            	if($showStatic === false){
								$feature_page_id = get_theme_mod('feature_page'.$i);
								$url = get_theme_mod('luzuk_features_page_url_'.$i, '#');	
								$feature_page_title = get_theme_mod('feature_page_title'.$i, 'Precision in Design');
								$feature_page_txt = get_theme_mod('feature_page_txt'.$i, 'Our team’s expertise ensures professionalism and reliability, making your real estate journey seamless');
								$feature_title_img = get_theme_mod('feature_title_img'.$i); 
								$feature_page_icon = get_theme_mod('feature_page_icon'.$i);
								$feature_page_icon = get_theme_mod('feature_page_icon'.$i);
								if($feature_page_icon){
	              
	        	?>		
	          	<div class="<?php echo $colCls;?> f-bx">
	              	<div class="fea-single feasingle">
	            				<div class="fea-icon">
			            				<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
			                  			<span class="<?php echo $feature_page_icon; ?>"></span> 
			                  	</a>
	                		</div> 
		                	<div class="fea-conbx">
				                	<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
			                			<div class="fea-title inner-area-title">
			                					<?php echo $feature_page_title; ?>
			                			</div>
			                		</a>
			                		<p><?php echo $feature_page_txt; ?></p>
			                		
		                	</div> 
		                	<div class="clearfix"></div>
	            		</div>
	          	</div>
							<?php   
									}               
							}else{?>

							<div class="<?php echo $colCls;?> f-bx">
									<div class="fea-single feasingle">
											<div class="fea-icon">
													<a href="#"> <span class="fa fa-pencil" aria-hidden="true"></span> </a>
											</div>
											<div class="fea-conbx">
													<a href="#"><div class="fea-title inner-area-title">Precision in Design </div></a>
													<p>Our team’s expertise ensures professionalism and reliability, making your real estate journey seamless</p>
				
											</div>
											<div class="clearfix"></div>
									</div>
									
									</div>
				            <?php }
				          }?>
					    <div class="clearfix"></div>
					</div>
				</div>
		</div>
</div> 
<?php } 