/* ==========================================================================
   モバイル専用ヒーロースライダー CSS（767px以下）
   ========================================================================== */

/* モバイルスライダー用のベースクラス - デスクトップでは非表示 */
.riff-mobile-hero-slider {
  display: none;
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

/* モバイルスライダーコンテナ */
.riff-mobile-slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* スライドラッパー */
.riff-mobile-slides-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* 個別スライド */
.riff-mobile-slide-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
}

/* スライドのビデオコンテナ */
.riff-mobile-slide-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.riff-mobile-slide-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* スライドオーバーレイ */
.riff-mobile-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* スライドコンテンツ */
.riff-mobile-slide-content {
  position: relative;
  width: 100%;
  padding: 30px 20px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 40%,
    transparent 100%
  );
  color: #fff;
  z-index: 3;
  text-align: center;
}

.riff-mobile-slide-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  line-height: 1.3;
}

.riff-mobile-slide-subtitle {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  opacity: 0.9;
}

.riff-mobile-slide-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: rgba(30, 115, 190, 0.9);
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.riff-mobile-slide-button:hover {
  background-color: rgba(58, 151, 228, 0.95);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* スライダーコントロール - 完全に非表示 */
.riff-mobile-slider-controls {
  display: none !important;
}

.riff-mobile-slider-nav {
  display: none !important;
}

.riff-mobile-slider-prev,
.riff-mobile-slider-next {
  display: none !important;
}

.riff-mobile-slider-dots {
  display: none !important;
}

.riff-mobile-slider-dot {
  display: none !important;
}

/* プログレスバー（オプション） */
.riff-mobile-slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 10;
  overflow: hidden;
}

.riff-mobile-slider-progress-bar {
  height: 100%;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.1s linear;
}

/* アニメーション */
@keyframes riffMobileSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.riff-mobile-slide-content.animate {
  animation: riffMobileSlideIn 0.6s ease-out;
}

/* スワイプ中の視覚フィードバック */
.riff-mobile-slides-wrapper.swiping {
  transition: none;
}

.riff-mobile-slides-wrapper.momentum {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ローディング状態 */
.riff-mobile-slider-loading {
  opacity: 0.7;
  pointer-events: none;
}

.riff-mobile-slider-loading .riff-mobile-slide-item {
  filter: blur(1px);
}

/* ==========================================================================
   767px以下のメディアクエリ - モバイルスライダー有効化
   ========================================================================== */

@media (max-width: 767px) {
  /* 元のグリッドを非表示 */
  .hero-section .hero-grid {
    display: none !important;
  }
  
  .hero-section .hero-backgrounds {
    display: none !important;
  }

  /* モバイルスライダーを表示 */
  .riff-mobile-hero-slider {
    display: block;
    height: 90vh;
    min-height: 500px;
  }

  /* モバイル用ヒーローセクションの調整 */
  .hero-section {
    height: 90vh;
    min-height: 500px;
  }

  /* スライドコンテンツの調整 */
  .riff-mobile-slide-content {
    padding: 25px 15px;
  }

  .riff-mobile-slide-title {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .riff-mobile-slide-subtitle {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .riff-mobile-slide-button {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* 480px以下の調整 */
@media (max-width: 480px) {
  .riff-mobile-hero-slider {
    height: 80vh;
    min-height: 450px;
  }

  .hero-section {
    height: 80vh;
    min-height: 450px;
  }

  .riff-mobile-slide-content {
    padding: 20px 12px;
  }

  .riff-mobile-slide-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .riff-mobile-slide-subtitle {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .riff-mobile-slide-button {
    padding: 8px 18px;
    font-size: 12px;
  }
}

/* 375px以下の超小画面対応 */
@media (max-width: 375px) {
  .riff-mobile-slide-title {
    font-size: 18px;
  }

  .riff-mobile-slide-subtitle {
    font-size: 13px;
  }

  .riff-mobile-slide-button {
    padding: 7px 15px;
    font-size: 11px;
  }
}

/* アクセシビリティ配慮 */
@media (prefers-reduced-motion: reduce) {
  .riff-mobile-slides-wrapper,
  .riff-mobile-slide-button {
    transition: none !important;
    animation: none !important;
  }
}

/* ハイコントラスト対応 */
@media (prefers-contrast: high) {
  .riff-mobile-slide-overlay {
    background-color: rgba(0, 0, 0, 0.8);
  }

  .riff-mobile-slide-button {
    border: 2px solid #fff;
  }
}

/* 横向き表示時の調整 */
@media (max-width: 767px) and (orientation: landscape) {
  .riff-mobile-hero-slider {
    height: 100vh;
  }

  .hero-section {
    height: 100vh;
  }

  .riff-mobile-slide-content {
    padding: 15px;
  }

  .riff-mobile-slide-title {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .riff-mobile-slide-subtitle {
    font-size: 13px;
    margin-bottom: 12px;
  }
}

/* タッチデバイス用の調整 */
@media (hover: none) and (pointer: coarse) {
  .riff-mobile-slide-button:hover {
    transform: none;
    background-color: rgba(30, 115, 190, 0.9);
  }
}