@charset "UTF-8";

main {
  padding-bottom: 5rem;
}

main.photogallery h1 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
  margin: 0 auto;
  padding-top: 3rem;
}

main.photogallery .en {
  font-size: 1.2rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  text-align: center;
  color: var(--primary-color);
  margin: 1rem auto 0;
}

.photogaller__anchor--group ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding-right: 1rem;
}

.photogaller__anchor--group ul li {
  position: relative;
  margin-left: 1rem;
  padding-left: 1rem;
}

.photogaller__anchor--group ul li:not(:first-child)::before {
  content: "";
  position: absolute;
  top: calc(50% + 2px);
  left: 0;
  display: block;
  width: 1px;
  height: 20px;
  background-color: #d8dce7;
  transform: translateY(-50%);
}

.photogaller__anchor--group ul li a {
  font-size: 1.4rem;
  color: var(--primary-color);
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.photogaller__anchor--group ul li a:active {
  color: #333;
  text-decoration: underline;
}

.photogallery__contents {
  background-color: #fff;
  border: solid 1px var(--border-color);
  border-radius: var(--radius);
  margin: 3rem 2rem 4rem;
  padding: 3rem 2rem;
}

.photogallery__contents h2 {
  position: relative;
  margin: 0 0 2rem;
  padding: 1rem 3.5rem 1rem 1rem;
  color: var(--primary-color);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.3;
  background-color: var(--bg02-color);
  border-left: solid 5px var(--primary-color);
  cursor: pointer;
}

.photogallery__contents h2::before,
.photogallery__contents h2::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 15px;
  height: 3px;
  background-color: var(--primary-color);
  transition: transform 0.3s ease-out;
}

.photogallery__contents h2::after {
  transform: translateY(-50%) rotate(90deg);
}

.photogallery__contents h2::before {
  transform: translateY(-50%);
}

.photogallery__contents--inner.is-open h2::after {
  transform: translateY(-50%) rotate(0deg);
}

.gallery__group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  max-height: 0;
}

.photogallery__contents--inner.is-open .gallery__group {
  max-height: 1500px;
  margin-bottom: 4rem;
}

.gallery__group button {
  width: calc(50% - (1rem / 2));
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.gallery__group button img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease-in-out;
}

.modal-trigger-button:active img {
  transform: scale(1.1);
}

.modal-trigger-button {
  cursor: pointer;
}

.gallery__group>* {
  overflow: hidden;
}

/* モーダルコンテンツ */
#gallery-modal {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;

  .modal-content {
    border: none;
    box-shadow: none;
    border-radius: var(--radius);
  }

  .modal-body {
    padding: 0;
  }
}

#gallery-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  max-width: calc(100% - 3rem);
  width: 100%;
  max-height: calc(100% - 3rem);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  z-index: 1001;
}

#gallery-modal.is-visible .modal-content {
  transform: translateY(0);
}

.modal-close-button {
  position: absolute;
  top: -15px;
  right: -10px;
  background-color: #fff;
  border: solid 1px #afafaf;
  border-radius: 100px;
  font-size: 1.6rem;
  font-weight: 900;
  cursor: pointer;
  width: 3rem;
  height: 3rem;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  z-index: 1002;
}

.gallery-content figure {
  margin: 0;
}

.gallery-content iframe {
  width: 100%;
  aspect-ratio: 16/9;
}

.gallery-content figure figcaption {
  font-weight: 700;
  line-height: 1.4;
  color: #333;
  margin-top: 1rem;
}

.gallery-content figure p {
  font-size: 1.2rem;
  color: #333;
  margin: 0.75rem 0 0;
}

/* タブレット */
@media screen and (min-width: 768px) {}

/* PC */
@media screen and (min-width: 1138px) {
  main {
    padding-bottom: 12rem;
  }

  main.photogallery h1 {
    font-size: 3.6rem;
    margin: 0 auto;
    padding-top: 8rem;
  }

  main.photogallery .en {
    font-size: 1.5rem;
  }

  .photogaller__anchor--group ul {
    margin-top: 5rem;
  }

  .photogaller__anchor--group ul li {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
  }

  .photogaller__anchor--group ul li:not(:first-child)::before {
    top: calc(50% + 1px);
    height: 24px;
  }

  .photogaller__anchor--group ul li a {
    font-size: 1.6rem;
  }

  .photogaller__anchor--group ul li a:hover {
    color: #333;
    text-decoration: underline;
  }

  .photogallery__contents {
    max-width: var(--contents-width);
    width: 100%;
    margin: 6rem auto 0;
    padding: 6rem calc(6rem - 2px) 2rem;
  }

  .photogallery__contents h2 {
    font-size: 2.4rem;
    margin: 0 0 4rem;
    padding: 1rem 1rem 1rem 2rem;
  }

  .photogallery__contents h2::before,
  .photogallery__contents h2::after {
    right: 20px;
  }

  .gallery__group {
    gap: 3rem;
  }

  .gallery__group button {
    width: 23.2rem;
  }

  .modal-trigger-button:hover img {
    transform: scale(1.1);
  }

  /* モーダルコンテンツ */
  .modal-content {
    max-width: 69rem;
    width: 100%;
    padding: 2.5rem;
  }

  .gallery-content figure figcaption {
    margin-top: 1rem;
  }

  .gallery-content figure p {
    font-size: 1.5rem;
  }

  .modal-close-button {
    top: -30px;
    right: -30px;
    font-size: 3rem;
    font-weight: 500;
    width: 6rem;
    height: 6rem;
  }

  /* スクロールバー対策 */
  body.modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width);
  }

  body.modal-open header {
    width: 100vw;
    padding: 2rem calc(3rem + var(--scrollbar-width)) 0 3rem;
  }

  body.modal-open main {
    width: 100vw;
    padding-right: var(--scrollbar-width);
  }

  body.modal-open footer {
    width: 100vw;
    padding-right: var(--scrollbar-width);
  }

  body.modal-open .sec__gallery::before {
    right: calc(50% - 50vw - var(--scrollbar-width));
    width: calc(50vw + var(--scrollbar-width));
  }
}