<?php if(get_theme_mod('buconz_starter_team_enable')) : ?>
	<!-- Start Team -->
	<section class="team-area section">
		<div class="container">
			<div class="row">
				<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1 col-12">
					<div class="section-title default text-center">
						<?php
							$buconz_starter_team_top_title = get_theme_mod('buconz_starter_team_top_title');
							$buconz_starter_team_title = get_theme_mod('buconz_starter_team_title');
							$buconz_starter_team_content = get_theme_mod('buconz_starter_team_content');
						?>
						<?php if(! empty (get_theme_mod('buconz_starter_team_top_title'))) : ?>
						<div class="section-top"><span><?php echo esc_html($buconz_starter_team_top_title); ?></span></div>
						<?php endif ; ?>
						<?php if(! empty (get_theme_mod('buconz_starter_team_title'))) : ?>
						<h1 class="section-heading"><?php echo esc_html($buconz_starter_team_title); ?></h1>
						<div class="section-text"><?php echo esc_html($buconz_starter_team_content); ?></div>
						<?php endif;?>
					</div>
				</div>
			</div>
			<div class="row">
				<?php 
					$k=1; 
						for($i=1;$i<=3;$i++){
							$buconz_starter_team_page[$k]=get_theme_mod('buconz_starter_team_page_'.$i);
							$buconz_starter_team_position[$k]=get_theme_mod('buconz_starter_team_position_'.$i);
							
							$buconz_starter_ts_icon_1[$k]=get_theme_mod('buconz_starter_ts_icon_1_'.$i);
							$buconz_starter_ts_link_1[$k]=get_theme_mod('buconz_starter_ts_link_1_'.$i);
							$buconz_starter_ts_icon_2[$k]=get_theme_mod('buconz_starter_ts_icon_2_'.$i);
							$buconz_starter_ts_link_2[$k]=get_theme_mod('buconz_starter_ts_link_2_'.$i);
							$buconz_starter_ts_icon_3[$k]=get_theme_mod('buconz_starter_ts_icon_3_'.$i);
							$buconz_starter_ts_link_3[$k]=get_theme_mod('buconz_starter_ts_link_3_'.$i);
							$buconz_starter_ts_icon_4[$k]=get_theme_mod('buconz_starter_ts_icon_4_'.$i);
							$buconz_starter_ts_link_4[$k]=get_theme_mod('buconz_starter_ts_link_4_'.$i);
							$k=$k+1;
						}
						
						$args = array (
							'post_type' => 'page',
							'post_per_page' => $i,
							'post__in'      => $buconz_starter_team_page,
							'orderby'           =>'post__in',
						);
						
						$buconz_starter_teamloop = new WP_Query($args);
						$j=1;

						if ($buconz_starter_teamloop->have_posts()) :  while ($buconz_starter_teamloop->have_posts()) : $buconz_starter_teamloop->the_post();
							
				?>
				<div class="col-lg-4 col-md-6 col-12">
					<div class="single-team style-1 ">
						<div class="team-head">
							<?php if( has_post_thumbnail()) : ?>	
							  <?php the_post_thumbnail('buconz-starter-team-thumb'); ?>
							<?php endif; ?>
							<ul class="team-social">
								<?php if (!empty ($buconz_starter_ts_icon_1[$j])) :?>
								<li><a href="<?php echo esc_url($buconz_starter_ts_link_1[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'buconz-starter'); ?>"><i class="fa <?php echo esc_attr($buconz_starter_ts_icon_1[$j]) ;?>"></i></a></li>
								<?php endif; ?>
								<?php if (!empty ($buconz_starter_ts_icon_2[$j])) :?>
								<li><a href="<?php echo esc_url($buconz_starter_ts_link_2[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'buconz-starter'); ?>"><i class="fa <?php echo esc_attr($buconz_starter_ts_icon_2[$j]) ;?>"></i></a></li>
								<?php endif; ?>
								<?php if (!empty ($buconz_starter_ts_icon_3[$j])) :?>
								<li><a href="<?php echo esc_url($buconz_starter_ts_link_3[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'buconz-starter'); ?>"><i class="fa <?php echo esc_attr($buconz_starter_ts_icon_3[$j]) ;?>"></i></a></li>
								<?php endif; ?>
								<?php if (!empty ($buconz_starter_ts_icon_4[$j])) :?>
								<li><a href="<?php echo esc_url($buconz_starter_ts_link_4[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'buconz-starter'); ?>"><i class="fa <?php echo esc_attr($buconz_starter_ts_icon_4[$j]) ;?>"></i></a></li>
								<?php endif; ?>
							</ul>
						</div>
						<div class="t-content">
							<div class="content-inner">
								<h2 class="name"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
								<span class="designation"><?php echo esc_html($buconz_starter_team_position[$j]) ;?></span>
							</div>
						</div>
					</div>
				</div>
				<?php $j=$j+1; 
					endwhile;
					wp_reset_postdata();  
				endif; ?>
			</div>
		</div>
	</section>
	<!--/ End Team -->
<?php endif;?>