body {
  font-family: "Helvetica Neue", Arial, "PingFang TC", "Microsoft JhengHei",
    sans-serif;
  margin: 0;
  background-color: #fff;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Header  --- */
.main-header {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* position: fixed; */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
}

.logo img {
  width: 180px;
  display: block;
}

/* --- 手機版：導覽列樣式 --- */
.main-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 230px;
  height: 100vh;
  background-color: #495472;
  padding-top: 80px;
  transition: right 0.3s ease-in-out;
  z-index: 999;
}

.main-nav.is-open {
  right: 0;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li a {
  display: block;
  padding: 15px 30px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  transition: background-color 0.2s;
}

.nav-menu li a:hover {
  background-color: #555;
}

/* --- 手機版：漢堡選單按鈕 --- */
.nav-toggle {
  display: block;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background-color: #445dc4;
  position: relative;
  transition: transform 0.3s, top 0.3s;
}
.hamburger::before {
  top: -8px;
}
.hamburger::after {
  top: 5px;
}

.nav-toggle.is-active {
  position: fixed;
  top: 25px;
  right: 20px;
}

.nav-toggle.is-active .hamburger {
  background-color: transparent;
}
.nav-toggle.is-active .hamburger::before {
  transform: rotate(45deg);
  top: -2px;
}
.nav-toggle.is-active .hamburger::after {
  transform: rotate(-45deg);
  top: -5px;
}
.nav-toggle.is-active .hamburger::before,
.nav-toggle.is-active .hamburger::after {
  background-color: #fff;
}
/* --- 電腦版樣式--- */
@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }

  .nav-toggle.is-active {
    position: relative;
    top: auto;
    right: auto;
  }

  .main-nav {
    position: static;
    right: auto;
    width: auto;
    height: auto;
    background-color: transparent;
    padding-top: 0;
    transition: none;
  }

  .nav-menu {
    display: flex;
    gap: 20px;
  }

  .nav-menu li a {
    padding: 5px;
    color: #445dc4;
    font-weight: 600;
    font-size: 18px;
    border-radius: 5px;
  }

  .nav-menu li a:hover {
    background-color: #f0f0f0;
    color: #0056b3;
  }
}

/* ----------------------------------------------------------- */
/* --- Banner 區塊 --- */
.banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  padding-top: 100px;
}

/* --- Header 導覽列 --- */
.banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}

.banner-header .logo {
  width: 200px;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.navbar {
  display: block;
}

/* 漢堡選單 */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: #333;
  margin: 4px 0;
  border-radius: 2px;
}

.banner-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 40px;
  position: relative;
  z-index: 1;
}

.banner-left {
  position: relative;
  width: 45%;
  min-width: 300px;
}

.banner-left img.base {
  width: 80%;
  position: relative;
  z-index: 1;
}

.base-wrapper {
  display: flex;
  justify-content: center;
}

.base-wrapper .base {
  opacity: 0;
  transform: translateY(-100px);
  animation: slideDown 1s ease-out forwards;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-100px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .base-wrapper {
    justify-content: flex-start;
    transform: translateX(100px);
  }
}

@media (max-width: 767px) {
  .base-wrapper {
    justify-content: center;
    transform: none;
  }
}

.banner-left img.overlay {
  width: 100%;
  position: absolute;
  top: -70px;
  left: -15px;
  z-index: 2;
  pointer-events: none;
  animation: flipY 3s linear infinite alternate;
  transform-origin: center center;
  display: inline-block;
}

@keyframes flipY {
  0% {
    transform: perspective(800px) rotateY(-12deg);
  }
  100% {
    transform: perspective(800px) rotateY(12deg);
  }
}

.banner-right {
  width: 50%;
  min-width: 350px;
  text-align: center;
}

.banner-right img {
  max-width: 100%;
}

/* --- 底部人物區 --- */
.banner-bottom {
  position: relative;
  text-align: center;
  margin-top: 20px;
}

.banner-bottom img.characters {
  max-width: 100%;
  position: relative;
  z-index: 1;
  margin-bottom: 130px;
}

.banner-bottom svg {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  z-index: 2;
}

.banner-bottom svg path {
  fill: #445dc4;
}

/* --- RWD --- */
@media (min-width: 1921px) {
  .banner-bottom img.characters {
    margin-bottom: 145px;
  }
}
@media (max-width: 1595px) {
  .banner-bottom img.characters {
    margin-bottom: 110px;
  }
}
@media (max-width: 1330px) {
  .banner-bottom img.characters {
    margin-bottom: 100px;
  }
}
@media (max-width: 1200px) {
  .banner-bottom img.characters {
    margin-bottom: 85px;
  }
}
@media (max-width: 1050px) {
  .banner-bottom img.characters {
    margin-bottom: 70px;
  }
}

@media (max-width: 875px) {
  .banner-bottom img.characters {
    margin-bottom: 60px;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .hamburger {
    font-size: 28px;
    cursor: pointer;
    display: block;
  }

  .navbar {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #fff;
  }

  .navbar.active {
    display: block;
  }

  .navbar ul {
    list-style: none;
    margin: 0;
    padding: 10px;
  }

  .navbar ul li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
  }

  .banner {
    padding-top: 50px;
  }

  .banner-content {
    flex-direction: column;
    text-align: center;
  }

  .banner-left,
  .banner-right {
    width: 100%;
  }

  .banner-right {
    margin-top: 20px;
  }

  .banner-bottom {
    display: none;
  }

  .banner-left img.overlay {
    top: -50px;
  }
}
/* ---------------------------------------------------------- */
/* Video Section */
.video-section {
  background-color: #445dc4;
  padding: 40px 20px;
  text-align: center;
}

.video-section iframe {
  width: 1120px;
  height: 630px;
  border: none;
}

@media (max-width: 1300px) {
  .video-section iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* Action Buttons */
.action-bg {
  background-color: #193693;
  padding: 30px 0px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
  padding: 0 5%;
}

.action-btn {
  background-color: #b4c4ef;
  color: #193693;
  padding: 30px 15px;
  text-align: center;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  opacity: 0;
  transform: translateY(30px);

  /* 關鍵：設定過渡效果，這就是我們的「動畫」本身 */
  /* 我們讓 opacity 和 transform 的變化在 0.6 秒內完成 */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.action-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 3. (可選，但強烈推薦) 為每個方塊設定不同的過渡延遲，創造輪流出現效果 */
.action-btn:nth-child(1) {
  transition-delay: 0.1s;
}
.action-btn:nth-child(2) {
  transition-delay: 0.2s;
}
.action-btn:nth-child(3) {
  transition-delay: 0.3s;
}
.action-btn:nth-child(4) {
  transition-delay: 0.4s;
}
.action-btn:nth-child(5) {
  transition-delay: 0.5s;
}
.action-btn:nth-child(6) {
  transition-delay: 0.6s;
}

.action-btn:hover {
  background-color: #d4e3fc;
  text-decoration: none;
}

.action-btn img {
  width: 140px;
}

.action-btn span {
  color: #758dc6;
}

.action-btn h1 {
  margin-top: 5px;
}

/* Info Sections */
@keyframes slide-in-left {
  0% {
    transform: translateX(-100px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.info-bg {
  background-color: #445dc4;
  padding: 30px 0px;
}
.info-sections {
  padding: 0 5%;
}

.info-section {
  background-color: #6a83d3;
  color: white;
  padding: 25px 30px;
  margin-bottom: 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.info-section.animate {
  animation: slide-in-left 1s ease-out forwards;
}

.info-section:nth-child(1) {
  animation-delay: 0s;
}
.info-section:nth-child(2) {
  animation-delay: 0.2s;
}
.info-section:nth-child(3) {
  animation-delay: 0.4s;
}

.info-main-img {
  flex: 0 0 180px;
}

.info-main-img img {
  max-width: 100%;
  height: auto;
  display: block;
}

.info-content {
  flex: 1;
}

.title-container {
  text-align: left;
  margin-bottom: 25px;
}

.info-section h2 {
  background-color: #193693;
  border-radius: 50px;
  padding: 10px 30px;
  font-size: 36px;
  font-weight: 700;
  display: inline-block;
  margin: 0;
}

.info-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.info-section li {
  margin-bottom: 25px;
  position: relative;
  padding-left: 45px;
  line-height: 1.6;
}

.info-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  background-image: url("../images/arrow.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 35px;
  height: 35px;
}

.highlight {
  background-color: #ffe26e;
  color: #193693;
  padding: 2px 8px;
  margin: 0 5px;
  font-weight: 700;
}

.discount-number {
  font-size: 45px;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  margin-left: 8px;
  margin-right: 2px;
}

@media (max-width: 768px) {
  .info-section {
    flex-direction: column;
    padding: 25px 20px;
  }

  .info-main-img {
    flex-basis: auto;
    width: 200px;
    margin-bottom: 20px;
  }

  .info-section h2 {
    font-size: 30px;
  }

  .discount-number {
    font-size: 40px;
  }
}

/* QR Codes */
.qr-codes {
  text-align: center;
  margin-top: 20px;
}
.qr-codes p {
  color: #fff;
  font-weight: 600;
  margin-bottom: 20px;
}

.qr-codes a {
  text-decoration: none;
  color: #fff;
}

.qr-codes a:hover {
  color: #ffe26e;
}

.qr-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-placeholder {
  margin-bottom: 5px;
}

.qr-placeholder img {
  width: 80px;
}

/* ----------------------------------------------------- */
.category-link {
  text-align: center;
}

.category-link a {
  background-color: #ffe26e;
  color: #193693;
  text-decoration: none;
  font-size: 36px;
  padding: 10px 30px;
  border-radius: 50px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease-out;
}

.category-link a:hover {
  transform: scale(1.05);
}

.category-link a::after {
  content: "";
  border: solid #193693;
  border-width: 0 4px 4px 0;
  display: inline-block;
  padding: 6px; /* 箭頭的大小 */
  transform: rotate(-45deg);
  margin-left: 10px;
  transition: transform 0.3s ease;
  position: relative;
  top: 2px;
}
@media (max-width: 768px) {
  .category-link a {
    font-size: 30px;
  }
}

/* About Us */
.about-us {
  background-color: #6a83d3;
  color: white;
  padding: 40px;
  border-radius: 10px;
  margin: 40px 5%;
  font-size: 1.15rem;
}
.about-us h1 {
  background-color: #193693;
  margin-bottom: 20px;
  display: inline-block;
  border-radius: 30px;
  padding: 5px 15px;
}

/* Footer */
footer {
  background-color: #061947;
  color: white;
  padding: 20px;
  text-align: center;
}

.footer-logo {
  width: 300px;
}

.social-icons {
  margin-top: 10px;
}

.social-icons a {
  color: white;
  text-decoration: none;
  font-size: 24px;
  margin: 0 10px;
}

.social-icons img {
  width: 45px;
}

@media (max-width: 992px) {
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .action-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .action-buttons {
    grid-template-columns: 1fr;
  }
}

/* ========================================= */
/* --- 7. 回到頂部 (Back to Top) 按鈕 --- */
/* ========================================= */

#back-to-top-btn {
  /* --- 定位 --- */
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999; /* 確保在大部分內容之上 */

  /* --- 外觀 --- */
  width: 50px;
  height: 50px;
  background-color: #2c4a8a; /* 按鈕背景色 (深藍色) */
  color: #fff; /* 箭頭顏色 (白色) */
  border: none;
  border-radius: 50%; /* 圓形按鈕 */
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

  /* --- 內容對齊 --- */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  text-decoration: none;

  /* --- 顯示/隱藏動畫 --- */
  opacity: 0; /* 預設透明 */
  visibility: hidden; /* 預設隱藏，無法點擊 */
  transform: translateY(15px); /* 輕微的向上滑動效果 */
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

/* 當按鈕可見時的樣式 */
#back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 滑鼠懸停時的效果 */
#back-to-top-btn:hover {
  background-color: #3b5a9a; /* 加深一點顏色 */
}
