<?php
defined( 'ABSPATH' ) || die;
/**
 * Title: Template query loop
 * Slug: themecut/template-query-loop
 * Inserter: no
 *
 * Main query loop for blog/archive pages. Beautiful 3-column card grid with
 * featured image, category badge, title, excerpt, date, and pagination.
 */
?>
<!-- wp:group {"align":"full","className":"tc-blog-archive","style":{"spacing":{"padding":{"top":"60px","bottom":"80px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull tc-blog-archive" style="padding-top:60px;padding-bottom:80px">

<!-- wp:query {"queryId":0,"query":{"perPage":9,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"layout":{"type":"constrained"}} -->
<div class="wp-block-query">

<!-- wp:post-template {"className":"tc-post-grid","layout":{"type":"grid","columnCount":3}} -->

<!-- wp:group {"className":"tc-post-card","style":{"border":{"radius":"16px"},"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group tc-post-card" style="border-radius:16px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">

<!-- wp:post-featured-image {"isLink":true,"aspectRatio":"16/9","className":"tc-post-card__image"} /-->

<!-- wp:group {"className":"tc-post-card__body","style":{"spacing":{"padding":{"top":"20px","right":"24px","bottom":"24px","left":"24px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group tc-post-card__body" style="padding-top:20px;padding-right:24px;padding-bottom:24px;padding-left:24px">

<!-- wp:post-terms {"term":"category","className":"tc-post-card__cat","style":{"spacing":{"margin":{"bottom":"10px"}}}} /-->

<!-- wp:post-title {"isLink":true,"level":2,"style":{"typography":{"fontSize":"1.125rem","lineHeight":"1.3"},"spacing":{"margin":{"top":"0","bottom":"10px"}}}} /-->

<!-- wp:post-excerpt {"numberOfWords":20,"className":"tc-post-card__excerpt","style":{"spacing":{"margin":{"bottom":"16px"}}}} /-->

<!-- wp:group {"className":"tc-post-card__footer","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between","verticalAlignment":"center"}} -->
<div class="wp-block-group tc-post-card__footer">
<!-- wp:post-date {"style":{"typography":{"fontSize":"0.8rem"}}} /-->
<!-- wp:read-more {"content":<?php echo wp_json_encode( __( 'Read more →', 'themecut' ) ); ?>,"className":"tc-post-card__readmore"} /-->
</div>
<!-- /wp:group -->

</div>
<!-- /wp:group -->

</div>
<!-- /wp:group -->

<!-- /wp:post-template -->

<!-- wp:query-no-results -->
<!-- wp:paragraph {"align":"center","style":{"spacing":{"padding":{"top":"60px","bottom":"60px"}}}} -->
<p class="has-text-align-center" style="padding-top:60px;padding-bottom:60px"><?php esc_html_e( 'No posts found.', 'themecut' ); ?></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results -->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"56px"}}},"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-group" style="margin-top:56px">
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center","flexWrap":"wrap"}} -->
<!-- wp:query-pagination-previous /-->
<!-- wp:query-pagination-numbers /-->
<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
</div>
<!-- /wp:group -->

</div>
<!-- /wp:query -->

</div>
<!-- /wp:group -->
