@charset "utf-8";

.gallery {
    width: 88.9%;
    margin: 165px auto 80px;
}

/* タイトル */
.gallery__title {
    display: flex;
    align-items: center;
    position: relative;
}
.gallery__titlemain {
    font-family: Kanit;
    font-size: max(4rem, 5.5vw);
    font-weight: 700;
    line-height: 71.25%;
}
.gallery__title02 {
    font-size: max(1.2rem, 0.97vw);
    font-weight: 700;
    line-height: 95%;
    position: absolute;
    bottom: 1.5%;
    left: 26%;
}
@media screen and (min-width: 1600px) {
  .gallery {
      margin: 175px auto 80px;
  }
}
@media screen and (min-width: 1800px) {
  .gallery {
      margin: 200px auto 80px;
  }
}
@media screen and (min-width: 2200px) {
  .gallery {
      margin: 250px auto 80px;
  }
}
@media screen and (max-width: 1400px) {
    .gallery {
        margin: 155px auto 80px;
    }
}
@media screen and (max-width: 1300px) {
    .gallery {
        margin: 145px auto 80px;
    }
}
@media screen and (max-width: 1200px) {
    .gallery {
        margin: 135px auto 80px;
    }
}
@media screen and (max-width: 1160px) {
    .gallery {
        margin: 130px auto 70px;
    }
}
@media screen and (max-width: 960px) {
    .gallery {
        margin: 120px auto 60px;
    }
    
    /* タイトル */
    .gallery__titlemain {
        font-family: Kanit;
        font-size: 5rem;
        font-weight: 600;
        line-height: 71.25%;
    }
    .gallery__title02 {
        position: relative;
        left: 0px;
        bottom: -11px;
    }
}
@media screen and (max-width: 860px) {
    .gallery {
        margin: 120px auto 50px;
    }
}
@media screen and (max-width: 769px) {
    .gallery {
        margin: 120px auto 40px;
    }
}
@media screen and (max-width: 680px) {
    .gallery {
        width: 94.6%;
    }
    .gallery {
        margin: 120px auto 26px;
    }
}
@media screen and (max-width: 530px) {
    .gallery {
        margin: 110px auto 26px;
    }
}
@media screen and (max-width: 480px) {
    .gallery {
        margin: 100px auto 26px;
    }
    
    /* タイトル */
    .gallery__title02 {
        position: relative;
        top: 8px;
    }
    .gallery__titlemain {
        font-size: 4rem;
    }
}



/* フィルターボタン */
.filter__box {
    display: flex;
    align-items: center;
    margin-left: 5.555%;
}
.filter-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}
.filter__title {
    color: #919191;
    font-family: Kanit;
    font-size: max(1.2rem, 1.3vw);
    font-weight: 600;
    margin-right: 15px;
}
.filter-box {
  border: solid 3px #1A1A1A;
  border-radius: 50px;
  border-radius: 50px;
    background: #FFF;
    box-shadow: 3px 3px 0px 0px #1A1A1A;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.filter-box:hover {
    color:#fff;
    text-shadow: none;
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px 0px #1A1A1A;
}
.filter-buttons button {
  padding: 5px 20px;
  cursor: pointer;
  color: #1A1A1A;
    font-family: Kanit;
    font-size: clamp(1.4rem, 1.73vw, 28rem);
    font-weight: 700;
}
@media screen and (max-width: 769px) {
    .filter__box {
        display: block;
        margin-left: 5.555%;
        width: 380px;
    }
    .filter-buttons {
      gap: 15px;
    }
    .filter__title {
        font-size: 1.8rem;
        margin-right: 0px;
        margin-bottom: 5px;
    }
    .filter-box {
      border: solid 3px #1A1A1A;
      border-radius: 50px;
      border-radius: 50px;
        background: #FFF;
        box-shadow: 3px 3px 0px 0px #1A1A1A;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        cursor: pointer;
    }
    .filter-box:hover {
        color:#fff;
        text-shadow: none;
        transform: translate(3px, 3px);
        box-shadow: 0px 0px 0px 0px #1A1A1A;
    }
    .filter-buttons button {
      padding: 5px 20px;
      cursor: pointer;
      color: #1A1A1A;
        font-family: Kanit;
        font-size: clamp(1.4rem, 1.73vw, 28rem);
        font-weight: 700;
    }
}
@media screen and (max-width: 680px) {
    .filter__box {
        display: block;
        margin-left: 2.66%;
        width: 355px;
    }
    .filter-buttons {
      gap: 10px;
    }
    .filter__title {
        font-size: 1.8rem;
        margin-right: 0px;
        margin-bottom: 5px;
    }
    .filter-box {
      border: solid 2px #1A1A1A;
      border-radius: 50px;
      border-radius: 50px;
        background: #FFF;
        box-shadow: 3px 3px 0px 0px #1A1A1A;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        cursor: pointer;
    }
    .filter-box:hover {
        color:#fff;
        text-shadow: none;
        transform: translate(3px, 3px);
        box-shadow: 0px 0px 0px 0px #1A1A1A;
    }
    .filter-buttons button {
      padding: 5px 20px;
      cursor: pointer;
      color: #1A1A1A;
        font-family: Kanit;
        font-size: clamp(1.4rem, 1.73vw, 28rem);
        font-weight: 700;
    }
}
@media screen and (max-width: 480px) {
    .filter__box {
        display: block;
        margin-left: 2.66%;
        width: 355px;
    }
    .filter-buttons {
      gap: 10px;
    }
    .filter__title {
        font-size: 1.8rem;
        margin-right: 0px;
        margin-bottom: 5px;
    }
    .filter-box {
      border: solid 2px #1A1A1A;
      border-radius: 50px;
      border-radius: 50px;
        background: #FFF;
        box-shadow: 3px 3px 0px 0px #1A1A1A;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        cursor: pointer;
    }
    .filter-box:hover {
        color:#fff;
        text-shadow: none;
        transform: translate(3px, 3px);
        box-shadow: 0px 0px 0px 0px #1A1A1A;
    }
    .filter-buttons button {
      padding: 5px 19px;
      cursor: pointer;
      color: #1A1A1A;
        font-family: Kanit;
        font-size: clamp(1.4rem, 1.73vw, 28rem);
        font-weight: 700;
    }
}


/* マソンリー */
.img {
  border-radius: 10px;
  transition: 0.7s;
}
.img:hover {
    opacity: .8;
}

.img:hover {
    transform: scale(1.05);
}
.masonry {
  width: 1280px;
  display: flex;
  flex-wrap: wrap;
  margin: 55px auto 150px; /* 上の余白補正 */
}
.masonry-item {
  width: 308.8px;
  margin-top: 15px;
  transition: all 0.4s ease; /* opacity, transform に加えて幅なども反映 */
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  pointer-events: auto;
  cursor: pointer;
}
.masonry-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 1;
  transform: scale(1);
}
.masonry-item.fade-in {
  opacity: 1;
  transform: scale(1);
}
.masonry-item.fade-out {
  opacity: 0;
  transform: scale(0.0);
}
.masonry-item.hidden {
  display: none;
}
@media screen and (min-width: 1600px) {
  .masonry {
    width: 1400px;
  }
  .masonry-item {
    width: 338.8px;
  }
}
@media screen and (min-width: 1800px) {
  .masonry {
    width: 1600px;
  }
  .masonry-item {
    width: 388.99px;
  }
}
@media screen and (min-width: 2100px) {
  .masonry {
    width: 1800px;
  }
  .masonry-item {
    width: 348.1px;
  }
}
@media screen and (min-width: 2300px) {
  .masonry {
    width: 2000px;
  }
  .masonry-item {
    width: 388.19px;
  }
}
@media screen and (min-width: 2500px) {
  .masonry {
    width: 2200px;
  }
  .masonry-item {
    width: 428.2px;
  }
}
@media screen and (max-width: 1400px) {
    .masonry {
        width: 1100px;
      }
      .masonry-item {
        width: 263.7px;
      }
}
@media screen and (max-width: 1300px) {
    .masonry {
        width: 1000px;
      }     
      .masonry-item {
        width: 238.9px;
      }
}
@media screen and (max-width: 1160px) {
    .masonry {
        width: 900px;
        margin: 55px auto 120px; /* 上の余白補正 */
      }  
      .masonry-item {
        width: 213.9px;
      }
}
@media screen and (max-width: 1060px) {
    .masonry {
        width: 820px;
      }
      .masonry-item {
        width: 263.5px;
      }
}
@media screen and (max-width: 960px) {
    .masonry {
        width: 750px;
        margin: 35px auto 110px; /* 上の余白補正 */
      } 
      .masonry-item {
        width: 240px;
      }
}
@media screen and (max-width: 860px) {
    .masonry {
        width: 700px;
        margin: 40px auto 80px; /* 上の余白補正 */
      }
      .masonry-item {
        width: 223.6px;
      }
}
@media screen and (max-width: 769px) {
    .masonry {
        width: 630px;
      }
      .masonry-item {
        width: 307.7px;
        margin-top: 20px;
      }
}
@media screen and (max-width: 700px) {
    .masonry {
        width: 580px;
      }
      .masonry-item {
        width: 282.5px;
        margin-top: 15px;
      }
}
@media screen and (max-width: 620px) {
    .masonry {
        width: 520px;
      }
      .masonry-item {
        width: 252.4px;
      }
}
@media screen and (max-width: 550px) {
    .masonry {
        width: 450px;
      }
      .masonry-item {
        width: 217.4px;
      }
}
@media screen and (max-width: 480px) {
    .masonry {
        width: 400px;
        margin: 30px auto 80px; /* 上の余白補正 */
      }
      .img {
        border-radius: 8px;
      }
      .masonry-item {
        width: 195.2px;
        margin-top: 10px;
      }
}
@media screen and (max-width: 420px) {
    .masonry {
        width: 370px;
      }
      .masonry-item {
        width: 180px;
        margin-top: 10px;
      }
}
@media screen and (max-width: 390px) {
    .masonry {
        width: 355px;
      }
      .masonry-item {
        width: 172.5px;
        margin-top: 10px;
      }
}










/* 画像拡大 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;

  /* 最初は非表示 */
  opacity: 1;
  transition: opacity 0.3s ease;
}
.modal.hidden {
  pointer-events: none;
  opacity: 0;
}
.modal-img {
  max-width: 70%;
  max-height: 70%;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  cursor: default;
}
.modal-close {
  position: fixed;
  top: 10%;
  right: 10%;
  font-size: 30px;
  color: white;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  z-index: 1100;
    transition: transform 0.3s ease;
}
.modal-close:hover {
    transform: scale(1.3);
}











