*,
*::before,
*::after {
    box-sizing: border-box;
}

h1 {
    line-height: 1.1em;
}

.posts {
    padding: 0;
    max-width: 70rem;
    margin-inline: auto;
    margin-block-start: 3rem;
    list-style: none;

    li {
        position: relative;
        margin-block-end: 0.1rem;
        background-color: var(--secondary);
    }

    h3 {
        display: flex;
        justify-content: space-between;
        margin-block: 0;
        font-size: 1.4em;
    }

    p {
        max-width: 40em;
        margin-block: auto;
        padding-block: 1rem;
    }

    img {
        display: none;
        margin: auto;
        width: 25%;
        height: 100%;
    }

    a:not(.overlay-link) {
        position: relative;
        width: 100%;
        padding: 1rem;
        z-index: 1;
    }
}

.post-content {
    display: flex;
    flex-direction: column;
    max-width: fit-content;
    flex-grow: 2;
}

.post-footer {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin-block-start: auto;
    gap: 1rem;

    >* {
        margin-block-end: 0;
    }
}

.post-label {
    max-width: 100%;
    text-align: center;
}

.post-img-caption {
    margin: 0 0 2rem 0;

    color: var(--textLight);
    text-align: center;
}

@media (min-width: 25rem) {
    .post-footer {
        flex-direction: row;
        column-gap: 1rem;

        a {
            width: 100%;
        }
    }

    .posts h3 {
        gap: 2rem;
    }

    .post-label {
        width: calc((100% - 1rem) / 2);
    }
}

@media (min-width: 35rem) {
    .post-footer {
        justify-content: space-between;
    }

    .posts .post-footer a {
        margin-block-start: auto;
        width: auto;
    }

    .post-label {
        width: auto;
    }
}

@media (min-width: 48rem) {
    .posts {
        img {
            display: initial;
        }

        li > div {
            display: flex;
            flex-direction: row;
            gap: 4rem;
        }
    }
}