/* ============================================================
   衛教影音專區 + 常見問題
   請將以下內容貼到 style.css 最末端
   (色彩盡量沿用 currentColor / 透明度,以融入既有配色;
    若您的 style.css 有定義 CSS 變數,可將 #5b7c99 等值替換為變數)
   ============================================================ */

/* ---------- 影音專區 ---------- */
.videos .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  justify-items: center;
  margin-top: 40px;
}

.video-item {
  margin: 0;
  width: 100%;
  max-width: 340px;
}

/* Reels 為直式 9:16 */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
}

/* YouTube 橫式影片改用此 class */
.video-frame-wide {
  aspect-ratio: 16 / 9;
  max-width: none;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-item figcaption {
  padding: 16px 8px 0;
}

.video-item figcaption h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.video-item figcaption p {
  font-size: 0.9rem;
  opacity: 0.75;
  margin: 0;
  line-height: 1.7;
}

.video-more {
  text-align: center;
  margin-top: 44px;
}

/* ---------- 常見問題 ---------- */
.faq-list {
  max-width: 760px;
  margin: 40px auto 0;
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.faq-item[open] {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.09);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* 展開指示符號 */
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  opacity: 0.55;
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 22px 20px;
}

.faq-answer p {
  margin: 0;
  line-height: 1.9;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ---------- 頁尾衛教聲明 ---------- */
.footer-note {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 6px;
}

/* ---------- 響應式 ---------- */
@media (max-width: 640px) {
  .videos .video-grid {
    grid-template-columns: 1fr;
  }
  .video-item {
    max-width: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-item summary::after {
    transition: none;
  }
}
