@charset "UTF-8";

@media (min-width: 480px) {
}
@media (min-width: 768px) {
}
@media (min-width: 1025px) {
}

/* mainvisual */

.mainvisual {
  position: relative;

  &::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(var(--base-color-rgb), 0.4);
    z-index: 2;
  }
}

#mv_movie {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 50vh;

  @media (min-width: 1025px) {
    height: 100vh;
  }

  .mv-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;

    video {
      width: 100%;
      height: 100%;
      object-fit: cover; /* 縦横比を維持しながら領域全体を覆う */
      display: block;
    }
  }

  /* 動画上のテキストエリア */
  .onMv {
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--wht-color);
    text-align: center;

    & .mvcatch {
      font-size: clamp(2.6rem, 0.39rem + 8.11vw, 7rem);
      font-weight: var(--font-semibold);
    }
    & .mvcatch-tect {
      font-size: clamp(1.1rem, 0.87rem + 0.97vw, 1.6rem);
      width: 90%;
    }
  }
}

/* ↓↓↓youtube */
/* #mv_movie {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 50vh;

  @media (min-width: 1025px) {
    height: 100vh;
  }

  .mv-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;

     --------------------------------------------------
       初期状態（動画は非表示 / ローディングは表示）
       -------------------------------------------------- 
    iframe {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 100vw;
      height: 56.25vw;
      min-height: 100vh;
      min-width: 177.77vh;
      transform: translate(-50%, -50%) scale(1.2);
      pointer-events: none;

      opacity: 0;
      transition: opacity 0.8s ease;

      z-index: 1;
    }

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

       ★単色ではなく、動画のキャプチャ画像などを背景に敷いておく 
      background: url("/assets/img/sample.jpg") no-repeat center center;
      background-size: cover;

      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 2;
      opacity: 1;
      transition: opacity 0.5s ease;
    }

     💡初回再生が終わったら、中のぐるぐる（スピナー）だけを先に消す 
    &.is-video-ready {
      iframe {
        opacity: 1;
      }
      .loading-spinner {
        display: none; 
      }
      .mv-loading {
         背景画像は完全に消さず、動画の真後ろに隠し絵として配置しておく 
        z-index: 0;  iframe（z-indexの指定なし、または1）の後ろに回す 
        opacity: 1; 透明度は1のままにしておくことで、ループの隙間にこの画像が見える 
      }
    }
  }

   透明なガード板 
  .mv-guard {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;  ローディングや動画よりも上に配置 
    background: transparent;
  }

  .onMv {
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--wht-color);
    text-align: center;

    & .mvcatch {
      font-size: clamp(2.6rem, 0.39rem + 8.11vw, 7rem);
      font-weight: var(--font-semibold);
    }
    & .mvcatch-tect {
      font-size: clamp(1.1rem, 0.87rem + 0.97vw, 1.6rem);
      width: 90%;
    }
  }
}

 💡 シンプルなぐるぐる回るローディングアニメーション（デザインは自由に変えてください） 
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(26, 60, 64, 0.2);
  border-top-color: #1a3c40;  企業カラーなどに合わせると綺麗です 
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
} */
