.gal-thumb2 {
    display: flex;
    flex-direction:row;
    flex-wrap: wrap;
    width: 100%;
    color: white;
}
.gal-thumb2 .box-img {
    display: block;
    position: relative;
    width: 25%; height: 600px; max-height: 30em;
    overflow: hidden;
}

.gal-thumb2 .box-img img {
    position: absolute;
    display: block;
    top: 0; bottom: 0; left: 0; right: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}
.gal-thumb2 .box-img:hover img {
    transform: scale(1.1);
}

.gal-thumb2 .box-img .inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%; height: 100%;
    padding: 2em;
    transform: none;
    transition: background-color 1s ease;
    box-sizing: border-box;
}
.gal-thumb2 .box-img:hover .inner {
    background-color: #E8004B99;
}

.gal-thumb2 .box-img .inner .center h2 {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1.1em;
    font-size: 1.3em;
    white-space: pre-wrap;
    text-shadow: 1px 1px 1px #00000066;
    text-align: center;
    color: white;
}
.gal-thumb2 .box-img:hover .inner .center h2 {
    position:static;
    top: 0; left: 0;
    transform: none;
    margin-bottom: 1em;
    font-size: 1.3em;
}
.gal-thumb2 .box-img .center p {
    visibility: hidden;
    text-align: center;
    text-shadow: 1px 1px 1px #00000066;
}
.gal-thumb2 .box-img:hover .inner .center p {
    visibility: visible;
}


@media screen and (max-width:1600px) {
    main .gal-thumb2 .box-img {
        width: 50%;
    }
}

@media screen and (max-width:864px) {
    main .gal-thumb2 .box-img {
        width: 100%;
    }
}