/* ========================================
   モバイル動画セクション全体
======================================== */
.mobile-video-section {
  display: none;
  width: 100%;
  height: 100vh;
  background: #000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  overflow: hidden;
}

.mobile-video-section.active {
  display: flex;
  flex-direction: column;
}

/* PC版表示時にモバイル版関連を非表示 */
.mobile-video-section.active ~ .header,
.mobile-video-section.active ~ .footer,
.mobile-video-section.active ~ .desktop-content {
  display: none;
}

/* ========================================
   動画スワイパーラッパー
======================================== */
.video-swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  scroll-behavior: smooth;
}

/* ========================================
   動画スライド基本構造
======================================== */
.video-swiper-slide {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.video-swiper-slide.active {
  display: flex;
}

/* ========================================
   スライド内のレイアウト層
======================================== */

/* 層1: 背景動画 */
.video-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

/* 層2: 黒オーバーレイ */
.overlay-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* 層3: テキストコンテナ */
.text-container {
  position: relative;
  z-index: 3;
  text-align: center;
  width: 85%;
  max-width: 90vw;
  pointer-events: none;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
  max-height: 50vh;
  overflow: hidden;
}

/* ========================================
   ケース用スライダーコンテナ
======================================== */
.case-slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

.case-slider-item {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 100%;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  
  transition: opacity 0.4s ease-out, left 0.4s ease-out;
}

.case-slider-item.active {
  left: 0;
  opacity: 1;
  pointer-events: auto;
}

.case-slider-item.prev {
  left: -100%;
}

/* ケース内のテキストコンテナ */
.case-slider-item .text-container {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  z-index: 10;
}

/* ========================================
   ケースページの背景固定
======================================== */
.video-swiper-slide.case-slide .video-layer,
.video-swiper-slide.case-slide .overlay-layer {
  position: fixed;
  z-index: 1;
}

/* ========================================
   最終CTA セクション
======================================== */
.mobile-cta-section {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 3rem 1.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  overflow-y: auto;
  background: #000;
}

.mobile-cta-section.active {
  display: flex;
}

/* 背景動画レイヤー */
.mobile-cta-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

/* オーバーレイレイヤー */
.mobile-cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* コンテンツレイヤー */
.mobile-cta-content {
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 3;
}

/* ========================================
   スワイプ操作最適化
======================================== */
.video-swiper-wrapper,
.video-swiper-slide,
.case-slider-item,
.mobile-cta-section {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ========================================
   パフォーマンス最適化
======================================== */
.video-layer,
.overlay-layer,
.text-container {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform;
}

/* ========================================
   フロートボタン調整（モバイル版） 
======================================== */
.float-button {
  opacity: 0.2;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.float-button:hover {
  opacity: 1;
}

/* ========================================
   デバイス別レスポンシブ
======================================== */
@media (max-width: 768px) {
  .mobile-video-section {
    display: flex;
  }

  .text-container {
    width: 90%;
  }
}

@media (max-width: 600px) {
  .mobile-cta-section {
    padding: 2rem 1.5rem;
  }

  .text-container {
    width: 85%;
  }
}

@media (max-width: 375px) {
  .mobile-cta-section {
    padding: 1.5rem 1rem;
  }

  .text-container {
    width: 80%;
    padding: 1.5rem 1rem;
  }
}