.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.gallery__item{
  border-radius: 16px;
  overflow: hidden;
  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer;
    &:hover {
      transform: scale(1.05);
    }
  }
}
.gallery-modal__img {
  height: 50vh;
  max-height: 70vh;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.18);
  background: #fff;
}
.gallery-modal__close {
  position: absolute;
  top: 32px;
  right: 48px;
  font-size: 48px;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s;
}
.gallery-modal__close:hover {
  color: #2563eb;
}
main {
  padding: 20px 0;
}
.gallery__grid {
  margin-top: 40px; 
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px; /* Можно изменить отступы между элементами */
  @media (max-width: 992px) {
    grid-template-columns: repeat(3, 1fr);
  }
  @media (max-width: 600px) {
    grid-template-columns: repeat(2, 1fr);
  }
  @media (max-width: 400px) {
    grid-template-columns: 1fr;
  }
}
.gallery__grid > :nth-child(5) {
  grid-row: span 2;
}


.gallery-modal{
  @media (max-width: 992px) {
    padding: 20px; 
    .gallery-modal__close{
      top: 100px;
      right: 50%;
      transform: translateX(50%);
      font-size: 56px;
    }
  }

  @media (max-width: 600px) {
  }
  .gallery-modal__img{
    object-fit: cover;
  }
}
.gallery{
  margin: 100px 0 50px 0;
}