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

if(get_theme_mod('lz_fitness_premium_facility_section_disable') != 'on' ){ 
	if(get_theme_mod('lz_fitness_premium_facility_section_background') == 'on' ){
		$style = 'background-image: url(\''.get_theme_mod('lz_fitness_facility_bg_image').'\');background-position: top;background-size: cover;';
	}else{
		$style = 'background-color: '.get_theme_mod('lz_fitness_facility_bg_color', '#fff').';';
	}
	?>
	<section id="ht-facility-section" class="ht-section" style="<?php echo $style;?>">
		<div class="lightbox">
			<div class="container">
				<div class=" wow fadeInUp" data-wow-duration="1s">
						<div class="ht-section-title-tagline">
							<?php
							$lz_fitness_facility_page_id = get_theme_mod('lz_fitness_facility_page');
							$lz_fitness_facility_title = get_theme_mod('lz_fitness_facility_title', 'Available Facilities');
							$lz_fitness_facility_subTitle = get_theme_mod('lz_fitness_facility_subTitle', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat');

							$lz_fitness_facility_text = get_theme_mod('lz_fitness_facility_text', '
								<ul>
									<li>List item 1 from bullet point one</li>
									<li>List item 1 from bullet point one this is some text</li>
									<li>List item 1 from bullet point one</li>
									<li>List item 1 from bullet point one this is some text</li>
									<li>List item 1 from bullet point one this is some text this is dummy text</li>
									<li>List item 1 from bullet point one</li>
								</ul>

								');
							?>
							<h2 class="ht-section-title lz-facility-heading text-center"><?php echo !empty($lz_fitness_facility_title)?$lz_fitness_facility_title:'Facilities'; ?></h2>
							<div class="ht-section-tagline lz-team-text">
								<?php echo $lz_fitness_facility_subTitle; ?>
							</div>
							<div class="clearfix"></div>
						</div>

					<div class="facility-box">
								<div class="col-md-6 col-sm-6 col-xs-12">
									<?php 
									$lz_fitness_facility_image = get_theme_mod('lz_fitness_facility_image');
									if(!empty($lz_fitness_facility_image)){
										echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($lz_fitness_facility_image).'" class=" img-rounded"/>';
									}else{
										echo '<img alt="Facilities" src="'.get_template_directory_uri().'/images/facility.jpg" class="facility-img" />';
									}
									?>
								</div>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<div class="ht-content lz-facility-text">
										<?php 
										if(!empty($lz_fitness_facility_text)){
											echo $lz_fitness_facility_text;
										}elseif(!empty($lz_fitness_facility_page_id) && is_numeric($lz_fitness_facility_page_id)){
											$args = array(
												'page_id' => absint($lz_fitness_facility_page_id)
											);
											$query = new WP_Query($args);
											$query->the_post();
											echo lz_fitness_excerpt( get_the_content(), 250);
										}?>
									</div>
									<div class="readmore">
										<a href="<?php echo (!empty($lz_fitness_facility_page_id))?esc_url(get_permalink($lz_fitness_facility_page_id)):'#'; ?>"><?php _e( 'Read More', 'lz-fintess-premium' ); ?></a>
									</div>
								</div>
								<div class="clearfix"></div>
					</div>
				</div>
			</div>
		</div>
	</section>
<?php } 