<section data-aos="fade-up" class="latest-news mt-5">
	<div class="container">
		<div class="mx-auto">
			<p class="subtitle">Blog</p>
			<h3 class="text-center">Inspiration</h3>
			<div class="row news-stories blog justify-content-center">

						<?php

				$args = array(
						'posts_per_page' => 4,
						'tag__and' => array( 64, 107 ),
						'order' => 'DESC'
				);
				$news = new WP_Query($args);
				$count = 0;
		?>

								<?php if ($news->have_posts()) : ?>

									<?php while ($news->have_posts()) : $news->the_post(); ?>

										<?php
								$permalink = get_the_permalink();
								$title = get_the_title();
								$excerpt = get_the_excerpt();
								$excerpt = apply_filters('the_content', $excerpt);
						?>

							<div class="col-12 col-md-6 p-1">
												<a href="<?php echo $permalink; ?>" class="relative block w-full">
													<div class="card h-100 mt-3">

														<?php
										if ( has_post_thumbnail() ) {
										 the_post_thumbnail('large', array( 'class' => 'img-fluid w-100' ));
									}
									else {
										echo '<img class="img-fluid w-100" src="' . get_bloginfo( 'stylesheet_directory' )
										. '/src/assets/images/default-image.jpg" />';
									}
									?>

															<div class="card-body d-flex flex-column p-4 bg-grey">
																<h3 class="h6">

																				 <?php echo $title; ?>

																</h3>

															</div>
													</div>
												</a>
											</div>

											<?php $count++ ?>
												<?php endwhile; wp_reset_postdata(); ?>
													<?php endif; ?>

														<?php
			wp_reset_postdata();

							?>

			</div>
		</div>
		<div class="col-12 text-center mt-5">
			<a class="btn btn-primary px-5" href="/blog">View More</a>
		</div>
	</div>
</section>

<?php if( get_sub_field('news_page_break') == 'left' ) { ?>

	<div class="page-break">
	<hr class="left"><i class="fa fa-plus left-plus" aria-hidden="true"></i>
	</div>

<?php }

if( get_sub_field('news_page_break') == 'right' ) { ?>

	<div class="page-break">
	<hr class="right"><i class="fa fa-plus right-plus" aria-hidden="true"></i>
	</div>

<?php }

?>
