/* StoryFrame standard post template: latest posts as an image gallery. */
.sf-is-archive .sf-primary-column>.sf-portfolio {
    padding-block: 1rem 2.5rem;
}

.sf-is-archive .sf-portfolio-grid,
.page-template-template-gallery .sf-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 2rem);
}

.sf-is-archive .sf-entry,
.page-template-template-gallery .sf-entry {
    position: relative;
    min-width: 0;
}

.sf-is-archive .sf-entry .entry-header,
.page-template-template-gallery .sf-entry .entry-header {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0.65rem 0.8rem;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
}

.sf-is-archive .sf-entry .entry-title,
.page-template-template-gallery .sf-entry .entry-title {
    margin: 0;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    line-height: 1.2;
}

.sf-is-archive .sf-entry .entry-title a,
.sf-is-archive .sf-entry .entry-meta,
.page-template-template-gallery .sf-entry .entry-title a,
.page-template-template-gallery .sf-entry .entry-meta {
    color: #fff;
}

.sf-is-archive .sf-entry .entry-meta,
.sf-is-archive .sf-entry .entry-content,
.sf-is-archive .sf-entry .entry-footer,
.page-template-template-gallery .sf-entry .entry-meta,
.page-template-template-gallery .sf-entry .entry-content,
.page-template-template-gallery .sf-entry .entry-footer {
    display: none;
}

.sf-is-archive .sf-entry .post-thumbnail,
.page-template-template-gallery .sf-entry .post-thumbnail {
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
}

.sf-is-archive .sf-entry .post-thumbnail a,
.sf-is-archive .sf-entry .post-thumbnail img,
.page-template-template-gallery .sf-entry .post-thumbnail a,
.page-template-template-gallery .sf-entry .post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
}

.sf-is-archive .sf-entry .post-thumbnail img,
.page-template-template-gallery .sf-entry .post-thumbnail img {
    object-fit: cover;
}

@media (max-width: 700px) {

    .sf-is-archive .sf-portfolio-grid,
    .page-template-template-gallery .sf-portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {

    .sf-is-archive .sf-portfolio-grid,
    .page-template-template-gallery .sf-portfolio-grid {
        grid-template-columns: 1fr;
    }
}