@charset "utf-8";
/*==========================
 Gallery
==========================*/
.section--gallery {
  background: var(--primary-accent-skyBlue);
  width: 100%;
  padding: 60px 0 0;
  position: relative;
}

.gallery__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--contentPadding);
}

.section__galleryTitle {
  color: var(--primary-softWhite);
  text-align: center;
  font-family: Zen Maru Gothic;
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.6em;
  margin: 120px auto 0;
    
}

.galleryParts {
  position: absolute;
  /* content: ""; */
  background-repeat: no-repeat; 
  background-size: contain;
  background-position: center;
  pointer-events: none;
  display: block;
  z-index: 1;
}

.galleryParts--01 {
  background-image: url("../images/parts-trees.svg");
  height: 100px;
  width: 100px;
  left: 60px;
  top: 100px;
  translate: 0 -50%;
  opacity: 0.9;
}

.galleryParts--02 {
  background-image: url("../images/parts-kounotori.svg");
  height: 90px;
  width: 90px;
  right: 60px;
  top: 150px;
  translate: 0 -50%;
  opacity: 0.3;
  transform: rotate(350deg);
}

.galleryParts--03 {
  background-image: url("../images/parts-tree01.svg");
  height: 50px;
  width: 50px;
  right: 55px;
  bottom: 155px;
  translate: 0 -50%;
  opacity: 0.9;
}

.galleryParts--04 {
  background-image: url("../images/parts-suzuranz.svg");
  height: 90px;
  width: 90px;
  right: 38%;
  bottom: 50px;
  translate: 0 -50%;
  opacity: 0.6;
}

.galleryParts--05 {
  background-image: url("../images/parts-suzuran01.svg");
  height: 46px;
  width: 46px;
  left: 35px;
  bottom: 35%;
  translate: 0 -50%;
  opacity: 0.6;
}

.gallery__grid {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  z-index: 2;
}

.gallery__item {
  text-align: center;
  padding-bottom: 10px;
  background-color: var(--primary-base-milkBeige);
  border-radius: 0.8rem;
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 6px 6px 0 0 ;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 8px;
}

.gallery__item figcaption {
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 1.4rem;
  color: var(--primary-charcoalGray);
  line-height: 1.6;
  opacity: 0.95;
}

/* section区切り skyGray */
.wrap__skyBlue {
  width: 100%;
  background-color: var(--primary-base-skyGray);
  margin-top: 0;
  padding: 0;
}

/* Gallery SP */
@media screen and (max-width: 769px) {
.section__galleryTitle {
    font-size: 2rem;
    letter-spacing: 0.3em;
    margin-top: 0 ;
  }

  .galleryParts--01 {
    height: 45px;
    width: 45px;
    left: 15px;
    top: 30px;
  }

  .galleryParts--02 {
    height: 45px;
    width: 45px;
    right: 20px;
    top: 35px;
  }

  .galleryParts--03,
  .galleryParts--04,
  .galleryParts--05 {
    display: none;
  }

  .gallery__inner {
    padding: 0 20px;
  }

  .gallery__grid {
    margin: 40px auto;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
  }

  .gallery__item img {
    border-radius: 8px;
  }

  .gallery__item figcaption {
    font-size: 1.2rem;
  }

}/* sp 769px */
/*==========================
 Gallery Modal
==========================*/
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  /* スクロールはコンテナ側で制御 */
}

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

.gallery-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.gallery-modal__container {
  position: relative;
  z-index: 1;
  background: var(--primary-accent-skyBlue);
  width: 92%;
  max-width: 1160px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  margin: 5vh auto;
  /* 開閉アニメーション */
  transform: translateY(24px);
  transition: transform 0.35s ease;
  /* スクロールバーをきれいに */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.4) transparent;
}

.gallery-modal.is-open .gallery-modal__container {
  transform: translateY(0);
}

.gallery-modal__header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--primary-accent-skyBlue);
  padding: 28px 36px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px 16px 0 0;
  /* 下にスクロールしたとき影で区切り感を出す */
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.gallery-modal__title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-softWhite);
  letter-spacing: 0.5em;
  line-height: 1;
}

.gallery-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.gallery-modal__close:hover {
  background: rgba(255,255,255,0.2);
  opacity: 0.8;
}

.gallery-modal__close img {
  width: 28px;
  height: 28px;
  display: block;
}

.gallery-modal__body {
  padding: 32px 36px 40px;
}

/* モーダル内のgridはgallery.cssの既存スタイルを流用 */
.gallery-modal__body .gallery__grid {
  margin-top: 0;
}

/* Gallery Modal SP */
@media screen and (max-width: 769px) {
  .gallery-modal__container {
    width: 96%;
    max-height: 88vh;
    margin: 6vh auto;
    border-radius: 12px;
  }

  .gallery-modal__header {
    padding: 20px 20px 16px;
    border-radius: 12px 12px 0 0;
  }

  .gallery-modal__title {
    font-size: 1.8rem;
    letter-spacing: 0.25em;
  }

  .gallery-modal__close img {
    width: 24px;
    height: 24px;
  }

  .gallery-modal__body {
    padding: 20px 16px 32px;
  }
}
