<?php
/**
 * Compact stacked row post (Plan A — remaining latest posts).
 *
 * @package ttsunsolar
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'blog-row' ); ?>>
	<?php if ( has_post_thumbnail() ) : ?>
		<a class="blog-row__media" href="<?php the_permalink(); ?>">
			<?php the_post_thumbnail( 'medium' ); ?>
		</a>
	<?php else : ?>
		<a class="blog-row__media blog-row__media--placeholder" href="<?php the_permalink(); ?>">
			<img src="<?php echo esc_url( ttsunsolar_image_uri( 'footer-post-1.jpg' ) ); ?>" alt="<?php the_title_attribute(); ?>" />
		</a>
	<?php endif; ?>
	<div class="blog-row__body">
		<div class="entry-meta">
			<span><?php echo esc_html( get_the_date() ); ?></span>
		</div>
		<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
		<div class="entry-summary">
			<?php echo esc_html( wp_trim_words( wp_strip_all_tags( get_the_excerpt() ? get_the_excerpt() : get_the_content() ), 18 ) ); ?>
		</div>
		<a class="text-link" href="<?php the_permalink(); ?>"><?php esc_html_e( 'Read more', 'ttsunsolar' ); ?></a>
	</div>
</article>
