.story-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.story-gallery a:has(article) {
    width: calc(25% - 2rem);
    aspect-ratio: 1 / 1.33;
    text-decoration: none !important;
}

.story-gallery article {
    width: 100%;
    height: 100%;
}

article {
    background-size: cover;
    background-position: center center;
    transition: all 0.25s ease-in-out;
}

a:hover article h3, a:focus article h3, a:active article h3 {
    opacity: 1;
    color: var(--fg);
}

article h3 {
    color: var(--fg);
    background-color: rgba(252, 252, 237, 0.65);
    width: 100%;
    height: 100%;
    opacity: 0;
    font-size: 1.5rem;
    text-align: center;
    transition: all 0.25s ease-in-out;
}

@media only screen and (max-width: 992px) {
    .story-gallery a:has(article) {
        width: calc(50% - 1rem);
    }

    article h3 {
        opacity: 1;
        color: var(--fg);
    }

}
