.preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  max-width: 900px;
  width: 90%;
  margin: 70px auto 250px auto;
}

.photo-item {
  width: 100%;
  aspect-ratio: 1.5;
  border: 4px #ffffff solid;
  border-radius: 20px;
  background-size: cover;
  overflow: hidden;
  transition: 0.5s;
}

.foto {
  width: 100%;
  height: 100%;
}

.photo-item:hover {
  cursor: pointer;
  transform: translateY(-5px);
  transition: 0.5s;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #00000080;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0);
  transition: 0.5s;
}

.modalOpen {
  transform: scale(1);
  transition: 0.5s;
}

.btn {
  width: 50px;
  height: 50px;
  margin: 20px;
  background: url(../img/arow.png) no-repeat center center;
  background-size: contain;
}

.btn:hover {
  background: url(../img/arow-hover.png) no-repeat center center;
  cursor: pointer;
}
.prev {
  transform: scale(-1, 1);
}

.slider {
  position: relative;
  width: 90%;
  max-width: 650px;
  aspect-ratio: 1.5;
  border: 5px #ffffff solid;
  border-radius: 30px;
  background-size: cover;
  overflow: hidden;
}

.sliderCloser {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 40px;
  height: 40px;
  background: url(../img/krest.png);
}
.sliderCloser:hover {
  cursor: pointer;
  background: url(../img/krest-hover.png);
}

@media (max-width: 767px) {
  .preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 70px;
  }
}
