* {
  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;
}

.link ul {
  display: flex;
  gap: 15px;
}

#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;
}
#header .logo h1 a {
  width: 160px;
  height: 41px;
  background: url(../images/logo.png) no-repeat;
  display: block;
  text-indent: 100%;
  overflow: hidden;
  white-space: nowrap;
  margin-left: 15px;
}
#form2 {
  display: flex;
  width: 280px;
  height: 2rem;
  border: 1px solid #fff;
  border-radius: 8px;
  margin-left: 15px;
}
#form2 .select-control,
#form2 input,
#form2 button {
  border: none;
  outline: none;
}
#form2 .select-control {
  border-radius: 6px 0 0 6px;
  padding: 0 7px;
  background-color: #d9d9d9;
  transition: all 0.3s ease-in;
  font-size: 15px;
}
#form2 .select-control:hover {
  background-color: #bebebe;
}
#form2 .select-control option {
  background-color: #fff;
}
#form2 input {
  margin-left: 10px;
  text-align: start;
  background-color: #445962;
  color: #fff;
  width: 150px;
}
::placeholder {
  color: #fff;
}
#form2 .btn {
  cursor: pointer;
  background: transparent none;
  margin-left: 10px;
}

.page-cover {
  position: relative;
}
.page-cover img {
  width: 100%;
  height: auto;
  image-rendering: crisp-edges; /* 防止模糊 */
}
.job-vacancyCover {
  text-align: center;
}
.job-vacancyImg {
  border-radius: 15px;
  margin-bottom: 15px;
  position: relative;
  width: 100%;
}
.popup-1,
.popup-2,
.popup-3,
.popup-4 {
  position: absolute;
  display: none;
  z-index: 10;
}
.popup-box {
  font-size: 14px;
  display: none; /* 預設隱藏 */
  position: absolute;
  background: #000;
  border: 1px solid #ddd;
  padding: 10px;
  cursor: pointer;
  pointer-events: auto; /* 確保可以點擊 */
  color: #fff;
  font-weight: 600;
  z-index: 1000;
}
.job-vacancy-m {
  /* display: none; */
  text-align: center;
}
.jVtitle {
  margin: 0 auto;
  width: 50%;
  background-color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
}
.jVtitle h2 {
  font-size: 28px;
  font-weight: 700;
}
.jVtitle p {
  font-size: 14px;
  font-weight: 700;
}
.job-area {
  margin: 0 auto;
  padding: 15px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  justify-content: center; /* 讓 grid 容器內的內容置中 */
  align-items: center; /* 讓 grid 內部的內容在垂直方向上置中 */
}
.job-area img {
  display: block;
  margin: 0 auto;
}
.selected-good-courses {
  padding-top: 30px;
  padding-bottom: 25px;
  background-image: url(/images/selected-good-courses-bg.png);
  background-size: cover; /* 讓背景圖片完全填滿 */
  background-position: start;
  background-repeat: no-repeat;
}
.IT {
  background-color: #4a86be;
}
.IT-title {
  color: #002f56;
}
.MB {
  background-color: #2e704b;
}
.MB-title {
  color: #155136;
}
.LS {
  background-color: #ff5151;
}
.LS-title {
  color: #ff5151;
}
.AR {
  background-color: #ffbc51;
}
.AR-title {
  color: #e2890a;
}
.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;
}
.course-card {
  display: flex;
  flex-direction: column;
  width: 20%;
  background-color: #fff;
  padding: 15px;
  border-radius: 15px;
  cursor: pointer;
  /* height: 100%; 設定固定高度，保持一致 */
}
.course-card img {
  width: 100%;
  border-radius: 10px;
}
.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;
}

/* footer start. */
#footer {
  width: 100%;
  background-color: #e9ecef;
  margin-top: 10px;
}

#footer .footer_container {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  padding: 10px 0 30px 0;
  display: flex;
  flex-direction: row;
}
#footer .footer_container .link_section {
  margin-top: 30px;
  width: fit-content;
  flex: 1;
}
#footer .footer_container .link_section a {
  color: #495057;
  font-size: 13px;
}
#footer .footer_container .link_section a:hover {
  text-decoration: underline;
}
#footer .footer_container .other_section {
  margin-top: 30px;
  flex: 1;
  margin-left: 20%;
}
#footer .footer_container .other_section .social_media {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
#footer .footer_container .other_section .social_media a svg path {
  transition: 0.1s ease;
}
#footer .footer_container .other_section .social_media a:hover svg path {
  fill: #008172;
}

#footer .footer_container .other_section .company_info {
  margin-top: 10px;
  color: #495057;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
#footer .link_section ul {
  display: flex;
  flex-direction: column;
  gap: 5;
}
#footer .link_section ul li {
  list-style: none;
}

#footer .link_section h3 {
  font-size: 16px;
  color: #0a65c2;
  font-weight: 600;
  margin-bottom: 14px;
}
#footer .link_section a {
  color: #000000;
  line-height: 20px;
}

#footer .info {
  font-size: 13px;
  color: #555555;
  float: left;
  text-align: right;
  margin-right: 7px;
}
#footer .copyright {
  font-size: 13px;
}
#footer .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 screen and (min-width: 1920px) {
  #form2 {
    left: 22%;
  }
}
@media (max-width: 1024px) {
  .certificate-section {
    flex-direction: column;
    text-align: center;
  }

  .right-grid,
  .down-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1024px) {
  .link ul {
    gap: 8px;
  }
}

@media (max-width: 768px) {
  #header .link {
    margin: 0 auto;
  }
  #header .link ul li {
    padding: 5px 0px;
    margin-right: 5px;
  }
  #header .link ul li a {
    font-size: 12px;
  }
  #header .logo h1 a {
    margin-left: 0;
    transform: scale(0.8);
  }
  #form2 {
    margin-left: 0;
    width: 220px;
    height: 1.5rem;
  }
  #form2 input {
    width: 110px;
  }
  #form2 .select-control {
    padding: 0 0;
  }
  .selected-good-courses article,
  .text-div article {
    font-size: 24px;
  }
  .article-box .title {
    font-size: 14px;
  }
  .job-vacancyCover {
    overflow-x: auto;
  }
  .job-vacancyImg {
    scale: 0.95;
  }
  .course-card {
    padding: 10px;
  }
  .selected-good-courses .course-card .courseTitle {
    font-size: 18px;
  }

  .courseUnit {
    white-space: nowrap; /* 確保文字不換行 */
    overflow: hidden; /* 隱藏超出部分 */
    text-overflow: ellipsis; /* 以省略號代替超出部分 */
  }

  #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) {
  #header {
    height: 130px;
    display: flex;
    flex-wrap: wrap;
    padding-top: 10px;
  }
  #header .link {
    margin: 0;
  }
  #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; /* 讓文字靠上 */
  }
  #header .logo h1 a {
    position: absolute;
    top: 0;
    left: -3%;
    transform: scale(0.8);
    margin-left: 0;
  }
  .page-cover {
    position: relative;
    width: 100%;
    max-width: 100%;
  }
  .page-cover img {
    width: 100%;
  }
  .job-vacancyCover {
    text-align: center;
    overflow-x: scroll;
    scrollbar-gutter: stable; /* 保持滾動條穩定 */
    direction: rtl; /* 讓滾動條預設在最右側 */
  }
  .job-vacancyCover::-webkit-scrollbar {
    height: 6px; /* 設定滾動條高度 */
  }
  /* 設定滾動條背景 */
  .job-vacancyCover::-webkit-scrollbar-track {
    background: transparent; /* 讓背景透明 */
    margin-bottom: 8px; /* 增加滾動條與圖片的距離 */
  }

  /* 設定滾動條的滑塊 */
  .job-vacancyCover::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 10px;
  }
  .job-vacancyImg {
    overflow-x: auto;
    scale: 0.9;
  }
  #form2 {
    position: absolute;
    left: 60%;
    top: 8%;
    transform: translate(-50%, 10%);
    opacity: 0.85;
    height: 1.5rem;
    width: 50%;
    margin-left: 25px;
  }
  #form2 .select-control {
    padding: 0;
    font-size: 14px;
    display: block;
    height: 22px;
  }
  #form2 input {
    width: 50%;
  }
  .courses-container {
    margin: 15px 0;
    margin-left: 15px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch; /* 支援 iOS 上的流暢滾動 */
  }
  .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%; /* 限制最大寬度，避免內容撐開 */
  }

  #footer-m .footer_container {
    grid-template-columns: repeat(2, 1fr);
  }
}
