/* ================================================================================
 * ファイル名: app/assets/stylesheets/landing_sections.css
 * 📊 リファクタリング基準（コメント行は行数カウントから除外）
 *   ✅ 500行未満: 完璧
 *   ✅ 800行未満: 問題なし
 *   ⚠️  1200行未満: 注意喚起・リファクタリング要検討
 *   🚨 1200行以上: リファクタリング必須
 * 現在のコード行数: 約350行（コメント除く） / 総行数 447行 → ✅ 完璧
 *
 * 🎯 作成日: 2026-03-20
 * 📝 目的: ランディングページの問題提起・ソリューションセクションのCSS
 *         （機能紹介は 2026-05-03 に landing_features.css へ分離済）
 *
 * 【分離元】landing.css（Phase 1 セクション別分離 → 2026-05-03 配線完了）
 *
 * 【セクション構成】
 *   1. 問題提起（3Dカルーセル: 赤ボーダーの課題カード）
 *   2. ソリューション（Before/After 2カラム比較）
 *   3. レスポンシブ（768px / 480px）
 *
 * 【ジュニアエンジニア向け解説】
 *   - 問題提起カルーセルは landing_pricing.css と同じ5段階配置パターン
 *     （is-active / is-side-left / is-side-right / is-far-left / is-far-right）
 *   - backdrop-filter: blur(8px) で側面カードにガラス効果を適用
 *   - auto-fit と auto-fill の違い:
 *     auto-fit: コンテナに余裕があればカラムを引き伸ばす
 *     auto-fill: コンテナに余裕があっても空カラムを維持する
 *
 * 【関連ファイル】
 *   - app/assets/stylesheets/landing.css（CSS変数・ベーススタイル）
 *   - app/assets/stylesheets/landing_features.css（機能紹介セクション 2026-05-03 分離）
 *   - public/javascripts/landing_page.js（カルーセル制御）
 *
 * 【変更履歴】
 *   2026-03-22: 日本語コメント追加（保守性向上）
 *   2026-05-03: 機能紹介を landing_features.css に移動。本ファイルは problem / solution と
 *               そのレスポンシブ（@media 768px / 480px）に専念（Phase 1+2 リファクタリング）
 * ================================================================================ */

/* ----------------------------------------
   問題提起セクション（カルーセル）
   3D perspective付きカルーセルで課題カードを表示。
   .is-active: 中央のアクティブカード（z-index:3, 赤ボーダー）。
   .is-side-left/.is-side-right: 左右の半透明カード（scale 0.82）。
   .is-far-left/.is-far-right: 画面外の非表示カード。
   ナビ矢印: glassmorphicピル型 + ゴールドグロー。
   ---------------------------------------- */
.landing-problem {
  background: var(--landing-bg-secondary);
}

.landing-problem__carousel {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 16px;
  perspective: 1200px;
}

.landing-problem__stage {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  min-height: 320px;
  overflow: hidden;
  padding: 20px 0;
}

.landing-problem__card {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 420px;
  padding: 36px;
  background: rgba(20, 20, 30, 0.7);
  border: 1px solid var(--landing-card-border);
  border-radius: 20px;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              box-shadow 0.6s ease,
              border-color 0.6s ease,
              background 0.6s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

/* Center card (active) - solid premium background */
.landing-problem__card.is-active {
  opacity: 1;
  transform: translateX(0) scale(1) rotateY(0deg);
  z-index: 3;
  pointer-events: auto;
  background: rgba(20, 20, 30, 0.95);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(239, 68, 68, 0.1);
}

/* Side cards (±1 position from center) - translucent */
.landing-problem__card.is-side-left {
  opacity: 0.5;
  transform: translateX(-95%) scale(0.82) rotateY(8deg);
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  background: rgba(20, 20, 30, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.landing-problem__card.is-side-right {
  opacity: 0.5;
  transform: translateX(95%) scale(0.82) rotateY(-8deg);
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  background: rgba(20, 20, 30, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Far cards (±2 positions, hidden) */
.landing-problem__card.is-far-left {
  opacity: 0;
  transform: translateX(-130%) scale(0.65) rotateY(12deg);
  z-index: 1;
}

.landing-problem__card.is-far-right {
  opacity: 0;
  transform: translateX(130%) scale(0.65) rotateY(-12deg);
  z-index: 1;
}

/* Hover on side cards */
.landing-problem__card.is-side-left:hover,
.landing-problem__card.is-side-right:hover {
  opacity: 0.7;
}

.landing-problem__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  padding: 13px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 14px;
  color: var(--landing-negative);
}

.landing-problem__card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.landing-problem__card-text {
  color: var(--landing-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Navigation Arrows - Luxury Glassmorphism Pill (Grid-placed) */
.landing-problem__nav {
  grid-row: 1;
  width: 100%;
  height: 140px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.landing-problem__nav-glow {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(212, 175, 55, 0.15) 30%,
    rgba(212, 175, 55, 0.25) 50%,
    rgba(212, 175, 55, 0.15) 70%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.landing-problem__nav:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.06);
  color: var(--landing-gold-light);
  transform: scaleY(1.04);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.12),
              0 0 24px rgba(212, 175, 55, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.landing-problem__nav:hover .landing-problem__nav-glow {
  opacity: 1;
}

.landing-problem__nav:active {
  transform: scaleY(0.97);
  transition-duration: 0.1s;
}

.landing-problem__nav--prev {
  grid-column: 1;
}

.landing-problem__nav--next {
  grid-column: 3;
}

.landing-problem__nav svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.landing-problem__nav--prev:hover svg {
  transform: translateX(-2px);
}

.landing-problem__nav--next:hover svg {
  transform: translateX(2px);
}

/* Dot Indicators */
.landing-problem__dots {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.landing-problem__dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: var(--landing-card-border);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.landing-problem__dot:hover {
  background: rgba(239, 68, 68, 0.4);
}

.landing-problem__dot--active {
  background: var(--landing-negative);
  transform: scale(1.3);
}

/* ----------------------------------------
   ソリューションセクション（Before/After比較）
   左右2カラムで導入前(赤系)と導入後(緑系)を比較。
   中央に矢印アイコン。768px以下で縦並びに変更。
   ---------------------------------------- */
.landing-solution__comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.landing-solution__before,
.landing-solution__after {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  padding: 32px;
  border-radius: 16px;
}

.landing-solution__before {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.landing-solution__after {
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.landing-solution__label {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.landing-solution__label--before {
  background: rgba(239, 68, 68, 0.15);
  color: var(--landing-negative);
}

.landing-solution__label--after {
  background: rgba(34, 197, 94, 0.15);
  color: var(--landing-positive);
}

.landing-solution__items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-solution__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.landing-solution__item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.landing-solution__item--negative svg {
  color: var(--landing-negative);
}

.landing-solution__item--positive svg {
  color: var(--landing-positive);
}

.landing-solution__arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: var(--landing-card-bg);
  border: 1px solid var(--landing-card-border);
  border-radius: 50%;
  color: var(--landing-accent);
}

/* ----------------------------------------
   レスポンシブ: 768px 以下
   ---------------------------------------- */
@media (max-width: 768px) {
  .landing-problem__carousel {
    grid-template-columns: 32px 1fr 32px;
    column-gap: 10px;
  }

  .landing-problem__stage {
    min-height: 280px;
  }

  .landing-problem__card {
    max-width: 340px;
    padding: 28px;
  }

  .landing-problem__card.is-side-left {
    transform: translateX(-90%) scale(0.78) rotateY(6deg);
    opacity: 0.4;
  }

  .landing-problem__card.is-side-right {
    transform: translateX(90%) scale(0.78) rotateY(-6deg);
    opacity: 0.4;
  }

  .landing-problem__nav {
    height: 100px;
    border-radius: 16px;
  }

  .landing-problem__nav svg {
    width: 14px;
    height: 14px;
  }

  .landing-solution__comparison {
    flex-direction: column;
  }

  .landing-solution__arrow {
    transform: rotate(90deg);
  }
}

/* ----------------------------------------
   レスポンシブ: 480px 以下
   ---------------------------------------- */
@media (max-width: 480px) {
  .landing-problem__carousel {
    grid-template-columns: 28px 1fr 28px;
    column-gap: 8px;
  }

  .landing-problem__stage {
    min-height: 260px;
  }

  .landing-problem__card {
    max-width: 100%;
    padding: 24px;
  }

  .landing-problem__card.is-side-left,
  .landing-problem__card.is-side-right {
    opacity: 0;
    pointer-events: none;
  }

  .landing-problem__nav {
    height: 72px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .landing-problem__nav svg {
    width: 12px;
    height: 12px;
  }
}
