/**
 * @file    : css/case-video.css
 * @purpose : 案例影片展示 — 手機框架 + 雙欄佈局（最佳實踐版）
 * @depends : ['css/variables.css']
 */

/* ============================================
   案例影片區塊 — 深色沉浸容器
   ============================================ */
.case-video-section {
  position: relative;
  padding: var(--spacing-3xl) var(--spacing-xl);
  background: linear-gradient(160deg, #1a0f0a 0%, #2d1810 40%, #1a1512 100%);
  overflow: hidden;
}

.case-video-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(60%, 400px);
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-primary),
    transparent
  );
  opacity: 0.5;
}

/* ============================================
   雙欄佈局：手機影片 + 行銷文案
   ============================================ */
.case-video-layout {
  display: flex;
  align-items: center;
  gap: var(--spacing-3xl);
  max-width: 960px;
  margin: 0 auto;
}

.case-video-layout.layout-reverse {
  flex-direction: row-reverse;
}

/* 左欄：手機影片 */
.case-video-phone {
  flex-shrink: 0;
  width: 280px;
}

/* 右欄：文案 */
.case-video-copy {
  flex: 1;
  min-width: 0;
}

/* ============================================
   手機框架模擬器
   ============================================ */
.phone-frame {
  position: relative;
  background: #111;
  border-radius: 32px;
  padding: 10px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 瀏海凹口 */
.phone-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #111;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}

.phone-frame video {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  border-radius: 22px;
  background: #000;
  object-fit: cover;
}

/* 點擊播放覆蓋按鈕 */
.phone-frame {
  cursor: pointer;
}

.phone-frame .video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s;
}

.phone-frame .video-play-overlay svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s;
}

.phone-frame:hover .video-play-overlay svg {
  transform: scale(1.1);
}

.phone-frame .video-play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* 影片底部資訊條 */
.phone-lower-third {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 12px 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  border-radius: 0 0 22px 22px;
  pointer-events: none;
}

.phone-lower-third span {
  display: block;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* ============================================
   行業標籤
   ============================================ */
.case-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(210, 105, 30, 0.15);
  border: 1px solid rgba(210, 105, 30, 0.3);
  border-radius: var(--radius-full);
  color: var(--color-primary-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
}

.case-video-badge::before {
  content: "▶";
  font-size: 0.6em;
}

/* ============================================
   標題 — 高權重選擇器覆蓋 base.css
   ============================================ */
.case-video-section h3.case-video-headline,
.pricing-case-video h3.case-video-headline,
.subpage-case-video h3.case-video-headline {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: var(--spacing-sm);
}

.case-video-headline em {
  font-style: normal;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-accent-light)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.case-video-section p.case-video-subhead,
.pricing-case-video p.case-video-subhead,
.subpage-case-video p.case-video-subhead {
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

/* ============================================
   金句引言
   ============================================ */
.case-video-quote {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  line-height: 1.6;
  position: relative;
  padding-left: 20px;
  margin-bottom: var(--spacing-lg);
}

.case-video-quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 800;
  line-height: 1;
}

/* ============================================
   指標徽章列
   ============================================ */
.case-video-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.case-video-metric {
  text-align: center;
  padding: 12px 20px;
  background: rgba(210, 105, 30, 0.1);
  border: 1px solid rgba(210, 105, 30, 0.2);
  border-radius: var(--radius-lg);
}

.case-video-metric-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-accent-light)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.case-video-metric-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  white-space: nowrap;
}

/* ============================================
   Pricing 頁面變體
   ============================================ */
.pricing-case-video {
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-2xl);
  background: linear-gradient(160deg, #1a0f0a 0%, #2d1810 100%);
  border-radius: var(--radius-2xl);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   服務分頁變體
   ============================================ */
.subpage-case-video {
  padding: var(--spacing-3xl) var(--spacing-xl);
  background: linear-gradient(160deg, #1a0f0a 0%, #2d1810 100%);
  margin-top: var(--spacing-2xl);
}

/* 分頁多影片間距 */
.subpage-case-video .case-video-layout + .case-video-layout {
  margin-top: var(--spacing-3xl);
  padding-top: var(--spacing-3xl);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================
   響應式 — 768px（平板）
   ============================================ */
@media (max-width: 768px) {
  .case-video-section {
    padding: var(--spacing-2xl) var(--spacing-md);
  }

  .case-video-layout {
    gap: var(--spacing-xl);
  }

  .case-video-phone {
    width: 220px;
  }

  .phone-frame {
    border-radius: 24px;
    padding: 8px;
  }

  .phone-frame::before {
    width: 60px;
    height: 18px;
    top: 8px;
  }

  .phone-frame video {
    border-radius: 16px;
  }

  .pricing-case-video {
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
  }

  .subpage-case-video {
    padding: var(--spacing-2xl) var(--spacing-md);
  }
}

/* ============================================
   響應式 — 480px（手機：垂直堆疊）
   ============================================ */
@media (max-width: 480px) {
  .case-video-section {
    padding: var(--spacing-xl) var(--spacing-sm);
  }

  .case-video-layout,
  .case-video-layout.layout-reverse {
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
    text-align: center;
  }

  .case-video-phone {
    width: 200px;
  }

  .phone-frame {
    border-radius: 22px;
    padding: 6px;
  }

  .phone-frame::before {
    width: 50px;
    height: 14px;
    top: 6px;
    border-radius: 0 0 10px 10px;
  }

  .phone-frame video {
    border-radius: 16px;
  }

  .case-video-quote {
    text-align: left;
    font-size: 0.9rem;
  }

  .case-video-metrics {
    justify-content: center;
  }

  .case-video-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
  }

  .pricing-case-video {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-xl);
  }

  .subpage-case-video {
    padding: var(--spacing-xl) var(--spacing-sm);
    margin-top: var(--spacing-xl);
  }

  .subpage-case-video .case-video-layout + .case-video-layout {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
  }
}
