/* ==========================================================================
   Post Grid
   Shared grid used by featured_posts flex layout, archive templates,
   and future CPT listing pages (podcast, messages, etc.)
   ========================================================================== */

.rw-post-grid {
    display: grid;
    gap:     20px;
    grid-template-columns: repeat( 3, 1fr );
}

/* Hide 4th card on desktop — shown on tablet as 2x2 grid */
.rw-post-grid .rw-cpt-card:nth-child(4) {
    display: none;
}



/* ==========================================================================
   Featured Posts intro heading
   ========================================================================== */

.rw-featured-posts__intro {
    text-align:    center;
    margin-bottom: 40px;
}


/* ==========================================================================
   Post Card — modifier overrides for .rw-cpt-card
   Image is flush to card edges (no outer padding like slider cards)
   ========================================================================== */

.rw-cpt-card--post {
    padding: 20px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media ( max-width: 992px ) {
    .rw-post-grid {
        grid-template-columns: repeat( 2, 1fr );
    }

    .rw-post-grid .rw-cpt-card:nth-child(4) {
        display: block;
    }

    .rw-featured-posts__intro {
        margin-bottom: 10px;
    }
}

@media ( max-width: 640px ) {
    .rw-post-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Featured Posts Story and Search Override
   ========================================================================== */

.rw-search-results .rw-post-grid--archive .rw-cpt-card,
    .rw-story-archive .rw-post-grid--archive .rw-cpt-card {
    display: block;
}
.rw-story-archive {
    padding: 15px 20px;
}

.rw-search-results {
    padding: 60px 20px 30px;
}

.rw-story-archive .rw-archive-grid__pagination,
.rw-search-results .rw-archive-grid__pagination {
    padding-top: 30px;
    /*align-items: center;*/
    /*justify-content: center;*/
}


@media ( max-width: 992px ) {
    .rw-story-archive {
        padding: 0 20px 15px 20px;
    }
}