.photogallery__top {
  width: 66%;
  margin: 0 0 350px auto;
}

@media (min-width: 715px) {
  .photogallery__top {
    margin: 0 0 65px auto;
  }
}

.photogallery__top h1 {
  font-family: var(--font-family-Bold);
  font-size: var(--font-size-30);
  margin: 0 0 25px 0;
}

.photogallery__text {
  font-size: var(--font-size-14);
  font-family: var(--font-family-Medium);
  line-height: 1.4;
  color: var(--color-light-gray);
}

.photogallery__list ul {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: (minmax(345px, 1fr))[auto-fill];
      grid-template-columns: repeat(auto-fill, minmax(345px, 1fr));
  gap: 15px;
}

.photogallery__list ul li {
  background-color: var(--color-gray);
  padding: 15px;
  border-radius: 10px;
}

.photogallery__list ul li:not(:first-child) {
  cursor: pointer;
}

.photogallery__list ul li:first-child {
  background-color: transparent;
  position: relative;
}

.photogallery__list ul li:first-child::before {
  content: "";
  position: absolute;
  width: 680px;
  height: 360px;
  top: -346px;
  right: -21%;
  background-image: url("./images/back.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: 50% 50%;
  z-index: -1;
}

@media (min-width: 432px) {
  .photogallery__list ul li:first-child::before {
    right: -3%;
  }
}
@media (min-width: 488px) {
  .photogallery__list ul li:first-child::before {
    right: 16%;
  }
}
@media (min-width: 590px) {
  .photogallery__list ul li:first-child::before {
    right: 31%;
  }
}
@media (min-width: 715px) {
  .photogallery__list ul li:first-child::before {
    width: 680px;
    height: 783px;
    top: -250px;
    right: 100px;
  }
}

.photogallery__list ul li h3 {
  text-align: center;
  line-height: 1.4;
}

.photogallery__item-img {
  height: 300px;
  margin: 0 0 20px 0;
}

.photogallery__item-img img {
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 8px;
  width: 100%;
  height: 100%;
}

.photogallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.photogallery-modal::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--color-black);
  opacity: 0.9;
}

.photogallery-modal__close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: var(--font-size-22);
  color: var(--color-white);
  border: 2px var(--color-white) solid;
  border-radius: 50%;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 1;
}

.photogallery-modal__container {
  background-color: var(--color-black);
  max-width: 1000px;
  height: 50vh;
}

.mySwiper2 {
  height: 50vh;
  width: 100%;
  margin: 0 0 10px 0;
  position: relative;
}

.mySwiper2 img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.swiper-button-next,
.swiper-button-next2,
.swiper-button-prev,
.swiper-button-prev2 {
  position: absolute;
  width: 30px;
  height: 30px;
  top: 50%;
  -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
          transform: translateY(-50%);
  border-top: 5px solid var(--color-gray);
  border-right: 5px solid var(--color-gray);
  z-index: 1;
  cursor: pointer;
}

.swiper-button-next,
.swiper-button-next2 {
  -webkit-transform: rotate(45deg);
      -ms-transform: rotate(45deg);
          transform: rotate(45deg);
  right: 20px;
}

.swiper-button-prev,
.swiper-button-prev2 {
  -webkit-transform: rotate(-135deg);
      -ms-transform: rotate(-135deg);
          transform: rotate(-135deg);
  left: 20px;
}

.mySwiper {
  height: 20vh;
  position: relative;
}

.mySwiper img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
