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

<?php if ( $data->get( 'enable_banner' ) ) : ?>
	<?php do_action( 'inventive_banner', $data );?>
<?php else:?>
<!-- Page Title -->
<section class="page-title">
    <?php if( $data->get( 'banner' ) ){?><div class="bg-layer" style="background-image: url('<?php echo esc_url( $data->get( 'banner' ) ); ?>');"></div><?php };?>
    <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 endif;?>

<?php while (have_posts()) : the_post(); 
?>

<!--
=====================================================
    Service Details
=====================================================
-->
<!-- Service Area Start -->
<section class="project_details pt_100 pb_100">
	<div class="auto-container">
    	<?php $project_image = get_post_meta( get_the_id(), 'feature_image', true ); ?>
        <?php if($project_image['id']){?>    
		<div class="project_details_image mb_70">            
			<img src="<?php echo wp_get_attachment_url($project_image['id']);?>" alt="<?php esc_attr_e('Awesome Image', 'inventive'); ?>">
        </div>
        <?php } ?>
        <div class="row">
            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="section_title">
                    <h3><?php echo (get_post_meta( get_the_id(), 'project_side_info_title', true ));?></h3>
                </div>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="project_info_box">
                    <?php
						$icons = get_post_meta(get_the_id(), 'info_tabs2', true); if ($icons) : 
					?>
					<?php 
						for ( $i=0; $i < count( $icons['info_title2'] ); $i++ ) {
						$info_title2 = ( isset( $icons['info_title2'][$i] ) && !empty( $icons['info_title2'][$i] ) ) ? $icons['info_title2'][$i] : '';
						$info_text2 = ( isset( $icons['info_text2'][$i] ) && !empty( $icons['info_text2'][$i] ) ) ? $icons['info_text2'][$i] : '';
					?>
                    <div class="project_info mb_20">
						<h6 class="info_title"><?php echo wp_kses($info_title2, true); ?></h6>
                        <p class="info_text"><?php echo wp_kses($info_text2, true); ?></p>
                    </div>
					<?php } ?>
                    <?php endif; ?>
					<?php
                        $icons = get_post_meta(get_the_id(), 'project_social_media_tabs', true); if ($icons) : 
                    ?>
                    <div class="project_info mb_20">
                        <h6 class="info_title"><?php echo (get_post_meta( get_the_id(), 'project_social_title', true ));?></h6>
                        <ul class="shear_social_icon">
                            <?php
								for ( $i=0; $i < count( $icons['select_social_media2'] ); $i++ ) {
								$social_icon = ( isset( $icons['select_social_media2'][$i] ) && !empty( $icons['select_social_media2'][$i] ) ) ? $icons['select_social_media2'][$i] : '';
								$social_link = ( isset( $icons['link_social_media2'][$i] ) && !empty( $icons['link_social_media2'][$i] ) ) ? $icons['link_social_media2'][$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>
                    </div>
                    <?php endif; ?>
                </div>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-12">
                <div class="project_details_content">
                    <?php the_content(); ?>
                    <?php if(get_post_meta( get_the_id(), 'project_btn_title', true )) {?>
                    <div class="link_btn"><a href="<?php echo esc_url(get_post_meta( get_the_id(), 'project_btn_link', true ));?>"><?php echo (get_post_meta( get_the_id(), 'project_btn_title', true ));?></a></div>
                	<?php } ?>
                </div>
            </div>
    	</div>
    </div>    
</section>
<!-- gallery-details end -->

<?php endwhile; ?>
<?php get_footer(); ?>