/**
 * Academy Testimonial Lightbox + 影片 slide play icon overlay
 */

/* 影片 slide：play icon overlay 在縮圖中央 */
.course-reviews__slide--video {
  position: relative;
}
.course-reviews__slide--video img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-reviews__slide-bg-fallback {
  background: #1a1a1a;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
}
/* 播放箭頭 — 右下角圓形外框，預設透明背景，hover 30% 黑底 */
.course-reviews__play-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: auto;
  height: auto;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 2px solid #fff;
  border-radius: 50%;
  padding: 6px;
  transition: background 0.15s, transform 0.15s;
}
.course-reviews__slide--video:hover .course-reviews__play-icon {
  background: rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}
.course-reviews__play-icon svg {
  width: 18px;
  height: 18px;
  margin: 0 0 0 2px;
  display: block;
}

/* === Lightbox overlay === */
.academy-testimonial-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  box-sizing: border-box;
}
.academy-testimonial-lightbox.is-open {
  display: flex;
}
.academy-testimonial-lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.academy-testimonial-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.academy-testimonial-lightbox__content {
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.academy-testimonial-lightbox__content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}
.academy-testimonial-lightbox__content iframe,
.academy-testimonial-lightbox__content video {
  width: min(90vw, 1200px);
  height: min(75vh, calc(min(90vw, 1200px) * 9 / 16));
  background: #000;
  display: block;
  border: 0;
}

/* ── 2026-07-15: 影片彈窗貼合 16:9（消除內部黑邊）── */
.academy-testimonial-lightbox__content iframe,
.academy-testimonial-lightbox__content video {
  width: min(90vw, 1200px, calc(82vh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
}
/* ── 2026-07-15 v2: 影片彈窗＝頁面 80% 寬、16:9 等比；背景改半透明+模糊，不再整片死黑 ── */
.academy-testimonial-lightbox {
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.academy-testimonial-lightbox__content {
  max-width: none;
}
.academy-testimonial-lightbox__content iframe,
.academy-testimonial-lightbox__content video {
  width: min(80vw, calc(92vh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
@media (max-width: 768px) {
  .academy-testimonial-lightbox__content iframe,
  .academy-testimonial-lightbox__content video {
    width: min(92vw, calc(92vh * 16 / 9));
  }
}
/* ── 2026-07-15 v3: 背景再減黑（0.35）＋毛玻璃模糊加強（16px）── */
.academy-testimonial-lightbox {
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}