body {
  height: fit-content;
}
header {
  position: sticky;
  inset: 0px auto auto auto;
}
main {
  /* 被 JS 強制改 Padding Top 所以這邊加上 !important 去壓 */
  padding-top: 0px !important;
}
#Service:before {
  height: auto;
}
/*

/* Navbar */
.navbar {
  padding: 14px 22px 14px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/*Logo*/
.navbar #Logo {
  margin-right: auto;
  background-color: transparent !important;
}
.navLogo {
  width: auto;
  height: 36px;
  max-height: 100%;
  -o-object-fit: contain;
  object-fit: contain;
}

/*登入按鈕*/
.navbar #Login{
  font-weight: bold;
  border-width: 0;
  background-color: rgb(255 255 255);
  font-size: inherit;
  height: 27px;
}
.navbar #Login:hover{
background-color: #CCCCCC;
}

#Login{
  border-bottom: 3px solid transparent;
  border-left: 1rem solid transparent;
  border-right: 1rem solid transparent;
  border-radius: 40px;
  width: 84px;
}

/*人頭按鈕*/
.navbar #user {
all: unset;
cursor: pointer;
width: 36px;
}

/*人頭選單*/
.tooltipContent {
position: fixed;
top: 60px;
right: 20px;
z-index: 10;
padding: 0px 0px 8px 0px;
background: white;
border: 3px solid #878787;
border-radius: 15px;
display: flex;
flex-direction: column;
gap: 8px;
align-items: center;
}
.tooltipContent.hide {
display: none;
}
.tooltipContent #LogoutMobile {
color: red;
}
.tooltipContent .nav-link {
padding: 0px 16px;
color: black;
font-size: 16px;
}
.tooltipContent button{
  border-bottom: 3px solid transparent;
}
.tooltipContent button:hover{
background-color: #CCCCCC;
}
/*使用者名稱*/
#UserName{
  background-color: #eeeeee;
  font-weight: bold;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0px 0px;
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*九宮格按鈕*/
.navbar #dots-menu{
all: unset;
cursor: pointer;
}

/*人頭、九宮格hover*/
.navbar .navbar_dots-menu_hover, .navbar .navbar_user_hover{
width: 40px;
height: 40px;
display: flex;
justify-content: center;
margin-right: 20px;
}
.navbar .navbar_dots-menu_hover:hover, .navbar .navbar_user_hover:hover{
border-radius: 100%;
background-color: #CCCCCC;
}
.navbar .navbar_hover_show{
border-radius: 100%;
background-color: #CCCCCC;
}

#dots-menu img{
  width:26px;
}
#user img{
  width:100%;
}

/*九宮格選單*/
.jiugonggeContainer{
position: fixed;
width: 400px;
height: 700px;
top: 0%;
right: 0%;
margin: 60px 20px;
z-index: 10;
padding: 10px 0px;
background: white;
border: 3px solid #878787;
border-radius: 15px;
}
.jiugonggeContent {
width: 397px;
height: 615px;
top: 4%;
display: flex;
flex-wrap: wrap;
overflow: auto;
justify-content: center;
position: relative;
}
/* iOS 設備檢測 */
@supports (-webkit-touch-callout: none) {
button {
  /* 移除默認的邊框和輪廓 */
  border: none;
  outline: none;
  /* 移除默認的背景色和文字顏色 */
  background: none;
  color: inherit;
  /* 移除內邊距 */
  padding: 0;
  /* 移除 iOS 的默認按鈕樣式 */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* 確保按鈕可以正確換行 */
  white-space: normal;
}
}
.jiugonggeContainer.hide {
display: none;
}
.jiugonggeContent div {
width: 102px;
height: 164px;
margin: 0px 5px;
display: flex;
justify-content: center;
align-items: flex-start;
}
.jiugonggeContent div:hover{
background: #CCCCCC;
border-radius: 15px;
cursor: pointer;
}
.jiugonggeContent button {
background: none;
border: none;
display: grid;
align-items: flex-start;
}
.jiugonggeContent img {
width: 100%;
}
.jiugonggeContent span {
  font-size: 18px;
}
.jiugonggeContent::-webkit-scrollbar {
width: 6px;
}
.jiugonggeContent::-webkit-scrollbar-track {
background: rgb(0 0 0 / 0%);
}
.jiugonggeContent::-webkit-scrollbar-thumb {
background: #CCCCCC;
}

/*右側垂直進度條*/
aside{
  right: 0;
  background-image: url('../images/aside.png');
  width: 170px;
  height: 314px;
}
aside .scrollTop{
  background-image: url(../images/button_12.png);
  height: 69px;
  background-color: rgb(255 255 255 / 0%);
  margin: 4px 0px 0px 14px;
}

#BannerContent {
  top: 50px;
}

.carousel-inner .carousel-item img{
  object-fit: contain;
  max-width: 100%;
}

.carouselExample_img{
  object-fit: contain;
  max-width: 100%;
}

#Feature{
  margin-top: -50px;
}

#Website #website_list div{
  min-width: 60px;
}
#Website #website_list img{
  height: 40px;
  max-height: 100%;
  object-fit: contain;
}

#scroll_down{
  transform: translate(-50%, 50%);
  cursor: pointer;
}

small{
  color: black;
}
#small{
  cursor: pointer;
}

footer a{
  font-size:16px;
  color:#444
}

/*RWD*/
@media (max-width: 768px) {
.navbar #Logo {
  margin-right: auto;
}
.navbar #user {
  display: block;
  position: relative;
}
.tooltipContent {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 10;
  padding: 0px 0px 8px 0px;
  background: white;
  border: 2px solid #878787;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.tooltipContent .nav-link {
  padding: 0px 16px;
  color: black;
  font-size: 16px;
}
.tooltipContent #LogoutMobile {
  color: red;
}
}
@media (max-height: 750px) {
.jiugonggeContainer{
  height: 500px;
}
.jiugonggeContent {
  height: 435px;
}
}
@media (max-width: 450px) {
.navbar .navbar_dots-menu_hover, .navbar .navbar_user_hover{
  margin-right: 0px;
}
.jiugonggeContainer{
  width: 350px;
  height: 500px;
}
.jiugonggeContent {
  width: 347px;
  height: 430px;
}
.jiugonggeContent button {
  width: 90%;
}
}

.top_button {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

@media screen and (max-width: 640px) {
  html {
    width: 100%;
  }
  body {
    width: 100%;
    min-width: 320px;
    overflow-y: auto;
  }
  #Banner {
    height: auto;
    aspect-ratio: 990 / 500;
  }
  #BannerContent {
    top: 0px !important;
  }
  #Feature {
    margin-top: -20px !important;
  }
  #Feature #learn_switch #Teacher img,
  #Feature #learn_switch #Student img {
    width: calc((27 / 270) * 100%);
  }
  #Feature #learn_grid {
    display: flex;
    flex-direction: column;
    gap: 24px !important;
  }
  #Service > div > div {
    display: flex;
    flex-direction: column;
    transition: 0.2s;
  }
  #Service .service_title:before {
    display: none;
  }
  #Service > div > div > div {
    padding-left: 0px !important;
  }
  #Service .iframe_body {
    width: 100%;
    min-width: 300px;
    height: 100%;
    aspect-ratio: 360 / 200;
  }
  #News #news_switch {
    width: 100%;
    max-width: 314px;
  }
  #News #news_switch button {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1rem !important;
  }
  #News #news_switch button img {
    width: calc((30 / 150) * 100%) !important;
  }
}

@media screen and (max-width: 480px) {
  #News .new_bg .new_title p,
  #News .new_bg .new_title span {
    font-size: 2rem !important;
  }
  #News #book_list {
    display: flex;
    flex-direction: column;
  }
  #News #book_list .book_item {
    margin-top: 1rem !important;
  }
  #Website .website_title p,
  #Website .website_title span {
    font-size: 2.7rem;
  }
  #Website #website_list {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 450px) {
  #Logo img {
    height: 32px;
    width: 145px;
  }
}