<div class="posts-card archive-posts masonry-container">
    <?php if (have_posts()) :
        while (have_posts()) : the_post(); ?>
            <div class="post-preview masonry-item">
                <a href="<?php the_permalink(); ?>">
                    <span class="post-category"><?php aurora_lite_get_categories(['archive' => true]);?></span>

                    <div class="post-featured-image masonry-item-image" 
                        style="background-image: url('<?php echo esc_url(get_the_post_thumbnail_url(get_the_ID(), 'large')); ?>')">
                    </div>
                </a>

                <div class="post-details">
                    <h3 class="post-title">
                        <a href="<?php the_permalink(); ?>">
                            <?php echo esc_html(get_the_title()); ?>
                        </a>
                    </h3>
                    <span class="post-excerpt">
                        <?php echo wp_trim_words(get_the_excerpt(), 13); ?>
                    </span>                  
                </div>
                
                <div class="post-meta">
                    <div class="post-author">
                        <span class="author-image"><?php echo get_avatar(get_the_author_meta('ID'), 20); ?></span>
                        <span class="author"><?php echo esc_html(get_the_author());?></span>
                    </div>
                    <span class="divider">•</span>
                    <span class="post-date"><?php echo esc_html(get_the_date(aurora_lite_get_date_format())); ?></span>
                </div>
            </div>
        <?php endwhile; ?>
</div>

<?php
    aurora_lite_paginate($query);
else : 
    aurora_lite_no_content_message();
endif;