.containar-5 {
    background-image: url('/contents/4x/BGぱたーん@4x.png'); /* タイルとして使いたい画像 */
    background-repeat: repeat; /* 画像をタイル状に繰り返す */
    background-size: calc(10vw + 100px) auto; /* 横幅を1pxだけ大きくする */
    width: 100%;
}



.section-title2 {
    font-size: 2em;
    color: #ddc79b;
    border-bottom: 1px solid #ddc79b;
    margin-bottom: 50px;
    margin-top: 50px;
    width: 80%;
    
}

.gallery-warpper3{
max-width: 1100px;
margin: 0 auto;
}

.gallery-container2{
    position: relative;
    max-width: none;

}

.monstar-list2 {
    max-width: 100vw;
}


  .content-hover2:hover {

    cursor: pointer;
  }


  .monstars2 {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;

}







/* 各スライドアイテム */
.content2 {
  position: relative;
  width: 20vw;
  height: 20vw;
  max-width: 300px;
  max-height: 300px;
  min-width: 300px;
  min-height: 300px;

  border: 4px solid #b11e00;
  box-sizing: border-box;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 画像サイズ */
.content2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



/* ホバー時に画像を暗くする */
.content-hover:hover img {
  opacity: 0.3;
}


/* 怪異の名前（日本語+英語） */
.content-text {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: calc(100% - 10px); /* 左右の余白を考慮 */
  border-bottom: #ddc79b solid 1px;
  color: #ddc79b;
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
  font-size: 16px;
  white-space: nowrap; /* テキストのはみ出し防止 */
  text-overflow: ellipsis; /* 長いテキストを省略 */
  overflow: hidden;
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 3;
}

.content-text .en {
  font-size: 12px;
}

/* ホバー時：怪異名を上に移動 */
.content-hover:hover .content-text {
  transform: translateY(-220px);
}

/* 説明テキスト（画像全体をカバー） */
.content-description {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* 親要素と同じ幅にする */
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: #ddc79b;
  padding: 15px;
  text-align: left;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow-y: auto;
  border-radius: 5px;
  box-sizing: border-box; /* 追加！パディング分ではみ出さないように */
}


.content-hover {
    transition: all 0.2s;
    margin-right: 0px;
  }

/* ホバー時の表示 */
.content-hover:hover .content-description {
  opacity: 1;
}

.content-hover:hover .more-button {
  opacity: 1;
  transform: translateY(-5px);
}

.boundary2 {
    max-width: 1100px;
    margin: auto;
}

.boundary2 img {
    width: 100%;
    margin-bottom: 50px;
    margin-top: 50px;
 
}










/* 画像一覧 */
.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 正方形のグリッド */
  gap: 10px;
  max-width: 1000px;
  margin: auto;
}

.photo-list img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 4px solid #b11e00; /* 赤い枠線 */
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

.photo-list img:hover {
  transform: scale(1.05);
}

/* モーダル（拡大表示） */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8); /* 背景を暗くする */
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* モーダル内のコンテンツ */
.modal-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}

.modal img {
  width: 100%;
  height: auto;
  max-height: 80vh; /* 画面サイズに収める */
  object-fit: contain;
  border: 4px solid #b11e00; /* 赤枠 */
}

/* 説明文 */
#modal-caption {
  color: #fff;
  margin-top: 10px;
  font-size: 1.2em;
}

/* 閉じるボタン */
.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
}

/* ナビゲーションボタン */
.modal-nav span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  padding: 10px;
}

#prev { left: 10px; }
#next { right: 10px; }
