/**
 * Masonry Gallery — layout handled by Macy.js.
 */

.thr-masonry-gallery__list {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.thr-masonry-gallery__item {
  display: block;
  margin: 0;
  padding: 0;
  float: none;
  width: 100%;
  box-sizing: border-box;
}

.thr-masonry-gallery__media {
  position: relative;
  margin: 0;
  line-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.thr-masonry-gallery__link {
  display: block;
  position: relative;
  line-height: 0;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  border-radius: inherit;
}

.thr-masonry-gallery__img,
.thr-masonry-gallery .gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  max-width: 100%;
}

.thr-masonry-gallery__caption-below,
.thr-masonry-gallery .gallery-caption {
  margin-block-start: 0.5em;
  padding: 0;
  line-height: 1.4;
}

/* Overlay caption — bottom of image, faint black gradient, white type */
.thr-masonry-gallery__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0) 100%
  );
  color: #fff;
  text-align: start;
  line-height: 1.4;
  pointer-events: none;
}

.thr-masonry-gallery__title.elementor-heading-title,
.thr-masonry-gallery__title {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
}

.thr-masonry-gallery__title.elementor-heading-title:is(h4),
.thr-masonry-gallery h4.thr-masonry-gallery__title {
  font-size: var(--h4-size, 1.25rem);
  line-height: var(--h4-leading, 1.3);
}

.thr-masonry-gallery__title.elementor-heading-title:is(h5),
.thr-masonry-gallery h5.thr-masonry-gallery__title {
  font-size: var(--h5-size, 1.125rem);
  line-height: var(--h5-leading, 1.35);
}

.thr-masonry-gallery__text {
  margin: 0.35em 0 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0.95;
}

.thr-masonry-gallery__text:first-child {
  margin-top: 0;
}
