<?php if(get_theme_mod( 'tromas_about_section_enable')):?>
<section id="about-us" class="about-us section">
	<div class="container">
		<div class="row">
			<div class="col-12">
				<div class="tabs-main center-nav">	
					<div class="nav-main">
						<!-- Tab Menu -->
						<ul class="nav nav-tabs" id="myTab" role="tablist">
							<?php
								for($i=1;$i<=4;$i++):
								$about_title[$i] = get_theme_mod('tromas_about_page_title_'.$i);
								$about_icon[$i] = get_theme_mod( 'tromas_about_icon_title_'.$i );
								$queried_post[$i] = get_post($about_title[$i]);
							?>
							<li class="nav-item"><a class="nav-link <?php ($i==1) ? 'active' : '';?>" href="#tab_<?php echo esc_attr($i);?>" role="tab" data-toggle="tab"><i class="fa <?php echo esc_attr( $about_icon[$i] );?>"></i><span><?php echo esc_html($queried_post[$i]->post_title); ?></span></a></li>
							<?php endfor;?>
						</ul>
					</div>
					<!--/ End Tab Menu -->
					<div class="tab-content">
						<?php
							$i=1;
							$j=1;
			                  	$about_title[1] = get_theme_mod('tromas_about_page_title_1');
			                  	$about_title[2] = get_theme_mod('tromas_about_page_title_2');
			                  	$about_title[3] = get_theme_mod('tromas_about_page_title_3');
			                	$about_title[4] = get_theme_mod('tromas_about_page_title_4');
		                      $args = array (
		                          'post_type' => 'page',
		                          'post_per_page' => 4,
		                          'post__in'         => $about_title,
		                          'orderby'           =>'post__in',
		                        );

		                      $aboutloop = new WP_Query($args);
		                      ?>
						<!-- About Us Tab -->
							<?php if($aboutloop->have_posts()) :  while ($aboutloop->have_posts()) : $aboutloop->the_post(); ?>
						<div class="tab-pane fade <?php if($j==1): echo 'show active'; ?><?php endif; ?>" id="tab_<?php echo esc_attr($j);?>" role="tabpanel">
							<div class="about-inner">
								<div class="row">
									<?php if(has_post_thumbnail()): ?>
									<div class="col-lg-5 col-12">
										<!-- About Image -->
										<div class="single-image">
											<?php the_post_thumbnail( 'tromas-about-thumb' ); ?>
											<!-- Tab Video -->
											<?php if(get_theme_mod( 'tromas_about_vedio_title_'.$j)):?>
											<a href="<?php echo esc_url(get_theme_mod( 'tromas_about_vedio_title_'.$j));?>" class="video-popup mfp-iframe"><i class="fa fa-play"></i></a>
											<?php endif;?>
											<!--/ End tab video -->
										</div>
									</div>
									 <?php endif;?>
									<!-- End About Image -->
								<!-- End About Image -->
										<?php if(has_post_thumbnail()): ?>
										<div class="col-lg-5 col-12">
										<?php else: ?>
										<div class="col-12">
										<?php endif;?>
										<div class="content">
											<h2 class="tab-title"><?php the_title(); ?></h2>
											<?php the_content(); ?>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!--/ End About Us Tab -->
						<?php $j=$j+1;?> 
				          <?php  endwhile;
			              wp_reset_postdata();  
			            endif; ?>
					</div>
				</div>
			</div>
		</div>	
	</div>	
</section>
<!-- End About Us -->
<?php endif;?>