/* News Feed block — date and excerpt sit inside article-preview, styled to match the theme's article-preview component */

.article-preview__date {
    font-size: 0.85em;
    color: #666;
    margin: 0 0 4px;
}

.article-preview__excerpt {
    margin: 0 0 8px;
}

/*
 * Full-image layouts — opt-in via the block's "Show full images" toggle.
 *
 * By default .article-preview__img-wrapper is a fixed 2:1 frame with
 * overflow: hidden and the image set to object-fit: cover, so anything that
 * doesn't match that ratio gets cropped. Both modifiers below undo that for
 * images that carry text and must be readable end to end.
 *
 * Selectors are deliberately three classes deep so they outrank the base
 * article-preview rules (and the global `img { object-fit: cover }` reset)
 * no matter which stylesheet the browser loads first.
 */

/* Natural: the frame takes the image's own aspect ratio, so the image spans the
   full card width and is never cropped. Card heights vary with the images. */
.article-preview-box--images-natural .article-preview .article-preview__img-wrapper {
    aspect-ratio: auto;
    overflow: visible;
    background-color: transparent;
}

.article-preview-box--images-natural .article-preview .article-preview__img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius-medium);
}

/* Fit: keeps the fixed frame — so every card stays the same height — and
   letterboxes the image inside it instead of cropping. */
.article-preview-box--images-fit .article-preview .article-preview__img {
    object-fit: contain;
}
