.before-after-galleries {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: start;
}

.gallery-box {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.gallery-box .image-overlay {
  display: none !important;
}
.gallery-box .gallery-image-container {
  overflow: hidden;
}

.gallery-box .gallery-image-container img {
    width: 100%;
    transition: 400ms all;
    -webkit-transition: 400ms all;
}

.gallery-box:hover .gallery-image-container img {
    transform: scale(1.1);
}

.gallery-box a,
.gallery-box a:hover,
.gallery-box a h4,
.gallery-box a p,
.gallery-box a:hover h4,
.gallery-box a:hover p {
  text-decoration: none;
}

.gallery-content-container {
    background: #fff;
    margin-top: -7px;
    border: 1px solid #ebebeb;
    z-index: 10;
    position: relative;
    flex-grow: 1;
    transition: 400ms all;
    -webkit-transition: 400ms all;
}
.gallery-box:hover .gallery-content-container {
    border: 1px solid #a5ccce;
}


.gallery-box a .gallery-content-container h4 {
    background: #a5ccce;
    padding: 10px 15px;
    margin-top: -1px;
    color: #fff;
    text-align: center;
    transition: 400ms all;
    -webkit-transition: 400ms all;
}
.gallery-box a:hover .gallery-content-container h4 {
    background: #88a9ab;
    color: #fff;
}

.gallery-box p {
    padding: 0 15px;
    line-height: 1.4;
}
.gallery-box a {
    display: flex !important;
    flex-direction: column;
    flex-grow: 1;
}


@media (min-width: 600px) {
  .gallery-box {
    width: calc(100% / 2 - 10px);
  }
}

@media (min-width: 900px) {
  .gallery-box {
    width: calc(100% / 3 - 10px);
  }
}