<?php
/**
 *
 * @package LZ Fitness Premium
 */

if(get_theme_mod('lz_fitness_premium_aboutus_section_disable') != 'on' ){
	if(get_theme_mod('lz_fitness_premium_aboutus_section_background') == 'on' ){
		$style = 'background-image: url(\''.get_theme_mod('lz_fitness_about_bg_image').'\');background-position: top;background-size: cover;';
	}else{
		$style = 'background-color: '.get_theme_mod('lz_fitness_about_bg_color').';';
	}
	?>
	<section id="ht-about-us-section" class="ht-section"  style="<?php echo $style;?>"> 
		<div class="lightbox">
			<div class="wow fadeInUp" data-wow-duration="1s">
				<?php
				$showStatic = true;
				for( $i = 1; $i < 3; $i++ ){
					$url = get_theme_mod('lz_fitness_about_page_url_'.$i, '#');
					$link = get_theme_mod('lz_fitness_about_page_link'.$i);
					$lz_fitness_about_page_id = get_theme_mod('lz_fitness_about_page_icon'.$i); 
					if(!empty($lz_fitness_about_page_id)){
						$showStatic = false;
						break;
					}
				}
				$lz_fitness_aboutus_title = get_theme_mod('lz_fitness_aboutus_title', 'WHAT WE CAN DO FOR YOU');
				$lz_fitness_about_sub_title = get_theme_mod('lz_fitness_about_sub_title', 'About Us');
				?>
				<div class="row aboutbox">
						<div class="ht-section-title-tagline">
							<div class="lz-about-subheading">
							<?php if($lz_fitness_about_sub_title){
									echo esc_html($lz_fitness_about_sub_title);
								}?>
							</div>
							<h2 class="ht-section-title lz-about-heading">
								<?php
								if(!empty($lz_fitness_aboutus_title))	{
									echo esc_html($lz_fitness_aboutus_title);
								} ?>
							</h2> 
							
						</div>
						
						</div>
					<div class="clearfix"></div>
				</div>
		<div class="col-md-10 col-md-offset-1">
			
				<div class="row lowerabout-box">
						<div class="about-post-wrap">
							<?php
							$cols = get_theme_mod('lz_fitness_about_npp_count', 2);
							$cols++;
							// echo '$cold: '.$cols;
							switch($cols){
								case 1:
								$colCls = 'col-md-12 col-sm-12';
								break;
								case 2:
								$colCls = 'col-md-6 col-sm-6';
								break;

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

								default: 
								$colCls = 'col-md-4 col-sm-6';
								break;
							}
							$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
							?>
							<div class="row about-post-boxes">
								<?php
								for( $i = 1; $i <= $cols; $i++ ){
									if($showStatic === false){
										$url = get_theme_mod('lz_fitness_about_page_url_'.$i, '#');
										
										$lz_fitness_about_page_title = get_theme_mod('lz_fitness_about_page_title_'.$i, 'Sample title');
										$lz_fitness_about_page_description = get_theme_mod('lz_fitness_about_page_description_'.$i, 'Lorem ipsum dolor amet, constetuer adipiscing elit, sed diam...');
										$lz_fitness_about_page_id = get_theme_mod('lz_fitness_about_page'.$i); 
										$lz_fitness_about_page_icon = get_theme_mod('lz_fitness_about_page_icon'.$i);
										if($lz_fitness_about_page_icon){
											
													?>
													<div class="<?php echo $colCls;?>">
														<div class="about-post text-center">
															<div class="about-icon">
																<span class="<?php echo $lz_fitness_about_page_icon; ?>"></span>
															</div>
															<h5><?php echo $lz_fitness_about_page_title; ?></h5>
															<div class="about-excerpt">
																<p>
														<?php echo $lz_fitness_about_page_description; ?>
																</p>
															</div>
															<?php
										$lz_fitness_about_page_id = get_theme_mod('lz_fitness_about_page');
										$lz_fitness_about_page_button_title = get_theme_mod('lz_fitness_about_page_button_title_'.$i, 'Read More');
										?>
										<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
															<div class="about-link">
																<!-- <a href="<?php// echo esc_url(get_permalink()); ?>"><?php// _e( 'Read More', 'total' ); ?></a> -->
																<button> <?php echo $lz_fitness_about_page_button_title; ?></button>
															</div>
														</a>
															<div class="clearfix"></div>
														</div>
													</div>
													<?php
												
										}
									}else{?>
										<div class="<?php echo $colCls;?>">
											<div class="about-post text-center">
												<div class="about-icon">
													<span class="fa fa-calendar-o"></span>
												</div>
												<div class="details">
													<h5>Planning</h5>
													<div class="about-excerpt">
														<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book Lorem Ipsum has been.</p>
													</div>	
													<a href="#">											
													<div class="about-link">
														<!-- <a href="#"><? //php _e( 'Read More', 'lz-fitness' ); ?></a> -->
														<button>Read More</button>
													</div>
												</a>
											</div>
													<div class="clearfix"></div>												
											</div>
										</div>
									<?php }

								}?>
								<div class="clearfix"></div>
							</div>
						</div>
					<div class="clearfix"></div>
				</div>
			</div>
			<div class="clearfix"></div>
		</div>
	
	</section>
<?php } 