<?php get_header();
$data = \INVENTIVE\Includes\Classes\Common::instance()->data('single-team')->get(); 

?>
<!-- Page Title -->
<section class="page-title">
    <div class="bg-layer" style="background-image: url('<?php echo esc_url( $data->get( 'banner' ) ); ?>');"></div>
    <div class="auto-container">
        <div class="content-box">
            <h1><?php if( $data->get( 'title' ) ) echo wp_kses( $data->get( 'title' ), true ); else( the_title( ) ); ?></h1>
            <ul class="bread-crumb clearfix">
                <?php echo inventive_the_breadcrumb(); ?>
            </ul>
        </div>
    </div>
</section>
<!-- End Page Title -->
<?php while (have_posts()) : the_post(); ?>

<!--
=====================================================
    Team Details
=====================================================
-->
<!-- team-details -->
<section class="team-details">
    <div class="auto-container">
        <div class="row clearfix">
            <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                <?php if(has_post_thumbnail()):?>
                <div class="image-box">
                    <figure class="image image-1"><?php the_post_thumbnail('inventive_370x505'); ?></figure>
                </div>
                <?php endif; ?>
            </div>
            <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                <div class="content-box">
                    <h2><span><?php esc_html_e('Hi, I am', 'inventive');?></span> <?php the_title(); ?></h2>
                    <span class="designation special-font"><?php echo (get_post_meta( get_the_id(), 'designation', true ));?></span>
                    <div class="text">
                        <?php the_content();?>                        
                    </div>
                    <div class="contact-inner">
                        <h4><?php esc_html_e('Contact me', 'inventive');?></h4>
                        <h6><a href="mailto:<?php echo (get_post_meta( get_the_id(), 'team_email', true ));?>"><?php echo (get_post_meta( get_the_id(), 'team_email', true ));?></a></h6>
                        <?php
							$icons = get_post_meta(get_the_id(), 'social_media_tabs', true); if ($icons) : 
						?>
                        <ul class="social-links clearfix">
                        	<?php
								for ( $i=0; $i < count( $icons['select_social_media'] ); $i++ ) {
								$social_icon = ( isset( $icons['select_social_media'][$i] ) && !empty( $icons['select_social_media'][$i] ) ) ? $icons['select_social_media'][$i] : '';
								$social_link = ( isset( $icons['link_social_media'][$i] ) && !empty( $icons['link_social_media'][$i] ) ) ? $icons['link_social_media'][$i] : '';
							?>
							<li><a target="_blank" href="<?php echo esc_url($social_link); ?>"><i class="fab <?php echo esc_attr(str_replace("fa ", " ", $social_icon)); ?>"></i></a></li>
							<?php } ?>
                        </ul>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- team-details end -->

<?php endwhile; ?>

<?php get_footer(); ?>