/* Галерея портфолио — визуально как /case/ (True Gallery masonry) */

.ep-portfolio-gallery {
  padding: 1%;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.ep-portfolio-gallery .tg-gallery-masonry {
  column-gap: 20px;
}

.ep-portfolio-gallery .tg-gallery-masonry .tg-gallery-item {
  margin-bottom: 20px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.ep-portfolio-gallery .tg-gallery-item--link {
  cursor: pointer;
}

.ep-portfolio-gallery .tg-gallery-item .tg-overlay {
  background-color: rgba(0, 0, 0, 0.35);
}

.ep-portfolio-gallery .tg-filters {
  gap: 8px;
  margin-bottom: 20px;
}

.ep-portfolio-gallery .tg-filter-btn {
  border-radius: 50px;
  font-family: "Unbounded", inherit, sans-serif;
}

.ep-portfolio-gallery__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #fff;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.ep-portfolio-gallery__item:hover .ep-portfolio-gallery__title,
.ep-portfolio-gallery__item:focus-visible .ep-portfolio-gallery__title {
  opacity: 1;
  transform: translateY(0);
}

.ep-portfolio-gallery .tg-gallery-item__bg {
  display: block;
  width: 100%;
  min-height: 220px;
  background-size: cover;
  background-position: center;
}
