/* header Styling */
.header {
  display: flex;
  background-color: #dceefc;
  align-items: center;
  justify-content: center;
  min-height: calc(12.5vh - 6.375px);
  background-image: url(../../images/kazuend-cCthPLHmrzI-unsplash.jpg);
  /* background-position: bottom; */
  background-size: cover;
}
/*表單說明標題CSS*/
.title-dark {
  color: #181818;
  margin-top: 0.8rem;
}
/*表單說明標題CSS*/
/* Footer 收放按鈕 */
/* Footer 收放按鈕 */
.footer-toggle {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: #acc8dd;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  color: white;
  transition: background 0.3s;
  visibility: visible;
  opacity: 1;
}

.footer-toggle:hover{
  background: #b9d8ed;
}

.footer-toggle.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.footer-toggle span {
  font-size: 20px;
}
/* Footer 收放按鈕 */
/* Footer 收放按鈕 */
/*返回驗紐CSS*/
main.background .container .row .logo-container {
  text-decoration: none; /* 這樣就可以搬掉 inline style */
}

.no-decoration {
  text-decoration: none;
}

.white-text {
  color: white;
}

.back-icon {
  width: 100px;
  height: 100px;
}
/*返回驗紐CSS*/


.container {
  width: 100%;
  max-width: 1200px;
  /* margin: 0 auto;
  text-align: center;
  padding: 0 15px;
  box-sizing: border-box; */
}

/* Logo Styling */
.Logo {
  width: 5rem;
  height: 5rem;
  margin-right: 1rem;
}

/* picture styling */
.pic {
  width: 10rem;
  height: 10rem;
  /* margin-top: 10px; */
}

.pic-small {
  width: 5.3rem;
  height: 5.3rem;
}

/* footer styling */
footer {
  background-color: #dceefc; /* 深綠色，代表自然與穩定 */
  color: #e0f2f1; /* 淺綠色，讓文字清楚 */
}

footer a {
  text-decoration: none;
  color: #212121;
  transition: 0.1s;
  font-weight: bold;
}
footer a:hover {
  color: #4c4c4c;
  font-weight: bolder;
  transform: scale(1.05);
}

footer h5 {
  color: #212121;
  font-weight: bolder;
}
footer ul {
  list-style-type: disc !important;  /* 強制使用項目符號 */
  padding-left: 18px !important;
}


/* font setting */
p,
h4 {
  margin: 0;
  margin-bottom: 0px;
  padding: 0;
  border: 0;
  outline: 0;
}

/* custom-accordion-button */
.custom-accordion-button {
  background-color: #dceefc; /* 按鈕背景顏色 */
  color: #ffffff; /* 按鈕文字顏色 */
  border: none;
  transition: background-color 0.3s ease;
}

.custom-accordion-button:hover {
  background-color: #3382c7; /* 滑鼠懸停時的背景顏色 */
}

.custom-accordion-button:focus {
  box-shadow: 0 0 0 0.2rem #007bff40;
}

.custom-accordion-button.collapsed {
  background-color: #cde29f; /* 收起狀態的背景顏色 */
  color: #ffffff;
}

.custom-accordion-button.collapsed:hover {
  background-color: #7bbe4e;
}

.custom-accordion-button:not(.collapsed) {
  background-color: #cde29f; /* 展開狀態背景顏色 */
  color: #ffffff;
  font-weight: bold;
}

.custom-accordion-button:not(.collapsed):hover {
  background-color: #cde29f;
}
/* 導覽列欄位文字美化 */
.accordion-body .col-3 a {
  text-decoration: none; /* 移除超連結的底線 */
  color: inherit; /* 讓超連結顏色與父元素相同 */
}

.accordion-body .col-3 a:hover {
  text-decoration: underline; /* 滑鼠移上去時才顯示底線 */
  color: #4c4c4c; /* 滑鼠移上去時變藍色 */
  transition: 0.2s;
  font-weight: bold;
}

/* Icon Card Styling */
.icon-card {
  background-color: #dceefc;
  color: #212121;
  text-align: center;
  padding: 20px;
  margin: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  text-decoration: none;
}
.icon-card:hover {
  transform: scale(1.025);
  background-color: #aad4f4;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.icon-card p {
  font-size: 1.6rem;
  font-weight: bold;
  margin-top: 1rem;
}

.icon-card h4 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Center Content Styling */
.center-content {
  text-align: center;
  padding: 20px;
  color: #212121;
  margin-bottom: 30px;
}
.center-content img {
  max-width: 100px;
  margin-bottom: 10px;
}

/* Logo Container Styling */
.logo-container {
  /* 讓它與 container 對齊 */
  width: 100%;
  max-width: 1174px;
  background-color: #cde29f;
  /* padding: 30px; */
  margin: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.logo-container:hover {
  transform: scale(1.01);
  background-color: #d8f698;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.logo-container h3 {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
  color: #212121;
}

/* video container */
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #f5f8fa;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Background Styling */
.background {
  background-color: #ffffff;
  min-height: auto; /* 讓它根據內容高度自動調整 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 讓內容靠上對齊 */
  padding-top: 20px; /* 避免貼到 header */
  padding-bottom: 20px; /* 避免貼到 footer */
}

/* nav Styling */
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background-color: #cde29f;
  padding: 5px 10px;
  position: relative;
  z-index: 1000; /* 讓 nav 永遠在最上層 */
}

nav a {
  font-size: 1.05rem;
  font-weight: bold;
  text-decoration: none;
  color: #000000;
  margin-right: 2rem;
  transition: 0.3s;
  text-align: center;
}

nav a:hover {
  scale: 105%;
  background-color: #aad4f4;
  color: #212121;
  border-radius: 3%;
  padding: 2.5px 5px;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 5px 15px;
}

/* 下拉選單的容器 */
.dropdown {
  position: relative;
  display: inline-block;
}
/* 讓 dropdowns 以 space-around 方式排列 */
.dropdown-container {
  display: flex;
  justify-content: space-evenly;
  align-items: center;  /* 這行重點：讓內容上下置中 */
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  min-height: calc(3.7vh - 6.375px);  /* 這行可以先暫時拿掉來測試效果 */
}

/* 下拉選單內容（隱藏） */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #dceefc;
  min-width: 150px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  z-index: 1100; /* 設定比 nav 更高的層級 */
}

/* 下拉選單內的超連結樣式 */
.dropdown-content a {
  color: #212121;
  padding: 10px;
  text-decoration: none;
  display: block;
  text-align: left;
}

/* 子選單內的選項 hover 效果 */
.dropdown-content a:hover {
  background-color: #aad4f4;
}

/* 🔹 漢堡選單按鈕 (預設隱藏) */
.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  padding: 10px;
}

/* 🔹 nav 樣式（桌機版） */
.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background-color: #dceefc;
  padding: 5px 10px;
  position: relative;
  z-index: 1000;
}

/* nav Styling */

/* small-back-button */
.small-back-button {
  background-color: #cde29f;
}
.small-back-button:hover {
  transform: scale(1.01);
  background-color: #8bd659;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

/* Back Button Styling */
.back-button {
  background-color: #cde29f;
  max-width: 100%;
  padding: 30px;
  border-radius: 10px;
  min-height: calc(1.75 * (12vh - 12.75px));
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-top: 0.75rem;
}
.back-button:hover {
  transform: scale(1.01);
  background-color: #d8f698;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
.back-button h4 {
  font-weight: bold;
  margin-top: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #212121;
}

@media (max-width: 767.99px) {
  .icon-card {
    min-height: calc(25vh - 12.75px);
    min-height: calc(25vh - 12.75px);
  }
  .logo-container {
    min-height: calc(2 * (25vh - 12.75px));
    min-width: calc(1.9 * (25vh - 12.75px));
  }
  .icon-card.use {
    padding-top: 10px;
  }
  .back-button {
    min-height: calc(0.75 * (25vh - 12.75px));
    min-width: calc(1.9 * (25vh - 12.75px));
    margin-top: 10px; /* 增加間距 */
    margin-bottom: 10px; /* 增加間距 */
  }

  nav {
    flex-direction: column; /* 小螢幕時改為垂直排列 */
    align-items: center; /* 垂直置中 */
    justify-content: center; /* 小螢幕時內容居中 */
    flex-direction: row; /* 項目改為橫向排列 */
    gap: 10px; /* 項目間距 */
  }

  nav a {
    /* writing-mode: horizontal-tb; 文字改為水平排列 */
    min-width: calc(1.9 * (25vh - 12.75px));
    min-height: calc(1 * (3vh - 12.75px));
    text-orientation: initial;
  }

  footer .row {
    flex-direction: column; /* 改為垂直排列 */
    align-items: center;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
  }

  footer a {
    display: block; /* 確保文字能單獨一行 */
    margin-bottom: 10px;
  }


  .menu-toggle {
    display: block; /* 讓漢堡選單按鈕在手機版可見 */
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    background-color: #dceefc;
    width: 100%;
    text-align: left;
    padding: 10px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* 預防未展開時仍可點擊 */
  }

  /* 🔹 點擊按鈕時顯示 nav */
  .nav-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 28px;
  }
  .nav-menu a {
    display: block;
    padding: 10px;
    color: #212121;
    text-decoration: none;
  }

  .nav-menu a:hover {
    background-color: #dceefc;
    color: #212121;
  }

  .header {
    padding-bottom: 8px;
    padding-top: 8px;
  }
  /* 🔹 修改 `.dropdown-content`，讓它不再使用 hover */
  .dropdown-content {
    display: none;
    position: relative;
    background-color: #dceefc;
    min-width: 150px;
    border-radius: 5px;
    padding: 10px;
    transition: all 0.3s ease;
  }

  /* 🔹 點擊展開 `.dropdown-content` */
  .dropdown.active .dropdown-content {
    display: block;
  }

  /* 🔹 `.dropdown-content` 內的選項 */
  .dropdown-content a {
    color: #212121;
    padding: 8px;
    text-decoration: none;
    display: block;
    text-align: left;
  }

  .dropdown-content a:hover {
    background-color: #aad4f4;
  }
}

@media screen and (min-width: 768px) {
  .icon-card {
    min-height: calc(25vh - 12.75px);
    min-height: calc(25vh - 12.75px);
    /* width: 10rem; */
  }
  .icon-card.build,
  .icon-card.fileusage {
    /* min-height: calc(6.25vh - 3.1875px); */
    min-height: calc((100vh - 69px) / 6);
    max-height: calc((100vh - 69px) / 6);
  }
  .icon-card.construction {
    min-height: calc((100vh - 60px) / 5);
    max-height: calc((100vh - 60px) / 5);
  }

  .icon-card.use {
    min-height: calc((100vh - 123px) / 12);
    max-height: calc((100vh - 123px) / 12);
  }
  .icon-card.use h4 {
    font-size: 20px;
    padding-bottom: 13px;
  }
  /* 讓展開只在大螢幕適用 */
  .dropdown:hover .dropdown-content {
    display: block;
  }
}
/* 自訂搜尋樣式 */
.search-btn-custom {
  background-color: #dceefc;
  border-color: #dceefc;
  color: #000;
}
.search-btn-custom:hover {
  background-color: #aad4f4;
  border-color: #aad4f4;
  color: #000;
}
.result-header {
  background-color: #dceefc;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
}