/* p-gallery
---------------------------------------------------------------------------- */
.p-gallery {
  padding-block: 10rem;
}

.p-gallery-txt {
  text-align: center;
  margin-bottom: 4rem;
}

.p-gallery-tab-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.p-gallery-tab-contents {
  margin-top: 4rem;
}

.p-gallery-tab-content {
  display: none;
}

.p-gallery-tab-content.is_active {
  display: block;
}

.p-gallery-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2rem;
}

.p-gallery-wrap._column-1 {
  grid-template-columns: repeat(1, 1fr);
}

.p-gallery-img {
  cursor: pointer;
  width: 100%;
  aspect-ratio: 3/2;
  opacity: 1;
  transition: opacity 0.3s;
}

.p-gallery-img:hover {
  opacity: 0.7;
}

.p-gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.p-gallery-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.8);
}

.p-gallery-modal-content {
  position: relative;
  margin: 3% auto;
  padding-block: 7rem 3rem;
  padding-inline: 5rem;
  width: 100%;
  max-width: 76.7rem;
  background: #fff;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s;
}

.p-gallery-modal-close {
  display: grid;
  place-content: center;
  width: 5rem;
  aspect-ratio: 1;
  background-color: #059856;
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
}

.p-gallery-modal-close span {
  display: grid;
  grid-template-columns: auto;
}

.p-gallery-modal-close span::before,
.p-gallery-modal-close span::after {
  grid-column: 1/2;
  grid-row: 1/2;
  content: "";
  width: 3rem;
  height: 0.3rem;
  background-color: #fff;
  border-radius: 10vmax;
}

.p-gallery-modal-close span::before {
  rotate: 45deg;
}

.p-gallery-modal-close span::after {
  rotate: -45deg;
}

.p-gallery-modal-img {
  width: 60rem;
  aspect-ratio: 3/2;
  margin-inline: auto;
}

.p-gallery-modal-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.p-gallery-modal-prev,
.p-gallery-modal-next {
  display: grid;
  place-content: center;
  width: 5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: #059856;
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  cursor: pointer;
}
.p-gallery-modal-prev::before,
.p-gallery-modal-next::before {
  content: "";
  width: 1rem;
  aspect-ratio: 1;
  color: #fff;
  border-top: 0.4rem solid;
  border-right: 0.4rem solid;
}

.p-gallery-modal-prev {
  left: 1rem;
}
.p-gallery-modal-prev::before {
  translate: 14%;
  rotate: -135deg;
}

.p-gallery-modal-next {
  right: 1rem;
}
.p-gallery-modal-next::before {
  translate: -14%;
  rotate: 45deg;
}

@media screen and (max-width: 767px) {
  .p-gallery {
    padding-block: 13.3333333333vw;
  }
  .p-gallery-txt {
    margin-bottom: 10.6666666667vw;
  }
  .p-gallery-tab-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 5.3333333333vw;
  }
  .p-gallery-tab-contents {
    margin-top: 10.6666666667vw;
  }
  .p-gallery-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 5.3333333333vw;
  }
  .p-gallery-wrap._column-1 {
    grid-template-columns: repeat(1, 1fr);
  }
  .p-gallery-modal {
    padding-inline: 2.6666666667vw;
  }
  .p-gallery-modal-content {
    margin: 10% auto;
    padding-block: 10.6666666667vw 5.3333333333vw;
    padding-inline: 2.6666666667vw;
    max-width: 100%;
    box-shadow: 0 2.6666666667vw 8vw rgba(0, 0, 0, 0.5);
  }
  .p-gallery-modal-close {
    width: 8vw;
  }
  .p-gallery-modal-close span::before,
  .p-gallery-modal-close span::after {
    width: 4vw;
    height: 0.5333333333vw;
  }
  .p-gallery-modal-img {
    width: 100%;
  }
  .p-gallery-modal-prev,
  .p-gallery-modal-next {
    width: 8vw;
    top: 89%;
    translate: 0 -50%;
  }
  .p-gallery-modal-prev::before,
  .p-gallery-modal-next::before {
    width: 1.6vw;
    border-top: 0.5333333333vw solid;
    border-right: 0.5333333333vw solid;
  }
  .p-gallery-modal-prev {
    left: 2.6666666667vw;
  }
  .p-gallery-modal-next {
    right: 2.6666666667vw;
  }
}
