/* メインビジュアル */
.main-visual {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.mv-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.mv-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 2s ease;
  overflow: hidden;
  z-index: 0;
}

.mv-slide.active {
  opacity: 1;
  z-index: 1;
}

.mv-slide-inner {
  position: absolute;
  /* 内部要素を拡大して常にアニメーション用の余白を確保 */
  top: -10%;
  left: -10%;
  width: 140%;
  height: 140%;
  background-size: cover;
  background-position: center;
  will-change: transform, background-position;
  animation-fill-mode: forwards;
}

/* アニメーション効果のクラス */
/* ズームイン効果 */
.zoom-in .mv-slide-inner {
  animation: zoomIn 7.5s ease-out forwards;
}

/* ズームアウト効果 */
.zoom-out .mv-slide-inner {
  animation: zoomOut 7.5s ease-out forwards;
}

/* 上から下へのパン効果 */
.pan-top-to-bottom .mv-slide-inner {
  animation: panTopToBottom 7.5s ease-out forwards;
  background-position: center top;
}

/* 下から上へのパン効果 */
.pan-bottom-to-top .mv-slide-inner {
  animation: panBottomToTop 7.5s ease-out forwards;
  background-position: center bottom;
}

/* ゆっくりとしたズームイン＋上から下へのパン */
.zoom-pan-top-to-bottom .mv-slide-inner {
  animation: zoomPanTopToBottom 7.5s ease-out forwards;
  background-position: center top;
}

/* ゆっくりとしたズームイン＋下から上へのパン */
.zoom-pan-bottom-to-top .mv-slide-inner {
  animation: zoomPanBottomToTop 7.5s ease-out forwards;
  background-position: center bottom;
}

/* ズームイン＋左から右へのパン */
.zoom-pan-left-to-right .mv-slide-inner {
  animation: zoomPanLeftToRight 7.5s ease-out forwards;
  background-position: left center;
}

/* ズームイン＋右から左へのパン */
.zoom-pan-right-to-left .mv-slide-inner {
  animation: zoomPanRightToLeft 7.5s ease-out forwards;
  background-position: right center;
}

/* アニメーションキーフレーム */
@keyframes zoomIn {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.2);
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes panTopToBottom {
  from {
    background-position: center top;
  }
  to {
    background-position: center bottom;
  }
}

@keyframes panBottomToTop {
  from {
    background-position: center bottom;
  }
  to {
    background-position: center top;
  }
}

@keyframes zoomPanTopToBottom {
  from {
    transform: scale(1);
    background-position: center 10%;
  }
  to {
    transform: scale(1.15);
    background-position: center 90%;
  }
}

@keyframes zoomPanBottomToTop {
  from {
    transform: scale(1);
    background-position: center 90%;
  }
  to {
    transform: scale(1.15);
    background-position: center 10%;
  }
}

@keyframes zoomPanLeftToRight {
  from {
    transform: scale(1);
    background-position: 0% center;
  }
  to {
    transform: scale(1.15);
    background-position: 100% center;
  }
}

@keyframes zoomPanRightToLeft {
  from {
    transform: scale(1);
    background-position: 100% center;
  }
  to {
    transform: scale(1.15);
    background-position: 0% center;
  }
}

.mv-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  width: 100%;
  padding: 0 20px;
  z-index: 10;
}

.mv-text {
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mv-text img {
  max-width: 450px;
  margin-bottom: 20px;
}

.mv-text h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 3vw;
  margin-bottom: 20px;
  line-height: 1.5;
  text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
}

.scroll-down {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  z-index: 10;
}

.scroll-down::after {
  content: '';
  width: 1px;
  height: 40px;
  background-color: #fff;
  margin-top: 10px;
  animation: scrollDown 2s ease infinite;
}

@keyframes scrollDown {
  0% {
    height: 0;
    opacity: 0;
  }
  50% {
    height: 40px;
    opacity: 1;
  }
  100% {
    height: 0;
    opacity: 0;
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .mv-text h2 {
    font-size: 24px;
  }
  
  .mv-text img {
    max-width: 80%;
  }
}

/* ウィンドウ幅が狭い場合の調整（例：600px以下） */
@media screen and (max-width: 600px) {
  .mv-slide-inner {
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
  }
}