/* =============================================
   26_CF_default.css  —  CTIMES 科技講座首頁
   主題色: #FDB827
   ============================================= */

/* ----- Reset / Base ----- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #f4f4f4; font-family: "Microsoft JhengHei","微軟正黑體", sans-serif; }
center { display: block; }

/* ----- Page wrapper（置中，總寬 = 820 + 12 + 336 = 1168）----- */
.cf-page-wrap {
  max-width: 1168px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

/* ----- 廣告列 ----- */
.cf-ads {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.cf-ad-main {
  flex: 0 0 820px; max-width: 820px; min-width: 0; overflow: hidden;
}
.cf-ad-side {
  flex: 0 0 336px; max-width: 336px; min-width: 0; overflow: hidden;
}
/* 廣告圖片 RWD：蓋掉 inline style 的固定尺寸 */
.cf-ad-main ins,
.cf-ad-main img,
.cf-ad-side ins,
.cf-ad-side img,
.cf-ad-side a img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
}
@media(max-width: 767px) {
  .cf-ads { flex-wrap: wrap; }
  .cf-ad-main { flex: 1 1 100%; max-width: 100%; }
  .cf-ad-side { display: none !important; }
}

/* ----- 廣告下方兩欄 ----- */
.cf-below-ads {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cf-below-main {
  flex: 0 0 820px; max-width: 820px; min-width: 0;
}
.cf-below-side {
  flex: 0 0 336px; max-width: 336px; min-width: 0;
}
@media(max-width: 1023px) {
  .cf-below-ads { flex-wrap: wrap; }
  .cf-below-main { flex: 1 1 100%; max-width: 100%; }
  .cf-below-side { display: none; }
}

/* ----- Section header ----- */
.cf-section-head {
  background: transparent;
  padding: 0 0 0 4px;
  margin: 0 0 2px;
  border-left: none;
  border-radius: 0;
  display: flex;
  align-items: center;
}
/* 標題文字本身有底色膠囊 */
.cf-section-head-label {
  display: inline-block;
  background: #FDB827;
  color: #1a1a1a;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 8px 18px 8px 12px;
  border-radius: 4px;
  border-left: 5px solid #c8920a;
  line-height: 1.3;
}

/* ----- 近期場次卡片：類別 + 日期 meta 列 ----- */
.cf-card-cat-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0e8d0;
  color: #5a3e00;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.cf-card-meta-date {
  font-size: 12px;
  color: #888;
}

/* ----- Swiper block wrapper ----- */
.cf-swiper-block {
  margin-bottom: 24px;
}
.cf-swiper-body {
  border: 1px solid #e2e2e2;
  border-top: none;
  border-radius: 0 0 6px 6px;
  background: #fff;
  padding: 12px 8px 40px;
}

/* ----- Swiper controls ----- */
.swiper { width: 100%; overflow: hidden; }
.swiper-slide { height: auto; padding: 4px; box-sizing: border-box; }
.swiper-button-next,
.swiper-button-prev { color: #FDB827 !important; }
.swiper-button-next::after,
.swiper-button-prev::after { font-size: 20px !important; }
.swiper-pagination-bullet-active { background: #FDB827 !important; }

/* ----- Card ----- */
.cf-card {
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cf-card:hover {
  box-shadow: 0 5px 18px rgba(253,184,39,0.18);
  transform: translateY(-2px);
}
.cf-card-img-wrap {
  position: relative; padding-top: 56.25%;
  overflow: hidden; background: #eee;
}
.cf-card-img-wrap img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.cf-card-body {
  padding: 12px; display: flex; flex-direction: column; flex: 1;
}
.cf-card-meta {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.cf-card-date { color: #888; font-size: 12px; }
.cf-card-title {
  color: #1a1a1a; font-weight: 700; text-decoration: none;
  font-size: 14px; line-height: 1.4; display: block;
  margin-bottom: 6px; transition: color 0.15s;
}
.cf-card-title:hover { color: #c8920a; }
.cf-card-desc {
  color: #666; font-size: 12px; line-height: 1.6; flex: 1; margin-bottom: 6px;
}
.cf-card-time { font-size: 12px; font-weight: 700; color: #444; }

/* ----- Generic content block ----- */
.cf-block {
  border-radius: 0 0 6px 6px; overflow: hidden;
  border: 1px solid #e2e2e2; border-top: none;
  background: #fff; margin-bottom: 20px;
}
.cf-block-body { padding: 14px; }
.cf-block-body + .cf-block-body { border-top: 1px solid #f0f0f0; }

/* ----- Typography helpers ----- */
.newstitle  { color: #003366; font-weight: 700; text-decoration: none; font-size: 15px; }
.newstitle:hover { color: #c8920a; }
.decs       { color: #555; font-size: 13px; line-height: 1.7; }
.title      { color: #777; font-size: 13px; }
.black13bold{ color: #333; font-size: 13px; font-weight: 700; }
.hp7        { color: #069; font-size: 12px; }
.small-title{ color: #333; font-size: 13px; text-decoration: none; }
.small-title:hover { color: #c8920a; }

/* ══════════════════════════════════════════════
   近期場次 Swiper — 特色大卡片（與下方三區塊區隔）
   ══════════════════════════════════════════════ */

/* 近期場次：無底色，與一般區塊一致 */
.cf-swiper-block--featured {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  margin-bottom: 28px;
}
.cf-swiper-block--featured .cf-section-head-label {
  font-size: 19px;
  padding: 9px 20px 9px 14px;
}
.cf-swiper-block--featured .cf-swiper-body {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 16px 14px 48px;
}

/* 特色卡片本體 */
.cf-card--featured {
  border: none;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(200,140,0,.14);
  transition: box-shadow .22s, transform .22s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cf-card--featured:hover {
  box-shadow: 0 8px 28px rgba(200,140,0,.28);
  transform: translateY(-3px);
}

/* 圖片區：比一般卡片略矮，偏寬闊橫幅感 */
.cf-card--featured .cf-card-img-wrap {
  padding-top: 52%;
}

/* 日期 badge —— 圖片右上角 */
.cf-card--featured .cf-card-date-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #FDB827;
  color: #3a2800;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  line-height: 1.4;
  white-space: nowrap;
  z-index: 2;
}

/* card body */
.cf-card--featured .cf-card-body {
  padding: 14px 14px 12px;
  background: #fff;
}
.cf-card--featured .cf-card-meta {
  margin-bottom: 8px;
}

/* 標題更大更顯眼 */
.cf-card--featured .cf-card-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  color: #2d1f00;
  margin-bottom: 8px;
}
.cf-card--featured .cf-card-title:hover { color: #c8920a; }

/* 摘要 */
.cf-card--featured .cf-card-desc {
  font-size: 13px;
  color: #5a4020;
  line-height: 1.7;
}

/* 時間列 — 底部橫條 */
.cf-card--featured .cf-card-time {
  font-size: 12.5px;
  font-weight: 700;
  color: #7a5c20;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #e8d8b0;
}

/* 近期場次 Swiper 導覽按鈕 */
.cf-swiper-block--featured .swiper-button-next,
.cf-swiper-block--featured .swiper-button-prev {
  color: #c8920a !important;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  width: 34px;
  height: 34px;
}
.cf-swiper-block--featured .swiper-button-next::after,
.cf-swiper-block--featured .swiper-button-prev::after {
  font-size: 14px !important;
  font-weight: 900;
}
.cf-swiper-block--featured .swiper-pagination-bullet-active {
  background: #c8920a !important;
}
