:root {
  --BLUE_1: #003FFF;
  --BLUE_2: #CCDBFF;
  --GREEN_1: #009926;
  --GREY_1: #808080;
  --GREY_2: #333333;
}
/* var(--GREEN_1); */

* {
  font-family: 'Roboto', 'Noto Sans SC', 'Noto Sans TC', serif;
}
a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
  color: inherit;
}

  #logo {
    display: block;
    margin: 0 auto;
    text-align: center;
    transition: transform 0.3s ease-in-out;
  }

  #logo:hover {
    transform: scale(1.1);
  }

  .search-box {
    position: relative
  }

  /* 搜尋框樣式 */
  .search-box input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
  }

  #MainMenu .nav-item a {
    /* font-size: 2rem; */
    color: var(--GREY_2);
    transition: color 0.3s;
    text-align: left;
  }

  .dropdown-menu>li>a {
    padding: 10px 20px;
  }

  #MainMenu .nav-item .dropdown-menu a:hover {
    background-color: var(--BLUE_1);
    color: #fff;
  }

  /* 覆蓋 navbar-collapse */
  #headermenu.navbar-collapse {
    display: flex !important;
    justify-content: center;
    align-items: center;
  }

  #MainMenu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    /* 項目間距 */
    list-style: none;
    padding: 0;
    margin: 0;
  }

  #MainMenu .nav-item {
    margin: 0 10px;
  }

  #MainMenu .nav-item .nav-link {
    text-align: center;
    font-size: 1.5rem;
    padding: 10px 15px;
    line-height: 1.5;
    transition: color 0.3s;
  }

  #MainMenu .nav-item .nav-link:hover {
    color: var(--BLUE_1);
  }

  #header nav,
  #headermenu.navbar-collapse {
    background-color: #fff !important;
    border-bottom: 1px solid var(--BLUE_1);
  }

  /* 覆蓋 Bootstrap 的預設 */
  .bg-light {
    background-color: #fff !important;
  }

  /* 語言切換下拉選單 */
  .dropdown-toggle {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    background-color: #fff;
    font-size: 1.2rem;
    line-height: 1.4em;
  }

  .dropdown-menu {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    padding: 5px 0;
    min-width: 150px;
    z-index: 1050 !important;
  }

  .dropdown-item {
    font-size: 1.2rem;
    color: var(--GREY_1);
    padding: 5px 10px;
    transition: background-color 0.3s, color 0.3s;
  }

  .dropdown-item:hover {
    background-color: #f0f0f0;
    color: #007bff;
  }

  .navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
    /* 滑鼠懸停時顯示下拉選單 */
  }

  /* Modal 整體樣式 */
  .modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
  }

  /* Modal 內容樣式 */
  .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  #languageButton {
    border: 1px solid var(--GREEN_1);
    border-radius: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
  }

pre {
  font-size: initial;
  color: initial;
}


.text-blue {
  color: var(--BLUE);
}

.text-lightblue {
  color: var(--LIGHTBLUE);
}

.text-darkblue {
  color: var(--DARKBLUE);
}

.bg-blue {
  background-color: var(--BLUE);
}

.bg-darkblue {
  background-color: var(--DARKBLUE);
}

.bg-lightblue {
  background-color: var(--LIGHTBLUE);
}

.border-bottom-blue {
  border-bottom: 1px solid var(--BLUE);
}

.ratio-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  /* If you want text inside of it */
}

.ratio-container-1-1 {
  padding-top: 100%;
  /* 1:1 Aspect Ratio */
}

.ratio-container-16-9 {
  padding-top: 56.25%;
  /* 1:1 Aspect Ratio */
}

.ratio-container-4-3 {
  padding-top: 75%;
  /* 1:1 Aspect Ratio */
}

/* If you want text inside of the container */
.ratio-text {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.sticky-top {
  position: -webkit-sticky;
  position: fixed;
  top: 0;
  z-index: 1020;
}

@media (min-width: 576px) {
  .sticky-sm-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
  }
}

@media (min-width: 768px) {
  .sticky-md-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
  }
}

@media (max-width: 767.98px) {
  .divider {
    width: 95% !important;
  }
}

@media (min-width: 768px) and (max-width: 1024.98px) {
  .divider {
    width: 95%;
  }
}

@media (min-width: 992px) {
  .sticky-lg-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
  }
}

@media (min-width: 1200px) {
  .sticky-xl-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
  }
}

@media (min-width: 1400px) {
  .sticky-xxl-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
  }
}


/*下拉選單改成hover*/
header .dropdown>.dropdown-menu {
  top: 200%;
  transition: 0.3s all ease-in-out;
}

#othermenu1 ol li:hover {
  color: var(--LIGHTBLUE);
}

@media (min-width: 992px) {
  header .dropdown:hover>.dropdown-menu {
    display: block;
    top: 90%;
  }
}



header .dropdown:hover>.triangle {
  display: block !important;
}

header .dropdown>.dropdown-toggle:active {
  /*Without this, clicking will make it sticky*/
  pointer-events: none;
}

/* 選單 */
header #MainMenu .nav-link {
  color: var(--GREY_2);
  position: relative;
  display: inline-block;
  text-decoration: none;
  transition: color 0.3s ease;
}

header #MainMenu .nav-link:hover {
  color: var(--BRIGHTRED);
}

header #MainMenu .nav-link:not(:hover) {
  animation: vanish-flash 0.3s ease-out;
}

@keyframes vanish-flash {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}


/* 聯絡我們項目樣式 */
header .contact-item {
  position: absolute;
  right: 3vw;
  top: 50%;
  transform: translateY(-50%);
}

header .contact-item .nav-link {
  color: var(--GREY_2);
  text-align: center;
}

header .contact-item .nav-link:hover {
  color: var(--BRIGHTRED);
}

header .contact-item .nav-link:not(:hover) {
  animation: vanish-flash 0.3s ease-out;
}


header .dropdown-arrow::after {

  position: absolute;
  right: -3px;
  top: 50%;
  display: inline-block;
  margin-left: .255em;
  vertical-align: .255em;
  content: "";
  border-top: .3em solid;
  border-right: .3em solid transparent;
  border-bottom: 0;
  border-left: .3em solid transparent;
  height: 100%;
}

header #switch .line {
  width: 2rem;
  height: .2rem;
  background-color: var(--GREY_1);
  display: block;
  margin: .4rem auto;
  -webkit-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

#switch.is-active {
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  -o-transform: rotate(90deg);
  transform: rotate(90deg);
}

#switch.is-active .line:nth-child(2) {
  -webkit-transition: none;
  -o-transition: none;
  transition: none;
}

#switch .line:nth-child(3) {
  height: .1rem;
}

#switch .line:nth-child(2) {
  -webkit-transition-delay: 0.3s;
  -o-transition-delay: 0.3s;
  transition-delay: 0.3s;
}


#switch.is-active .line:nth-child(2) {
  opacity: 0;
}

#switch.is-active .line:nth-child(1),
#switch.is-active .line:nth-child(3) {
  width: 1rem;
  margin: .8rem auto;
  -webkit-transform-origin: left;
  -moz-transform-origin: left;
  -ms-transform-origin: left;
  -o-transform-origin: left;
  transform-origin: left;
}

#switch.is-active .line:nth-child(1) {
  -webkit-transform: translateY(15px) rotate(45deg);
  -ms-transform: translateY(15px) rotate(45deg);
  -o-transform: translateY(15px) rotate(45deg);
  transform: translateY(15px) rotate(45deg);
}

#switch.is-active .line:nth-child(3) {
  -webkit-transform: translateY(-15px) rotate(-45deg);
  -ms-transform: translateY(-15px) rotate(-45deg);
  -o-transform: translateY(-15px) rotate(-45deg);
  transform: translateY(-15px) rotate(-45deg);
}


.morebutton {
  background-color: blue;
  letter-spacing: .2rem;
  border: 2px solid yellow;
}


@media (min-width: 576px) {
  .position-sm-static {
    position: static !important;
  }

  .position-sm-relative {
    position: relative !important;
  }

  .position-sm-absolute {
    position: absolute !important;
  }

  .position-sm-fixed {
    position: fixed !important;
  }

  .position-sm-sticky {
    position: sticky !important;
  }

  .w-sm-45 {
    width: 45% !important;
  }

  .w-sm-50 {
    width: 50% !important;
  }
}

@media (min-width: 768px) {
  .position-md-static {
    position: static !important;
  }

  .position-md-relative {
    position: relative !important;
  }

  .position-md-absolute {
    position: absolute !important;
  }

  .position-md-fixed {
    position: fixed !important;
  }

  .position-md-sticky {
    position: sticky !important;
  }

  .w-md-50 {
    width: 50% !important;
  }

}

@media (min-width: 992px) {
  .position-lg-static {
    position: static !important;
  }

  .position-lg-relative {
    position: relative !important;
  }

  .position-lg-absolute {
    position: absolute !important;
  }

  .position-lg-fixed {
    position: fixed !important;
  }

  .position-lg-sticky {
    position: sticky !important;
  }
}

@media (min-width: 1200px) {
  .position-xl-static {
    position: static !important;
  }

  .position-xl-relative {
    position: relative !important;
  }

  .position-xl-absolute {
    position: absolute !important;
  }

  .position-xl-fixed {
    position: fixed !important;
  }

  .position-xl-sticky {
    position: sticky !important;
  }
}

body {
  line-height: 2em;
}

@media (min-width: 576px) {
  body {
    font-size: 14px;
  }
}

@media (min-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.75em;
  }
}

@media (min-width: 992px) {
  body {
    font-size: 16px;
    line-height: 2.5em;
  }
}

@media (min-width: 1200px) {
  body {
    font-size: 16px;
    line-height: 2.5em;
  }
}
