/* ==================================================
   courseNew.css 原版架構附加樣式
   ================================================== */
/* ===== 既有：圖片比例與卡片排版 ===== */
.resizesa img {
  /*
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  */
  position:absolute; inset:0;
  width:100%; height:100%; object-fit:cover;
  transition:transform .3s ease;
}
.item:hover img { transform: scale(1.05); }

.resizesa {
  /*
  height: 0; width: 100%;
  padding-bottom: 169px;          
  position: relative; overflow: hidden;
  border-radius: 40px 40px 0 0;
  min-width: 300px;
  */  
  position:relative;
  width:100%;
  padding-top:56.25%;  /* 16:9 = 9/16 = 56.25% */
  overflow:hidden;
  border-radius:40px 40px 0 0;
}
.course_box { 
    /*min-width: 300px; */  
}

.container-xxl { width: 1290px; margin: 0 auto; }

/* ===== 既有：標籤與價錢樣式 ===== */
.font24{
  font-size: 24px; font-weight: 700; color: #000; text-align: left !important;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  line-height: 1.25em; max-height: 2.5em; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  clear: both; height: 60px;
}

.tagBtn{ padding: 4px 14px; font-size: 12px; border-radius: 7px 0; margin-top: 10px; margin-right: 5px; display: inline-block; font-weight: 700; }
.tagBlue{ background-color:#6CACE4; color:#fff; }
.tagRed{ background-color:#E75245; color:#fff; }
.tagGray{ background-color:#898989; color:#fff; }

.txtBtn{ font-size:14px; margin-right:12px; margin-bottom:5px; font-weight:700; display:inline-block; float:left; }
.txtBlue{ color:#6CACE4; }
.txtRed{ color:#E75245; }
.txtGray{ color:#898989; }

.txtCount, .txtDisCount{
  font-size:21px; font-weight:700; margin-right:20px; margin-top:10px; display:inline-block; float:left;
}
.txtDisCount{ font-weight:500; text-decoration: line-through; }

/* RWD */
@media screen and (max-width: 767px){
  .container-xxl{ width:100%; padding-left:15px; padding-right:15px; }
}
@media (max-width: 767.98px){
  .filter-card{ position:static; top:auto; }
}
/* ===== 搜尋框（膠囊＋內凹漸層） ===== */
.header-search-container{
  display:flex; justify-content:center; align-items:center; margin-bottom:1.5rem;
}
.search-icon{
  position:absolute; top:50%; left:14px; transform:translateY(-50%);
  color:#4285f4; font-size:14px; pointer-events:none;
}
.input_box{
  width: 450px; height: 42px;
  padding-left: 38px; padding-right: 14px;  /* 左側給 icon 空間 */
  border: none; border-radius: 30px; font-size: 15px;
  /*background: #f8f8f8;
  background-image: linear-gradient(to bottom, #ffffff, #eaeaea);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.08);
  transition: box-shadow .2s ease, background-image .2s ease;*/
}
.input_box:focus{
  /*outline: none;
  background-image: linear-gradient(to bottom, #ffffff, #e0e0e0);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.15), 0 0 0 3px rgba(0,123,255,.2);*/
}
@media (max-width: 576px){ .input_box{ width:100%; } }

/* ===== （Bootstrap 4.5 相容） ===== */

:root {
  --primary: #2e7dd7;
  --secondary: #69b1ff;
  --muted: #6b7a90;
  --card: #ffffff;
  --bg: #f3f6fb;
  --tag-blue: #eaf4ff;
  --tag-gray: #eff1f5;
  --badge: #fef3f2;
  --danger: #d92d20;
}
/*body { background: var(--bg); color: #1f2937; }*/
.top-nav a.nav-link { color:#1f2937; font-weight:600; }
.top-nav .btn-warning { border-radius: 22px; padding: .35rem .9rem; font-weight:700; }
.breadcrumb { background: transparent; font-size:.92rem; }
.page-title { font-weight: 800; color: var(--primary); letter-spacing:.5px; }
.search-bar { background:#fff; border-radius: 999px; padding: .5rem 1rem; border:1px solid #e5e7eb; }
.search-bar input { border:0; outline:0; width:100%; }
.section-box { background:#e8f0fb; border-radius: 16px; padding: 18px 18px 0px 18px; }
.tag { display:inline-block; font-size:.8rem; padding:.125rem .5rem; border-radius: 6px; margin-right:.25rem; }
.tag-blue { background: var(--tag-blue); color:#2e7dd7; font-weight:700; }
.tag-gray { background: var(--tag-gray); color:#64748b; font-weight:700; }
.badge-hot { background: var(--badge); color:#b42318; border-radius: 6px; padding:.125rem .5rem; font-weight:700; }
/* sidebar */
.filter-card { background:#fff; border-radius: 16px; padding:16px; border:1px solid #e5e7eb; position: sticky; top: 65px; }
.filter-card h6 { font-weight:800; color:#1f2937; }
.filter-card .custom-control { margin-bottom:.3rem; }
/* course card */
.course-card { background: var(--card); border:1px solid #e5e7eb; border-radius: 16px; overflow:hidden; box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: box-shadow .2s ease; height:100%; }
.course-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.course-img { height: 160px; background:#eef2f7; display:block; }
.course-img img { width:100%; height:100%; object-fit:cover; display:block; }
.course-body { padding: 14px 16px 16px; }
.course-title { font-size:1.05rem; font-weight:800; line-height:1.35; min-height:2.6em; }
.course-sub { color:#6b7280; font-size:.85rem; }
.price { font-weight:900; color: var(--danger); }
.price .del { color:#94a3b8; font-weight:600; text-decoration:line-through; margin-left:.25rem; }
.meta { color:#64748b; font-size:.8rem; }
.btn-like { position:absolute; right:10px; top:10px; z-index:2; background: #fff; border:1px solid #e5e7eb; border-radius: 999px; padding:.25rem .55rem; font-size:.8rem; }
/* footer */
footer { background:#fff; border-top:1px solid #e5e7eb; }
.footer-brand { font-weight:900; letter-spacing:.5px; color:#2e7dd7; }
.footer-muted { color:#6b7280; }
/* carousel arrows mimic */
.carousel-control-prev, .carousel-control-next { width: 40px; height: 40px; top: -20px; transform: translateY(-100%); opacity:1; }
.carousel-control-prev span, .carousel-control-next span { background-color:#fff; border:1px solid #e5e7eb;border-radius:50%;width:40px;height:40px; filter:none; }
.note { color:#64748b; font-size:.9rem; }

/*================================================================*/
.filter-card {
    border: 1px solid #fff;
    box-shadow: 5px 4px 5px 0px rgba(137, 137, 137, 0.7);
}
.filter-card h6 { 
    font-weight:normal; 
    color:#1f2937; 
    margin-bottom: 0.8rem !important;
    font-size: 1.1rem;
}
.filter-card .custom-control {
    margin-left: 1.2rem;
}
.tagBtn{
    padding: 3px 16px;
    font-size: 13px;
    font-weight: normal;
}
.font24 {
    font-size: 20px;
}
.txtCount, .txtDisCount {
    font-size: 18px;
    margin-top: 0px;
}
.course_box .mt-1 {
    margin-bottom: 0.5rem;
}
.course_box p {
    clear: both;
    font-size: 14px;
    margin: 0;
    text-align: right;
}
.course-item {
    margin-bottom: 1.3rem;
}

/*（以下為你後段保留版本，不改數值；先前相同宣告已移除重覆）*/
.filter-card{
  position:sticky; top:65px;
  background:#fff; border:1px solid #fff;
  border-radius:16px; padding:16px;
  box-shadow:5px 4px 5px rgba(137,137,137,.7);
}

/* ===== 側欄 filter-card（sticky） ===== */
.filter-card {
  position: sticky;
  top: 65px;
  background:#fff;
  border:1px solid #fff;
  border-radius: 16px;
  padding:16px;
  box-shadow: 5px 4px 5px rgba(137,137,137,.7);
}
.filter-card h6 { font-size: 1.1rem; margin-bottom: .8rem; }
.filter-card .custom-control { margin-left: 1.2rem; margin-bottom:.3rem; }
@media (max-width: 767.98px){
  .filter-card{ position: static; top:auto; }
}

/* 先讓容器可作為定位參考 */
.section-box { position: relative; }

/* 箭頭本體放到右上角，並做成圓鈕（只保留一組） */
#featured .carousel-control-prev,
#featured .carousel-control-next{
  position: absolute;
  top: 0px;
  bottom: auto;
  width: 35px;
  height: 35px;
  opacity: 1;
  background: #fff;                 /* 圓底白色 */
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 16px;
  box-shadow: 0px 2px 1px 1px rgb(137 137 137 / 59%);
}
/* 兩顆靠右排列（間隔 48px vs 16px） */
#featured .carousel-control-prev{ right: 64px; left: auto;}
#featured .carousel-control-next{ right: 16px; left: auto; }

/* 圖示大小與置中（只保留一組） */
#featured .carousel-control-prev-icon,
#featured .carousel-control-next-icon{
  width: 22px;
  height: 22px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 0;
}

/* ★ 重新指定 Bootstrap 4 的箭頭圖示（保留藍色較粗樣式） */
#featured .carousel-control-prev-icon{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233498db'%3E%3Cpath d='M10.5 2a1 1 0 010 1.4L6.9 7.5l3.6 4.1a1 1 0 01-1.4 1.4l-4.5-5a1 1 0 010-1.4l4.5-5A1 1 0 0110.5 2z'/%3E%3C/svg%3E") !important;
}
#featured .carousel-control-next-icon{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233498db'%3E%3Cpath d='M5.5 2a1 1 0 011.4 0l4.5 5a1 1 0 010 1.4l-4.5 5a1 1 0 11-1.4-1.4L9.1 7.5 5.5 3.4A1 1 0 015.5 2z'/%3E%3C/svg%3E") !important;
}

/* 可選：hover 陰影（保留一次） */
#featured .carousel-control-prev:hover,
#featured .carousel-control-next:hover{
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

#carousel-title {
  border-radius: 0px 20px 20px 20px;
  background-color: #fff;
  color: #6CACE4 !important;
  padding: 0.2rem 1.8rem;
  font-size: 1.2rem;
  letter-spacing: 0.2rem;
  box-shadow: 0px 2px 1px 1px rgb(137 137 137 / 59%);
} 

/* 粗實心藍點 + 柔和外圈的 radio 樣式（Bootstrap 4 custom-radio 客製） */
.filter-card .custom-radio .custom-control-label {
  cursor: pointer;
  color: #1f2937;                 /* 預設文字色 */
}

/* 外圈（空心圓） */
.filter-card .custom-radio .custom-control-label::before {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #c9d6ea;      /* 未選邊框 */
  background-color: #fff;
  top: .25rem;                    /* 垂直微調 */
  box-shadow: inset 0px 2px 2px 0px rgb(20 23 26 / 18%);
}

/* 內點（實心圓）＋柔光暈 */
.filter-card .custom-radio .custom-control-label::after {
  top: .5rem;                    /* 與 ::before 對齊 */
  left: -1.25rem;                 /* 依你原本 margin-left:1.2rem 作微調 */
  width: 10px;
  height: 10px;
  background-color: #6CACE4;      /* 實心藍點 */
  border-radius: 50%;
  transform: none;                /* 覆蓋 bootstrap 的縮放動畫 */
  opacity: 0;                     /* 未選時隱藏 */
  /*box-shadow: 0 0 0 6px rgba(108,172,228,.18);*/  /* 柔和外圈 */
  border: 5px solid #6CACE4;
}

/* 選取狀態：外圈變藍、實心點顯示 */
.filter-card .custom-radio .custom-control-input:checked ~ .custom-control-label::before {
  border-color: #6CACE4;
  background-color: #fff;
}
.filter-card .custom-radio .custom-control-input:checked ~ .custom-control-label::after {
  opacity: 1;
}

/* 鍵盤聚焦可見（無障礙） */
.filter-card .custom-radio .custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 3px rgba(108,172,228,.25);
}

/* 停用狀態（可選） */
.filter-card .custom-radio .custom-control-input:disabled ~ .custom-control-label {
  color: #9aa4b2;
}
.filter-card .custom-radio .custom-control-input:disabled ~ .custom-control-label::before {
  border-color: #e0e6f2;
  background-color: #f8fafc;
}

/* 外框（方形框） */
.filter-card .custom-checkbox .custom-control-label::before {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #c9d6ea;
  background-color: #fff;
  top: .25rem;
  box-shadow: inset 0px 2px 2px 0px rgba(20,23,26,.18);
}

/* 打勾符號 */
.filter-card .custom-checkbox .custom-control-label::after {
  top: .25rem;
  left: -1.5rem;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background-color: #6CACE4;
  border: 1px solid #6CACE4;
  content: "✓";
  color: #fff;
  font-size: 0px;                 /* 勾勾大小 使用原本勾勾 */
  font-weight: bold;
  display: flex;                   /* 使用 flex 置中 */
  align-items: center;
  justify-content: center;
  opacity: 0;                      /* 預設隱藏 */
}

/* Checked 狀態 */
.filter-card .custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  opacity: 1;
}

/* Focus 狀態 */
.filter-card .custom-checkbox .custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 3px rgba(108,172,228,.25);
}

/* Disabled 狀態 */
.filter-card .custom-checkbox .custom-control-input:disabled ~ .custom-control-label {
  color: #9aa4b2;
}
.filter-card .custom-checkbox .custom-control-input:disabled ~ .custom-control-label::before {
  border-color: #e0e6f2;
  background-color: #f8fafc;
}

/* Hover 手勢 */
.filter-card .custom-checkbox .custom-control-label:hover {
  cursor: pointer;
}

/* 動畫更順一點（可選） */
.filter-card .custom-checkbox .custom-control-label::before,
.filter-card .custom-checkbox .custom-control-label::after {
  transition: box-shadow .18s ease, background-color .18s ease, opacity .12s ease;
}

/* -------------------------------------------
   ✅ 讓外暈只跟「聚焦」有關，不跟 :checked 走
   ------------------------------------------- */

/* 1) 先確保 checked 只顯示勾勾／藍底，不留外暈 */
.filter-card .custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  opacity: 1;                 /* 顯示勾勾／藍底 */
  box-shadow: none;           /* ❌ 不要持續外暈 */
}
/* radio 也是一樣理念：僅在 focus 顯示外暈 */
.filter-card .custom-radio .custom-control-input:checked ~ .custom-control-label::before {
  /* 你的原本框線樣式維持，但不放外暈 */
  /* ex: border-color: #6CACE4; background-color:#fff; */
}

/* 2) 聚焦時顯示外暈（第一次點擊就會出現；失焦就移除） */
.filter-card .custom-checkbox:focus-within .custom-control-label::before,
.filter-card .custom-checkbox .custom-control-input:focus ~ .custom-control-label::before {
  border-color: #6CACE4;
  box-shadow:
    0 0 0 6px rgba(108,172,228,.18),  /* 外暈 */
    inset 0 2px 2px rgba(20,23,26,.18);/* 你的內陰影保留 */
}
/* 若你希望外暈畫在藍底那層也行（擇一或都留）： */
.filter-card .custom-checkbox:focus-within .custom-control-label::after,
.filter-card .custom-checkbox .custom-control-input:focus ~ .custom-control-label::after {
  box-shadow: 0 0 0 6px rgba(108,172,228,.18);
}

/* radio 與 checkbox 一致化：聚焦才有外暈 */
.filter-card .custom-radio:focus-within .custom-control-label::before,
.filter-card .custom-radio .custom-control-input:focus ~ .custom-control-label::before {
  box-shadow:
    0 0 0 6px rgba(108,172,228,.18),
    inset 0 2px 2px rgba(20,23,26,.18);
}

/* 3) 滑鼠按下瞬間也給回饋（即使瀏覽器暫不送 focus） */
.filter-card .custom-checkbox .custom-control-input:active ~ .custom-control-label::before,
.filter-card .custom-radio    .custom-control-input:active ~ .custom-control-label::before {
  box-shadow:
    0 0 0 6px rgba(108,172,228,.18),
    inset 0 2px 2px rgba(20,23,26,.18);
}

/* 4) 動畫更順（可留） */
.filter-card .custom-control-label::before,
.filter-card .custom-control-label::after{
  transition: box-shadow .18s ease, background-color .18s ease, opacity .12s ease, border-color .18s ease;
}


/* 當 radio/checkbox 被選取時，文字變色 #6CACE4 */
.filter-card .custom-control-input:checked ~ .custom-control-label {
  color: #6CACE4;
}


/* ====== vM1: Mobile Drawer for filters（≤991px 右側浮動按鈕開啟） ====== */
@media (max-width: 991.98px){
  #filtersDrawer{
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(92vw, 380px);
    max-width: none;
    height: 100vh;
    height: 100dvh;
    margin: 0 !important;
    padding: 52px 18px calc(30px + env(safe-area-inset-bottom, 0px));
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
    background: #fff;
    z-index: 1040;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: -2px 0 18px rgba(0,0,0,.12);
    pointer-events: none;
    visibility: hidden;
    box-sizing: border-box;
  }

  #filtersDrawer.is-open{
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
    z-index: 1100;
  }

  .drawer-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1090;
  }

  .drawer-backdrop[hidden]{
    display: none !important;
  }

  .drawer-close{
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    margin: 0;
    padding: 6px 10px;
    display: block;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #6CACE4;
    cursor: pointer;
    z-index: 3;
  }

  #filtersDrawer .drawer-panel-head,
  #filtersDrawer .drawer-search,
  #filtersDrawer .drawer-footer,
  #filtersDrawer .filter-card{
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  #filtersDrawer .course-new-search-box--drawer{
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  #filtersDrawer .filter-card{
    box-shadow: none;
    border: 0;
    padding: 0;
    padding-bottom: 8px;
  }

  #filtersDrawer .filter-card::after{
    content: "";
    display: block;
    height: 32px;
  }

  #filtersDrawer .filter-card h6{
    margin-top: .5rem;
  }

  /* 手機 drawer：大按鈕 chip 版型（易點、適合長輩） */
  #filtersDrawer #filters{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
  }

  #filtersDrawer #filters > h6{
    flex: 0 0 100%;
    width: 100%;
    margin: 18px 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .02em;
  }

  #filtersDrawer #filters > h6:first-child{
    margin-top: 4px;
  }

  #filtersDrawer #filters > hr{
    flex: 0 0 100%;
    width: 100%;
    margin: 14px 0 2px;
    border-color: #e5e7eb;
  }

  #filtersDrawer #filters > .custom-control{
    flex: 0 0 100%;
    min-width: 0;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0;
    position: relative;
    min-height: 48px;
  }

  /* 課程狀態：兩欄並排 */
  #filtersDrawer #filters .custom-control:has([name="status"]){
    flex: 1 1 calc(50% - 5px);
    min-width: calc(50% - 5px);
  }

  #filtersDrawer #filters .custom-control:has([name="status"]) .custom-control-label{
    padding: 12px 10px !important;
    font-size: .92rem;
  }

  /* 開課時間：三個並排大按鈕 */
  #filtersDrawer #filters .custom-control:has(#time-all),
  #filtersDrawer #filters .custom-control:has(#time-1m),
  #filtersDrawer #filters .custom-control:has(#time-3m){
    flex: 1 1 calc(33.333% - 7px);
    min-width: 0;
  }

  /* 課程類別：多選兩欄 */
  #filtersDrawer #filters .custom-control:has(.cat-multi){
    flex: 1 1 calc(50% - 5px);
    min-width: calc(50% - 5px);
  }

  #filtersDrawer #filters .custom-control-input{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
  }

  #filtersDrawer #filters .custom-control-label{
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 2px solid #c8daf0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    color: #1f2937;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  }

  #filtersDrawer #filters .custom-control:has(#time-all) .custom-control-label,
  #filtersDrawer #filters .custom-control:has(#time-1m) .custom-control-label,
  #filtersDrawer #filters .custom-control:has(#time-3m) .custom-control-label{
    padding: 12px 8px !important;
    font-size: .95rem;
  }

  #filtersDrawer #filters .custom-control-label::before,
  #filtersDrawer #filters .custom-control-label::after{
    display: none !important;
  }

  #filtersDrawer #filters .custom-control-input:checked ~ .custom-control-label{
    background: #6CACE4;
    border-color: #5a9bd8;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(108,172,228,.28);
  }

  #filtersDrawer #filters .custom-control-input:focus-visible ~ .custom-control-label{
    outline: 3px solid rgba(108,172,228,.45);
    outline-offset: 2px;
  }

  #filtersDrawer #filters .custom-control-input:active ~ .custom-control-label{
    transform: scale(.98);
  }
}

@media (max-width: 767.98px){
  .filter-card{ position: static; top:auto; }
}


/* ====== v1.1 手機優化（不影響桌機） ====== */
@media (max-width: 767.98px){

  /* 讓輪播上方留出箭頭的空間，避免擠到標題 */
  .section-box{
    padding: 12px 12px 10px;
    padding-top: 28px; /* 預留給兩顆箭頭的高度 */
  }

  /* 手機上箭頭縮小、往內縮一點；保留你要的 right + left:auto 規則 */
  #featured .carousel-control-prev,
  #featured .carousel-control-next{
    top: 8px;                /* 從原本 0 調高，避免貼齊圓角 */
    width: 32px;
    height: 32px;
    right: 12px;             /* 右邊的那顆維持 12px 內縮 */
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
  }
  #featured .carousel-control-prev{
    right: 56px;             /* 與下一顆間距 44px，較緊湊 */
    left: auto;              /* 依你的規則保留 */
  }
  #featured .carousel-control-prev-icon,
  #featured .carousel-control-next-icon{
    width: 18px;
    height: 18px;
  }

  /* 標題膠囊縮小些，並避免被箭頭壓到（預留右側空間） */
  #carousel-title{
    font-size: 1rem;
    padding: .2rem 1rem;
    letter-spacing: .12rem;
    max-width: calc(100% - 120px); /* 右邊預留兩顆箭頭的寬度 */
    display: inline-block;
    vertical-align: middle;
  }

  /* 卡片圓角在小螢幕稍微收斂，視覺更穩 */
  .resizesa{ border-radius: 20px 20px 0 0; }
  .course_box{ padding: 10px; }

  /* 避免 carousel 在 iOS 滾動時「卡住」感 */
  #featured{ -webkit-overflow-scrolling: touch; touch-action: pan-y; }

  /* 抽屜 / 遮罩權重維持在輪播之上（若有重疊） */
  aside[role="region"]{ z-index: 1050; }
  .drawer-backdrop{ z-index: 1040; }
}

@media (max-width: 767px){
  #featured .course-item { margin-bottom: 1rem; }
  #featured .carousel-item .col-12 { padding: 0 8px; }
}
/* vM1: 手機輪播高度變化時做平滑過渡（桌機不受影響） */
@media (max-width: 767.98px){
  #featured { transition: height .2s ease; }
}




/* vM2: 手機輪播每次只顯示一張卡片（其他隱藏），不影響桌機 */
@media (max-width: 767.98px){
  /* 先隱藏同一 slide 內的所有欄位 */
  #featured .carousel-item .row > [class^="col-"],
  #featured .carousel-item .row > [class*=" col-"]{
    display: none;
  }
  /* 僅顯示第一個卡片，並讓它 100% 寬 */
  #featured .carousel-item .row > [class^="col-"]:first-child,
  #featured .carousel-item .row > [class*=" col-"]:first-child{
    display: block;
    flex: 0 0 100%;
    max-width: 100%;
    /*padding-left: 0;*/  /*靠近左右兩邊的內容會被邊界吃掉而無法顯示*/
    /*padding-right: 0;*/
  }
}


/* 讓日期固定在卡片右下，並預留底部空間 */
.course_box{
  position: relative;
  padding-bottom: 32px;    /* 預留日期高度 */
}
.course_box p{             /* 開課日期 */
  position: absolute;
  right: 15px;
  bottom: 5px;
  margin: 0;
  text-align: right;
}

/* 價格改堆疊顯示，移除 float 影響 */
.course_box .txtCount,
.course_box .txtDisCount{
  float: none;
  display: block;
  margin: 0;               /* 與行高控制高度 */
  line-height: 24px;
}

/* ⬇ 價格區固定高度：兩行高 (約 44px)
   若只有一行，利用 :has() 自動補一個「空行」撐高 */
.course_box:has(.txtCount):not(:has(.txtDisCount)) .txtCount::after,
.course_box:has(.txtDisCount):not(:has(.txtCount)) .txtDisCount::after{
  content: "";
  display: block;
  height: 24px;            /* 第二行的保留高度 */
}

/* （可選）為了不同字重造成的行高誤差，稍微加大保留空間 */
@supports not (selector(:has(*))) {
  /* 如果極少數舊瀏覽器不支援 :has()，退而求其次：直接固定兩行高度 */
  .course_box .txtCount,
  .course_box .txtDisCount{ min-height: 48px; }
}

#scrollUp {
    bottom: 45px;
    color: #ffffff;
    cursor: pointer;
    font-size: 28px;
    height: 40px;
    line-height: 37px;
    right: 12px;
    text-align: center;
    width: 40px;
}

/* v1.6: 搜尋列—中間置中 + 右側連結 */
.search-extra-link {
    font-weight: 600;
    text-align: center;
    line-height: 1.45;
    font-size: 1.0rem;
    text-decoration: underline;
    color: #6caedf;
    display: inline-block;
}



/* ==================================================
   courseNew.css 新版架構附加樣式
   ================================================== */

.course-new-container{
  max-width: 1240px;
}

/* 搜尋區 */
.course-new-search{
  margin-bottom: 10px;
}

.course-new-search-inner{
  position: relative;
  padding-left: 22px;
  padding-right: 22px;
}

.course-new-search-main{
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
  text-align: center;
}

.course-new-search-inner > .corelab-extra-link{
  position: absolute;
  right: 22px;
  top: 0;
  height: 48px;
  display: flex;
  align-items: center;
  text-align: left;
}

.course-new-search-inner > .corelab-extra-link .search-extra-link{
  white-space: nowrap;
  line-height: 1.35;
}

.course-new-search-inner > .corelab-extra-link[hidden]{
  display: none !important;
}

.course-new-search-note{
  color: #585757;
  font-size: 12px;
  margin-top: 8px;
  margin-bottom: 0px;
  text-align: center;
}

.course-new-search-box{
  width: 450px;
  max-width: 100%;
  height: 48px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #dbe6f5;
  border-radius: 999px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.08);
  overflow: hidden;
}

.course-new-search-box .search-icon{
  left: 24px;
  color: #005edb;
}

.course-new-search-box .input_box{
  width: 100%;
  height: 48px;
  border: 0;
  box-shadow: none;
  padding-left: 58px;
  padding-right: 24px;
}

/* 右側主內容 */
.course-main-new{
  padding-left: 22px;
}

/* Hero */
.course-hero-new{
  /*min-height: 430px;*/
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #eef7ff 0%, #f7fbff 100%);
  border-radius: 16px;
  /*padding: 48px;
  margin-bottom: 34px;*/
  padding: 0px 20px;
  margin-bottom: 14px;
  overflow: hidden;
}

.course-hero-text{
  /*width: 48%;*/
  width: 63%;
  position: relative;
  z-index: 2;
}

.course-hero-text h2{
  /*font-size: 2.55rem;
  line-height: 1.35;*/
  font-size: 2.1rem;
  line-height: 1.15;
  font-weight: 900;
  color: #06449b;
  /*margin-bottom: 22px;*/
  margin-bottom: 12px;
  letter-spacing: 0.25rem;
}

.course-hero-text p{
  font-size: 1.08rem;
  /*line-height: 1.9;*/
  line-height: 1.5;
  color: #06449b;
  font-weight: 600;
  /*margin-bottom: 30px;*/
  margin-bottom: 10px;
}

.role-title{
  color: #06449b;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.role-list{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.role-card{
  min-width: 112px;
  /*padding: 16px 18px;*/
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid #d6e4f5;
  background: #fff;
  color: #0b3f91;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.role-card:hover{
  color: #0b66d8;
  text-decoration: none;
  transform: translateY(-2px);
}

.course-main-new .role-card.is-active{
  background: #0b4eb3;
  border-color: #0b4eb3;
  color: #fff;
  box-shadow: 0 8px 20px rgba(11,78,179,.22);
}

.course-main-new .role-card.is-active:hover{
  color: #fff;
  transform: translateY(-1px);
}

/* Hero 主視覺圖 */
.course-hero-placeholder{
  width: 35%;
  height: 250px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.course-hero-placeholder img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 18px;
}

.fake-screen{
  position: absolute;
  right: 60px;
  top: 50px;
  width: 260px;
  height: 160px;
  border: 10px solid #0b66d8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(11,102,216,.18);
}

.fake-screen::before{
  content: "";
  position: absolute;
  left: 30px;
  top: 35px;
  width: 150px;
  height: 12px;
  border-radius: 999px;
  background: #d9e8fb;
  box-shadow: 0 34px 0 #d9e8fb, 0 68px 0 #d9e8fb;
}

.fake-person{
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 130px;
  height: 170px;
  border-radius: 70px 70px 20px 20px;
  background: linear-gradient(180deg, #3b82f6, #0b4eb3);
}

.fake-person::before{
  content: "";
  position: absolute;
  top: -48px;
  left: 36px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #ffd6a8;
}

/* 五大入口 */
.course-service-scroll-wrap{
  position: relative;
  margin-bottom: 10px;
}

.course-service-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 0;
}

.course-service-scroll-wrap::after{
  content: none;
}

.service-card{
  position: relative;
  /*min-height: 360px;
  padding: 48px 18px 18px;*/
  min-height: 295px;
  padding: 8px 10px 8px;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  color: #1f2937;
  border: 1px solid #cfe0f7;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.service-card:hover{
  text-decoration: none;
  transform: translateY(-3px);
}

.service-no{
  position: absolute;
  top: 0;
  left: 0;
  /*padding: 8px 15px;*/
  padding: 3px 12px;
  color: #fff;
  font-weight: 900;
  border-radius: 8px 0 8px 0;
  background: #0b66d8;
}

.service-icon{
  width: 86px;
  height: 86px;
  border-radius: 22px;
  /*margin: 20px auto 24px;*/
  margin: 10px auto 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(108,172,228,.25), rgba(108,172,228,.08)),
    #eef7ff;
}

.service-icon:has(img){
  background: transparent;
}

.service-icon img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.service-card h3{
  /*min-height: 54px;
  font-size: 1.28rem;*/
  min-height: 24px;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 900;
  color: #0b4eb3;
  margin-bottom: 12px;
}

.service-card p{
  font-size: .9rem;
  line-height: 1.75;
  color: #1f2937;
}

.service-btn{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  /*padding: 10px 8px;*/
  padding: 5px 6px;
  border-radius: 6px;
  background: #0b66d8;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.service-green .service-no,
.service-green .service-btn{ background:#00918f; }
.service-orange .service-no,
.service-orange .service-btn{ background:#ff7a00; }
.service-purple .service-no,
.service-purple .service-btn{ background:#6b4bb7; }

/* 熱門課程 */
.hot-course-section{
  margin-top: 12px;
}

.course-section-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.course-section-head h3{
  font-size: 1.45rem;
  font-weight: 900;
  color: #06449b;
  margin: 0;
}

.more-course-link{
  color: #0b66d8;
  font-weight: 700;
}

.course-main-new .course-item.course-item--limit-hidden{
  display: none !important;
}

.course-main-new .course-empty-state{
  display: none;
  margin-top: 8px;
  padding: 36px 24px;
  border-radius: 14px;
  border: 1px dashed #cfe0f5;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  text-align: center;
}

.course-main-new .course-empty-state.is-visible{
  display: block;
}

.course-main-new .course-empty-icon{
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eef5ff;
  color: #0b4eb3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.course-main-new .course-empty-title{
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #06449b;
}

.course-main-new .course-empty-desc{
  margin: 0 auto 16px;
  max-width: 520px;
  color: #64748b;
  font-size: .95rem;
  line-height: 1.6;
}

.course-main-new .course-empty-reset{
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: #0b4eb3;
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
}

.course-main-new .course-empty-reset:hover{
  background: #06449b;
}

/* 課程卡片新版微調 */
.course-main-new .course-item .item{
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5eef8;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  height: 100%;
}

.course-main-new .resizesa{
  border-radius: 12px 12px 0 0;
}

.course-main-new .course_box{
  padding: 14px 14px 36px;
}

/* 課程名稱固定兩行高度，超出以 … 截斷 */
.course-main-new .course-item .font24{
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  height: calc(1.35em * 2);
  max-height: calc(1.35em * 2);
}

/* RWD */
@media (max-width: 1199.98px){
  .course-service-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px){
  .course-main-new{
    padding-left: 15px;
    padding-right: 15px;
  }

  .course-service-scroll-wrap{
    margin-left: -15px;
    margin-right: -15px;
  }

  .course-service-scroll-wrap::after{
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 8px;
    width: 36px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.96));
    pointer-events: none;
    z-index: 1;
  }

  .course-service-grid{
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 15px;
    padding: 0 15px 8px;
    scrollbar-width: none;
  }

  .course-service-grid::-webkit-scrollbar{
    display: none;
  }

  .course-service-grid::after{
    content: "";
    flex: 0 0 12px;
  }

  .course-service-grid .service-card{
    flex: 0 0 calc(100% - 52px);
    max-width: 320px;
    scroll-snap-align: start;
  }

  .course-hero-new{
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
  }

  .course-hero-text,
  .course-hero-placeholder{
    width: 100%;
  }

  .course-main-new .hero-home .course-hero-placeholder,
  .course-main-new .course-hero-banner-placeholder{
    display: none !important;
  }

  .course-main-new .course-hero-new:not(.is-subpage){
    padding: 20px 16px;
  }

  .course-main-new .course-hero-new.is-subpage{
    padding: 16px;
  }
}

@media (max-width: 576px){
  .course-new-search-box:not(.course-new-search-box--drawer){
    height: auto;
    flex-direction: column;
    border-radius: 18px;
    padding: 8px;
  }

  .course-new-search-box:not(.course-new-search-box--drawer) .input_box{
    height: 42px;
    padding-right: 14px;
  }

  .course-new-search .search-extra-link{
    display: inline-block;
    margin-top: 12px;
    line-height: 1.5;
  }

  .course-hero-text h2{
    font-size: 2rem;
  }

  .role-card{
    width: calc(50% - 7px);
  }

  .course-section-head{
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .fa-search::before {
	display: none;
  }
}
@media (min-width: 48em) {
    section {
        padding: 0 0 1rem 0;
    }
}

/* ==================================================
   courseNew 第二層（subpage）切換樣式
   - 僅影響右側新版區塊
   ================================================== */

/* Hero 內部模板容器 */
.course-main-new .course-hero-new .hero-home{
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.course-main-new .course-hero-new .hero-sub{
  display: flex;
  width: 100%;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
}

/* 第二層 Hero 外觀 */
.course-main-new .course-hero-new.is-subpage{
  background: linear-gradient(90deg, #e9f4ff 0%, #f7fbff 55%, #ffffff 100%);
  border: 1px solid #d9e8fb;
  padding: 22px 22px;
  min-height: 0;
  overflow: visible;
  align-items: stretch;
}

.course-main-new .course-hero-sub-left{
  flex: 1 1 58%;
  min-width: 0;
}

.course-main-new .course-hero-sub-right{
  flex: 0 0 38%;
  max-width: 38%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
}

.course-main-new .course-hero-sub-right .course-hero-banner-placeholder{
  flex: 1 1 auto;
  min-height: 180px;
  height: auto;
}

.course-main-new .course-hero-sub-right .course-hero-contact{
  flex: 0 0 auto;
  max-width: none;
  width: 100%;
}

/* 第二層右側：預設僅聯絡卡（Banner 需 heroMap.showBanner: true 才顯示） */
.course-main-new .course-hero-new.is-subpage .course-hero-sub-right .course-hero-banner-placeholder{
  display: none;
}

.course-main-new .course-hero-new.is-subpage .course-hero-sub-right{
  justify-content: center;
}

.course-main-new .course-hero-new.is-subpage.is-show-banner .course-hero-sub-right .course-hero-banner-placeholder{
  display: block;
}

.course-main-new .course-hero-new.is-subpage.is-show-banner .course-hero-sub-right{
  justify-content: flex-start;
}

/* 企業包班／新尖兵／合作夥伴：右側僅聯絡卡（JS 同步 hidden） */
.course-main-new .course-hero-new.is-ctp .course-hero-sub-right .course-hero-banner-placeholder,
.course-main-new .course-hero-new.is-new .course-hero-sub-right .course-hero-banner-placeholder,
.course-main-new .course-hero-new.is-aly .course-hero-sub-right .course-hero-banner-placeholder,
.course-main-new .course-hero-new.is-loc .course-hero-sub-right .course-hero-banner-placeholder,
.course-main-new .course-hero-new.is-icp .course-hero-sub-right .course-hero-banner-placeholder{
  display: none;
}

.course-main-new .course-hero-new.is-ctp .course-hero-sub-right,
.course-main-new .course-hero-new.is-new .course-hero-sub-right,
.course-main-new .course-hero-new.is-aly .course-hero-sub-right,
.course-main-new .course-hero-new.is-loc .course-hero-sub-right,
.course-main-new .course-hero-new.is-icp .course-hero-sub-right{
  justify-content: center;
}

.course-main-new .course-hero-banner-placeholder{
  width: 100%;
  height: 120px;
  border-radius: 14px;
  border: 2px dashed #9ec5ef;
  background:
    radial-gradient(circle at 20% 30%, rgba(108,172,228,.30), transparent 35%),
    linear-gradient(135deg, #dceeff 0%, #f8fbff 60%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.course-main-new .course-hero-banner-placeholder::after{
  content: "Banner 圖片預留";
  position: absolute;
  left: 14px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid #cfe0f7;
  color: #5a7aa8;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
}

.course-main-new .course-hero-sub-content{
  padding-top: 12px;
}

.course-main-new .course-hero-sub-title{
  margin: 0 0 8px;
  font-weight: 900;
  color: #06449b;
  letter-spacing: .08em;
  font-size: 1.6rem;
}

.course-main-new .course-hero-sub-title .fa{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-right: 12px;
  border-radius: 50%;
  background: #0b4eb3;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  vertical-align: middle;
}

.course-main-new .course-hero-subtitle{
  margin: 0;
  color: #1e4a8a;
  font-weight: 600;
  line-height: 1.75;
  font-size: 0.98rem;
  max-width: 52em;
}

/* 右側聯絡卡 placeholder */
.course-main-new .course-hero-contact{
  flex: 0 0 320px;
  max-width: 320px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b66d8, #0b4eb3);
  color: #fff;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 26px rgba(11,102,216,.18);
}

.course-main-new .course-hero-contact-icon{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0%);
  border: 0px solid rgba(255,255,255,.22);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-main-new .course-hero-contact-icon .fa{
  font-size: 2rem;
  color: #fff;
  line-height: 1;
}

.course-main-new .course-hero-contact-label{
  font-weight: 800;
  font-size: 0.92rem;
  opacity: .95;
}

.course-main-new .course-hero-contact-value{
  font-weight: 900;
  letter-spacing: .04em;
  font-size: 1.05rem;
  margin-top: 2px;
}

/* 第二層資訊區（Logo） */
.course-main-new .course-sub-content{
  margin-top: 14px;
  margin-bottom: 18px;
}

.course-main-new .partner-logo-section{
  background: #fff;
  border: 1px solid #e5eef8;
  border-radius: 14px;
  padding: 14px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.course-main-new .partner-logo-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.course-main-new .partner-logo-head h4{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #06449b;
  letter-spacing: .06em;
}

.course-main-new .partner-logo-more{
  color: #0b66d8;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.course-main-new .partner-logo-more:hover{
  text-decoration: underline;
}

.course-main-new .partner-logo-grid{
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.course-main-new .partner-logo-card{
  height: 54px;
  border-radius: 12px;
  border: 1px solid #e5eef8;
  background:
    linear-gradient(135deg, rgba(108,172,228,.18), rgba(238,247,255,.9)),
    #f8fbff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
}

.course-main-new .partner-logo-card:has(img){
  background: #fff;
}

.course-main-new .partner-logo-card img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.course-main-new .partner-logo-card::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  animation: partnerShimmer 2.2s ease-in-out infinite;
}

.course-main-new .partner-logo-card:has(img)::after{
  content: none;
}

@keyframes partnerShimmer{
  0%{ transform: translateX(-100%); }
  60%{ transform: translateX(100%); }
  100%{ transform: translateX(100%); }
}

/* subpage 時隱藏五大入口（以 hidden + JS 控制為主；此處做保底） */
.course-main-new .course-hero-new.is-subpage + .course-service-grid{
  display: none;
}

/* 首頁 Hero 角色選取時隱藏五大入口 */
.course-main-new .course-hero-new.is-role-mode + .course-service-grid{
  display: none;
}

/* RWD */
@media (max-width: 991.98px){
  .course-main-new .course-hero-new .hero-home{
    flex-direction: column;
    align-items: flex-start;
  }
  .course-main-new .course-hero-new .hero-sub{
    flex-direction: column;
  }
  .course-main-new .course-hero-sub-right{
    flex: none;
    max-width: 100%;
    width: 100%;
    margin-top: 10px;
  }
  .course-main-new .course-hero-contact{
    flex: none;
    max-width: 100%;
    width: 100%;
    padding: 12px 14px;
  }
  .course-main-new .course-hero-contact-icon{
    width: 40px;
    height: 40px;
  }
  .course-main-new .course-hero-contact-icon .fa{
    font-size: 1.5rem;
  }
  .course-main-new .partner-logo-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 企業包班特色卡（status-ctp） */
.course-main-new .enterprise-feature-section{
  margin-top: 12px;
}

.course-main-new .enterprise-feature-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.course-main-new .enterprise-feature-card{
  border-radius: 14px;
  border: 1px solid #e5eef8;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
}

.course-main-new .enterprise-feature-icon{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-main-new .enterprise-feature-icon .fa{
  font-size: 1.6rem;
  color: #0b4eb3;
  line-height: 1;
}

.course-main-new .enterprise-feature-title{
  font-weight: 900;
  color: #06449b;
  letter-spacing: .04em;
  font-size: 1rem;
  line-height: 1.2;
}

.course-main-new .enterprise-feature-desc{
  color: #64748b;
  font-weight: 700;
  font-size: .9rem;
  margin-top: 2px;
}

/* 新尖兵特色卡（status-new，樣式同 enterprise-feature-card） */
.course-main-new .newbie-feature-section{
  margin-top: 12px;
}

.course-main-new .newbie-feature-grid{
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.course-main-new .newbie-feature-card{
  border-radius: 12px;
  border: 1px solid #e5eef8;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}

.course-main-new .newbie-feature-icon{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-main-new .newbie-feature-icon .fa{
  font-size: 1.5rem;
  color: #0b4eb3;
  line-height: 1;
}

.course-main-new .newbie-feature-title{
  font-weight: 900;
  color: #06449b;
  letter-spacing: .04em;
  font-size: 1rem;
  line-height: 1.2;
}

/* 新尖兵聯絡卡（紫色） */
.course-main-new .course-hero-contact.is-purple{
  background: linear-gradient(135deg, #6b4bb7, #4c1d95);
  box-shadow: 0 10px 26px rgba(107,75,183,.22);
}

@media (max-width: 576px){
  .course-main-new .course-hero-sub-title{ font-size: 1.35rem; }
}

/* 在職菁英班特色卡（status-icp，樣式同 newbie-feature-card） */
.course-main-new .icp-feature-section{
  margin-top: 12px;
}

.course-main-new .icp-feature-grid{
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.course-main-new .icp-feature-card{
  border-radius: 12px;
  border: 1px solid #e5eef8;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}

.course-main-new .icp-feature-icon{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-main-new .icp-feature-icon .fa{
  font-size: 1.5rem;
  color: #0b4eb3;
  line-height: 1;
}

.course-main-new .icp-feature-title{
  font-weight: 900;
  color: #06449b;
  letter-spacing: .04em;
  font-size: 1rem;
  line-height: 1.2;
}

/* 在職菁英班聯絡卡（青綠色） */
.course-main-new .course-hero-contact.is-teal{
  background: linear-gradient(135deg, #0f766e, #115e59);
  box-shadow: 0 10px 26px rgba(15,118,110,.22);
}

/* 樂齡學習中心（status-loc） */
.course-main-new .course-hero-new.is-loc{
  background: linear-gradient(90deg, #fff7ed 0%, #fffbf5 55%, #ffffff 100%);
  border-color: #fed7aa;
}

.course-main-new .course-hero-contact.is-orange{
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 10px 26px rgba(234,88,12,.22);
}

.course-main-new .senior-promo-section{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  /*padding: 12px 16px;*/
  padding: 0px 30px;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 0;
  background: linear-gradient(90deg, #fff7ed 0%, #fbeee0 52%, #fff9f4 100%);
  min-height: 90px;
  box-shadow: 0 6px 18px rgba(91,58,30,.08);
}

.course-main-new .senior-promo-trophy,
.course-main-new .senior-promo-illust{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-main-new .senior-promo-trophy img,
.course-main-new .senior-promo-illust img{
  display: block;
  width: auto;
  height: auto;
  max-height: 78px;
  object-fit: contain;
}

.course-main-new .senior-promo-text{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.course-main-new .senior-promo-text strong{
  font-size: 1.28rem;
  font-weight: 900;
  color: #5b3a1e;
  letter-spacing: .02em;
  line-height: 1.35;
}

.course-main-new .senior-promo-text span{
  font-size: 1rem;
  color: #6d4c2f;
  line-height: 1.45;
}

.course-main-new .senior-promo-btn{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #6d4c2f;
  background: #fff;
  color: #5b3a1e;
  font-weight: 700;
  font-size: .84rem;
  text-decoration: none;
  white-space: nowrap;
}

.course-main-new .senior-promo-btn:hover{
  background: #fffaf5;
  color: #5b3a1e;
  text-decoration: none;
}

/* 架構同 .partner-logo-section：section > head > grid > card */
.course-main-new .senior-category-section{
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.course-main-new .senior-category-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.course-main-new .senior-category-head h4{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #9a3412;
  letter-spacing: .06em;
}

.course-main-new .senior-category-more{
  color: #ea580c;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.course-main-new .senior-category-more:hover{
  text-decoration: underline;
}

.course-main-new .senior-category-grid{
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.course-main-new .senior-category-sep{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: #d1d5db;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  user-select: none;
  padding: 0 2px;
}

.course-main-new .senior-category-card{
  flex: 1 1 0;
  min-width: 0;
  min-height: 56px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.course-main-new .senior-category-icon{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-main-new .senior-category-card[data-loc-tab="partner"] .fa{ color: #ea580c; }
.course-main-new .senior-category-card[data-loc-tab="center"] .fa{ color: #2563eb; }
.course-main-new .senior-category-card[data-loc-tab="community"] .fa{ color: #0d9488; }
.course-main-new .senior-category-card[data-loc-tab="library"] .fa{ color: #1e40af; }
.course-main-new .senior-category-card[data-loc-tab="ltc"] .fa{ color: #fb923c; }
.course-main-new .senior-category-card[data-loc-tab="medical"] .fa{ color: #2563eb; }

.course-main-new .senior-category-icon .fa{
  font-size: 1.35rem;
  line-height: 1;
}

.course-main-new .senior-category-label{
  font-size: .92rem;
  font-weight: 700;
  color: #374151;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 991.98px){
  .course-main-new .senior-category-grid{
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .course-main-new .senior-category-card{
    flex: 0 0 auto;
    min-width: 118px;
  }

  .course-main-new .senior-promo-section{
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 12px;
    padding: 12px 14px;
    min-height: 0;
  }

  .course-main-new .senior-promo-trophy,
  .course-main-new .senior-promo-illust{
    display: none !important;
  }

  .course-main-new .senior-promo-text{
    flex: 1 1 100%;
    order: 1;
  }

  .course-main-new .senior-promo-btn{
    order: 2;
    width: 100%;
  }
}

@media (max-width: 576px){
  .course-main-new .senior-category-card{
    min-width: 108px;
    padding: 10px 8px;
  }

  .course-main-new .senior-category-label{
    font-size: .84rem;
  }
}

/* ==================================================
   courseNew 手機版 UI 優化
   ================================================== */

.course-new-search-toolbar{
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-new-search-toolbar-main{
  flex: 1 1 auto;
  min-width: 0;
}

.course-new-search-toolbar-action{
  flex: 0 0 auto;
}

.course-new-search-toolbar-action .btn{
  white-space: nowrap;
  min-height: 44px;
  padding-left: 12px;
  padding-right: 12px;
}

.filter-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0b4eb3;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.filter-badge[hidden]{
  display: none !important;
}

.course-filter-bar{
  position: sticky;
  top: var(--course-nav-height, 72px);
  z-index: 1058;
  margin-top: 0;
  margin-left: -15px;
  margin-right: -15px;
  margin-bottom: 12px;
  padding: 8px 15px;
  background: #f0f6ff;
  border-bottom: 1px solid #c8daf0;
  box-shadow:
    0 4px 14px rgba(11, 78, 179, .08),
    0 -24px 0 24px #f0f6ff;
}

.course-filter-bar[hidden]{
  display: none !important;
}

.course-filter-bar-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.course-filter-bar-summary{
  margin: 0;
  font-size: .84rem;
  font-weight: 800;
  color: #06449b;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-filter-bar-actions{
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.course-filter-bar-btn{
  border: 1px solid #0b66d8;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #0b66d8;
  line-height: 1.2;
  white-space: nowrap;
}

.course-filter-bar-btn--clear{
  background: #0b66d8;
  color: #fff;
}

.course-filter-bar-btn--clear:hover,
.course-filter-bar-btn--clear:focus{
  background: #06449b;
  color: #fff;
}

.course-filter-bar-btn--edit:hover,
.course-filter-bar-btn--edit:focus{
  background: #f0f7ff;
}

.course-filter-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-filter-chips--bar{
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.course-filter-chips--bar::-webkit-scrollbar{
  display: none;
}

.course-filter-chips[hidden]{
  display: none !important;
}

.course-filter-chip{
  border: 1px solid #9ec5ef;
  border-radius: 999px;
  background: #fff;
  color: #06449b;
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.course-filter-chip span{
  margin-left: 6px;
  color: #64748b;
}

.course-section-head-main{
  min-width: 0;
}

.course-list-meta{
  margin: 4px 0 0;
  color: #64748b;
  font-size: .88rem;
  font-weight: 600;
}

.course-list-meta[hidden]{
  display: none !important;
}

.course-role-hint{
  margin: 10px 0 0;
  color: #0b4eb3;
  font-size: .88rem;
  font-weight: 700;
}

.course-role-hint[hidden]{
  display: none !important;
}

.hot-course-section{
  scroll-margin-top: 96px;
}

.more-course-link--footer{
  display: none;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #0b66d8;
  background: #fff;
  color: #0b66d8;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.more-course-link--footer:hover{
  background: #f7fbff;
  color: #0b4eb3;
  text-decoration: none;
}

.more-course-link--footer[hidden]{
  display: none !important;
}

.course-hero-contact-tel{
  color: inherit;
  text-decoration: underline;
}

.course-hero-contact-tel:hover{
  color: inherit;
}

.drawer-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid #e5eef8;
  width: 100%;
  box-sizing: border-box;
}

.drawer-search{
  margin-bottom: 10px;
  padding: 0;
  border-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.drawer-panel-head{
  margin: 0 0 12px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.drawer-panel-title{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #06449b;
}

.drawer-search-label{
  display: block;
  margin-bottom: 8px;
  font-size: .92rem;
  font-weight: 800;
  color: #06449b;
}

.course-new-search-box--drawer{
  width: 100%;
  max-width: 100%;
  height: 48px;
  margin: 0;
  box-sizing: border-box;
}

.course-new-search-box--drawer .search-icon{
  left: 16px;
  font-size: 15px;
}

.course-new-search-box--drawer .input_box{
  width: 100%;
  height: 48px;
  padding-left: 44px;
  padding-right: 14px;
  font-size: 16px;
  line-height: 1.4;
  background: transparent;
  border-radius: 0;
}

.course-new-search-box--drawer .input_box::placeholder{
  color: #8a9bb0;
  font-size: 14px;
}

.course-new-search-box--drawer .input_box:focus{
  outline: none;
  box-shadow: none;
}

.course-new-search-note--drawer{
  margin-top: 8px;
  text-align: center;
}

.drawer-extra-link{
  display: block;
  margin-top: 10px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: underline;
  color: #6caedf;
  text-align: center;
  line-height: 1.45;
}

.course-filter-fab{
  position: fixed;
  right: 12px;
  top: 42%;
  transform: translateY(-50%);
  z-index: 1055;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b4eb3, #06449b);
  color: #fff;
  box-shadow: 0 8px 22px rgba(11,78,179,.32);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.course-filter-fab .fa{
  font-size: 1.15rem;
  line-height: 1;
}

.course-filter-fab .filter-badge{
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  margin-left: 0;
  border: 2px solid #fff;
}

.course-filter-fab[aria-expanded="true"]{
  background: linear-gradient(135deg, #06449b, #0b4eb3);
  box-shadow: 0 10px 24px rgba(11,78,179,.4);
}

@media (max-width: 991.98px){
  #myNavbar{
    z-index: 1060;
  }

  main .heightH{
    height: var(--course-nav-height, 72px) !important;
  }

  .course-filter-chips{
    margin-top: 0;
  }

  .course-new-search-note{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
  }

  .course-new-search-note--drawer{
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    text-align: center;
  }

  .drawer-extra-link{
    text-align: center;
  }

  .course-new-search-box--drawer{
    border-color: #c8daf0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.06);
  }

  .drawer-search-label{
    font-size: .88rem;
  }

  aside[role="region"]{
    padding-bottom: 16px;
  }

  .more-course-link--head{
    display: none !important;
  }

  .hot-course-section{
    margin-bottom: 28px;
    padding-bottom: 12px;
  }

  .more-course-link--footer:not([hidden]){
    display: block;
    margin-top: 16px;
    margin-bottom: 12px;
  }

  .course-main-new .course-hero-sub-title .fa{
    width: 44px;
    height: 44px;
    margin-right: 8px;
    font-size: 1rem;
  }

  .course-main-new .partner-logo-head{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .course-main-new .partner-logo-more{
    white-space: normal;
  }

  .course-main-new .enterprise-feature-grid,
  .course-main-new .newbie-feature-grid,
  .course-main-new .icp-feature-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .course-main-new .enterprise-feature-card,
  .course-main-new .newbie-feature-card,
  .course-main-new .icp-feature-card{
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    min-height: 0;
    gap: 4px;
    width: auto;
    max-width: none;
  }

  .course-main-new .enterprise-feature-icon .fa,
  .course-main-new .newbie-feature-icon .fa,
  .course-main-new .icp-feature-icon .fa{
    font-size: 1.05rem;
  }

  .course-main-new .enterprise-feature-title,
  .course-main-new .newbie-feature-title,
  .course-main-new .icp-feature-title{
    font-size: .72rem;
    letter-spacing: 0;
    line-height: 1.25;
  }

  .course-main-new .enterprise-feature-desc{
    font-size: .62rem;
    line-height: 1.25;
    margin-top: 0;
    font-weight: 600;
  }

  .course-main-new .partner-logo-grid{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
  }

  .course-main-new .partner-logo-card{
    flex: 0 0 42%;
    min-width: 132px;
    scroll-snap-align: start;
  }

  .course-main-new .course-list{
    margin-left: -6px;
    margin-right: -6px;
  }

  .course-main-new .course-list > .course-item{
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 12px;
  }

  .course-main-new .course-item .resizesa{
    border-radius: 10px 10px 0 0;
  }

  .course-main-new .course-item .course_box{
    display: flex;
    flex-direction: column;
    padding: 8px 8px 26px;
  }

  .course-main-new .course-item .course_box .txtBtn{
    float: none;
    display: inline-block;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 2px;
  }

  .course-main-new .course-item .course_box .txtCount,
  .course-main-new .course-item .course_box .txtDisCount{
    float: none;
    display: block;
    font-size: .82rem;
    line-height: 1.35;
    margin-top: 4px;
    margin-right: 0;
  }

  .course-main-new .course-item .course_box:has(.txtCount):not(:has(.txtDisCount)) .txtCount::after,
  .course-main-new .course-item .course_box:has(.txtDisCount):not(:has(.txtCount)) .txtDisCount::after{
    display: none;
  }

  .course-main-new .course-item .course_box p{
    font-size: 11px;
    right: 8px;
    bottom: 4px;
  }

  .course-main-new .course-item .course_box .mt-1{
    margin-top: .2rem !important;
  }

  .course-main-new .course-item .tagBtn{
    font-size: 10px;
    padding: 2px 7px;
    margin-top: 4px;
    margin-right: 3px;
  }

  .course-main-new .course-item .font24{
    font-size: .92rem;
    margin-top: 2px;
  }

  .course-main-new .course-empty-state{
    padding: 24px 16px;
  }

  .course-main-new .course-empty-reset{
    display: block;
    width: 100%;
  }

  .course-main-new .service-card{
    min-height: 0;
    padding-bottom: 56px;
  }

  .course-service-grid .service-card{
    flex-basis: calc(100% - 44px);
    max-width: none;
  }
}

@media (max-width: 576px){
  .course-hero-text h2{
    font-size: 1.65rem;
    letter-spacing: .12rem;
  }

  .course-main-new .role-card{
    width: calc(50% - 7px);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
}