body {
  margin: 0px;
  padding: 0;
  width: 100%;
  font-family: Swei Gothic CJK TC !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}



#divNews {
  width: 70%;
  margin: auto;
  display: grid;
  grid:
    ". ."
    /1fr 1fr;
}

.newsImg {
  max-width: 100%;
  max-height: 100%;
  padding: 10px;
}

h2 {
  width: 100%;
  color: #5dc697 !important;
  text-align: center;
  font-weight: 600 !important;
}

.hr {
  width: 70%;
  background-color: #a6a5a5;
  height: 2px;
  border: none;
  margin: auto;
}


/* .contain {
  flex: 1;
} */



.container {
  padding-left: 0px !important;
  padding-right: 0px !important;
  color: white;
  max-width: 100% !important;
}

.containerGray {
  background-color: rgb(255, 255, 255);
}

#divTop {
  display: grid;
  grid:
    ". ."
    /1fr 1fr;
  width: 70%;
  align-items: center;
  margin: auto;
}

#divLogo {
  text-align: left;
  max-height: 100%;
}

#divLogin {
  text-align: right;
}

#toLogin {
  display: grid;
  justify-content: center;
  margin-top: 20px;
  justify-content: end;
}

.loginImg {
  width: 40px;
  margin: auto;
}

.logoImg {
  padding-top: 0.5rem;
  padding-bottom: 0.2rem;
  max-width: 326px;
}

.userBtn {
  color: #707070;
  background-color: transparent;
  border: none;
}

.nav {
  font-size: 0.85rem;
  height: 3rem;
  width: 100%;
  background: linear-gradient(#003f8a, #43aeae);
  display: flex;
  align-items: center;
  justify-content: center;
}

#divNav>div>a {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.navImg {
  vertical-align: bottom;
  width: 15px;
  cursor: pointer;
}

#divNav {
  width: 70%;
  display: grid;
  grid: ". . . .";
  margin: auto;
  text-align: center;
}

#divSlide {
  width: 70%;
  margin: auto;
}

.listImg {
  width: 40px;
  vertical-align: sub;
  padding-left: 1rem;
}

.gpsImg {
  width: 60px;
  visibility: hidden;
  margin-left: auto;
}

#divChild {
  width: 70%;
  margin: auto;
  display: grid;
  grid:
    ". ."
    /1fr 1fr;
}


#map {
  margin-right: 15px;
  height: 24rem;
  border-radius: 10px;
}

#childList {
  margin-left: 15px;
  background-color: #43aeae;
  height: 24rem;
  border-radius: 10px;
}

#listSelect {
  width: 80%;
  margin-left: 10%;
  border-radius: 5px;
  height: 30px;
  color: black;
}

#childList h3 {
  text-align: center;
  letter-spacing: 0.1rem;
  padding: 0.8rem 0;
  color: white;
  border: dashed 1px white;
  border-radius: 1rem;
  margin: 1rem;
}

#childList ul {
  color: white;
  padding-left: 20px;
  padding-right: 40px;
}

#childList li {
  font-size: 0.9rem;
  list-style: none;
  display: grid;
  grid:
    ". . ."
    /0.1fr 1fr 0.3fr;
  align-items: center;
}

#divUl {
  max-height: 14rem;
  display: block;
  overflow-y: auto;
}

.modal-body button {
  border: none;
  color: white;
  font-weight: bold;
  padding: 0.5rem 1.6rem;
  margin-left: 0.2rem;
  margin-right: 0.2rem;
  border-radius: 0.5rem;
  letter-spacing: 0.2rem;
  background: linear-gradient(#43aeae, #003f8a);
}



.modal-body {
  color: black;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.9);
}

#locationImg {
  width: 250px;
}

/* #divStream {
  width: 70%;
  margin: auto;
  display: grid;
  grid:
    ". . . ."
    /1fr 1fr 1fr 1fr;
} */

.card {
  width: 100%;
  max-width: 400px;
  /* 固定最大寬度 */
  height: 300px;
  /* 固定卡片高度 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* 讓內容平均分佈 */
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  padding: 10px;
  background: #fff;
}

#divStream {
  width: 70%;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* 桌機版：4 欄 */
  gap: 10px;
}


.cardOut {
  padding: 5px;
}

.card-img-top {
  width: 100%;
  height: 180px;
  /* 固定圖片高度 */
  object-fit: cover;
  /* 確保圖片不變形 */
}

.card-text {
  flex-grow: 1;
  /* 讓文字區域填滿可用空間 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* 限制最多顯示 3 行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
  /* 限制最大高度，避免內容撐開 */
}

.previewBtn {
  background-color: #43aeae !important;
  border: 1px solid #43aeae !important;
  font-size: 14px !important;
  font-weight: bolder !important;
}

.streamBtn {
  background-color: #ff1212 !important;
  border: 1px solid #ff1212 !important;
  font-size: 14px !important;
  font-weight: bolder !important;
}

.hide {
  visibility: hidden;
}

#divAct {
  width: 70%;
  margin: auto;
}

#act {
  display: grid;
  grid: ". . . .";
  justify-content: space-around;
}

.actImg {
  max-width: 100%;
  padding: 5px;
}

footer {
  background: linear-gradient(#92e5a8, #3c9d9b);
  height: 10rem;
  width: 100%;
  display: grid;
  flex-shrink: 0;
}

#divFooter {
  width: 70%;
  display: grid;
  grid:
    ". ."
    /1fr 1fr;
  margin: 0 auto;
  align-items: center;
}

#divFooterInfo {
  color: white;
  height: 80%;
  display: grid;
  grid: "." "." "." ".";
}

#divFooterImg {
  text-align: right;
}

#divFooterImg>img {
  padding: 0.3rem;
}

.footerImg {
  width: 40px;
}

.footerInfo {
  margin-bottom: 0px;
}

.footer {
  color: white;
}

.newsnewsBody {
  display: grid;
  grid-template-areas:
    "newsnewsImg"
    "newsnewsTitle"
    "newsnewsContent"
    "newsnewsFooter";
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 90vw;
  /* 限制最大寬度，確保在手機上適應 */
  padding: 12px;
}

.newsnewsImg {
  grid-area: newsnewsImg;
  width: 100%;
  /* 讓圖片撐滿容器 */
  max-width: 550px;
  /* 限制最大寬度，避免過大 */
  height: auto;
  border-radius: 8px;
  /* 圓角設計，讓 UI 更美觀 */
  margin: 0 auto;
  /* 水平置中 */
}

.newsnewsTitle {
  grid-area: newsnewsTitle;
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 10px;
}

.newsnewsContent {
  grid-area: newsnewsContent;
  font-size: 1rem;
  padding: 10px;
}

.newsnewsFooter {
  grid-area: newsnewsFooter;
  margin-top: 15px;
}

.newsnewsBtn {
  width: 80%;
  padding: 12px;
  font-size: 1.2rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.newsnewsBtn:hover {
  background-color: #45a049;
}




@media (max-width: 1024px) {
  #divTop {
    width: 90%;
  }

  #divNews {
    width: 90%;
  }

  #divSlide {
    width: 100%;
  }

  #divChild {
    width: 90%;
  }

  #divStream {
    width: 90%;
  }

  #divAct {
    width: 90%;
  }

  #divFooter {
    width: 90%;
  }

  .logoImg {
    max-width: 245px;
  }

  .gpsImg {
    visibility: visible;
  }

  #divStream {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 欄排列 */
    width: 90%;
    gap: 10px;
    /* 控制卡片間距 */
    overflow-x: hidden;
    align-items: start;
    /* 讓內容靠上對齊 */
  }

  .cardOut {
    display: flex;
    justify-content: center;
    align-items: start;
    /* 內容靠上對齊，避免多餘空隙 */
    width: 100%;
  }

  .card {
    width: 100%;
    max-width: 400px;
    margin-bottom: 10px;
    /* 避免卡片間太擠 */
  }

  .contain {
    height: auto;
  }
}

@media (max-width: 600px) {
  .nav {
    height: 3rem;
  }

  #divNews {
    grid: ".";
  }

  #divNav {
    width: 90%;
  }

  #divNav>a {
    margin: 1rem;
    grid: ".";
  }

  #divNav>a>img {
    width: 20px;
    margin: auto;
  }

  .logoImg {
    max-width: 163px;
  }

  #divChild {
    grid: ".";
    height: auto;
  }

  /*  #divStream {
    grid: ". ." /1fr 1fr;
    height: auto;
  } */
  #divStream {
    display: grid;
    grid-template-columns: 1fr;
    /* 變成單欄 */
    width: 90%;
    /* 略增加寬度，讓排版更好看 */
    overflow-x: hidden;
    /* 確保不會有水平滾動 */
  }

  .cardOut {
    display: flex;
    justify-content: center;
    /* 讓內部內容水平置中 */
    align-items: center;
    width: 100%;
  }

  .card {
    width: 100%;
    /* 讓卡片占滿整個 div */
    max-width: 400px;
    /* 限制最大寬度，避免過大 */
  }

  #divAct {
    grid: ".";
    height: auto;
  }

  #map {
    margin-bottom: 20px;
    height: 20rem;
    margin-right: 0px;
  }

  #childList {
    height: 20rem;
    margin-left: 0px;
  }

  #divUl {
    max-height: 10rem;
  }

  #act {
    display: grid;
    grid: ". ." /1fr 1fr;
  }

  #divFooterInfo {
    font-size: 14px;
  }

  .footerImg {
    width: 35px;
  }
}

.text-below-marker {
  min-width: 150px;
  /* left: -50px; */
  text-align: left;
  min-height: 1.2em;
  /* border: 1px solid red; */
  font-size: 1rem;
  color: #003f8a;
  font-weight: bold;
  padding-left: 1.5rem;
  text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;

}

.ellipsis {
  min-width: 80px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}


/* 翻譯按鈕的樣式 */
.translate-button {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-radius: 0 5px 5px 0;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0.6;
}

.translate-button:hover {
  background-color: #45a049;
  opacity: 1;
}

/* Google Translate 工具區域的樣式 */
#google_translate_element {
  position: fixed;
  left: 40px;
  top: 0%;
  background-color: white;
  border: 1px solid #ddd;
  z-index: 1000;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  background: transparent;
}