.nv-index-posts-wrap {
    --row-h: 15rem;
    --title-h: 3.3125rem;
    --fallback-w: 15rem;
    --gap: 4rem;
    --pad-x: 20rem;
    padding-top: 1.5rem;
}

.posts-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: var(--gap);
    padding: 0 var(--pad-x);
}

.article-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    overflow: hidden;
    transition: border-color .15s ease;
}

.article-card:hover {
    border-color: #ccc;
}

.article-card a {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.article-card.has-thumb {
    width: calc(var(--row-h) * var(--ratio, 1));
}

.article-card.has-thumb img {
    display: block;
    width: 100%;
    height: var(--row-h);
    object-fit: cover;
}

.article-card.no-thumb {
    width: var(--fallback-w);
    min-height: calc(var(--row-h) + var(--title-h));
}

.article-card.no-thumb a {
    justify-content: flex-end;
}

.article-card .card-title {
    padding: 1rem;
    text-align: center;
}

.article-card .card-title h2 {
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
    overflow-wrap: break-word;
}

@media (max-width: 600px) {
    .nv-index-posts-wrap {
        --row-h: 11rem;
        --title-h: 2.75rem;
        --fallback-w: 9.5rem;
        --gap: 0.6rem;
        --pad-x: 1rem;
    }

    .article-card .card-title {
        padding: 0.6rem;
    }

    .article-card .card-title h2 {
        font-size: 0.85rem;
    }
}

