@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

#gContainer.gallery {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 30px;
}

#gContainer.gallery .gTitle {
  font-size: 48px;
  font-weight: 400;
  margin: 30px 0 60px;
  font-family: "Montserrat", sans-serif;
  text-align: center;
  border-bottom: none;
}
#gContainer.gallery .gTitle img {
  width: 800px;
  height: auto;
}
#gContainer.gallery .gTitle span {
  font-size: 14px;
  display: block;
  font-weight: 400;
  font-family: "Noto Sans Japanese", sans-serif;
  margin-bottom: 10px;
}
#gContainer.gallery .galleryList {
  margin-top: 50px;
}
#gContainer.gallery .galleryList ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 15px 15px;
  margin: 0 auto;
}
#gContainer.gallery .galleryList ul li {
  width: calc((100% - 30px) / 3);
}
#gContainer.gallery .galleryList ul li a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transition: all 0.3s ease;
}
#gContainer.gallery .galleryList ul li a::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0); /* 初期は透明 */
  transition: background 0.3s ease;
  pointer-events: none; /* クリックの邪魔をしない */
}

#gContainer.gallery .galleryList ul li a:hover::after {
  background: rgba(0, 0, 0, 0.2); /* hover 時に色が変化 */
}
#gContainer.gallery .galleryList ul li a img {
  transition: none;
}
#gContainer.gallery .galleryList ul li a:hover img {
  opacity: 1;
}

/* modal */
#gContainer.gallery .modal {
  display: none;
  position: fixed;
  z-index: 100000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  justify-content: center;
  align-items: center;
  padding: 40px;
  box-sizing: border-box;
}

#gContainer.gallery .modal-content {
  position: relative;
  background: rgba(0, 0, 0, 0.8);
  padding: 60px 60px 50px 60px;
  color: white;
  max-width: 600px;
  max-height: 94vh;
  margin: 0 auto;
}

#gContainer.gallery .modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
}

#gContainer.gallery .modal-close::before,
#gContainer.gallery .modal-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 3px;
  background-color: white;
  transform-origin: center;
}

#gContainer.gallery .modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#gContainer.gallery .modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#gContainer.gallery .modal .overflow {
  max-height: 80vh;
  overflow-y: auto;
}
#gContainer.gallery .modal .image {
  max-width: 400px;
  max-height: 400px;
  width: auto;
  height: auto;
  margin: 0 auto;
}
#gContainer.gallery .modal .image img {
  width: 100%;
  height: auto;
  max-width: 100%;
}
#gContainer.gallery .modal .text {
  margin: 30px auto;
}
#gContainer.gallery .modal .text p {
  text-align: center;
}
#gContainer.gallery .modal .text p.strong {
  font-family: "Noto Sans Japanese bold", sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 20px;
}
@media only screen and (min-width: 1900px) {
  #gContainer.gallery .modal-content {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    padding: 100px 60px 50px 60px;
    color: white;
    max-width: 700px;
    max-height: 980px;
    margin: 0 auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
  }
  #gContainer.gallery .modal .image {
    max-width: 500px;
    max-height: 500px;
  }
}

@media only screen and (max-width: 767px) {
  #gContainer.gallery #pathNavi {
    padding: 0 10px;
    box-sizing: border-box;
  }
  #gContainer.gallery {
    width: 100%;
    max-width: none;
    padding-top: 10px;
  }
  #gContainer.gallery .gTitle {
    font-size: 32px;
    margin: 35px 0 10px;
  }
  #gContainer.gallery .gTitle img {
    width: 92%;
    height: auto;
  }
  #gContainer.gallery .galleryList {
    margin-top: 20px;
  }
  #gContainer.gallery .galleryList ul {
    gap: 8px 8px;
    padding: 0 14px;
  }
  #gContainer.gallery .galleryList ul li {
    width: calc((100% - 8px) / 2);
  }

  /* modal */
  #gContainer.gallery .modal {
    padding: 50px 20px 20px 20px;
  }

  #gContainer.gallery .modal-content {
    padding: 50px 40px 50px 40px;
    height: 75vh;
    width: 90%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
  }
  #gContainer.gallery .modal-close {
    top: 6px;
    right: 6px;
  }
  #gContainer.gallery .modal-close::before,
  #gContainer.gallery .modal-close::after {
    width: 16px;
    height: 2px;
  }

  #gContainer.gallery .modal .overflow {
    max-height: 85vh;
  }

  #gContainer.gallery .modal .text {
    margin: 20px auto 0 auto;
  }
  #gContainer.gallery .modal .text p {
    margin-bottom: 15px;
    font-size: 12px;
  }
  #gContainer.gallery .modal .text p.strong {
    font-size: 13px;
    margin-bottom: 15px;
  }
}
@media screen and (max-height: 719px) {
  #gContainer.gallery .modal {
    padding: 20px 20px 20px 20px;
  }
  #gContainer.gallery .modal .overflow {
    max-height: 85vh;
  }

  #gContainer.gallery .modal-content {
    padding: 50px 40px 40px 40px;
    height: 80vh;
    width: 86%;
    max-height: 630px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
  }
  #gContainer.gallery .modal .text p {
    margin-bottom: 15px;
    font-size: 9px;
  }
  #gContainer.gallery .modal .text p.strong {
    font-size: 10px;
    margin-bottom: 15px;
  }
}
