.image-card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 30px;
    margin-bottom: 30px;
}

figure {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-height: 460px;
}

.image-card-img {
    width: 100%;
    height: auto;
    display: block;
}

figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
}

figure.in-view figcaption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    figcaption {
        padding: 10px;
        font-size: 0.9em;
    }
}