<?php $bauen_options = get_option('bauen'); ?>
<?php get_header(); ?>	

    <?php if (Bauen_AfterSetupTheme::return_thme_option('index_header_show')!='no'){ ?>	
	
	<section class="banner-header banner-img valign bg-img bg-fixed" <?php if (Bauen_AfterSetupTheme::return_thme_option('theme_color_style')=='st2'){ ?>data-overlay-darkgray="5"<?php } else { ?> data-overlay-light="3"<?php  } ;?> data-background="<?php echo esc_url(Bauen_AfterSetupTheme::return_thme_option('index_header_banner_img','url'));?>">
		<!-- Left Panel -->
		<?php if (Bauen_AfterSetupTheme::return_thme_option('nav_menu_style')=='st1'){ ?> 
			<div class="left-panel"></div>
		<?php } 
		else if (Bauen_AfterSetupTheme::return_thme_option('nav_menu_style')=='st2'){ ?> 
		    <div class="left-panel"></div>
		<?php } 
		else { ?>	
			<div class="left-panel-no"></div>			
		<?php } ?>				
	</section>
	<!-- Blog  -->
	<section class="section-static-banner-header">
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<h2 class="section-title">
						<?php single_cat_title( '', true ); ?>				
					</h2>
				</div>
			</div>
		</div>
	</section>		

	<?php } ?>		
	
	<!-- Projects -->
	<section class="projects section-padding2">
		<div class="container">
			<div class="row">	
				<?php global $loop; 
				$args = array_merge( $wp_query->query, array( 'post_type' => 'portfolio', 'posts_per_page'=>-1, ) );
				query_posts( $args );?>	
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
				<?php $bauen_portfolio_category = wp_get_post_terms($post->ID,'portfolio_category');?>
				<?php 
				$bauen_class = ""; 
				$bauen_categories = ""; 
				foreach ($bauen_portfolio_category as $bauen_item) {
				$bauen_class.=esc_attr($bauen_item->slug . ' ');
				$bauen_categories.='<span class="cat-divider">';
				$bauen_categories.=esc_html($bauen_item->name . '  ');
				$bauen_categories.='</span>';
				}?>
				<?php if (has_post_thumbnail( $post->ID ) ):
				$bauen_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'bauen_portfolio_image' );?>
				
                    <div class="col-md-6">
					<?php get_template_part('template-parts/aniamte/animate-div-start');?>
                        <div class="item">
							<div class="position-re o-hidden"> <img src="<?php echo esc_url($bauen_image[0]);?>" alt="<?php the_title();?>"> </div>
							<div class="con">
								<h6><?php echo $bauen_categories;?></h6>
								<h5><a href="<?php the_permalink();?>"><?php the_title();?></a></h5>
								<div class="line"></div> <a href="<?php the_permalink();?>"><i class="ti-arrow-right"></i></a>
							</div>
                        </div>                   
					<?php get_template_part('template-parts/aniamte/animate-div-end');?>
					</div>
					
                <?php endif;?>
			    <?php  endwhile; endif; wp_reset_postdata(); ?> 					
					
			</div>
		</div>
	</section>			

<?php get_footer(); ?>