@charset "utf-8";

/*
 * Custom slide show
 */

.slider {
  margin-top: 50px; /* ナビゲーションメニューの高さ分だけ下げる */
  width: 100%;
  height: 40vh;
  overflow: hidden;
  position: relative;
  max-width: 100%;
  /* margin: 0px 0px 20px 20px; */
}

.slider div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 10;
  opacity: 0;
  animation-name: slide-fade;
  animation-duration: 70s; /* スライド枚数×10s + 任意で追加*/
  animation-iteration-count: infinite;
  transform: scale(1.3); /* 最初に画像を大きくしておく */
}

@keyframes slide-fade {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 0;
    transform: scale(1); /* ここで画像サイズを1に戻す */
  }
  100% {
    opacity: 0;
    z-index: 0;
  }
}

.slider div:first-of-type {
  background-image: url(../figures/w001.jpg);
}
.slider div:nth-of-type(2) {
  background-image: url(../figures/w002.jpg);
  animation-delay: 30s; /* 秒数を変更 */
}
.slider div:nth-of-type(3) {
  background-image: url(../figures/w003.jpg);
  animation-delay: 40s; /* 秒数を変更 */
}
.slider div:nth-of-type(4) {
  background-image: url(../figures/w004.jpg);
  animation-delay: 50s; /* 秒数を変更 */
}
.slider div:nth-of-type(5) {
  background-image: url(../figures/w005.jpg);
  animation-delay: 60s; /* 秒数を変更 */
}
.slider div:nth-of-type(6) {
  background-image: url(../figures/w006.jpg);
  animation-delay: 70s; /* 秒数を変更 */
}

/* ポスターのズームアウト表示 */

@keyframes zoomOut {
  0% {
    transform: scale(5) translateX(-25%) translateY(-15%); /* 拡大と同時に左上に移動 */
  }
  100% {
    transform: scale(1) translateX(0) translateY(0); /* 通常サイズに戻り、中央に位置 */
  }
}

.poster_container {
  width: 100%; /* 親要素の幅 */
  height: 100%; /* 親要素の高さ */
  overflow: hidden; /* はみ出しを非表示にする */
  position: relative;
  margin-bottom: 10px; /* ナビゲーションメニューの高さ分だけ下げる */
}

.poster_container img {
  width: 100%; /* 画像を親要素の幅に合わせる */
  height: 100%; /* 画像を親要素の高さに合わせる */
  object-fit: cover; /* 縦横比を維持しながら要素全体を覆う */
  animation: zoomOut 30s ease-out forwards;
}
