﻿/* 網頁頭部樣式（由 頁面管理 › 頁面頭部建立 › 網頁頭部 移出，2026-11-26）*/

/* ===== Header：背景滿版，Logo + 選單內容置中於 1280px ===== */
.header {
  overflow-x: clip;   /* 避免滿版白底造成橫向捲軸，不影響下拉選單 */
}
.header .head {
  width: 100% !important;
  max-width: none !important;
  padding-left: max(20px, calc((100% - 1280px) / 2)) !important;
  padding-right: max(20px, calc((100% - 1280px) / 2)) !important;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  /* 解除外層裁切，讓白底能往左右延伸、下拉選單能展開 */
  .header .mycollapse,
  .header .navbar-collapse {
    overflow: visible !important;
  }

  /* 上方小選單（topnav）右側對齊 1280px 範圍 */
  .header .head .topnav {
    left: auto !important;
    right: max(20px, calc((100% - 1280px) / 2)) !important;
  }

  /* 主選單白色橫條：滿版 */
  .header .head .mainmenu {
    position: relative;
    z-index: 20;
  }
  .header .head .mainmenu::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -100vw;
    right: -100vw;
    background-color: #fff;
    z-index: -1;
  }

  /* 選單項目左右間距隨螢幕縮放，避免擠成兩行 */
  .header .mainmenu .navbar-nav > li > a {
    padding-left: clamp(12px, 2.4vw, 40px) !important;
    padding-right: clamp(12px, 2.4vw, 40px) !important;
    white-space: nowrap;
  }
}

/* ===== 首頁最新消息：滿版灰底區塊（與認識學院區隔） ===== */
.M10074 {
  background-color: #f7f9fb;
  box-shadow: 0 0 0 100vmax #f7f9fb;
  clip-path: inset(0 -100vmax);
  padding: 48px 0 56px;
}

/* ===== 分類列表頁（版型 mobilecgmolist）：整頁灰底 =====
   最新消息、獎學金、演講。活動轉知、榮譽榜。學術研究、新聞。影音分享…
   只要選用這個列表版型就自動套用，新增分類不用再改 header */
body.page_mobilecgmolist,
body.page_mobilecgmolist .wrap,
body.page_mobilecgmolist #main-content,
body.page_mobilecgmolist .main,
body.page_mobilecgmolist .main .minner,
body.page_mobilecgmolist .main .module,
body.page_mobilecgmolist .main .module .minner {
  background-color: #f7f9fb !important;
}
body.page_mobilecgmolist .module-ptlist {
  padding: 40px 0 56px;
}

/* ===== 首頁區塊標題 + 英文副標：最新消息（M10074）、六大學位學程（M12471） =====
   其他區塊要同樣效果，把模組編號加進下面各段即可 */
.M10074 .mt,
.M12471 .mt {
  display: block !important;
  text-align: center !important;
  margin: 0 0 36px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}
.M10074 .mt::before,
.M12471 .mt::before,
.M10074 .mt::after,
.M12471 .mt::after,
.M10074 .mt .mt-title::before,
.M12471 .mt .mt-title::before,
.M10074 .mt .mt-title::after,
.M12471 .mt .mt-title::after {
  display: none !important;
  content: none !important;
}
.M10074 .mt .mt-title,
.M12471 .mt .mt-title {
  display: block !important;
  float: none !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(28px, 3vw, 38px) !important;
  font-weight: 700;
  color: #2b2d42 !important;
  letter-spacing: 2px;
  border: none !important;
  background: none !important;
}
/* 英文副標：用後台模組內建的副標題（mt-sub-title） */
.M10074 .mt .mt-sub-title,
.M12471 .mt .mt-sub-title {
  display: block !important;
  float: none !important;
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Jost", "Noto Sans TC", sans-serif;
  font-size: clamp(17px, 1.6vw, 21px) !important;
  font-weight: 400 !important;
  line-height: 1.5;
  color: #666 !important;
  text-align: center !important;
  text-transform: none !important;
  letter-spacing: normal;
  text-decoration: none !important;
  border: none !important;
  background: none !important;
}
.M10074 .mt .mt-sub-title::before,
.M12471 .mt .mt-sub-title::before,
.M10074 .mt .mt-sub-title::after,
.M12471 .mt .mt-sub-title::after {
  display: none !important;
  content: none !important;
}
.M10074 .mt .mt-sub-title span,
.M12471 .mt .mt-sub-title span {
  color: #6f9f8a !important;
}

/* 六大學位學程：內文自訂標題（.ace-six-programs__heading）也套用相同效果 */
.ace-six-programs .ace-six-programs__heading h2 {
  margin: 0 0 6px !important;
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(28px, 3vw, 38px) !important;
  font-weight: 700;
  color: #2b2d42 !important;
  letter-spacing: 2px;
}
.ace-six-programs .ace-six-programs__heading p {
  font-family: "Jost", "Noto Sans TC", sans-serif;
  font-size: clamp(17px, 1.6vw, 21px) !important;
  font-weight: 400;
  color: #666 !important;
}
.ace-six-programs .ace-six-programs__heading p strong {
  font-weight: 400;
  color: #6f9f8a;
}

/* ===== 分類列表頁：每排卡片等高 + 上下間距（每 4 筆是獨立的 .row） ===== */
body.page_mobilecgmolist .module-ptlist .listBS {
  display: flex;
  flex-wrap: wrap;
}
body.page_mobilecgmolist .module-ptlist .listBS::before,
body.page_mobilecgmolist .module-ptlist .listBS::after {
  display: none;
}
body.page_mobilecgmolist .module-ptlist .listBS .d-item {
  margin-bottom: 28px;
}

/* ===== 最新消息卡片（首頁 + 分類列表頁）：白底 + 陰影 + 日期左側色條 ===== */
.M10074 .listBS .d-item .mbox,
body.page_mobilecgmolist .module-ptlist .listBS .d-item .mbox {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px 22px;
  height: 100%;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, .5);
}
.M10074 .listBS .d-item .d-img,
body.page_mobilecgmolist .module-ptlist .listBS .d-item .d-img {
  margin: -20px -22px 18px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.M10074 .listBS .mtitle .mdate,
body.page_mobilecgmolist .module-ptlist .listBS .mtitle .mdate {
  display: block;
  font-style: normal;
  font-size: 15px;
  color: #8a949c;
  line-height: 1.2;
  padding-left: 12px;
  border-left: 4px solid #6f9f8a;
  margin-bottom: 14px;
}
.M10074 .listBS .mtitle .mdate::before,
.M10074 .listBS .mtitle .mdate::after,
body.page_mobilecgmolist .module-ptlist .listBS .mtitle .mdate::before,
body.page_mobilecgmolist .module-ptlist .listBS .mtitle .mdate::after {
  display: none;
}
.M10074 .listBS .mtitle a,
body.page_mobilecgmolist .module-ptlist .listBS .mtitle a {
  display: block;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  color: #26332e;
  text-decoration: none;
}
.M10074 .listBS .mtitle a:hover,
body.page_mobilecgmolist .module-ptlist .listBS .mtitle a:hover {
  color: #245b48;
}

/* ===== 文章內頁（版型 mobileptdetail）：標題（墨黑字 + 綠色左直條） ===== */
body.page_mobileptdetail .module-detail .mpgtitle {
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}
body.page_mobileptdetail .module-detail .mpgtitle::before,
body.page_mobileptdetail .module-detail .mpgtitle::after,
body.page_mobileptdetail .module-detail .mpgtitle .hdline::before,
body.page_mobileptdetail .module-detail .mpgtitle .hdline::after {
  display: none !important;
  content: none !important;
}
body.page_mobileptdetail .module-detail .mpgtitle .hdline {
  margin: 0 !important;
  padding: 2px 0 2px 16px !important;
  border: none !important;
  border-left: 5px solid #6f9f8a !important;
  background: none !important;
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(22px, 2.4vw, 30px) !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  letter-spacing: 1px;
  color: #2b2d42 !important;
}

/* ===== 文章內頁（版型 mobileptdetail）：發布日期灰色膠囊標籤 ===== */
body.page_mobileptdetail .mpgdetail .ptinfoproperty {
  margin: 0 0 28px;
  padding: 0 0 20px;
  border-bottom: 1px dashed #e1e5ea;
}
body.page_mobileptdetail .ptinfoproperty .ptinfoproperty_date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px 7px 14px;
  background-color: #f3f5f7;
  border: 1px solid #e1e5ea;
  border-radius: 999px;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #8a949c;
  line-height: 1;
}
/* 日曆小圖示 */
body.page_mobileptdetail .ptinfoproperty .ptinfoproperty_date::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.page_mobileptdetail .ptinfoproperty .ptinfoproperty_date::after {
  display: none;
}
/* 日期數字：墨黑 */
body.page_mobileptdetail .ptinfoproperty .ptinfoproperty_date > span {
  font-family: "Jost", "Noto Sans TC", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .5px;
  color: #2b2d42;
}

/* ===== 首頁認識學院：移除底線（只影響此模組，按鈕除外） ===== */
.M11091,
.M11091 *:not(.ace-intro__button),
.M11091 *::before,
.M11091 *::after {
  border-bottom: none !important;
}
.M11091 .ace-intro__title,
.M11091 .ace-intro__subtitle,
.M11091 .ace-intro__subtitle strong {
  text-decoration: none !important;
}

/* =====================================================================
   下載清單樣式（2026-10 建立，2026-11 改為共用，請勿刪除）
   ‧ 檔案下載分類頁：列表 #pageptlist
   ‧ 其他指定區塊（例如公開專區的決算／預算頁籤）：程式加上 .dl-box
   兩者都會加上 .dl-list，下面的樣式就會套用
   ===================================================================== */
/* ---------- 檔案下載分類頁：版面 ---------- */
body.page_mobilecgmolist.dl-page .module-ptlist { padding: 0 0 56px; margin-top: 0; }
/* 上方空的「分類說明」區塊不佔空間（列表頂端與左側選單對齊） */
body.dl-page .module-cglist.is-empty,
body.dl-page .module-cglist:has(.mpgdetail .meditor:empty) { display: none !important; }

/* ---------- 白底外框 ---------- */
body #pageptlist.dl-list,
body .dl-box .module-special .mb {
  background: #fff;
  border-radius: 10px;
  padding: 4px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

/* ---------- 取消卡片樣式，改成一列一筆 ---------- */
body .dl-list .listBS {
  display: block !important;
  margin: 0 !important;
}
body .dl-list .listBS::before,
body .dl-list .listBS::after { display: none; }
body .dl-list .listBS .d-item {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body .dl-list .listBS .d-item .mbox {
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  height: auto !important;
}
body .dl-list .listBS .d-item .d-img { display: none !important; }

/* ---------- 每一列 ---------- */
body .dl-list .listBS .mtitle {
  display: flex !important;
  align-items: center;
  gap: 16px;
  margin: 0 !important;
  padding: 20px 8px !important;
  border-bottom: 1px solid #e8e8e8;
}
/* 最後一筆（只有一筆時也是）不要底線 */
body .dl-list .listBS .d-item.is-last .mtitle { border-bottom: 0 !important; }

/* 左側：標題 */
.dl-list .dl-head {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

/* ( ) 裡的文字：標題上方小字說明 */
.dl-list .dl-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dl-list .dl-note {
  display: block;
  margin-bottom: 4px;
  padding-left: 10px;
  border-left: 3px solid #6f9f8a;
  color: #4f7f6a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

/* 標題（純文字，不連內頁） */
.dl-list .dl-head > a,
.dl-list .dl-head > .dl-title-text,
.dl-list .dl-text > a,
.dl-list .dl-text > .dl-title-text {
  display: inline !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  color: #333 !important;
  line-height: 1.6 !important;
  text-decoration: none !important;
}
.dl-list .dl-head > a:hover,
.dl-list .dl-text > a:hover { color: #245b48 !important; }
.dl-list .dl-title-text { cursor: default; }

/* 右側：檔案圖示（固定寬度靠右，每列對齊） */
.dl-list .dl-files {
  flex: 0 0 110px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-list .dl-loading { color: #aaa; font-size: 13px; }
.dl-list .dl-icon { display: inline-block; line-height: 0; }
.dl-list .dl-icon img { display: block; width: 28px; height: 28px; object-fit: contain; }
.dl-list .dl-icon:hover img { opacity: .7; }

/* 手機版：標題換行，圖示放下一行 */
@media (max-width: 767px) {
  body #pageptlist.dl-list,
  body .dl-box .module-special .mb { padding: 4px 12px; }
  body .dl-list .listBS .mtitle { flex-wrap: wrap; padding: 16px 4px !important; }
  .dl-list .dl-head { flex-basis: 100%; flex-wrap: wrap; row-gap: 8px; }
  .dl-list .dl-files { flex: 0 0 auto; margin-left: 0; }
  .dl-list .dl-head > a,
  .dl-list .dl-head > .dl-title-text { flex-basis: 100%; font-size: 16px !important; }
  .dl-list .dl-text { flex-basis: 100%; }
  .dl-list .dl-text > a,
  .dl-list .dl-text > .dl-title-text { font-size: 16px !important; }
}

/* ---------- 六學位學程：【 】分組小標籤、切換按鈕、分頁（2026-11） ---------- */
.dl-list .dl-group {
  flex: 0 0 auto;
  align-self: center;
  margin-right: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eaf2ee;
  color: #245b48;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 1px;
  white-space: nowrap;
}
.dl-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.dl-filter__btn {
  min-width: 96px;
  padding: 8px 22px;
  border: 1.5px solid #245b48;
  border-radius: 999px;
  background: #fff;
  color: #245b48;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.4;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.dl-filter__btn:hover,
.dl-filter__btn:focus-visible { background: #eaf2ee; }
.dl-filter__btn:focus-visible { outline: 2px solid #245b48; outline-offset: 2px; }
.dl-filter__btn.is-active {
  background: #245b48;
  color: #fff;
  box-shadow: 0 6px 16px rgba(36, 91, 72, .22);
}
.dl-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0;
}
.dl-pager__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid #cfe0d7;
  border-radius: 999px;
  background: #fff;
  color: #245b48;
  font-family: "Jost", "Noto Sans TC", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.dl-pager__btn:hover,
.dl-pager__btn:focus-visible { border-color: #245b48; background: #eaf2ee; }
.dl-pager__btn:focus-visible { outline: 2px solid #245b48; outline-offset: 2px; }
.dl-pager__btn.is-active { border-color: #245b48; background: #245b48; color: #fff; }
.dl-pager__btn.is-disabled { opacity: .35; cursor: default; background: #fff; border-color: #cfe0d7; }
@media (max-width: 767px) {
  .dl-filter { gap: 8px; }
  .dl-filter__btn { min-width: 0; padding: 6px 16px; font-size: 14px; }
}

/* ---------- 頁籤模組專用美化（2026-11）：只套用在內頁頁籤模組（.dl-box），不影響檔案下載分類頁 ---------- */
/* 外框：白底、淡綠邊框、上方綠色色條 */
body .dl-box .module-special .mb {
  position: relative;
  padding: 10px 14px !important;
  border: 1px solid #dce5df;
  border-top: 4px solid #245b48;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(28, 57, 43, .07);
}
/* 每一列：滑過時淡綠底 */
body .dl-box .listBS .mtitle {
  gap: 18px;
  padding: 16px 14px !important;
  border-bottom: 1px dashed #dfe7e2;
  border-radius: 10px;
  transition: background .2s;
}
body .dl-box .listBS .mtitle:hover { background: #f3f8f5; }
.dl-box .dl-head > a,
.dl-box .dl-head > .dl-title-text,
.dl-box .dl-text > a,
.dl-box .dl-text > .dl-title-text {
  font-weight: 500 !important;
  color: #26332e !important;
}
body .dl-box .listBS .mtitle:hover .dl-title-text { color: #245b48 !important; }
/* 右側檔案：圓角按鈕 */
.dl-box .dl-files { flex: 0 0 auto; gap: 8px; min-width: 110px; justify-content: flex-end; }
.dl-box .dl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #dfe7e2;
  border-radius: 10px;
  background: #f7faf8;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}
.dl-box .dl-icon img { width: 26px; height: 26px; }
.dl-box .dl-icon:hover,
.dl-box .dl-icon:focus-visible {
  border-color: #245b48;
  background: #fff;
  box-shadow: 0 4px 12px rgba(36, 91, 72, .15);
  transform: translateY(-2px);
}
.dl-box .dl-icon:hover img { opacity: 1; }
.dl-box .dl-icon:focus-visible { outline: 2px solid #245b48; outline-offset: 2px; }

/* 頁籤模組：模組內重複的小標題（例如「公開專區-預算」）不顯示，頁籤已有名稱 */
body .dl-box .module-special > .mouter > .mt { display: none !important; }
/* 頁籤沒有資料：顯示提示文字（取代原本的隱藏空框） */
body .dl-box .module-special .mb:not(:has(.listBS)) { display: block; }
body .dl-box .module-special .mb:not(:has(.listBS))::after {
  content: "目前尚無資料";
  display: block;
  padding: 36px 0;
  text-align: center;
  color: #8a949c;
  font-size: 15px;
}
/* 頁籤按鈕：綠色膠囊 */
.dl-tabs .nav-tabs {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 24px !important;
  padding: 0 !important;
  border: 0 !important;
}
.dl-tabs .nav-tabs::before,
.dl-tabs .nav-tabs::after { display: none !important; }
.dl-tabs .nav-tabs > li { float: none !important; margin: 0 !important; list-style: none; }
.dl-tabs .nav-tabs > li > a {
  display: block;
  min-width: 110px;
  margin: 0 !important;
  padding: 10px 28px !important;
  border: 1.5px solid #245b48 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #245b48 !important;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 2px;
  text-align: center;
  text-decoration: none !important;
  transition: background .2s, color .2s, box-shadow .2s;
}
.dl-tabs .nav-tabs > li > a:hover,
.dl-tabs .nav-tabs > li > a:focus-visible { background: #eaf2ee !important; }
.dl-tabs .nav-tabs > li.active > a,
.dl-tabs .nav-tabs > li.active > a:hover,
.dl-tabs .nav-tabs > li.active > a:focus {
  background: #245b48 !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(36, 91, 72, .25);
}

@media (max-width: 767px) {
  /* 手機：圖示、標題、檔案按鈕同一列 */
  body .dl-box .listBS .mtitle { flex-wrap: nowrap; gap: 10px; padding: 14px 8px !important; }
  .dl-box .dl-head { flex: 1 1 auto; flex-basis: auto; }
  .dl-box .dl-files { min-width: 0; gap: 6px; }
  .dl-box .dl-icon { width: 38px; height: 38px; }
  .dl-box .dl-icon img { width: 22px; height: 22px; }
  .dl-tabs .nav-tabs > li > a { min-width: 0; padding: 8px 20px !important; }
  /* 圖示和標題維持同一列 */
  .dl-box .dl-head { flex-wrap: nowrap; }
  .dl-box .dl-head > .dl-title-text,
  .dl-box .dl-head > a,
  .dl-box .dl-text { flex: 1 1 auto; flex-basis: auto; }
}

/* =====================================================================
   內頁左側選單（檔案下載、各學位學程…所有內頁左欄的分類選單，2026-11 建立，請勿刪除）
   ===================================================================== */
.col.col_01 .module-cgmenu .mb { padding: 0; }
.col.col_01 .module-cgmenu .cgmenu {
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 4px;
  overflow: hidden;
}
.col.col_01 .module-cgmenu .cgmenu > .list-group-item {
  margin: 0;
  padding: 0;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #dfe3e8;
  border-radius: 0;
}
.col.col_01 .module-cgmenu .cgmenu > .list-group-item:last-child { border-bottom: 0; }
.col.col_01 .module-cgmenu .cgmenu > .list-group-item > a {
  display: block;
  padding: 12px 16px;
  border-left: 4px solid transparent;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
}
.col.col_01 .module-cgmenu .cgmenu > .list-group-item > a:hover,
.col.col_01 .module-cgmenu .cgmenu > .list-group-item.is-current > a {
  background: #eef3f1;
  border-left-color: #245b48;
  color: #245b48;
  font-weight: 700;
}

/* 選單標題（選單第一項且連結空白，例如「檔案下載」「生物與永續科技學位學程」）：不可點 */
.col.col_01 .module-cgmenu .cgmenu > .list-group-item.is-title > .menu-title {
  display: block;
  padding: 14px 16px;
  background: #245b48;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.5;
  cursor: default;
}
/* 學位學程名稱分兩行 */
.col.col_01 .module-cgmenu .cgmenu .menu-title__line { display: block; }
/* 程式還沒跑完前，先讓空連結不能點 */
.col.col_01 .module-cgmenu .cgmenu > .list-group-item:first-child > a[href=""] {
  pointer-events: none;
  cursor: default;
}

/* ---------- 螢幕 991px 以下：隱藏左側選單，右側內容滿版 ---------- */
@media (max-width: 991px) {
  body.has-sidemenu .row.col2 .col.col_01,
  .row.col2 .col.col_01:has(.module-menu) { display: none !important; }

  body.has-sidemenu .row.col2 .col.col_02,
  .row.col2 .mrow:has(> .col_01 .module-menu) > .col_02 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
  }
}

/* ===== 六學位學程切換選單：僅在指定學程頁面顯示 ===== */
.ace-program-switch { display:none; width:100%; background:#f7f9fb; border-bottom:1px solid #e4e7ec; }
.ace-program-switch.is-visible { display:block; }
.ace-program-switch__inner { max-width:1280px; margin:0 auto; padding:15px 20px; box-sizing:border-box; }
.ace-program-switch__links {
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:stretch;
  justify-content:space-between;
  gap:4px;
  margin:0;
  padding:0;
  min-width:0;
}
.ace-program-switch__link {
  display:flex !important;
  flex-direction:column;
  flex:1 1 0 !important;
  width:0;
  min-width:0;
  min-height:72px;
  padding:10px 4px;
  align-items:center;
  justify-content:center;
  text-align:center;
  box-sizing:border-box;
  border-radius:28px;
  color:#245b48 !important;
  font-size:16px;
  font-weight:500;
  line-height:1.4;
  text-decoration:none !important;
  white-space:normal;
  overflow-wrap:anywhere;
  transition:background .2s,color .2s;
}
.ace-program-switch__line { display:block; width:100%; white-space:nowrap; }
.ace-program-switch__degree { display:block; width:100%; font-size:15px; line-height:1.5; white-space:nowrap; }
.ace-program-switch__link:hover,
.ace-program-switch__link:focus-visible,
.ace-program-switch__link.is-active { background:#245b48; color:#fff !important; }
.ace-program-switch__link:focus-visible { outline:2px solid #245b48; outline-offset:2px; }
/* 窄螢幕也維持同一橫列，改為水平滑動，不折到第二行 */
@media(max-width:850px) {
  .ace-program-switch__inner { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .ace-program-switch__links { min-width:1050px; }
}
@media(max-width:575px) {
  .ace-program-switch__inner { padding:12px; }
}

/* =====================================================================
   內頁 Banner：標題＋麵包屑（依選單位置自動產生，2026-11 建立，請勿刪除）
   ===================================================================== */
#banner.has-hero { position: relative; overflow: hidden; }
#banner .inner-hero {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: #fff;
  background: rgba(20, 50, 35, .18);
  pointer-events: none;
}
#banner .inner-hero__title {
  margin: 0 0 14px;
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(26px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
#banner .inner-hero__title span { display: block; }
#banner .inner-hero__crumb {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(14px, 1.2vw, 18px);
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
  pointer-events: auto;
}
#banner .inner-hero__crumb li + li::before {
  content: ">";
  margin: 0 12px;
  opacity: .85;
}
#banner .inner-hero__crumb a { color: #fff !important; text-decoration: none !important; }
#banner .inner-hero__crumb a:hover { text-decoration: underline !important; }
#banner .inner-hero__crumb li:last-child { font-weight: 700; }
@media (max-width: 767px) {
  /* 手機 banner 太扁放不下文字：固定高度、圖片裁切填滿 */
  #banner.has-hero img { width: 100%; height: 200px !important; object-fit: cover; }
  #banner .inner-hero__title { margin-bottom: 8px; letter-spacing: 1px; }
  #banner .inner-hero__crumb li + li::before { margin: 0 6px; }
}

/* =====================================================================
   首頁 Banner 圖片說明（bn-mdetail）：疊在圖片上，上下左右置中（2026-11 建立，請勿刪除）
   ===================================================================== */
#banner:not(.has-hero) .module-adv .figBS {
  position: relative;
  margin: 0;
}
#banner:not(.has-hero) .module-adv .figBS > .bn-txt {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
  background: none;
  text-align: center;
  pointer-events: none;
}
#banner:not(.has-hero) .module-adv .figBS > .bn-txt:empty { display: none; }
#banner .bn-mdetail,
#banner .bn-mdetail .row,
#banner .bn-mdetail .row > div {
  float: none !important;
  width: 100% !important;
  max-width: 960px;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
}
/* 文字一律白色（蓋過公版預設的文字顏色） */
#banner .bn-txt,
#banner .bn-txt *,
#banner .bn-mdetail,
#banner .bn-mdetail * {
  color: #fff !important;
}
#banner .bn-mdetail h1,
#banner .bn-mdetail h2 {
  margin: 0 0 6px !important;
  color: #fff !important;
  text-align: center !important;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
#banner .bn-mdetail h1 { font-family: "Noto Sans TC", sans-serif; font-size: clamp(26px, 3.6vw, 54px); font-weight: 700; letter-spacing: 4px; }
#banner .bn-mdetail h2 { font-family: "DM Serif Display", "Times New Roman", serif; font-size: clamp(16px, 2vw, 30px); font-weight: 400; letter-spacing: 1px; }
@media (max-width: 767px) {
  /* 手機 banner 較扁：固定高度、圖片裁切填滿，文字才放得下 */
  #banner:not(.has-hero) .module-adv .figBS:has(.bn-mdetail) img { width: 100%; height: 220px !important; object-fit: cover; }
  #banner .bn-mdetail h1 { letter-spacing: 2px; }
}

/* =====================================================================
   關於學院各頁（循環經濟研究學院、法規彙編、院長…行政人員）：
   資料標題 hdline 置中＋下方綠色短線（2026-11 建立，請勿刪除）
   ===================================================================== */
body.about-page .module-detail .mpgtitle {
  margin: 0 0 32px !important;
  text-align: center !important;
}
body.about-page.page_mobileptdetail .module-detail .mpgtitle .hdline {
  position: relative;
  display: inline-block;
  margin: 0 !important;
  padding: 0 0 16px !important;
  border: 0 !important;
  text-align: center !important;
  font-size: 1.5em !important;   /* 跟一般 h2 差不多大（原本最大 30px） */
  line-height: 1.4 !important;
}
body.about-page.page_mobileptdetail .module-detail .mpgtitle .hdline::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: #6f9f8a;
  transform: translateX(-50%);
}

/* ===== 主選單下拉選單統一深綠色；頁首 Logo 區維持公版原色 ===== */
.header .mainmenu .dropdown-menu {
  background: #245b48 !important;
}
.header .mainmenu .dropdown-menu li > a {
  background-color: transparent !important;
  color: #fff !important;
}
.header .mainmenu .dropdown-menu li > a:hover,
.header .mainmenu .dropdown-menu li > a:focus {
  background-color: #39735e !important;
  color: #fff !important;
}

/* ===== 可愛分頁按鈕（鼠尾草綠 + 奶茶金）2026-11 ===== */
.mpgbar{--pg-main:#6f9f8a;--pg-main-dark:#557f6c;--pg-soft:#e8f1ec;--pg-gold:#cbbc85;--pg-text:#2a2f38}
body .mpgbar .pagination{display:flex!important;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;margin:28px 0 12px;padding:0}
body .mpgbar .pagination>li>a,body .mpgbar .pagination>li>span{float:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;margin:0;border:2px solid var(--pg-soft);border-radius:50%!important;background:#fff;color:var(--pg-text);font-size:15px;font-weight:700;line-height:1;box-shadow:0 4px 0 var(--pg-soft);transition:transform .3s cubic-bezier(.34,1.56,.64,1),background-color .2s,color .2s,border-color .2s,box-shadow .2s}
body .mpgbar .pagination>li>a:hover,body .mpgbar .pagination>li>a:focus{background:var(--pg-soft);color:var(--pg-main-dark);border-color:var(--pg-gold);transform:translateY(-5px) rotate(-6deg) scale(1.08);box-shadow:0 7px 0 rgba(203,188,133,.45);outline:none}
body .mpgbar .pagination>li>a:active{transform:translateY(2px) scale(.94);box-shadow:0 1px 0 var(--pg-soft)}
body .mpgbar .pagination>li.active>a,body .mpgbar .pagination>li.active>span,body .mpgbar .pagination>li.active>a:hover,body .mpgbar .pagination>li.active>a:focus{background:var(--pg-main);color:#fff;border-color:var(--pg-main);box-shadow:0 4px 0 var(--pg-main-dark),0 8px 16px rgba(111,159,138,.35);animation:pg-bounce 2s ease-in-out infinite}
@keyframes pg-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
body .mpgbar .pagination>li.pg-prev>a,body .mpgbar .pagination>li.pg-next>a,body .mpgbar .pagination>li.pg-first>a,body .mpgbar .pagination>li.pg-last>a{font-size:0}
body .mpgbar .pagination>li.pg-prev>a::before{content:"\2190";font-size:17px}
body .mpgbar .pagination>li.pg-next>a::before{content:"\2192";font-size:17px}
body .mpgbar .pagination>li.pg-first>a::before{content:"\00AB";font-size:19px}
body .mpgbar .pagination>li.pg-last>a::before{content:"\00BB";font-size:19px}
body .mpgbar .pg-txt{color:var(--pg-text)}
body .mpgbar .pg-txt>span{color:var(--pg-main);font-weight:700;margin:0 2px}
body .mpgbar .page-goto .form-control{height:44px;border:2px solid var(--pg-soft);border-right:0;border-radius:22px 0 0 22px;box-shadow:none}
body .mpgbar .page-goto .form-control:focus{border-color:var(--pg-main)}
body .mpgbar .page-goto .btn{height:44px;padding:0 16px;border:2px solid var(--pg-gold);border-radius:0 22px 22px 0;background:var(--pg-gold);color:#fff;font-weight:700;transition:background-color .2s}
body .mpgbar .page-goto .btn:hover{background:#b8a76c;border-color:#b8a76c}
@media (max-width:768px){body .mpgbar .pagination{gap:8px}body .mpgbar .pagination>li>a,body .mpgbar .pagination>li>span{width:38px;height:38px;font-size:14px}}
@media (prefers-reduced-motion:reduce){body .mpgbar .pagination>li>a{transition:none}body .mpgbar .pagination>li.active>a{animation:none}}
