/* галерея в статье*/

.gal-in-article {
  display: flex;
  flex-wrap: wrap;
  /* justify-content: center; */
  gap: 15px;
  max-width: 100%;
  /* display: grid;
  max-width: 100%;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(120px, auto)); */
  margin-top: 35px;
}

.gal-item {
  flex: 1 0 fit-content;
  text-align: center;
}

.last-row-items {
    flex: 0 0 fit-content;
}

/* .gal-item:last-child {
  flex: 0 0 fit-content;
  max-width: 50%;
} */
/* .gal-item-img {
    width: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    height: 100%;
    max-width: 100%;
} */

.main-content .gal-item-img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  box-shadow: #dbdada 0 0 12px;
  cursor: pointer;
  /* padding: 10px;    */
}

/* размеры для сетки галереи*/
.very-min-height {
  max-height: 120px;
}
.min-height {
  max-height: 160px;
}
.small-height {
  max-height: 200px;
}
.big-height {
  max-height: 500px;
}
.auto-height {
  height: auto;
}

/* обертка для одиночных фото */
.main-content__figure {
  position: relative;
  display: inline-block;
}
.main-content__figure.resize:hover::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
  border-radius: 3px;
  opacity: 0.5;
  background-color: #ffffff;
  background-image: url(/images/icon/zoom-in-blue.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 72%;
  cursor: pointer;
}
/* обнуляем контейнер с изображением */
figure {
  /* margin: 0 0 0; */
}

/* открытие изображения */

.card-template {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background-color: #000;
}

.popup-image {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 88vw;
  max-width: 1000px;
}
.popup_active {
  display: flex;
}

.open-image {
  max-width: 1000px;
  max-height: 80vh;
  object-fit: contain;
}

.img__description {
  width: 100%;
}

.img__title {
  color: #fff;
  font-size: 1.5rem;
}

.arrow-btn {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: contain;
  background-position-y: center;
}

.prev-btn {
  left: -40px;
  background-image: url(/images/icon/arrow-prev.svg);
  background-position-x: left;
}

.next-btn {
  right: -40px;
  background-image: url(/images/icon/arrow-next.svg);
  background-position-x: right;
}

/* крестик ------------------- */

.close-img-button {
  position: absolute;
  top: -35px;
  right: -35px;
  width: 30px;
  height: 30px;
  border: 0;
  background-color: transparent;
}

.cross-close-modal {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  opacity: 0.5;
  transition: opacity ease;
  cursor: pointer;

  &:hover {
    opacity: 1;
  }
}

.cross-close-modal::before,
.cross-close-modal::after {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
}

.cross-close-modal::before {
  transform: rotate(45deg);
}

.cross-close-modal::after {
  transform: rotate(-45deg);
}
