/* 全局變量 */
:root {
  --primary-color: #01248a;
  --secondary-color: #debf65;
  --section-bg: #f5f5f5;
  --transition: all 0.3s ease-in-out;

  --family-font: "Montserrat", "Noto Sans TC", sans-serif;
  --family-font-secondary: "Montserrat", sans-serif;
}

/* 字體 */
@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

.container {
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 48px;
  width: 100%;
  box-sizing: border-box;
}

/* 基礎樣式 */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--family-font);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  /* overflow-x: hidden; */
  width: 100%;
  position: relative;

  /* 記得取消 */
  height: 100vh;
  display: flex;
  flex-direction: column;
}

ul {
  padding-left: 0;
  margin: 0;
}

ul li {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
}

/* header */
.header {
  color: var(--primary-color);
}

@media screen and (min-width: 993px) {
  :root {
    --desktop-header-height: 126px;
  }

  body {
    padding-top: var(--desktop-header-height);
  }

  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    background-color: #fff;
    box-shadow: 0 6px 18px rgba(10, 32, 56, 0.08);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
  }
}

.header-container {
  display: flex;
  flex-direction: column;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

.header-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  width: 260px;
}

.header-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-logo span {
  color: var(--secondary-color);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0px;
}

.header-content .content-item {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 20px;
}

.header-content .content-item:last-child{
  margin-right: 0;
}

.header-content .content-item:nth-child(2){
  margin-right: 5px;
}

.header-content .content-item svg {
  width: 14px;
  height: 14px;
}

.header-content .content-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: underline;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-bottom {
  background-color: var(--primary-color);
  padding: 20px 0;
  position: relative;
  z-index: 20;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.header-bottom-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.header-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
}

.header-nav ul li {
  list-style: none;
  /* padding: 0 20px; */
  position: relative;
}

.header-nav ul li a {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.header-nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background-color: var(--secondary-color);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.header-nav ul li a:hover::after {
  opacity: 1;
}

.header-nav ul li a.active::after {
  opacity: 1;
}

.header-nav ul li a:hover {
  color: var(--secondary-color);
}

.header-nav ul li a.active {
  color: var(--secondary-color);
}

.header-nav .nav-item.has-dropdown {
  padding-bottom: 20px;
  margin-bottom: -20px;
}

.header-nav .nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: var(--transition);
  pointer-events: none;
}

.header-nav .nav-item.has-dropdown.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header-nav .mega-dropdown {
  width: min(900px, calc(100vw - 60px));
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 10px rgba(8, 24, 44, 0.1);
  color: #2a313b;
  overflow: hidden;
}

.mega-dropdown-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.3fr 1.3fr;
  gap: 32px;
  padding: 28px 30px 50px 30px;
}

.mega-column {
  min-width: 0;
}

.mega-column.first {
  border-right: 1px solid #e0e0e0;
}

.mega-column h4 {
  margin: 0 0 15px;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-color);
}

.column-item h4 {
  position: relative;
  padding-left: 10px;
}

.column-item h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 48%;
  transform: translateY(-50%);
  width: 2px;
  height: 48%;
  background-color: var(--secondary-color);
  border-radius: 5px;
}

.mega-column ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.mega-column ul:last-child {
  margin-bottom: 0;
}

.mega-column ul li {
  padding: 0;
}

.mega-column ul li a {
  font-size: 15px;
  color: #435161;
  line-height: 1.7;
  font-weight: 400;
  transition: var(--transition);
  transform: translateX(0);
  display: block;
}

.mega-column.first ul li a {
  font-size: 16px;
}

.mega-column ul li a:hover {
  color: var(--secondary-color);
  font-weight: 500;
  transform: translateX(5px);
}

.mega-column ul li a::after {
  display: none;
}

.header-nav .simple-dropdown {
  min-width: 260px;
  background-color: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 28px rgba(8, 24, 44, 0.18);
  padding: 14px 0;
}

.header-nav .simple-dropdown ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-nav .simple-dropdown ul li {
  padding: 0;
}

.header-nav .simple-dropdown ul li a {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  color: #2f3e50;
}

.header-nav .simple-dropdown ul li a:hover {
  background-color: rgba(26, 58, 92, 0.06);
  color: var(--primary-color);
}

.header-nav .simple-dropdown ul li a::after {
  display: none;
}

.language-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.language-wrapper a {
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  position: relative;
  padding-right: 15px;
}

.language-wrapper a:last-child {
  padding-right: 0;
}

.language-wrapper a::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  width: 1px;
  height: 80%;
  background-color: rgba(255, 255, 255, 0.3);
}

.language-wrapper a:last-child::after {
  display: none;
}

.language-wrapper a.active {
  color: var(--secondary-color);
  font-weight: 500;
}

.language-wrapper a:hover {
  color: var(--secondary-color);
}

/* footer */
.footer {
  background-color: #fff;
  color: #01248a;
  padding: 50px 0 20px 0;
  position: relative;
  border-top: 1px solid rgba(1, 36, 138, 0.05);
  /* box-shadow: 0 0 8px 0 rgba(1, 36, 138, 0.05); */

  /* 記得取消 */
  margin-top: auto;
}

.footer-container {
  position: relative;
  z-index: 2;
}

.footer::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/static/images/global-bg.png");
  opacity: 0.8;
  z-index: 1;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.footer-logo {
  width: 260px;
}

.footer-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-info {
  display: flex;
  align-items: center;
  gap: 5px;
}

.company-info span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-info span svg {
  width: 20px;
  height: 20px;
}

.company-info h2 {
  font-size: 19px;
  font-weight: 500;
  color: var(--primary-color);
}

.footer-middle {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
  border-bottom: 1px solid rgba(1, 36, 138, 0.1);
  padding-bottom: 30px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.column-wrapper.first {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.footer-column h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--primary-color);
}


.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-column ul li {
  padding: 0;
}

.footer-column ul li a {
  font-size: 15px;
  color: rgba(1, 36, 138, 0.9);
}

.footer-column ul li a svg {
  width: 14px;
  height: 14px;
}

.footer-column ul li a svg path {
  fill: rgba(1, 36, 138, 0.7);
}

.footer-column ul li a:hover {
  color: var(--primary-color);
  font-weight: 500;
}

.contact-footer ul li a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.contact-footer ul li a span {
  display: flex;
  align-items: center;
  justify-content: center;
  /* text-decoration: underline; */
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.footer-bottom-left ul {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-bottom-left ul li {
  list-style: none;
  padding-right: 15px;
  position: relative;
}

.footer-bottom-left ul li::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 80%;
  background-color: rgba(1, 36, 138, 0.15);
}

.footer-bottom-left ul li:last-child::after {
  display: none;
}

.footer-bottom-left ul li a {
  font-size: 14px;
  color: rgba(1, 36, 138, 0.7);
  font-weight: 500;
}

.footer-bottom-left ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom-right p {
  font-size: 12px;
  color: rgba(1, 36, 138, 0.7);
  font-weight: 500;
  text-align: right;
}

.footer-bottom-right p a {
  color: rgba(1, 36, 138, 0.7);
}

.footer-bottom-right p a:hover {
  color: var(--primary-color);
}

@media screen and (max-width: 767px) {
  .container {
    padding: 0 15px;
  }
}

/* 回到頂部 */
.back-to-top{
  position: fixed;
  bottom: 80px;
  right: 40px;
  width: 45px;
  height: 45px;
  /* background-color: #fff; */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  transform: translateY(10px);
  /* box-shadow: 0 2px 10px rgba(26, 58, 92, 0.2); */
  /* border: 1px solid var(--primary-color); */
  z-index: 5;
  opacity: 0;
  visibility: hidden;
}

.back-to-top::after{
  content: '';
  width: 100%;
  height: 100%;
  position: absolute;
  top: 3px;
  left: 3px;
  border: 1px solid var(--primary-color);
  z-index: -1;
  background-color: #fff;
  transition: all 0.3s ease;
}

.back-to-top.show{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* .back-to-top:hover{
  background-color: var(--primary-color);
} */
.back-to-top span{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease;
  z-index: 1;
  svg{
    width: 26px;
    height: 26px;
  }
}

.back-to-top:hover span{
  background-color: var(--primary-color);
  border-color: #535353;
  border-top: none;
  border-left: none;
  svg{
    path{
      fill: #fff;
    }
  }
}

.back-to-top:hover::after{
  background-color: var(--primary-color);
}




/* mobile */
/* mobile navigation */
.mobile-header {
  display: none;
}

@media (max-width: 992px) {

  .footer-logo{
    width: 210px;
  }

  .banner-section{
    padding-top: 0 !important;
  }

  .banner-container{
    border-radius: 0 !important;
  }

  .back-to-top{
    bottom: 40px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .back-to-top span svg{
      width: 20px;
      height: 20px;
  }

  .container {
    padding: 0 15px;
  }

  .header .header-top,
  .header .header-bottom {
    display: none;
  }

  .mobile-header {
    display: block;
    background-color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    border-bottom: 1px solid #e8edf2;
    box-shadow: 0 8px 22px rgba(17, 42, 72, .08);
    overflow: visible;
  }

  .mobile-header-bar {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background-color: #fff;
    position: relative;
    z-index: 120;
  }

  .mobile-nav-toggle {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-nav-toggle span {
    width: 22px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 999px;
    transition: transform .25s ease, opacity .2s ease;
  }

  body.mobile-nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  body.mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .mobile-logo {
    color: var(--primary-color);
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .02em;
    margin-right: auto;
    margin-left: 4px;
    white-space: nowrap;
    width: 180px;
  }

  .mobile-logo img{
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-logo span {
    color: var(--secondary-color);
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .mobile-language-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
  }

  .mobile-language-toggle span {
    color: var(--primary-color);
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
  }

  .mobile-language-toggle img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, .08);
  }

  .mobile-nav-drawer {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    border-top: 1px solid #edf1f5;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .36s ease, opacity .2s ease;
    background-color: #fff;
    box-shadow: 0 18px 30px rgba(10, 32, 56, .15);
    z-index: 110;
  }

  body.mobile-nav-open .mobile-nav-drawer {
    max-height: calc(100vh - 74px);
    opacity: 1;
    overflow-y: auto;
  }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 26, 44, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 100;
  }

  body.mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-drawer>ul {
    margin: 0;
  }

  .mobile-nav-item {
    border-bottom: 1px solid #edf2f6;
  }

  .mobile-nav-item:last-child {
    border-bottom: none;
  }

  .mobile-nav-link {
    width: 100%;
    min-height: 66px;
    border: 0;
    background: transparent;
    color: #1a2331;
    font-size: 33px;
    line-height: 1.25;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    text-align: left;
    cursor: pointer;
    font-family: var(--family-font);
  }

  .mobile-nav-link {
    text-decoration: none;
    font-size: 20px;
  }

  .mobile-nav-arrow {
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
    transition: transform .22s ease;
    margin-left: 12px;
    flex-shrink: 0;
  }

  .mobile-nav-item.open .mobile-nav-arrow {
    transform: rotate(-135deg);
  }

  .mobile-nav-item>ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
    background: #f8fafc;
  }

  .mobile-nav-item.open>ul {
    max-height: 280px;
  }

  .mobile-nav-item>ul li a {
    display: block;
    color: #37485d;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 500;
    padding: 12px 16px;
    border-top: 1px solid #ebf0f5;
  }

  .mobile-nav-item>ul li a:hover {
    color: var(--primary-color);
    background-color: #f1f6fb;
  }
}

@media (max-width: 767px) {
  .mobile-header .container {
    padding: 0 12px;
  }

  .mobile-header-bar {
    height: 66px;
  }

  .mobile-nav-drawer {
    top: 66px;
  }

  .mobile-logo {
    font-size: 23px;
  }

  body.mobile-nav-open .mobile-nav-drawer {
    max-height: calc(100vh - 66px);
  }

  .mobile-nav-link {
    min-height: 58px;
    font-size: 17px;
  }

  .mobile-nav-item>ul li a {
    font-size: 15px;
    padding: 11px 16px;
  }
}

@media (max-width: 992px) and (orientation: landscape) {
  .mobile-nav-link {
    font-size: 18px;
  }

  .mobile-nav-item>ul li a {
    font-size: 14px;
  }
}

@media (max-width: 992px) and (orientation: portrait) {
  .mobile-nav-link {
    font-size: 20px;
  }

  .mobile-nav-item>ul li a {
    font-size: 16px;
  }
}

/* main content + footer responsive */
@media (max-width: 992px) {
  .main-page {
    padding-top: 74px;
  }




  .footer {
    padding: 30px 0 20px;
  }

  .footer-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
  }

  .footer-logo {
    font-size: 22px;
  }

  .footer-middle {
    grid-template-columns: 1fr 1fr;
    gap: 24px 12px;
    margin-top: 20px;
    padding-bottom: 22px;
  }

  .footer-column {
    gap: 12px;
  }

  .footer-column h2 {
    font-size: 17px;
    font-weight: 600;
    position: relative;
    padding-left: 10px;
  }

  .footer-column h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 47%;
    transform: translateY(-50%);
    width: 2px;
    height: 55%;
    background-color: var(--primary-color);
  }

  .column-wrapper.first {
    /* grid-template-columns: 1fr; */
    gap: 6px;
  }

  .footer-column ul {
    gap: 8px;
  }

  .footer-column ul li a {
    font-size: 14px;
    line-height: 1.5;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
  }

  .footer-bottom-left ul {
    flex-wrap: wrap;
    gap: 10px;
  }

  .footer-bottom-left ul li {
    padding-right: 10px;
  }

  .footer-bottom-right p {
    text-align: left;
  }
}

@media (max-width: 767px) {
  .main-page {
    padding-top: 66px;
  }





  .footer {
    padding-top: 24px;
  }

  .footer-middle {
    /* grid-template-columns: 1fr; */
    gap: 16px;
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
  }

  .footer-column:first-child {
    width: 100%;
  }

  .footer-column {
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, .16);
    width: 47%;
    gap: 15px;
  }

  .footer-column:last-child {
    border-bottom: none;
    padding-bottom: 0;
    width: 100%;
  }

  .footer-bottom-left ul li::after {
    display: none;
  }
}