/* ===================================================================
   學員家長心聲 parents（type A）
   scope：.nstyle_theme.page_parents
   ‧ banner 用共用 .npage_banner（圖已內建標題文字，故不疊字）
   ‧ 分類切換（學員心得分享／家長滿意心聲）用公版 .ntabs（本頁為 JS 前端切換）
   ‧ 卡片：影片縮圖＋播放鍵浮層＋學校/姓名/成績 badge，點擊開 BS5 Modal 播 YouTube
   ‧ 資料讀 data/parents.json，每頁 8 筆，分頁用公版 .npager（js/npager.js）
   =================================================================== */

/* Banner（圖已內建標題；沿用共用 .npage_banner，僅指定圖與高度） */
.nstyle_theme.page_parents .npage_banner--parents {
  position: relative;
  z-index: 2; /* 疊在背景漂浮裝飾之上，避免 deco 蓋到 banner */
  background-image: url("../../img/parents/parents_banner.png");
  height: 300px;
  background-size: cover;
  background-position: center;
}

/* 頁面底：淡藍色暈 + 波浪流線 + 白→淺藍漸層 */
.nstyle_theme.page_parents {
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(680px 520px at 92% 8%, rgba(90, 166, 239, 0.12), transparent 60%),
    radial-gradient(560px 480px at 4% 42%, rgba(90, 166, 239, 0.08), transparent 60%),
    radial-gradient(640px 540px at 100% 92%, rgba(122, 184, 255, 0.10), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  background-repeat: no-repeat;
  background-position: center top, center center, center bottom, center center;
  background-size: auto, auto, auto, auto;
}
/* 背景漂浮裝飾 */
.nstyle_theme.page_parents .nparents_deco { position: absolute; z-index: 0; pointer-events: none; }
.nstyle_theme.page_parents .nparents_deco--blob1 {
  top: 360px; right: -90px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(120, 180, 255, 0.18), rgba(120, 180, 255, 0.04) 70%);
  filter: blur(4px);
}
.nstyle_theme.page_parents .nparents_deco--blob2 {
  bottom: -50px; left: -70px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(90, 166, 239, 0.14), transparent 70%);
}
.nstyle_theme.page_parents .nparents_deco--ring1 {
  top: 430px; left: -50px; width: 200px; height: 200px; border-radius: 50%;
  border: 2px solid rgba(90, 166, 239, 0.16);
}
.nstyle_theme.page_parents .nparents_deco--dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(90, 166, 239, 0.32); }
.nstyle_theme.page_parents .nparents_deco--d1 { top: 380px; right: 40px; }
.nstyle_theme.page_parents .nparents_deco--d2 { bottom: 160px; right: 90px; width: 9px; height: 9px; background: rgba(122, 184, 255, 0.4); }
/* 大顆實心圓（左右兩側探出，低透明度、置於卡片後方） */
.nstyle_theme.page_parents .nparents_deco--circle { border-radius: 50%; }
.nstyle_theme.page_parents .nparents_deco--c3 { bottom: 120px; left: -130px; width: 320px; height: 320px; background: rgba(90, 166, 239, 0.08); }
.nstyle_theme.page_parents .nparents_deco--c4 { bottom: -60px; right: -120px; width: 300px; height: 300px; background: rgba(122, 184, 255, 0.08); }

/* 右下裝飾文字圖（parents_bg_text.png，透明底） */
.nstyle_theme.page_parents .nparents_slogan {
  position: absolute;
  right: 85px;
  bottom: 75px;
  z-index: 1;
  width: 275px;
  height: auto;
  opacity: 0.65;
  pointer-events: none;
  transform: rotate(-15deg);
}
/* 左上／左下裝飾小圖（透明 PNG，置於卡片後方） */
.nstyle_theme.page_parents .nparents_air,
.nstyle_theme.page_parents .nparents_book {
  position: absolute;
  z-index: 0;
  height: auto;
  opacity: 0.8;
  pointer-events: none;
}
.nstyle_theme.page_parents .nparents_air { top: 337px; left: -25px; width: 240px; opacity: 0.55; }
.nstyle_theme.page_parents .nparents_book { bottom: 4px; right: 40px; width: 201px; opacity: 0.55; }

/* 內容容器 */
.nstyle_theme.page_parents .nparents_wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
/* 分類切換（公版 .ntabs）往上拉近 banner */
.nstyle_theme.page_parents .ntabs { margin: 10px auto 26px; }

/* 卡片格線（四欄） */
.nstyle_theme.page_parents .nparents_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
/* 單張卡片 */
.nstyle_theme.page_parents .nparents_card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eef3fb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(31, 95, 191, 0.10), 0 2px 6px rgba(31, 95, 191, 0.06);
  transition: transform 0.18s, box-shadow 0.18s;
}
.nstyle_theme.page_parents .nparents_card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(31, 95, 191, 0.18);
}

/* 影片縮圖（可點擊按鈕）＋播放鍵浮層 */
.nstyle_theme.page_parents .nparents_thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #dfe8f5;
  cursor: pointer;
  overflow: hidden;
}
.nstyle_theme.page_parents .nparents_thumb_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.nstyle_theme.page_parents .nparents_thumb::after { /* 暗角讓播放鍵更清楚 */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 30, 60, 0) 55%, rgba(10, 30, 60, 0.18) 100%);
  transition: background 0.2s;
}
.nstyle_theme.page_parents .nparents_play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55); /* 霧面白玻璃，低調融入縮圖 */
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #2f74d6;
  box-shadow: 0 4px 12px rgba(15, 45, 90, 0.18);
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.nstyle_theme.page_parents .nparents_play .material-icons-round { font-size: 21px; margin-left: 1px; }
.nstyle_theme.page_parents .nparents_card:hover .nparents_thumb_img { transform: scale(1.05); }
.nstyle_theme.page_parents .nparents_card:hover .nparents_play {
  transform: scale(1.08);
  background: #2f74d6;
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 116, 214, 0.32);
}
.nstyle_theme.page_parents .nparents_thumb:focus-visible { outline: 3px solid #5aa6ef; outline-offset: 2px; }

/* 內文 */
.nstyle_theme.page_parents .nparents_body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 20px;
  flex: 1;
}
.nstyle_theme.page_parents .nparents_school {
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 700;
  color: #6b7385;
  min-height: 40px; /* 兩行高，各卡校名對齊 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nstyle_theme.page_parents .nparents_name {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  color: #1f3a5f;
}
.nstyle_theme.page_parents .nparents_award {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2f74d6;
  font-size: 13px;
  font-weight: 700;
}

/* 分頁浮於裝飾之上 */
.nstyle_theme.page_parents .npager { position: relative; z-index: 1; margin-top: 40px; }

/* 無資料/載入中提示 */
.nstyle_theme.page_parents .nparents_empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #8a94a6;
  font-size: 15px;
  padding: 48px 0;
}

/* ── BS5 Modal 外觀（影片燈箱，取代舊 fancybox） ── */
.nparents_modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; background: #0d1626; }
.nparents_modal .modal-header {
  background: linear-gradient(135deg, #5aa6ef, #2f74d6);
  color: #fff;
  border-bottom: 0;
  padding: 14px 20px;
}
.nparents_modal .modal-title { font-weight: 800; font-size: 16px; }
.nparents_modal .modal-header { align-items: center; gap: 10px; }
/* 「在 YouTube 觀看」緊接標題文字後；關閉鈕靠最右 */
.nparents_modal .modal-header .btn-close { margin-left: auto; }
.nparents_modal .nparents_modal_open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.nparents_modal .nparents_modal_open:hover { background: rgba(255, 255, 255, 0.32); }
.nparents_modal .nparents_modal_open .material-icons-round { font-size: 16px; }
.nparents_modal .modal-body { padding: 0; }
.nparents_modal .ratio { background: #000; }

/* ── RWD ── */
@media (max-width: 991.98px) {
  .nstyle_theme.page_parents .nparents_grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 991.98px) {
  .nstyle_theme.page_parents .nparents_slogan,
  .nstyle_theme.page_parents .nparents_air,
  .nstyle_theme.page_parents .nparents_book { display: none; }
}
@media (max-width: 767.98px) {
  .nstyle_theme.page_parents .npage_banner--parents { height: 150px; }
  .nstyle_theme.page_parents .nparents_deco { display: none; }
}
@media (max-width: 479.98px) {
  .nstyle_theme.page_parents .nparents_grid { grid-template-columns: 1fr; }
  .nstyle_theme.page_parents .nparents_school { min-height: 0; }
}
