.gallery {
    max-width: 700px;
    margin: auto;
}

.gallery figure{
    margin: 20px 0px;
    height: 12rem;
    display: flex;
    align-items: stretch;
    background-color: #1f232a;
    color: #fff; 
    border-radius: 5px;
}

.gallery figure a {
    flex: 0 0 40%;
    /* = flex-grow: 0;
         flex-shrink: 0;
         flex-basis: 40%; */
}

a img{
    width: 100%;
    overflow: hidden;
    object-fit: cover;
    height: 100%;
}

.gallery figure figcaption {
    flex: 1 0 60%;
    padding-left: 5%;
    align-self: center;
    font-size: 1.5rem;
}

small {
    display: block;
}