.postListHighlight {
    container-type: inline-size;
}

.postList.--highlight {
    display: grid;
    grid-auto-rows: auto 1fr;
    gap: var(--marginMedium);
}

.--highlight .postListPost {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    align-items: flex-start;
    gap: var(--marginSmall);
    position: relative;
    overflow: hidden;
    transition: all  var(--timingFlash);
}

.--highlight .postListPost .tagsList__list {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: +1;/** tags must stay visible if image gets z-index on hover */
}

.--highlight .postMetaInfo {
    display: none;
}

.--highlight .postListPost__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.--highlight .postListPost__imageWrapper {
    overflow: hidden;
    border-radius: var(--borderRadiusSmall);
}

.--highlight .postListPost__image {
    aspect-ratio: 3/2;
    object-fit: cover;
}

/**
 * First item is styled differently
 */

.--highlight .postListPost:nth-child(7n + 1) {
    grid-row: span 2;
    padding: var(--marginMedium);
    justify-content: flex-start;
    gap: 0;
    border-radius: var(--borderRadiusSmall);
}

.--highlight .postListPost:nth-child(7n + 1) .tagsList__list {
    top: var(--marginMedium);
    left: var(--marginMedium);
}

.--highlight .postListPost:nth-child(7n + 1) > * {
    color: var(--baseLight100);
}

.--highlight .postListPost:nth-child(7n + 1) .postListPost__title {
    margin: 0;
    -webkit-line-clamp: 3;
    color: var(--baseLight100);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.--highlight .postListPost:nth-child(7n + 1) .postMetaInfo {
    display: flex;
    margin-block: auto 1rem;
}

.--highlight .postListPost .tagsList__list {
    position: absolute;
    top: var(--marginSmall);
    left: var(--marginSmall);
}

.--highlight .postListPost:nth-child(7n + 1) .postListPost__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    z-index: -1;
}

.--highlight .postListPost:nth-child(7n + 1)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.00) 30%, rgba(0,0,0,0.80) 100%);
    z-index: -1;
}

@container (min-width: 568px) {
    .postList.--highlight {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .--highlight .postListPost:nth-child(7n + 1) {
        grid-column: span 2;
    }

}

@container (min-width: 768px) {
    .postList.--highlight {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .--highlight .postList__post:nth-child(7n + 1) {
        grid-column: span 2;
    }
}

@container (min-width: 1024px) {
    .postList.--highlight {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}
