* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
a {
  text-decoration: none;
  outline: none;
}
body {
  width: 100%;
  font-family: "微軟正黑體", Verdana, Geneva, sans-serif;
}
#header {
  width: 100%;
  height: 50px;
  background-color: #445962;
  position: fixed;
  top: 0;
  /* opacity: 0.85; */
  z-index: 99;
  display: flex;
  justify-content: space-between; /*讓選單和頁籤分別靠左與右*/
  align-items: center;
}
#mobile_menu_btn {
  padding: 8px;
  border: 0.75px solid #fff;
  cursor: pointer;
  width: 33px;
  margin-left: 10px;
}
#header .link {
  display: flex; /* 讓 .link 內的 ul 可以正確排列 */
  margin-left: auto; /* 強制 .link 靠右對齊 */
  margin-right: 10px;
}
#header .link ul li {
  list-style: none;
  display: inline-block;
  padding: 8px 15px;
  transition: all 0.2s ease-in;
}
#header .link ul li a {
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  background: transparent;
}
#header .link ul li:hover {
  box-shadow: inset 0px 0px 1px 0.4px #fff;
}
.pageCover {
  position: relative;
}
.pageCover img {
  width: 100%;
  height: auto;
  image-rendering: crisp-edges; /* 防止模糊 */
}
#form1 {
  position: absolute;
  top: 70%;
  left: 18%;
  display: flex;
  width: 330px;
  background-color: #fff;
  border: 1px solid #fff;
  border-radius: 8px;
}
#form1 .select-control,
#form1 input,
#form1 button {
  border: none;
  outline: none;
}
#form1 .select-control {
  border-radius: 8px 0 0 8px;
  padding: 0 7px;
  background-color: #d9d9d9;
  transition: all 0.3s ease-in;
  font-size: 15px;
}
#form1 .select-control:hover {
  background-color: #bebebe;
}
#form1 .select-control option {
  background-color: #fff;
}
#form1 input {
  width: 200px;
  text-align: center;
}
#form1 .btn {
  padding: 6px;
  cursor: pointer;
  background: transparent none;
  margin-left: 10px;
}

/* 23 證照專區*/
.mainContent .certificate-section {
  position: relative;
  background-color: rgba(81, 202, 188, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center; /* 讓左右內容對齊 */
  justify-content: center;
  gap: 30px;
  padding: 30px 0;
}
.mainContent .certificate-section .left-content {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  flex: 1; /* 讓左側區塊可以自適應 */
  min-width: 280px;
  max-width: 35%; /* 避免過窄 */
  height: auto;
  background-color: #fff;
  padding: 20px 40px;
  border-radius: 0 0 100px 0;
  text-align: left;
}
.left-content article {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 28px;
  font-weight: 600;
}
.left-content h2 {
  font-size: 20px;
  font-weight: bold;
}
.left-content p {
  font-size: 16px;
  color: #555;
  margin: 10px 0;
}

.left-content h3 {
  font-size: 40px;
  color: red;
  margin-top: 20px;
  margin-left: 130px;
}
.certificate-section #certificate-section-hr {
  margin: 10px auto;
  width: 100%;
}

/* 圖片網格以每排4個 */
.right-grid,
.down-grid {
  display: grid;
  gap: 30px; /* 調整間距 */
  width: 100%;
  justify-content: center;
  grid-template-columns: repeat(4, 1fr); /* 自適應排列 */
  max-width: 90%;
}
.down-grid {
  padding-bottom: 25px;
}

/* 圖片樣式 */
.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  display: block; /* 讓 <a> 變成區塊 */
  text-decoration: none; /* 移除預設底線 */
}
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
/* 遮罩效果 */
.overlay-licenseText {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: rgba(6, 93, 130, 0.8);
  color: white;
  font-size: 16px;
  text-align: center;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* 文字垂直置中 */
  gap: 15px; /* 證照名稱的間距 */

  opacity: 0; /* 初始隱藏 */
  transition: opacity 0.3s ease-in;
}
.overlay-licenseText p {
  font-size: 18px;
  cursor: pointer; /* 讓 <p> 顯示為可點擊 */
  pointer-events: auto; /* 讓 <p> 能響應點擊 */
}
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  background: rgba(6, 93, 130, 1);
  color: white;
  font-size: 16px;
  text-align: center;
  border-radius: 0 0 10px 10px;
}
.overlay article {
  margin-bottom: 3px;
}
.overlay .intro-text {
  margin-top: 5px;
  font-size: 14px;
  letter-spacing: 1px;
  /* background-color: #FFF;
    color: rgba(6, 93, 130, 1); */
  padding: 1px 3px;
  width: fit-content;
  margin: 0 auto;
  font-weight: 600;
  color: #f69800;
}
.clear {
  display: hidden; /* 隱藏但保有空間 */
  pointer-events: none; /* 禁止點擊 */
  cursor: default; /* 設置滑鼠行為為預設 */
}
/* 滑鼠懸停圖片放大效果 */
.grid-item:hover img {
  transform: scale(1.1);
}
/* 滑鼠懸停顯示證照文字 */
.grid-item:hover .overlay-licenseText {
  opacity: 1;
}
.overlay-licenseText p:hover {
  color: #ffb74d;
}
.more-items {
  display: none; /* 預設將第三排共16類隱藏 */
}
.expand-div {
  position: absolute;
  margin: 0 auto;
  text-align: center;
  bottom: 0;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, 30%);
}
.expand-btn {
  position: relative;
  text-align: center;
}
.expand-div .expand-hint {
  position: absolute;
  top: -60%;
  left: -25%;
  width: 100px;
  color: #575757;
  opacity: 0; /* 初始隱藏 */
  transform: translateY(-5px); /* 輕微向上偏移，增加過度效果 */
  transition: opacity 0.5s ease-in, visibility 0.5s ease-in,
    transform 0.5s ease-in;
}
.expand-div:hover .expand-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* 回復到初始位置 */
}
.expand-btn {
  margin-top: 8px;
  padding: 10px 20px;
  background-color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in;
}
.expand-btn:hover {
  background-color: #e0e0e0;
}
#tab-recommendedCertificates {
  width: 100%;
  padding: 100px 40px 40px 40px;
  background-color: #51cabc;
  position: relative;
}
#tab-recommendedCertificates > ul {
  display: block;
  list-style: none;
}
#tab-recommendedCertificates > ul > li {
  background-color: #fff;
  display: inline-block;
  padding: 10px 20px;
  margin-right: 10px;
}
#tab-recommendedCertificates > ul > li a {
  text-decoration: none;
  color: #7e7e7e;
  font-weight: 600;
}
#tab-recommendedCertificates > ul > li.active a {
  color: #00a693;
  display: inline-block;
  font-weight: bold;
  position: relative;
}
#tab-recommendedCertificates > ul > li.active a::after {
  content: ""; /* 產生一個底線 */
  position: absolute;
  left: 0;
  bottom: -30%;
  width: 100%; /* 底線與文字同寬 */
  height: 2px; /* 底線厚度 */
  background-color: #00a693; /* 底線顏色 */
}
#tab-recommendedCertificates .tab-title {
  list-style: none;
}
#tab-recommendedCertificates .tab-inner {
  background-color: #fff;
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* 讓每個 box 之間有間距 */
  justify-content: stretch;
}
#tab-recommendedCertificates .tab-inner.GirdTemplateColumns {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 確保有兩欄 */
}
#tab-recommendedCertificates .right-section-title {
  position: absolute;
  background-color: #00a693;
  right: 0;
  top: 0;
  padding: 30px 50px 30px 60px;
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  border-radius: 0 0 0 100px;
}
#tab-recommendedCertificates .tab-inner .innerContent-box {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  color: #000;
}
#tab-recommendedCertificates .tab-inner .innerContent-box .inner-title {
  transition: all 0.3s ease-in;
}
#tab-recommendedCertificates .tab-inner .innerContent-box:hover .inner-title {
  color: #00a693;
}
/* 讓前 3 個 (1, 2, 3) 在左欄 */
.innerContent-box:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
.innerContent-box:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.innerContent-box:nth-child(3) {
  grid-column: 1;
  grid-row: 3;
}

/* 讓後 3 個 (4, 5, 6) 在右欄 */
.innerContent-box:nth-child(4) {
  grid-column: 2;
  grid-row: 1;
}
.innerContent-box:nth-child(5) {
  grid-column: 2;
  grid-row: 2;
}
.innerContent-box:nth-child(6) {
  grid-column: 2;
  grid-row: 3;
}
.innerContent-box .no-l {
  flex-shrink: 0; /* 防止圓形縮小 */
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f69800;
  margin-right: 15px;
}
.opcitity50 {
  opacity: 0.7;
}
.innerContent-box .no-l .noNum {
  font-size: 2rem;
  font-weight: 800;
  font-style: italic;
  color: #fff;
  margin-right: 3px;
}

.text-r article.inner-title {
  font-size: 1.4rem;
  font-weight: bolder;
  margin-bottom: 10px;
}
.text-r .inner-introText {
  text-align: justify;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* 限制最多2行 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal; /* 讓文字自動換行 */
  max-height: 3em; /* 依據行高調整，確保最多兩行 */
  line-height: 1.5em; /*設定行高，影響 max-height 計算*/
}
#tab-recommendedCertificates .noGirdTemplateColumns {
  display: inline-block;
}

.noCircle {
  color: #fff;
}
#tab-recommendedCertificates .tab-inner .title-row .hot-title {
  color: #00a693;
  border-radius: 15px;
  border: #00a693 1px solid;
  padding: 5px 20%;
}

.top-careerText-m {
  flex-grow: 1; /* 讓職缺資訊區塊自適應寬度 */
  text-decoration: none;
  color: #000;
  display: block;
}
.top-relatedLicense-r {
  display: flex;
  flex-wrap: wrap; /* 允許內容換行 */
  gap: 10px; /* 設定間距 */
  width: 45%; /* 設定證照區塊的寬度 */
  min-width: 200px;
}
.top-relatedLicense-r a {
  width: calc(50% - 5px);
  color: #555;
  font-size: 18px;
  transition: all 0.2s ease-in;
}
.top-relatedLicense-r a:hover {
  color: #00a693;
  font-size: 18px;
}
.use-hr {
  display: block;
  width: 90%;
  margin-left: 100px;
}
.container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #ffbc51;
}
#Certificates-ranking {
  background: white;
  padding: 20px 40px;
  border-radius: 0 0 100px 0;
  width: 70%;
}
#Certificates-ranking article {
  margin-bottom: 1rem;
  font-size: 28px;
  font-weight: 600;
}
/* 熱門證照排行 */
.rank-text {
  display: flex;
  gap: 25%;
}
.rank-text ul {
  display: flex;
  gap: 30px;
}
.rank-text ul li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px; /* 控制間距 */
}
.rank-text ul li span {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #e53935;
}
.rank-text ul li:last-child span {
  background-color: #00a693;
}
#rank-hr {
  width: 300px;
}
.ranking {
  display: flex;
  align-items: center;
  margin-top: 20px;
  gap: 10%;
}
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  list-style: none;
  width: 30%;
}
.ranking-list li {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}
.ranking-list li:first-child {
  color: #d00408;
}
.ranking-list li:nth-child(2) {
  color: #065d82;
}
.rank-num {
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  color: white;
  border-radius: 25%;
  margin-right: 10px;
  background-color: #ffb74d;
}
/* 長條圖 */
.bar-chart {
  width: 60%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: end;
}
.bar {
  height: 20px;
  background: #00897b;
  color: white;
  text-align: right;
  line-height: 20px;
  font-size: 14px;
  padding-right: 5px;
  border-radius: 15px;
}
.bar-1 {
  background: #e53935;
} /* 第一名紅色 */

#Certificates-ranking a {
  color: #fff;
  margin-left: 82%;
  font-size: 14px;
  font-weight: 700;
  background-color: #f69800;
  padding: 8px 13px;
  border-radius: 20px;
  transition: all 0.2s ease;
  border: 1px solid #f69800;
  letter-spacing: 0.1em;
}
#Certificates-ranking a:hover {
  box-shadow: inset 0px 0px 0px 0px #f69800;
  color: #f69800;
  background-color: #fff;
}
#Certificates-ranking .bar-description p {
  font-size: 13px;
}
/* 行事曆 */
#calendar {
  width: 30%;
  height: 280px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  margin: 50px;
  position: relative;
}
#calendar .calendar-title {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -30%);
  z-index: 1;
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  background-color: #fff;
  padding: 15px 20px;
  border-radius: 10px;
}
.calendar-card {
  width: 210px;
  margin: 10px auto;
  height: 170px;
  background: white;
  border-radius: 15px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 3, 3, 0.2);
}
.calendar-content {
  text-align: start;
  margin-top: 30px;
  padding-left: 0;
  padding-right: 0;
}
.calendar-content .courseDate {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: #ff5151;
  padding: 15px 10px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border-radius: 15px 15px 0 0;
  margin-bottom: 10px;
}
.calendar-content .courseDate .textDiv {
  background-color: #fff;
  color: #000;
  padding: 0 10px;
  border-radius: 10px;
}
.calendar-content .courseUnit {
  font-size: 16px;
  font-weight: 600;
  color: #555;
  margin-top: 10px;
  margin-bottom: 5px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}
.calendar-content a {
  font-size: 18px;
  color: #007bff;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  text-decoration: none;
  font-weight: bold;
  text-align: justify;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; /* 限制最多3行 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal; /* 讓文字自動換行 */
  max-height: 3em; /* 依據行高調整，確保最多3行 */
  line-height: 1em; /*設定行高，影響 max-height 計算*/
}
#calendar .more {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 0%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background-color: #f69800;
  padding: 8px 13px;
  border-radius: 20px;
  transition: all 0.2s ease;
  border: 1px solid #f69800;
  letter-spacing: 0.1em;
}
#calendar .more:hover {
  box-shadow: inset 0px 0px 0px 0px #f69800;
  color: #f69800;
  background-color: #fff;
}
.prev-btn,
.next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  background-color: #f69800;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.prev-btn {
  left: 30px;
}
.next-btn {
  right: 30px;
}

#featured-articles {
  background-color: #d2f6e8;
  padding: 30px 5% 15px 5%;
}
#featured-articles .articles-container {
  padding: 15px 5%;
  padding-bottom: 30px;
  background-color: #00a693;
  border-radius: 15px;
}
#featured-articles .section-title {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  gap: 20px;
}
.articles_area {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 15px;
}
.article-box {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 讓內容均分空間，svg在兩側 */
  width: 100%;
  padding: 10px;
  text-decoration: none;
  background-color: #fff;
  border-radius: 15px;
  transition: all 0.2s ease-in;
  color: #000;
}
.article-box:hover {
  background-color: #dbdbdb;
  color: #00a693;
}
.article-box .title {
  text-align: start;
  font-weight: 700;
}
.article-box svg:first-child {
  flex-shrink: 0; /* 讓 SVG 不縮小 */
}

.article-box article {
  flex-grow: 1; /* 讓標題占據剩餘空間 */
  text-align: center;
  padding: 0 10px;
}
.article-box svg:last-child {
  flex-shrink: 0;
}
#selected-good-courses {
  padding-top: 30px;
  padding-bottom: 25px;
  background-color: #d2f6e8; /* 沒有填滿的部分會顯示這個顏色 */
  background-image: url(/images/selected-good-courses-bg.png);
  background-size: cover; /* 讓背景圖片完全填滿 */
  background-position: start;
  background-repeat: no-repeat;
}
#selected-good-courses article {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}
.courses-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.course-card {
  display: flex;
  flex-direction: column;
  width: 20%;
  background-color: #fff;
  padding: 15px;
  border-radius: 15px;
  cursor: pointer;
  /* height: 100%; 設定固定高度，保持一致 */
  transition: all 0.3s ease-in;
  overflow: hidden;
}
.course-card:hover {
  box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
}
.img-wrapper {
  width: 100%;
  border-radius: 10px;
  overflow: hidden; /* 限制 img 不超過 padding */
}
.course-card:hover img {
  transform: scale(1.2);
}
.course-card img {
  width: 100%;
  border-radius: 10px;
  display: block;
  transition: transform 0.3s ease-in-out;
}
#selected-good-courses .course-card .courseTitle {
  margin-top: 8px;
  font-size: 20px;
  text-align: start;
  transition: all 0.3s ease-in;
  color: #000;
  overflow: hidden; /* 隱藏超出部分 */
  display: -webkit-box; /* 使用 flexbox 來控制多行 */
  -webkit-box-orient: vertical; /* 垂直排列子元素 */
  -webkit-line-clamp: 2; /* 限制為兩行 */
  text-overflow: ellipsis; /* 超出部分顯示 '...' */
  min-height: 50px; /* 確保標題高度一致 */
}

#selected-good-courses .course-card .courseIntroText {
  font-size: 14px;
  text-align: justify;
  color: #000;
  overflow: hidden; /* 隱藏超出部分 */
  display: -webkit-box; /* 使用 flexbox 來控制多行 */
  -webkit-box-orient: vertical; /* 垂直排列子元素 */
  -webkit-line-clamp: 5; /* 限制為五行 */
  text-overflow: ellipsis; /* 超出部分顯示 '...' */
  min-height: 95px; /* 統一高度 */
  margin-bottom: 8px;
}
#selected-good-courses .course-card .courseUnit {
  margin-top: 8px;
  font-size: 14px;
  color: #7e7e7e;
  text-align: center;
  margin-top: auto;
}
#selected-good-courses .course-card:hover .courseTitle {
  color: #00a693;
}
.more-btn {
  padding-bottom: 15px;
}
.more-btn a {
  float: right;
  color: #00a693;
  font-weight: 600;
  margin-right: 8%;
  transition: all 0.1s ease-in;
}
.more-btn a:hover {
  color: #fff;
}
.swiper {
  width: 100%;
  background-color: #51cabc;
  overflow: hidden;
  padding: 25px 0;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}
.card {
  display: flex;
  max-width: 1300px;
  width: 80%;
  overflow: hidden;
}

.ad_img_border {
  width: 100%;
  overflow: hidden;
}

.card img {
  width: 100%;
  object-fit: cover;
}
.swiper-button-prev,
.swiper-button-next {
  color: #fff;
}
.swiper-pagination-bullet-active {
  background-color: #fff;
  width: 20px; /* 讓選中的點更明顯 */
  height: 8px;
  border-radius: 12px;
}
#career-exploration {
  background-color: #fff;
  padding: 25px 80px;
  display: flex;
  gap: 30px;
}
.text-div {
  flex: 1; /* 讓它自適應剩餘空間 */
  min-width: 200px;
}
.text-div article {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 15px;
}
.text-div p {
  margin-top: 30px;
  text-align: justify;
}
.career-link-area {
  flex: 2; /* 讓圖片區域比文字區域寬 */
  display: flex;
  justify-content: space-between; /* 讓圖片均勻排列 */
  gap: 10px;
}
.career-link-area .img-div {
  flex: 1 1 calc(20% - 10px); /* 每個圖片佔 20% 的寬度，減去 gap */
  max-width: 150px; /* 避免過大 */
}
.career-link-area .career-link img {
  width: 100%;
  border-radius: 15px;
}

/* 響應式設計開始 */
@media screen and (min-width: 1920px) {
  #form1 {
    left: 22%;
  }
  .mainContent .certificate-section .left-content {
    padding: 30px 80px;
  }
  #Certificates-ranking {
    padding: 30px 80px;
  }
  #tab-recommendedCertificates .tab-title {
    margin-left: 91px;
  }
  #tab-recommendedCertificates .tab-inner.GirdTemplateColumns {
    width: 90%;
    margin: 0 auto;
  }

  #rank-hr {
    width: 400px;
  }
  #calendar {
    width: 25%;
  }
  .calendar-card {
    width: 270px;
  }
  #featured-articles {
    padding: 30px 8% 15px 8%;
  }
  .articles_area {
    gap: 25px;
  }
  .career-link-area {
    justify-content: center; /* 讓圖片均勻排列 */
    gap: 30px;
  }
  .career-link-area .img-div {
    max-width: 180px;
  }
}
@media (max-width: 1024px) {
  .left-content article,
  #tab-recommendedCertificates .right-section-title,
  #Certificates-ranking article,
  #calendar .calendar-title,
  #featured-articles .section-title,
  #selected-good-courses article {
    font-size: 24px;
  }
  .mainContent .certificate-section .left-content {
    padding: 10px 30px;
    max-width: 20%;
  }
  #Certificates-ranking article {
    width: 230px;
  }
  .left-content article {
    margin-bottom: 0;
  }
  .left-content h2 {
    font-size: 18px;
  }
  .left-content h3 {
    font-size: 28px;
    margin-top: 0px;
  }
  .certificate-section #certificate-section-hr {
    margin: 5px auto;
  }
  .left-content p {
    font-size: 14px;
  }
  .certificate-section {
    flex-direction: column;
    text-align: center;
  }
  .right-grid,
  .down-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .text-r article.inner-title {
    font-size: 1.1rem;
  }
  .rank-text {
    gap: 10%;
  }
  #Certificates-ranking a {
    display: inline-block;
    margin-top: 15px;
    margin-left: 75%;
  }
  .ranking {
    gap: 0%;
  }
  .ranking-list {
    width: 70%;
  }
  .rank-text ul {
    gap: 10px;
    margin-left: 10%;
  }
  #rank-hr {
    width: 230px;
  }
  #calendar {
    width: 40%;
  }
  .next-btn {
    right: 10px;
  }
  .prev-btn {
    left: 10px;
  }
  #selected-good-courses .course-card .courseTitle {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .mainContent .certificate-section .left-content {
    max-width: 50%;
  }
  .right-grid,
  .down-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .innerContent-box .no-l {
    width: 3rem;
    height: 3rem;
  }
  .text-r article.inner-title {
    font-size: 1.1rem;
  }
  .text-r .inner-introText {
    text-align: start;
  }
  #tab-recommendedCertificates .right-section-title {
    font-size: 24px;
  }
  #Certificates-ranking article {
    font-size: 24px;
    width: 300px;
  }
  #Certificates-ranking {
    width: 90%;
    padding: 20px 20px;
  }
  #Certificates-ranking a {
    margin-left: 38%;
    font-size: 12px;
  }
  .rank-text {
    justify-content: space-between;
  }
  .rank-text ul {
    gap: 0;
  }
  .ranking-list {
    width: 80%;
  }
  #rank-hr {
    width: 250px;
  }
  #calendar {
    margin: 15px;
  }
  #calendar .calendar-title {
    font-size: 24px;
    transform: translate(-50%, -10%);
    padding: 10px;
  }
  #calendar .more {
    width: 130px;
    margin-top: 15px;
    font-size: 12px;
  }
  .calendar-card {
    max-width: 100%;
    height: 160px;
  }
  .calendar-content .courseDate {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 10px 8px;
  }
  .calendar-content .courseUnit {
    font-size: 14px;
    margin-top: 12px;
  }
  .calendar-content a {
    font-size: 16px;
    margin-top: 8px;
    display: -webkit-box; /* 必須搭配 */
    -webkit-line-clamp: 2; /* 限制最多顯示 2 行 */
    -webkit-box-orient: vertical; /* 設定垂直方向排列 */
    overflow: hidden; /* 隱藏超出部分 */
    text-overflow: ellipsis; /* 省略號 */
    line-height: 1.5; /* 設定行高，確保 2 行能完整顯示 */
    height: 3em; /* 1.5 (行高) * 2 (行數) = 3em */
  }
  .prev-btn,
  .next-btn {
    top: 10px;
    transform: translate(0%);
    width: 30px;
    height: 30px;
  }
  .prev-btn {
    left: 5px;
  }
  .next-btn {
    right: 5px;
  }
  #featured-articles .section-title,
  #selected-good-courses article,
  .text-div article {
    font-size: 24px;
  }
  .article-box .title {
    font-size: 14px;
  }
  .course-card {
    padding: 10px;
  }
  #selected-good-courses .course-card .courseTitle {
    font-size: 18px;
  }

  .courseUnit {
    white-space: nowrap; /* 確保文字不換行 */
    overflow: hidden; /* 隱藏超出部分 */
    text-overflow: ellipsis; /* 以省略號代替超出部分 */
  }
  #career-exploration {
    padding: 25px 25px;
  }
  .career-link-area {
    flex-wrap: wrap;
    justify-content: flex-start;
    flex: 2;
  }
  .text-div {
    flex: 2;
  }
  .career-link-area .img-div {
    flex: auto;
    max-width: 100px;
  }
  .career-link-area .career-link img {
  }
  .text-div article {
    margin-bottom: 8px;
  }
}

@media screen and (max-width: 430px) {
  #header {
    height: 100px;
    justify-content: flex-end;
  }
  #header .link ul {
    text-align: center;
  }
  #header .link ul li {
    width: 50px;
    padding: 0 8px;
  }
  #header .link ul li a {
    font-size: 14px;
    display: inline-block;
    vertical-align: top; /* 讓文字靠上 */
  }
  .pageCover {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 140px;
    overflow: hidden; /* 確保圖片不會溢出 */
  }
  .pageCover img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%) scale(1); /* 讓圖片放大並置中 */
  }
  #form1 {
    left: 50%;
    transform: translate(-50%, -10%);
    opacity: 0.85;
    width: auto;
  }
  #form1 .select-control {
    padding: 0;
    font-size: 14px;
  }
  #form1 input {
    width: auto;
  }
  .mainContent .certificate-section .left-content {
    max-width: 100%;
    height: auto;
  }
  .mainContent .certificate-section .left-content {
    padding: 15px 20px;
    width: 100%;
    position: unset;
    text-align: center;
  }
  .left-content article {
    font-size: 24px;
    margin-top: 0.5rem;
  }
  .left-content h2 {
    font-size: 16px;
  }
  .left-content h3 {
    font-size: 28px;
    margin-top: 15px;
  }
  .left-content p {
    font-size: 14px;
  }
  .certificate-section #certificate-section-hr {
    width: 60%;
    margin: 0 auto;
  }
  .mainContent .certificate-section {
    justify-content: space-around;
    padding: 0;
    gap: 10px;
  }
  .right-grid,
  .down-grid {
    max-width: 100%;
    gap: 10px;
    grid-template-columns: 110px 110px 110px;
  }
  .grid-item {
    flex-direction: column;
  }
  .overlay-licenseText {
    position: static; /* 讓它變成一般區塊 */
    opacity: 1; /* 讓它一直顯示 */
    width: 100%;
    max-height: 90px; /* 限制最大高度 */
    background: rgba(6, 93, 130, 1);
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    border-radius: 0 0 10px 10px;
  }
  .overlay-licenseText p {
    font-size: 14px;
    color: #ffb74d;
    line-height: 1rem;
    text-decoration: underline;

    /* 限制最多 2 行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
  }
  .overlay {
    position: static; /* 讓它變成普通區塊 */
    width: 100%;
    min-height: 50px; /* 保持最小高度，即使內容只有一行也維持高度 */
    max-height: 50px; /* 限制最大高度 */
    color: white;
    font-size: 15px;
    padding: 10px;
    border-radius: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .right-grid:first-child:hover {
    pointer-events: none;
  }
  .grid-item img {
    width: 100%;
    height: auto;
    border-radius: 15px 15px 0 0;
    position: relative;
  }
  .grid-item:hover img {
    transform: none;
  }
  .clear {
    display: none;
  }
  .expand-btn {
    padding: 6px 10px;
  }
  .expand-btn svg {
    scale: 0.8;
  }
  #expand-hint {
    display: none;
  }
  /* 隱藏 hover 效果，避免手機版不適用 */
  .grid-item:hover .overlay-licenseText {
    opacity: 1;
  }
  #tab-recommendedCertificates {
    padding-bottom: 10px;
  }
  #tab-recommendedCertificates .right-section-title {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 15px 25px 15px 40px;
    font-size: 24px;
  }
  #tab-recommendedCertificates .tab-title {
    text-align: center;
  }
  #tab-recommendedCertificates > ul > li {
    margin-right: 0;
    padding: 10px 15px;
  }

  #tab-recommendedCertificates .tab-inner {
    display: block;
    padding: 15px;
  }
  #tab-recommendedCertificates .tab-inner .innerContent-box {
    display: block;
    width: 100%;
  }
  #tab-recommendedCertificates .tab-inner.GirdTemplateColumns {
    display: block;
  }
  .innerContent-box .no-l {
    width: 2rem;
    height: 2rem;
    float: left;
    margin-top: 5px;
    margin-left: 5px;
  }
  .innerContent-box .no-l .noNum {
    font-size: 1.2rem;
  }
  .text-r article.inner-title {
    font-size: 1.1rem;
    margin-top: 8px;
  }
  .text-r .inner-introText {
    font-size: 14px;
    margin-top: 1rem;
  }

  .top-careerText-m .inner-introText {
    font-size: 14px;
  }
  .top-relatedLicense-r {
    margin-top: 10px;
    width: 100%;
  }
  .top-relatedLicense-r a {
    font-size: 15px;
  }
  .use-hr {
    display: block;
    width: 90%;
    margin-left: 10px;
  }
  .container {
    flex-direction: column;
  }
  .rank-text {
    display: block;
    width: 80%;
    margin: 0 auto;
  }
  .rank-text ul {
    gap: 10px;
    margin-left: 5%;
  }
  #Certificates-ranking {
    width: 100%;
    padding: 15px 20px 25px 20px;
  }
  #Certificates-ranking article {
    margin: 15px auto;
    text-align: center;
    font-size: 24px;
  }
  #Certificates-ranking .bar-description p {
    font-size: 12px;
  }
  .ranking {
    gap: 10px;
    margin-bottom: 14px;
  }
  .ranking-list {
    width: 50%;
  }
  .ranking-list li span {
    font-size: 14px;
    max-width: 150px; /* 限制最大寬度 */
    white-space: nowrap; /* 不換行 */
    overflow: hidden; /* 隱藏超出的文字 */
    text-overflow: ellipsis; /* 省略號 */
    display: block; /* 確保 li 以區塊元素顯示 */
  }
  .bar-chart {
    width: 50%;
  }
  #rank-hr {
    margin-top: 10px;
    width: 350px;
    margin-left: 5%;
  }
  #Certificates-ranking a {
    margin-left: 35%;
    font-size: 12px;
    padding: 6px 10px;
  }
  #calendar {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
  }
  #calendar .calendar-title {
    font-size: 24px;
    padding: 10px 18px;
  }
  .prev-btn {
    top: 50%;
    left: 0px;
    transform: translate(40%, -50%);
  }
  .next-btn {
    top: 50%;
    right: 0px;
    transform: translate(-40%, -50%);
  }
  #featured-articles .section-title {
    font-size: 24px;
  }
  .articles_area {
    display: flex;
    flex-direction: column;
  }
  .article-box article {
    font-size: 14px;
    max-width: 300px; /* 限制最大寬度 */
    white-space: nowrap; /* 禁止換行 */
    overflow: hidden; /* 超出部分隱藏 */
    text-overflow: ellipsis; /* 顯示省略號 */
  }
  .courses-container {
    margin: 15px 0;
    margin-left: 15px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch; /* 支援 iOS 上的流暢滾動 */
    scrollbar-gutter: stable; /* 強制保留滾動條空間 */
    padding-bottom: 10px; /* 調整滾動條與內容的距離 */
  }
  /* 1. 自定義滾動條 */
  .courses-container::-webkit-scrollbar {
    height: 8px; /* 設定水平滾動條高度 */
  }

  /* 2. 滾動條的軌道 */
  .courses-container::-webkit-scrollbar-track {
    background: #f0f0f0; /* 淡灰色背景 */
    border-radius: 10px;
  }

  /* 3. 滾動條的滑塊 */
  .courses-container::-webkit-scrollbar-thumb {
    background: #4e4e4e;
    border-radius: 10px;
  }
  .course-card {
    min-width: 60%;
  }
  #selected-good-courses article {
    font-size: 24px;
  }
  #selected-good-courses .course-card .courseTitle {
    font-size: 18px;
  }
  #selected-good-courses .course-card .courseUnit {
    white-space: nowrap; /* 確保文字不換行 */
    overflow: hidden; /* 隱藏超出部分 */
    text-overflow: ellipsis; /* 以省略號代替超出部分 */
    max-width: 100%; /* 限制最大寬度，避免內容撐開 */
  }
  .swiper {
    padding-top: 20px;
  }
  .swiper-button-prev,
  .swiper-button-next {
    transform: scale(0.5);
  }
  .card {
    width: 90%;
  }
  #career-exploration {
    position: relative;
    flex-direction: column;
    padding: 15px 20px 25px 20px;
    height: 315px;
  }
  .text-div article {
    font-size: 24px;
    text-align: center;
  }
  .text-div p {
    font-size: 14px;
    margin-top: 15px;
  }
  .career-link-area {
    position: absolute;
    top: 150px;
    display: flex;
    flex-wrap: nowrap; /* 不換行 */
    overflow-x: auto; /* 啟用橫向滾動 */
    -webkit-overflow-scrolling: touch; /* iOS 流暢滾動 */
    white-space: nowrap; /* 確保子元素不換行 */
    gap: 15px; /* 增加間距 */
    padding-bottom: 10px; /* 確保滾動條不會被遮住 */
  }
  .career-link-area .img-div {
    flex: 0 0 40%; /* 每個圖片區塊佔 60% 螢幕寬度，讓它變大 */
    max-width: 300px; /* 設定最大寬度，防止過度放大 */
  }
  .career-link-area .career-link img {
    width: 100%;
    border-radius: 8px;
  }
}

/* footer start. */
#footer-pc {
  width: 100%;
  background-color: #e9ecef;
  /* margin-top: 10px; */
}

#footer-pc .footer_container {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  padding: 10px 0 30px 0;
  display: flex;
  flex-direction: row;
}
#footer-pc .footer_container .link_section {
  margin-top: 30px;
  width: fit-content;
  flex: 1;
}
#footer-pc .footer_container .link_section a {
  color: #495057;
  font-size: 13px;
}
#footer-pc .footer_container .link_section a:hover {
  text-decoration: underline;
}
#footer-pc .footer_container .other_section {
  margin-top: 30px;
  flex: 1;
  margin-left: 20%;
}
#footer-pc .footer_container .other_section .social_media {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
#footer-pc .footer_container .other_section .social_media a svg path {
  transition: 0.1s ease;
}
#footer-pc .footer_container .other_section .social_media a:hover svg path {
  fill: #008172;
}

#footer-pc .footer_container .other_section .company_info {
  margin-top: 10px;
  color: #495057;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
#footer-pc .link_section ul {
  display: flex;
  flex-direction: column;
  gap: 5;
}
#footer-pc .link_section ul li {
  list-style: none;
}

#footer-pc .link_section h3 {
  font-size: 16px;
  color: #0a65c2;
  font-weight: 600;
  margin-bottom: 14px;
}
#footer-pc .link_section a {
  color: #000000;
  line-height: 20px;
}

#footer-pc .info {
  font-size: 13px;
  color: #555555;
  float: left;
  text-align: right;
  margin-right: 7px;
}
#footer-pc .copyright {
  font-size: 13px;
}
#footer-pc .info .browser_set {
  font-weight: bolder;
  color: #000000;
}
.footerLine {
  border-bottom: #157dc6 5px solid;
  margin-top: 10px;
}
#footerNew {
  font-family: "新細明體";
  margin-top: 23px;
  font-size: 12px;
  text-align: center;
  line-height: 20px;
  letter-spacing: 0.5pt;
  color: #545454;
}
#footerNew a:link,
#footerNew a:visited,
#footerNew a:hover,
#footerNew a:active {
  text-decoration: none;
  color: #047fff;
}
#footerNew .infoFooter {
  margin-top: 12px;
}
/* footer end. */

@media (max-width: 768px) {
  #footer-m {
    width: 100%;
    background-color: #e9ecef;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
  }
  #footer-m .footer_container {
    width: 100%;
    padding: 10px 21.5px 30px 21.5px;
    display: flex;
    flex-direction: row;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  #footer-m .footer_container .link_section {
    margin-top: 20px;
    width: 20%;
    flex: 1 1 calc(25% - 20px);
    text-align: start;
    min-width: 120px;
  }
  #footer-m .link_section h3,
  .other_section h3 {
    font-size: 15px;
    color: #0a65c2;
    font-weight: 1000 !important;
    margin: 10px 0;
  }
  #footer-m .footer_container .link_section a {
    color: #495057;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.6;
  }
  #footer-m .link_section ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  #footer-m .link_section ul li {
    list-style: none;
  }
  #footer-m .footer_container .link_section a {
    color: #495057;
  }
  #footer-m .footer_container .other_section {
    text-align: start;
    margin-top: 20px;
    flex: 1 1 calc(25% - 20px);
  }
  #footer-m .footer_container .other_section .company_info {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  #footer-m .company_info p {
    color: #495057;
    font-size: 12px;
    margin: 0;
  }
  #footer-m .social_media {
    justify-content: center;
    display: flex;
    gap: 10px;
  }
  #footer-m .footer_container .social_media a svg path {
    transition: 0.1s ease;
  }
  #footer-m .social_media a:hover svg path {
    fill: #008172;
  }
  #footer-m .copyright {
    padding: 15px 10px;
    font-size: 12px;
    margin-left: auto;
    margin-right: auto;
  }

  @media screen and (max-width: 430px) {
    #footer-m .footer_container {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}
