.ccm-block-page-list-card-grid .card-grid-header h3,
.ccm-block-page-list-card-grid .card-grid-header h2,
.ccm-block-page-list-card-grid .card-grid-header h4 {
    font-family: var(--baq-font-display, serif);
    font-weight: var(--baq-weight-display-lg, 500);
    margin-bottom: 1.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
    /*
     * Grid's default align-items:stretch was forcing every card in a row
     * to the height of its tallest sibling. Confirmed live: an image-less
     * post next to one with a thumbnail stretched to match it, leaving a
     * large blank gap between the title and "Learn More" with nothing in
     * it — looked broken, not deliberate. align-items:start lets each
     * card size to its own content instead, so a text-only card is simply
     * shorter than an image card next to it, not stretched around an
     * empty hole.
     */
    align-items: start;
}

.card-grid-item {
    display: flex;
    flex-direction: column;
    background: var(--baq-paper, #fffdfa);
    border-top: 2px solid var(--baq-gold, #a98a55);
    text-decoration: none;
    color: var(--baq-ink, #0b0a0a);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-grid-item:hover,
.card-grid-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--baq-ink, #0b0a0a);
}

.card-grid-item-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
}

.card-grid-item-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.75rem;
}

.card-grid-item-title {
    font-family: var(--baq-font-display, serif);
    font-weight: var(--baq-weight-display-sm, 600);
    margin: 0 0 0.6rem;
    font-size: var(--baq-display-floor, 28px);
}

.card-grid-item-description {
    font-family: var(--baq-font-body, sans-serif);
    margin: 0 0 1.25rem;
    font-size: var(--baq-text-secondary-size, 16px);
    line-height: 1.6;
    color: #4f4945;
    flex: 1;
}

.card-grid-item-link {
    font-family: var(--baq-font-body, sans-serif);
    margin-top: auto;
    font-weight: 500;
    font-size: var(--baq-text-label-size, 13px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--baq-ink, #0b0a0a);
}

@media (max-width: 576px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}
