/* 新增 */
table {
  width: 100%;
  table-layout: fixed;
}
.tbl-header {
  background-color: rgba(255, 255, 255, 0.3);
}

th {
  padding: 20px 15px;
  text-align: left;
  font-weight: 500;
  font-size: 16px;
  /* color: #000000; */
  text-transform: uppercase;
}
td {
  padding: 15px;
  text-align: left;
  vertical-align: middle;
  font-weight: 300;
  font-size: 16px;
  color: #000000;
  border-bottom: solid 1px rgba(255, 255, 255, 0.6);
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    /*font-family: "Noto Sans TC", sans-serif;*/
    font-size: 16px;
}

.table-custom thead {
  background: linear-gradient(to right, #ffb554, #ff9100);
  color: white;
}

.table-custom th,
.table-custom td {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

.table-custom tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.table-custom tbody tr:hover {
  background-color: #ffdbac;
  transition: background-color 0.3s ease;
}

.tbl-content {
  max-height: 300px;
  overflow-x: auto;
  border: 1px solid #ccc;
  border-top: none;
}
/* .tbl-content {
  height: 300px;
  overflow-x: auto;
  margin-top: 0px;
  border: 1px solid rgba(255, 255, 255, 0.3);
} */

/* 捲動時不讓表頭跟表身錯位 */
.tbl-header::-webkit-scrollbar {
  display: none;
}

.tbl-content::-webkit-scrollbar {
  height: 8px;
  background-color: #f1f1f1;
}

.tbl-content::-webkit-scrollbar-thumb {
  background-color: #ff9100;
  border-radius: 4px;
}

/* for custom scrollbar for webkit browser*/

/* ::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
} */
/* header */
.form-header {
  font-weight: 700;
  font-size: larger;
}
/* 背景 */
.background-bg {
  width: auto;
  height: auto;
  background-image: url(../img/loginpage.png);
  background-color: #b4ede7;
  background-repeat: no-repeat;
  background-size: cover;
  background-position-y: 100%;
}

/* 標題 */
.login-title {
  color: #ff9100;
  font-weight: bolder;
  font-size: 1rem;
}

.p1 {
  letter-spacing: 6px;
  font-size: 28px;
  margin-bottom: -0.5rem;
}

.p2 {
  letter-spacing: 2px;
  font-size: 24px;
  margin-bottom: 0.5rem;
}
/* login button */
.login-btn {
  color: #fff;
  background-color: #ff9137;
}

.login-btn:hover {
  color: #fff;
  background-color: #ffad69;
}

.login-btn:active {
  color: #fff !important;
  background-color: #ffad69 !important;
}

/* navbar */
/* 設定第二層選單為側邊顯示 */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%; /* 將第二層選單定位在右側 */
  margin-top: -1px;
  display: none;
}

/* 第三層選單的定位 */
.dropdown-submenu .dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%; /* 將第三層選單再往右側定位 */
  margin-top: -1px;
  display: none;
}

/* 滑鼠移入時顯示各層次選單 */
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:hover .dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

/* section區域 */
.section {
  height: 100dvh;
  display: flex;
  justify-content: center;
  font-size: 1.25rem;
  color: rgb(0, 0, 0);
  position: relative;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}
#section1 {
  background-image: url("../img/index_bg.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
#section2 {
  background-color: #ffffff;
}
#section3 {
  background-image: url("../img/index_bg_bottom.png");
  position: relative; /* 確保 footer 相對於此區塊定位 */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/*section1*/
.scrollDown-btn {
  position: fixed;
  bottom: 20px;
  background-color: var(--mof-blue-500);
  width: 40px;
  height: 50px;
  border: none;
  cursor: pointer;
  z-index: 1000;
  transition: background-color 0.3s, color 0.3s;
}
.scrollDown-btn span {
  color: white;
  transition: color 0.3s;
}
.navbar-custom {
  background-color: rgba(0, 0, 0, 0);
}
.custom-card {
  background-color: white;
  height: 13rem;
  width: 13rem;
  color: black;
  transition: transform 0.2s, box-shadow 0.2s;
  /* 添加 box-shadow 的過渡效果 */
  box-shadow: 3px 4px 8px rgba(0, 0, 0, 0.2);
  /* 設置陰影效果 */
}
.custom-card img {
  width: 70px;
  height: 70px;
}
.apply-text {
  background-color: rgba(255, 255, 255, 0.2);
  border: 4px solid white;
  border-radius: 50px;
  display: inline-block;
}

/*section2*/
#Tab .active {
  background-color: var(--mof-blue-500);
  color: white;
}
#Tab li button:not(.active) {
  border-color: var(--mof-blue-500);
}
.nav-tabs-custom {
  border-color: var(--mof-blue-500);
  color: var(--mof-blue-700);
}
.nav-link {
  color: var(--mof-blue-500);
}
.news-box {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}
.news-date {
  color: var(--mof-blue-500);
  float: left;
  display: block;
}
.news-font {
  float: left;
  display: block;
}
.more-info-btn {
  padding: 0.5rem 2rem;
  /* 調整內邊距 */
  font-size: 1rem;
  /* 調整字體大小 */
  color: white;
  /* 字體顏色 */
  border: 2px solid #efefef;
  /* 外框顏色和粗細 */
  background-color: var(--mof-blue-500);
  /* 背景顏色 */
  transition: background-color 0.3s, color 0.3s;
  /* 過渡效果 */
}

/*section3*/
.custom-card2 {
  overflow: hidden; /* 使內容超出卡片邊界的部分被隱藏 */
  border-bottom: 5px solid var(--mof-blue-500); /* 確保底部邊框顏色統一 */
  width: 50%; /* 根據需要調整卡片寬度 */
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.custom-card2 .card-header {
  border-bottom: 0.5px solid var(--mof-blue-500);
}
.custom-card2 .card-header img {
  object-fit: cover;
  width: 30px;
  height: 30px;
}
.custom-card2 .list-group-item {
  border: none; /* 去掉每個列表項目的邊框 */
}
.custom-card2 .list-group-item a {
  color: #333;
}
.custom-card2 .list-group-item a .material-symbols-outlined {
  font-size: 24px; /* 調整圖示大小 */
  color: var(--mof-blue-500); /* 調整圖示顏色 */
}
.custom-card2 .card-header h3 {
  color: #333;
  flex-grow: 1;
}
.custom-card2 .more-btn {
  /* background-color: white; */
  color: var(--mof-blue-500);
  padding: 2px 8px;
  font-size: 1rem !important;
  text-decoration: none !important;
  /* border: 1px solid var(--mof-blue-500); */
}
.fs-custom {
  width: 40px;
  height: 27px;
}

/*footer*/
footer {
  position: absolute; /* 使 footer 能夠定位在第三頁的底部 */
}
/* 手機樣式 (寬度 <= 576px)*/
@media (max-width: 576px) {
  .section {
    height: auto;
    background-attachment: local !important;
  }
  .navbar-custom .navbar-toggler-icon {
    background-image: url(../img/list.svg);
  }
  .navbar-custom.scrolled-black .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg);
  }
  #section1 > div > div:first-child {
    margin-top: 4rem !important;
    margin-bottom: 1rem !important;
  }
  #section1 .apply-text {
    margin: 2rem !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  #section1 > div > div:nth-child(3) {
    flex-direction: column;
    margin-top: 0 !important;
    gap: 1rem !important;
    margin-bottom: 2rem;
    align-items: center;
  }
  #scrollDown {
    display: none;
  }
  #section2 > div > ul {
    justify-content: center;
    margin-top: 1.5rem !important;
  }
  #section2 > div > ul > li {
    width: 50%;
  }
  #section2 #TabContent li > div:first-child {
    margin-right: 0.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    padding: 0.4rem !important;
  }
  #section2 #TabContent .content-nowrap {
    margin-left: 0 !important;
  }
  #section2 #TabContent li > div:last-child {
    font-size: 1.2rem !important;
  }
  #section2 > div > div:last-child {
    margin-bottom: 1.5rem;
  }
  #section3 > div:first-child {
    flex-wrap: wrap;
  }
  #section3 .custom-card2:first-child {
    margin-top: 2.5rem !important;
  }
  #section3 .custom-card2 {
    width: 100%;
    overflow: auto;
  }
  #section3 {
    padding-bottom: 75%;
  }
}
/* 平板樣式 (577px <= 寬度 <= 1024px ) */
@media (min-width: 577px) and (max-width: 1024px) {
  .section {
    height: auto;
    padding-bottom: 5rem;
    background-attachment: local !important;
  }
  #scrollDown {
    display: none;
  }
  .navbar-custom .navbar-toggler-icon {
    background-image: url(../img/list.svg);
  }
  .navbar-custom.scrolled-black .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg);
  }
  #section1 > div > div:nth-child(3) {
    flex-wrap: wrap;
  }
  #section3 {
    margin-bottom: 0;
    padding-bottom: 12rem;
  }
  #section3 > div:first-child {
    flex-wrap: wrap;
  }
  #section3 .custom-card2:first-child {
    margin-top: 3rem !important;
  }
  #section3 .custom-card2 {
    width: 100%;
    overflow: auto;
  }
}
/* 桌面樣式 (寬度 > 1024px) */
@media (min-width: 1025px) {
  body {
    height: 100%;
  }
  .btn-login-custom:hover {
    background-color: #dcdcdc;
  }
  #section1 .scrollDown-btn:hover span {
    color: var(--mof-blue-500);
  }
  #section1 .custom-card:hover {
    transform: scale(1.08);
    /* 當卡片被懸停時放大 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    /* 懸停時增強陰影效果 */
  }
  #section1 .scrollDown-btn:hover {
    background-color: white;
    border: 1px solid var(--mof-blue-700);
  }
  #section2 .more-info-btn:hover {
    background-color: var(--mof-blue-700);
    /* 懸停時的背景顏色 */
    color: white;
    /* 懸停時的字體顏色 */
  }
  #section3 .custom-card2 .list-group-item a:hover {
    color: var(--mof-blue-700);
  }
}
.red_outline {
    border-color: red;
    color: red;
}

.red_outline input {
    border-color: red;
    color: red;
}