<?php
/**
 *
 */
if(get_theme_mod('luzuk_featured_section_disable') != 'on' ){?>
<section id="featured-post-section" class="ht-section">
	<div class="lightbox">
		<div class="col-md-10 col-md-offset-1">
			<div class="row">
				<?php
				$showStatic = true;
				for( $i = 1; $i < 4; $i++ ){
					$luzuk_featured_page_id = get_theme_mod('luzuk_featured_page_icon'.$i); 
					if(!empty($luzuk_featured_page_id)){
						$showStatic = false;
						break;
					}
				}
				$luzuk_featured_title = get_theme_mod('luzuk_featured_title', 'OUR SERVICES');
				$luzuk_featured_sub_title = get_theme_mod('luzuk_featured_sub_title', 'CHOOSE YOUR DESIRED COURSE');
				?>

				<div class="ht-section-title-tagline">
					<h2 class="ht-section-title lz-featured-heading">
						<?php
						if(!empty($luzuk_featured_title))	{
							echo esc_html($luzuk_featured_title);
						} ?>
					</h2>
					<div class="ht-section-tagline lz-featured-text feature-border">
						<?php if($luzuk_featured_sub_title){
							echo esc_html($luzuk_featured_sub_title);
						}?>
					</div>
				</div>
						
				<div class="col-md-6 padding0">
						

						<div class="featured-post-wrap">
							<?php
							$cols = get_theme_mod('luzuk_featured_npp_count', 3);
							$cols++;
							// echo '$cold: '.$cols;
							switch($cols){
								case 1:
								$colCls = 'col-md-12 col-sm-12';
								break;
								case 2:
								$colCls = 'col-md-12 col-sm-12';
								break;

								case 4:
								$colCls = 'col-md-12 col-sm-12';
								break;

								default: 
								$colCls = 'col-md-12 col-sm-12';
								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){
					$luzuk_featured_page_title = get_theme_mod('luzuk_featured_page_title_'.$i, 'Online Training');
					$luzuk_featured_page_description = get_theme_mod('luzuk_featured_page_description_'.$i, 'You can learn anything You can learn anything You can learn anything You can learn anything');
					$luzuk_featured_page_id = get_theme_mod('luzuk_featured_page'.$i);
					$luzuk_featured_page_icon = get_theme_mod('luzuk_featured_page_icon'.$i);
					if($luzuk_featured_page_icon){
					
							?>
							
													<div class="<?php echo $colCls;?>">
														<div class="featured-post wow fadeInUp">
															<div class="col-md-2">
															<div class="featured-icon">
																<span class="<?php echo $luzuk_featured_page_icon; ?>"></span>
															</div>
															</div>
															<div class="col-md-10">
															<h5><?php echo $luzuk_featured_page_title; ?></h5>
															<div class="featured-excerpt">
																<?php echo $luzuk_featured_page_description; ?>
															</div>
															</div>
															<div class="clearfix"></div>
														</div>
													</div>
													
													<?php
					}	
					}else{?>
										<div class="<?php echo $colCls;?>">
											<div class="featured-post wow fadeInUp">
												<div class="col-md-2">
												<div class="featured-icon"><span class="fa fa-bell"></span></div>
												</div>
												<div class="col-md-10">
												<h5>Online Training</h5>
												<div class="featured-excerpt">
													You can learn anything You can learn anything You can learn anything You can learn anything
												</div>
												</div>
												<div class="clearfix"></div>
											</div>
										</div>
									<?php }

								}?>
								<div class="clearfix"></div>
							</div>
						</div>
					<div class="clearfix"></div>
				</div>
				
				<div class="col-md-6 left-img padding0"> 
				<?php 
				$luzuk_featured_image = get_theme_mod('luzuk_featured_image'); 
				if(!empty($luzuk_featured_image)){ echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($luzuk_featured_image).'" class="img-responsive"/>'; }
				else{ 
					echo '<img alt="featured" src="'.get_template_directory_uri().'/images/feature-img.png" class="baseline img-responsive img-right" />'; 
					} 
				?> 
				</div>				
				
			</div>
			<div class="clearfix"></div>
		</div>
		<div class="clearfix"></div>
	</div>
</section>
<?php }