html,
body {
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Noto Sans TC", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: always;
  -webkit-user-select: none;
  /* Chrome all / Safari all */
  -moz-user-select: none;
  /* Firefox all */
  -ms-user-select: none;
  /* IE 10+ */
  user-select: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  /*scroll-behavior: smooth;*/
}

body {
  background-color: #e7e9eb;
  overflow-y: hidden;
  /* 在 loading 顯示時禁止捲動 */
}

img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

button:focus,
button:active,
input[type="button"]:focus,
input[type="submit"]:focus,
a.btn:focus {
  outline: none;
  box-shadow: none;
}

section {
  position: relative;
}

section.gy {
  padding: 0 0 80px 0;
}

section.bu {
  background-color: #00b4c4;
  margin: calc(100vw * 0.2217) 0;
}

section.bu::before, section.bu::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  width: 100%;
  height: calc(100vw * 0.2217);
  /* 斜率固定12.5度 */
  background-color: #00b4c4;
}

section.bu::before {
  top: 0;
  clip-path: polygon(100% 100%, 100% 0, 0 100%);
  transform: translateY(calc(-100% + 1px));
}

section.bu::after {
  bottom: 0;
  clip-path: polygon(100% 0, 0 0, 0 100%);
  transform: translateY(calc(100% - 1px));
}

section.wt {
  background-color: #fff;
  margin: calc(100vw * 0.2217) 0;
}

section.wt::before, section.wt::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  width: 100%;
  height: calc(100vw * 0.2217);
  /* 斜率固定12.5度 */
  background-color: #fff;
}

section.wt::before {
  top: 0;
  clip-path: polygon(100% 100%, 100% 0, 0 100%);
  transform: translateY(calc(-100% + 1px));
}

section.wt::after {
  bottom: 0;
  clip-path: polygon(100% 0, 0 0, 0 100%);
  transform: translateY(calc(100% - 1px));
}

section.bu2 {
  background-color: #00b4c4;
  margin: calc(100vw * 0.2217) 0 0 0;
  padding: 0;
}

section.bu2::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  width: 100%;
  height: calc(100vw * 0.2217);
  /* 斜率固定12.5度 */
  background-color: #00b4c4;
  clip-path: polygon(100% 0, 0 0, 0 100%);
  top: 0;
  clip-path: polygon(100% 100%, 100% 0, 0 100%);
  transform: translateY(calc(-100% + 1px));
}

/* Loading */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}


.loader-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}


.percent {
  font-size: 14px;
  font-weight: 600;
  color: #00b4c4;
  line-height: 1;
  letter-spacing: 0.2px;
  user-select: none;
}


.bar-bg {
  width: 100%;
  height: 2px;
  background: #ddd;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}


.bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: #00b4c4;
  height: 100%;
  transform-origin: left center;
  transition: width 300ms cubic-bezier(.2, .9, .1, 1);
}


.loaded {
  animation: fadeOut 500ms ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden
  }
}

/* Header */

.video-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.video-frame video {
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
}

.video-frame .topic {
  position: absolute;
  z-index: 2;
  width: auto;
  height: 50%;
  left: 50%;
  top: 20%;
  transform: translateX(-90%);
}

.video-frame .cover {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 30%;
  left: 0;
  bottom: 0;
  display: block;
  background: linear-gradient(0deg, rgba(10, 62, 73, 1) 30%, rgba(10, 62, 73, 0) 100%);
}

@media only screen and (max-width: 766px) {
  .video-frame {
    aspect-ratio: 9 / 11;
  }

  .video-frame video {
    object-position: 65% center;
  }

  header .video-frame .topic {
    top: 10%;
    width: 75%;
    height: auto;
    left: 10%;
    transform: translateX(0);
  }
}

.topic-text {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-bottom: 80px;
}

.topic-text .container {
  z-index: 2;
  position: relative;
  transform: translateY(-60%);
}

.topic-text::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 100%;
  height: calc(10% + 1px);
  top: -1px;
  background-color: #0a3e49;
}

.topic-text::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: 90%;
  left: 0;
  width: 100%;
  height: calc(100vw * 0.2217);
  /* 斜率固定12.5度 */
  background-color: #0a3e49;
  clip-path: polygon(100% 0, 0 0, 0 100%);
  transform: translateY(calc(100% - 1px));
}

.topic-text p {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 2;
  text-align: justify;
  margin-bottom: 40px;
}

.topic-text h3 {
  color: #feec4a;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 25px;
}

@media only screen and (max-width: 766px) {
  .topic-text .container {
    transform: translateY(-5%);
  }

  .topic-text::before {
    height: calc(80% + 1px);
  }

  .topic-text::after {
    bottom: 20%;
  }

  .topic-text p {
    font-size: 16px;
  }
}

/* Ai Form */
.ai-frame {
  width: 100%;
  padding: 20px 30px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 3px 3px 5px 0px rgba(0, 0, 0, 0.3);
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input[type="text"] {
  width: 100%;
  padding: 10px 40px 10px 20px;
  /* 右側留出按鈕空間 */
  border: 1px solid #00b4c4;
  border-radius: 25px;
  font-size: 16px;
  box-sizing: border-box;
  transition: all .2s ease-in;
}

.input-wrapper input::placeholder {
  font-size: 16px;
  color: #00b4c4;
}

.input-wrapper input:focus {
  outline: none;
  border: 1px solid #00b4c4;
}

.input-wrapper button {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background-color: #00b4c4;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease-in;
}

.input-wrapper button:hover {
  background-color: #075d65;
}

/* 可選：icon用 font-awesome 或 SVG */
.input-wrapper button svg {
  width: 16px;
  height: 16px;
}

#ai-answer {
  z-index: 2;
  width: 100%;
  height: 0;
  clip-path: inset(0 0 100% 0);
  /* 初始隱藏 */
  overflow: hidden;
  transition: clip-path 0.3s ease-in-out;
}

#ai-answer.active {
  height: auto;
  clip-path: inset(0 0 0 0);
  /* 展開 */
}

#ai-answer .inner {
  margin: 20px 0 0 0;
  padding: 20px 30px;
  background-color: #eee;
  border-radius: 10px;
}

#ai-answer h4 {
  font-size: 20px;
  font-weight: 600;
  color: #00b4c4;
  margin: 0 0 20px 0;
}

#ai-answer p {
  font-size: 15px;
  font-weight: 400;
  color: #111;
  margin: 0 0 0 0;
  line-height: 1.75;
  letter-spacing: 0;
}

/* Deco */

.dc1 {
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: -5%;
  width: 20%;
  height: auto;
}

.dc2 {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 30%;
  width: 8%;
  height: auto;
}

.dc3 {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  width: 13%;
  height: auto;
  transform: translateY(-120%);
}

.dc4 {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 0;
  width: 18%;
  height: auto;
  transform: translateY(120%);
}

.dc5 {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  width: 14%;
  height: auto;
  transform: translateY(-120%);
}

.dc6 {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 0;
  width: 13%;
  height: auto;
}

@media only screen and (max-width: 766px) {
  .dc5 {
    transform: translateY(-40%);
  }

  .dc6 {
    transform: translateY(100%);
  }
  
}

/* Content Text */

.content-text h3 {
  display: flex;
  align-items: center;
  color: #00b4c4;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

.content-text.wt h3 {
  color: #fff;
}

.content-text h3 img {
  display: inline-block;
  width: auto;
  height: 35px;
  margin: 0 15px 0 0;
}

.content-text h4 {
  color: #feec4a;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.75;
  margin: 0 0 10px 0;
}

.content-text h5 {
  color: #feec4a;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.75;
  margin: 0 0 10px 0;
}

.content-text.bk h5 {
  color: #00b4c4;
}

.content-text.bk2 h5 {
  color: #111;
}

.content-text p {
  color: #fff;
  font-size: 16px;
  font-weight: 450;
  line-height: 1.75;
  margin: 0 0 20px 0;
}

.content-text.bk p {
  color: #111;
}

/* Content Block */
.content-pic {
  position: relative;
  z-index: 1;
}

.content-move {
  margin: -150px 0 0 0;
  transform: translateX(-25%);
}

.content-move.alt {
  margin: -30px 0 0 0;
  transform: translateX(-25%);
}

.trapezoid {
  position: relative;
  padding: 80px 100px 60px 100px;
}

.trapezoid::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background-color: #00b4c4;
  transform: skewX(-22deg);
}

.trapezoid.wt::before {
  background-color: #fff;
}

@media (min-width:767px) and (max-width:1010px) {
  .content-move, .content-move.alt {
    margin: -30px 0 0 0;
    transform: translateX(0%);
  }

  .trapezoid {
    position: relative;
    padding: 60px 60px 50px 60px;
  }
}

@media only screen and (max-width: 766px) {
  .content-move, .content-move.alt {
    margin: -20px 0 0 0;
    transform: translateX(0);
  }

  .trapezoid {
    position: relative;
    padding: 40px 30px;
  }

  .trapezoid::before {
    width: 140%;
    left: -20%;
  }
}

.btn-or {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  padding: 8px 15px;
  text-align: center;
  border-radius: 16px;
  background: #FF5F29;
  background: linear-gradient(90deg,rgba(255, 95, 41, 1) 0%, rgba(255, 176, 0, 1) 100%);
  transition: all .2s ease-in;
}

.btn-or:hover {
  color: #fff;
  text-decoration: none;
  background: #d03e0e;
}

a.book img {
  transition: all .2s ease-in;
}

a.book:hover img {
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.3);
}

.footer {
  padding: 80px 0 40px 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer img {
  width: auto;
  height: 60px;
  margin: 0 10px 0 0;
}

.footer span {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  line-height: 1;
  letter-spacing: 1px;
}

@media only screen and (max-width: 766px) {
  .footer {
    flex-direction: column;
  }
  .footer img {
    height: 40px;
    margin: 0 0 10px 0;
  }
  .footer span {
    font-size: 13px;
  }
}

/* Top Btn */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: #333;
  color: white;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 999;
}

/* 顯示狀態 */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.navbar {
  padding: 0;
}

.full-screen-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100vh;
  background: #fff;
  clip-path: inset(0 0 0 100%);
  -webkit-clip-path: inset(0 0 0 100%);
  transition: clip-path 0.3s ease-in-out;
}

.full-screen-nav.show {
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
}

.full-screen-nav .navbar-nav {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  height: 100%;
  padding: 80px 0 0 0;
}

.full-screen-nav .nav-link {
  font-size: 16px;
  font-weight: 600;
  color: #00b4c4;
  margin: 8px 0 0 20px;
  transition: clip-path 0.3s ease-in-out;
}

.full-screen-nav .nav-link:hover {
  color: #075d65;
}

.custom-toggler {
  position: relative;
  z-index: 9999;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 1);
  cursor: pointer;
  margin: 20px 20px 0 0; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: all .2s ease-in;
}

.custom-toggler.active {
  box-shadow: 0 2px 6px rgba(0,0,0,0);
}

.custom-toggler .bar {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 3px;
  background-color: #075d65;
  border-radius: 2px;
  transform-origin: center;
  transition: 0.4s;
}

.custom-toggler .bar:nth-child(1) {
  top: calc(50% - 8px);
  transform: translateX(-50%);
}

.custom-toggler .bar:nth-child(2) {
  top: 53%;
  transform: translate(-50%, -50%);
}

.custom-toggler .bar:nth-child(3) {
  top: calc(50% + 8px);
  transform: translateX(-50%);
}

/* 點擊後動畫 */
.custom-toggler.active .bar:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
  top: 50%;
}

.custom-toggler.active .bar:nth-child(2) {
  opacity: 0;
}

.custom-toggler.active .bar:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
  top: 50%;
}

/* Bootstrap 4 style: add a custom ratio 6by19 (width:height = 6:19) */
.embed-responsive-6by19 {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 6 / 11;
}

.embed-responsive-6by19 .embed-responsive-item,
.embed-responsive-6by19 iframe,
.embed-responsive-6by19 embed,
.embed-responsive-6by19 object,
.embed-responsive-6by19 video {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
  border: 0;
}