.image-gallery-wrapper {
  max-width: 1050px;
  margin: 40px auto;
  padding: 0 20px;
  @media(min-width: 1140px) {
    padding: 0;
  }
}

.image-gallery-modal {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 100%;
  background: #000;
  color: #fff;
  z-index: 2;
  overflow: scroll;
  transition: top 0.3s ease-in-out;
  img {
    width: 100%;
    height: auto;
  }
}

.image-gallery-close-btn {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 40px;
  right: 40px;
  background-color: transparent;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  z-index: 1000;
  background: url('/themes/custom/broad/images/icon-modal-close.svg') no-repeat center center;
}

.image-gallery-nxg {
    margin-left: -10px;
    margin-right: -10px;
}

.js-masonry-grid-item {
  margin-bottom: 20px;
  padding: 0 10px;
  position: relative;
  &:hover,
  &:focus,
  &:focus-within {
    .image-gallery-plus-btn {
      opacity: 1;
    }
    .image-gallery-caption {
      .image-gallery-info-btn {
        opacity: 1;
      }
    }
  }
}

.image-gallery-plus-btn {
  position: absolute;
  opacity: 0;
  border: none;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  z-index: 1;
}

.image-gallery-plus-btn,
.image-gallery-caption p,
.image-gallery-caption .image-gallery-info-btn {
  transition: opacity 0.3s ease-in-out;
}

.image-gallery-caption {
  position: absolute;
  bottom: 20px;
  display: flex;
  align-items: end;
  gap: 10px; 
  padding: 0 30px 0 20px;
  p {
    background: #333F48D9;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    padding: 20px;
    border-radius: 6px;
    opacity: 0;
    &.is-open {
      opacity: 0.85;
    }
  }
}

.image-gallery-info-btn {
  opacity: 0;
  bottom: 30px;
  left: 30px;
  &.is-visible {
    opacity: 1;
  }
}

button {
  border: none;
  background: transparent;
}