* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  overflow-x: hidden;
  font-family:
    "Noto Sans TC",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

/* 導覽列主體 */
.main-nav {
  background-color: #23489b;
  width: 100%;
  height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  z-index: 100;
}

.nav-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo & 分享圖示樣式 */
.logo img {
  height: 60px;
  width: auto;
  display: block;
}
.share-group {
  display: flex;
  align-items: center;
  gap: 15px;
}
.share-text {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
}
.share-link img {
  width: 40px;
  height: 40px;
  display: block;
}

/* --- CSS 波浪繪製區 --- */
.main-nav::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;

  /* 在這裡設定波浪的「深度 (高度)」 */
  bottom: -20px; /* 必須與 height 的負值相同 */
  height: 20px;

  /* 已經加入 preserveAspectRatio='none'，並優化了平滑曲線 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,0 L100,50 C75,50 75,100 50,100 C25,100 25,50 0,50 Z' fill='%2323489b'/%3E%3C/svg%3E");

  /* 2. 在這裡設定波浪的「寬度 (週期)」。
       前面的數值 (50px) 是單一波浪的寬度，越寬越平緩。
       後面的數值必須固定為 100%，讓它自動貼合上方設定的 height。 */
  background-size: 50px 100%;

  background-repeat: repeat-x;
  background-position: center top;
}

/* 響應式微調 */
@media (max-width: 768px) {
  .main-nav {
    height: 60px;
  }
  .nav-container {
    padding: 0 15px;
  }
  .logo img {
    height: 50px;
  }
}

/* =========================================
   Hero 區塊主視覺排版 (完美比例疊合策略)
========================================= */

.hero-section {
  width: 100%;
  background: url("../images/background.png") repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 50px 20px 80px;
}

.hero-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- 核心主圖群組 --- */
.hero-graphic-group {
  position: relative;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.hero-graphic-group img {
  width: 100%;
  height: auto;
  display: block;
}

/* 1. 主標題 (最上方) */
.main-title {
  position: relative;
  width: 50%;
  z-index: 5;
}

/* 2. 副標題 55 (中間) */
.sub-title {
  position: relative;
  width: 35%;
  z-index: 4;
  margin-top: -2%;
}

/* 3. 禮物盒與貓咪 (底部) */
.gift-box {
  position: relative;
  width: 100%;
  z-index: 3;
  margin-top: -23%;
}

/* 4. 優惠訊息  */
.promo-text {
  position: absolute;
  width: 60%;
  bottom: 13%; /* 固定在緞帶位置 */
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}

/* 5. 活動時間 (右上角) */
.event-time {
  position: absolute;
  width: 16%;
  top: 8%;
  right: 3%;
  z-index: 10;
}

/* --- 快速連結區塊 (按鈕) --- */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  width: 100%;
  max-width: 1000px;
  z-index: 10;
  margin-bottom: 50px;
}

/* =========================================
   按鈕彈出動畫 
========================================= */

.link-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  flex-basis: calc(25% - 15px);
  min-width: 180px;
  max-width: 250px;
  opacity: 0;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  animation-delay: calc(var(--order, 1) * 0.15s) !important;
}

.link-btn.is-visible {
  animation-name: btnPopIn;
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation-fill-mode: forwards;
}

.link-btn img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.link-btn:hover {
  transform: scale(1.05) translateY(-3px) !important;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* 強化彈出動畫 */
@keyframes btnPopIn {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(40px);
  }
  70% {
    opacity: 1;
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* =========================================
   手機版與平板適配 (RWD)
========================================= */
@media (max-width: 992px) {
  .main-title {
    width: 65%;
  }
  .sub-title {
    width: 35%;
  }
  .link-btn {
    flex-basis: calc(33.333% - 15px);
  } /* 平板一行 3 個 */
}

@media (max-width: 768px) {
  .hero-section {
    padding: 40px 15px 60px;
  }

  .event-time {
    width: 18%;
    top: 9%;
    right: 2%;
  }

  .quick-links {
    gap: 12px;
  }

  .link-btn {
    height: auto;
    flex-basis: calc(50% - 7px);
    min-width: 0;
  }

  .link-btn img {
    width: 95%;
    height: auto;
  }

  /* 處理最後一顆落單按鈕靠左對齊  */
  .link-btn:last-child:nth-child(odd) {
    margin-right: auto;
  }
}

@media (max-width: 500px) {
  .quick-links {
    gap: 8px;
  }

  .link-btn {
    flex-basis: calc(50% - 5px);
  }

  .link-btn img {
    width: 85%;
  }

  .event-time {
    top: 16%;
    right: 4%;
  }

  .main-title {
    width: 75%;
  }

  .promo-text {
    width: 62%;
  }

  .hero-section {
    padding: 40px 0px 60px;
  }

  .hero-graphic-group {
    width: 110%;
    margin-left: -5%;
  }
}

/* ==========================================================================
   Hero 區塊開場動畫 
========================================================================== */

/* 初始狀態：將所有要進場的元素隱藏 */
.main-title,
.sub-title,
.gift-box,
.event-time,
.promo-text {
  opacity: 0;
  will-change: transform, opacity;
}

/* 主標題：從上往下 (落差：0.2s 開始 / 持續放慢至：1.2s) */
.main-title {
  animation: heroSlideDown 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

/* 副標題：從下往上 (落差：0.6s 開始 / 持續放慢至：1.2s) */
.sub-title {
  animation: heroSlideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

/* 禮物盒與貓咪：原地淡入 (落差：1.0s 開始 / 持續放慢至：1.5s 緩緩浮現) */
.gift-box {
  animation: heroFadeIn 1.5s ease-out 1s forwards;
}

/* 活動時間：彈出 + 無限上下晃動 (落差：1.4s 開始 / 持續放慢至：0.8s) */
.event-time {
  animation:
    eventPopIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.4s forwards,
    heroSway 3.5s ease-in-out 2.2s infinite;
}

/* 優惠訊息：在緞帶處從上往下 (落差：1.8s 開始 / 持續放慢至：1.0s) */
.promo-text {
  animation: promoSlideDown 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.8s
    forwards;
}
/* =========================================
   定義動畫路徑 (Keyframes)
========================================= */

/* 一般從上往下 */
@keyframes heroSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 一般從下往上 */
@keyframes heroSlideUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 原地淡入 */
@keyframes heroFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* promo-text 的進場 */
@keyframes promoSlideDown {
  0% {
    opacity: 0;
    transform: translate(-50%, -30px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* 活動時間專用的彈出放大 */
@keyframes eventPopIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 活動時間專用的無限上下柔和晃動 */
@keyframes heroSway {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* --- 向下箭頭樣式 --- */
.scroll-down-integrated {
  position: relative;
  margin-top: 10px;
  width: 36px;
  height: 36px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 10;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;

  animation: scrollFlowIntegrated 2s infinite ease-in-out;
}

.integrated-arrow {
  width: 20px;
  height: 20px;
  display: block;
}

@keyframes scrollFlowIntegrated {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  30% {
    transform: translateY(0px);
    opacity: 1;
  }
  70% {
    transform: translateY(15px);
    opacity: 1;
  }
  100% {
    transform: translateY(25px);
    opacity: 0;
  }
}

/* ==========================================================================
   影片區塊 
========================================================================== */

.wave-section-blue {
  background-color: #23489b !important;
  width: 100%;
  position: relative;
  padding: 50px 0;
  z-index: 20;
  overflow: visible !important;
}

/* --- 頂部波浪紋 --- */
.wave-section-blue .top-wave {
  position: absolute;
  top: -19px;
  left: 0;
  width: 100%;
  height: 20px;
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 L100,100 L100,50 C75,50 75,0 50,0 C25,0 25,50 0,50 Z' fill='%2323489b'/%3E%3C/svg%3E");

  background-size: 50px 100%;
  background-repeat: repeat-x;
  background-position: center bottom;
  z-index: 25;
}

/* --- 內容容器 --- */
.section-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: center;
}

/* =========================================
   分離動畫層：外層負責「漂浮」，內層負責「縮放」
========================================= */

/* 彈跳進場 + 無限漂浮 */
.wave-section-blue .video-animate-wrapper {
  opacity: 0;
  will-change: transform, opacity;
  transform-origin: center center;
}

/* 無限漂浮 */
.wave-section-blue .video-animate-wrapper.is-visible {
  animation:
    scalePopInVideo 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
    floatGlowVideo 4s ease-in-out 0.8s infinite;
}

.wave-section-blue .video-animate-wrapper:hover {
  animation-play-state: paused;
}

.promo-video-link {
  display: block;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
  transform-origin: center center;
}

.promo-video-link:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.5));
}

.promo-img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 900px;
}

/* =========================================
   動畫 Keyframes 定義
========================================= */

/* 彈跳進場  */
@keyframes scalePopInVideo {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(40px);
  }
  70% {
    opacity: 1;
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 漂浮 + 柔和呼吸光暈 */
@keyframes floatGlowVideo {
  0%,
  100% {
    transform: translateY(0);
    /* 原始無光暈狀態的陰影 */
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
  }
  50% {
    transform: translateY(-12px); /* 向上漂浮 12px */
    filter: drop-shadow(0 15px 25px rgba(124, 169, 237, 0.7));
  }
}

/* --- 手機版微調 --- */
@media (max-width: 768px) {
  .wave-section-blue {
    padding: 60px 0;
  }
  .section-container {
    padding: 0 20px;
  }

  .promo-img {
    max-width: 450px;
  }
}

/* 週年慶五個行銷區塊 */
/* ==========================================================================
  全域共用與進場動畫
========================================================================== */
.js-animate-item {
  opacity: 0;
  will-change: transform, opacity;
}

/* 共用進場初始位置 */
.slide-left,
.animate-left {
  transform: translateX(-100px);
}
.slide-right,
.animate-right {
  transform: translateX(100px);
}

/* 共用進場動畫觸發 */
.slide-left.is-visible,
.animate-left.is-visible {
  animation: globalSlideLeftIn 1s ease-out forwards;
}
.slide-right.is-visible,
.animate-right.is-visible {
  animation: globalSlideRightIn 1s ease-out forwards;
  animation-delay: 0.1s;
}

/* 共用進場 Keyframes */
@keyframes globalSlideLeftIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes globalSlideRightIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 優惠標籤彈出動畫*/
.pop-in {
  transform: scale(0.5);
  opacity: 0;
}
.pop-in.is-visible {
  animation: popInBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.stagger-1.is-visible {
  animation-delay: 0.3s;
}
.stagger-2.is-visible {
  animation-delay: 0.6s;
}
@keyframes popInBounce {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 標題文字 Hover 特效 */
.promo-title-link {
  display: inline-block;
  position: relative;
  transition:
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    filter 0.3s ease;
  will-change: transform, filter;
}
.promo-title-link img {
  display: block;
  width: 100%;
  height: auto;
}
.promo-title-link:hover {
  transform: translateY(-5px) scale(1.03);
  filter: drop-shadow(0 15px 20px rgba(50, 50, 93, 0.15));
}

/* ==========================================================================
   2. 各區塊專屬動畫
========================================================================== */

/* 周年慶貓咪晃動 */
.promo-cat-link {
  display: inline-block;
  position: relative;
  transform-origin: center center;
  animation: gentleSway 3s ease-in-out infinite;
  transition: filter 0.3s ease;
  will-change: transform;
}
.promo-cat-link img {
  display: block;
  width: 100%;
  height: auto;
}
.promo-cat-link:hover {
  animation-play-state: paused;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}
@keyframes gentleSway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(3deg);
  }
  75% {
    transform: rotate(-3deg);
  }
}

/* 新課首發貓咪呼吸 */
.promo-cat-link-pulse {
  display: inline-block;
  position: relative;
  animation: pulseGentle 2.5s ease-in-out infinite;
  transition: filter 0.3s ease;
  will-change: transform;
}
.promo-cat-link-pulse img {
  display: block;
  width: 100%;
  height: auto;
}
.promo-cat-link-pulse:hover {
  animation-play-state: paused;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}
@keyframes pulseGentle {
  0%,
  100% {
    transform: scale(0.98);
  }
  50% {
    transform: scale(1.04);
  }
}

/* 揪團學習貓咪開車 */
.promo-car-link {
  display: inline-block;
  position: relative;
  animation: carDriving 3s ease-in-out infinite;
  transition: filter 0.3s ease;
  will-change: transform;
}
.promo-car-link img {
  display: block;
  width: 100%;
  height: auto;
}
.promo-car-link:hover {
  animation-play-state: paused;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
}
@keyframes carDriving {
  0%,
  100% {
    transform: translateX(0px) translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateX(8px) translateY(-3px) rotate(1deg);
  }
  66% {
    transform: translateX(14px) translateY(1.5px) rotate(-1deg);
  }
}

/* 線上學習貓咪 3D翻轉 */
.promo-cat-link-flip {
  display: inline-block;
  position: relative;
  perspective: 800px;
  animation: digitalFlip 4s ease-in-out infinite;
  transition: filter 0.3s ease;
  will-change: transform;
}
.promo-cat-link-flip img {
  display: block;
  width: 100%;
  height: auto;
}
.promo-cat-link-flip:hover {
  animation-play-state: paused;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
}
@keyframes digitalFlip {
  0%,
  100% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(15deg);
  }
}

/* 50+貓咪舉牌  */
.promo-cat-link-bounce {
  display: inline-block;
  position: relative;
  animation: signBounce 3s ease-in-out infinite;
  transition: filter 0.3s ease;
  will-change: transform;
}
.promo-cat-link-bounce img {
  display: block;
  width: 100%;
  height: auto;
}
.promo-cat-link-bounce:hover {
  animation-play-state: paused;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
}
@keyframes signBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-13px);
  }
}

/* 揪團學習群組特效 */
.promo-group-link {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  width: 100%;
  transition:
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    filter 0.3s ease;
  will-change: transform, filter;
}
.promo-group-link:hover {
  transform: translateY(-5px) scale(1.02);
  filter: drop-shadow(0 15px 20px rgba(50, 50, 93, 0.15));
}

/* ==========================================================================
   3. 各區塊基礎樣式與排版
========================================================================== */

/* 共用容器設定 */
.section-container,
.promo-container-flex,
.group-container-flex {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.flex-wrapper,
.promo-container-flex,
.group-container-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.flex-wrapper {
  justify-content: space-between;
  gap: 50px;
}
.promo-container-flex {
  justify-content: center;
  gap: 40px;
}
.group-container-flex {
  justify-content: space-between;
  gap: 40px;
}
.content-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}
.content-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 500px;
}

/* 1. 週年慶專屬優惠 (黃) */
.promo-section-yellow {
  background-color: #f7e877;
  width: 100%;
  padding: 80px 0;
}
.promo-text-wrap {
  flex: 1;
  max-width: 450px;
  display: flex;
  justify-content: flex-end;
}
.promo-img-wrap {
  flex: 1.2;
  max-width: 600px;
  display: flex;
  justify-content: flex-start;
}
.promo-text-wrap img,
.promo-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* 2. 新課首發 (深藍) */
.wave-section-blue {
  background-color: #3d5cae;
  width: 100%;
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

/* 3. 揪團學習省更多 (綠) */
.promo-section-green {
  background-color: #bfe0aa;
  width: 100%;
  padding: 80px 0;
  overflow: hidden;
}
.group-left-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 30px;
}
.group-title {
  width: 100%;
  max-width: 450px;
}
.group-title img {
  width: 100%;
  height: auto;
  display: block;
}
.discount-badges {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  width: 100%;
  margin-top: 20px;
}
.badge {
  flex: 1;
  max-width: 120px;
}
.badge img {
  width: 100%;
  height: auto;
  display: block;
}
.group-right-wrap {
  flex: 1.2;
  max-width: 600px;
  display: flex;
  justify-content: center;
}
.group-right-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* 4. 線上學習零距離 (粉) */
.promo-section-pink {
  background-color: #f29891;
  width: 100%;
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}
.promo-section-pink .online-img-wrapper,
.promo-section-pink .online-text-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 500px;
}
.promo-section-pink .online-img-wrapper img,
.promo-section-pink .online-text-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* 5. 50+ 滿足條件 (橄欖綠) */
.promo-section-olive {
  background-color: #d2d3ae;
  width: 100%;
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}
.promo-section-olive .senior-text-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 380px;
}
.promo-section-olive .senior-img-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 550px;
}
.promo-section-olive .senior-text-wrapper img,
.promo-section-olive .senior-img-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   4. 手機版 (RWD) 統一管理
========================================================================== */
@media (max-width: 768px) {
  /* 共用滑入偏移量縮小 */
  .slide-left,
  .animate-left {
    transform: translateX(-50px);
  }
  .slide-right,
  .animate-right {
    transform: translateX(50px);
  }

  /* 間距縮小 */
  .promo-section-yellow,
  .promo-section-green {
    padding: 50px 0;
  }
  .wave-section-blue,
  .promo-section-pink,
  .promo-section-olive {
    padding: 60px 0;
  }

  /* Flex 排版改為垂直堆疊 */
  .promo-container-flex,
  .group-container-flex,
  .flex-wrapper {
    flex-direction: column;
    padding: 0 20px;
    gap: 30px;
  }
  .group-container-flex {
    gap: 40px;
  }

  /* 寬度釋放與置中限制 */
  .promo-text-wrap,
  .promo-img-wrap,
  .group-left-wrap,
  .group-right-wrap {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
  }
  .promo-text-wrap img {
    max-width: 350px;
  }
  .promo-section-pink .online-img-wrapper,
  .promo-section-pink .online-text-wrapper,
  .promo-section-olive .senior-text-wrapper,
  .promo-section-olive .senior-img-wrapper {
    max-width: 100%;
  }

  /* 徽章區塊與揪團連結調整 */
  .discount-badges {
    gap: 10px;
    justify-content: center;
  }
  .badge {
    max-width: 90px;
  }
  .promo-group-link {
    align-items: center;
  }

  /* 新課首發與線上學習的「標題文字」在上方 */
  #new-course .flex-wrapper .animate-right,
  #online-learning .flex-wrapper .animate-right {
    order: -1;
  }
  #new-course .flex-wrapper .animate-left,
  #online-learning .flex-wrapper .animate-left {
    order: 1;
  }

  /* 確保 50+ 區塊：標題強制在上，貓咪強制在下 */
  #senior-discount .flex-wrapper {
    display: flex;
    flex-direction: column;
  }

  #senior-discount .senior-text-wrapper {
    order: -1;
  }

  #senior-discount .senior-img-wrapper {
    order: 1;
  }

  .promo-title-link img,
  .group-title img {
    max-width: 330px;
    margin: 0 auto;
  }

  .section-container {
    padding: 0 20px;
  }
}

/* --- 北中南學習據點零時差區塊基礎樣式 --- */
.locations-section {
  background-color: #2a5593;
  width: 100%;
  position: relative;
  padding: 100px 0;
  z-index: 20;
}

/* --- 波浪  --- */
.top-wave-blue {
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 L100,100 L100,50 C75,50 75,0 50,0 C25,0 25,50 0,50 Z' fill='%232a5593'/%3E%3C/svg%3E");
  background-size: 50px 100%;
  background-repeat: repeat-x;
}

.bottom-wave-blue {
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,0 L100,50 C75,50 75,100 50,100 C25,100 25,50 0,50 Z' fill='%232a5593'/%3E%3C/svg%3E");
  background-size: 50px 100%;
  background-repeat: repeat-x;
}

/* --- 內容容器與標題 --- */
.locations-section .section-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.locations-title {
  width: 100%;
  max-width: 750px;
}

.locations-title img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- 地點圖連結與 Hover 動畫 --- */

.location-link {
  display: block;
  text-decoration: none;
  transition:
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    filter 0.3s ease;
}

/* 滑鼠懸停時的效果：上浮、微放大、產生陰影 */
.location-link:hover {
  transform: translateY(-5px) scale(1.03);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.25));
}

.location-link:active {
  transform: translateY(-2px) scale(0.98);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

/* --- 地點圖網格 (桌機版：單排排列) --- */
.locations-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.location-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.location-item img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 160px;
}

/* --- 台北校區文字 --- */
.taipei-campuses {
  margin-top: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  color: #ffffff;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
}

/* =========================================
   動畫設定區 
========================================= */

.js-animate-item {
  opacity: 0;
  will-change: transform, opacity;
}

.animate-top {
  transform: translateY(-40px);
}
.animate-top.is-visible {
  animation: slideInDownLoc 1s ease-out forwards;
}
@keyframes slideInDownLoc {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 地點圖輪番彈出 */
.animate-pop {
  transform: scale(0.8);
}
.animate-pop.is-visible {
  animation: popInLoc 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes popInLoc {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 遞增延遲 */
.stagger-1.is-visible {
  animation-delay: 0.4s;
}
.stagger-2.is-visible {
  animation-delay: 0.6s;
}
.stagger-3.is-visible {
  animation-delay: 0.8s;
}
.stagger-4.is-visible {
  animation-delay: 1s;
}
.stagger-5.is-visible {
  animation-delay: 1.2s;
}

/* =========================================
   手機版適配 (RWD: 上排3 下排2 置中)
========================================= */
@media (max-width: 768px) {
  .locations-section {
    padding: 60px 0;
  }
  .locations-section .section-container {
    padding: 0 15px;
    gap: 40px;
  }

  .locations-grid {
    flex-wrap: wrap;
    gap: 20px 10px;
  }

  .location-item {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
  }

  .taipei-campuses {
    font-size: 12px;
    gap: 5px;
  }

  .animate-top {
    transform: translateY(-20px);
  }
}

/* =========================================
   0元起體驗講座區塊 (#free-trial-section)
========================================= */

.promo-section-lightpink {
  background-color: #fab2c9;
  width: 100%;
  position: relative;
  padding: 100px 0;
  overflow-x: hidden;
}

/* 容器：管控最大寬度與左右安全間距 (40px) */
.promo-section-lightpink .section-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* 上半部：貓咪與標題 */
.promo-section-lightpink .flex-wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 60px;
}

.promo-section-lightpink .content-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.promo-section-lightpink .content-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 450px;
}

/* =========================================
   進場動畫設定區
========================================= */
.js-animate-item {
  opacity: 0;
  will-change: transform, opacity;
}

.animate-left {
  transform: translateX(-100px);
}
.animate-right {
  transform: translateX(100px);
}
.animate-left.is-visible {
  animation: slideInLeft 1s ease-out forwards;
}
.animate-right.is-visible {
  animation: slideInRight 1s ease-out forwards;
}

@keyframes slideInLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-up {
  transform: translateY(50px);
}
.animate-up.is-visible {
  animation: slideUpFade 1s ease-out 0.4s forwards;
}
@keyframes slideUpFade {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* =========================================
   手機版適配 (RWD)
========================================= */
@media (max-width: 768px) {
  .promo-section-lightpink {
    padding: 60px 0;
  }
  .promo-section-lightpink .section-container {
    padding: 0 15px;
  }

  .promo-section-lightpink .flex-wrapper {
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
  }

  .animate-right {
    order: -1;
  }
  .animate-left {
    order: 1;
  }
  .animate-left {
    transform: translateX(-50px);
  }
  .animate-right {
    transform: translateX(50px);
  }

  .promo-section-lightpink .content-wrapper img {
    max-width: 330px;
  }
}

/* =========================================
footer
========================================= */
.footer-section {
  background-color: #595757;
  padding: 30px;
}

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

.footer_img img {
  width: 50px;
}

.footer_text {
  font-size: 13px;
  color: #fff;
  text-align: center;
  margin-top: 20px;
}

footer {
  background-color: #000;
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 15px;
}

/* =========================================
0元體驗講座看更多的頁面
=========================================*/
.backtoindex a {
  color: #0bff62;
  text-decoration: none;
  font-size: 22px;
}

.backtoindex a:hover {
  color: #82fbac;
  text-decoration: none;
}

/* --- 網格區塊外層 --- */
.grid-wrapper {
  width: 100%;
  padding: 0;
}

/* --- 卡片網格排版--- */
.card-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 20px;
  width: 100%;
}

/* --- 卡片樣式  --- */
.grid-card-placeholder {
  background-color: #ffffff;
  border-radius: 12px;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  animation: fadeInCard 0.6s ease-out forwards;
}

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   底部載入中提示 
========================================= */

.loading-indicator {
  width: fit-content;
  margin: 50px auto 30px auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #2a5593;
  color: #ffffff;
  padding: 12px 32px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(15px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.loading-indicator.is-loading {
  opacity: 1;
  transform: translateY(0);
}

.loading-indicator.is-static {
  opacity: 1;
  transform: none;
}

/* 轉圈動畫元件  */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 呼吸燈效果  */
.spinner + span {
  animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes pulseText {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
/* =========================================
   卡片網格區塊 RWD 設定
========================================= */

/* 顯示 2 張卡片 */
@media (max-width: 768px) {
  .card-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* 顯示 1 張卡片 */
@media (max-width: 480px) {
  .card-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
/* =========================================
   回到頂部按鈕 (Back to Top)
========================================= */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 55px;
  height: 55px;
  background-color: #ffffff;
  color: #23489b;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 當 JS 偵測到捲動，加上 .show 讓按鈕浮現 */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  background-color: #f0f4f8;
}

/* --- 手機版微調 --- */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* =========================================
   現代化分享按鈕
========================================= */
.modern-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 24px;
  background-color: #4d88ff;
  color: #23489b;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 控制左右圖片的大小 */
.modern-share-btn img {
  height: 26px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

/*  懸停狀態 (Hover) */
.modern-share-btn:hover {
  background-color: #6ba3ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(77, 136, 255, 0.4);
}

/* 懸停時，讓左右的小圖片產生可愛的互動 */
.modern-share-btn:hover .share-icon-left {
  transform: scale(1.1) translateX(-2px);
}
.modern-share-btn:hover .share-icon-right {
  transform: scale(1.1) rotate(5deg);
}

/*  點擊狀態 (Active) */
.modern-share-btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .modern-share-btn {
    padding: 6px 16px;
    font-size: 16px;
    gap: 5px;
  }

  .modern-share-btn img {
    height: 18px;
  }
}

/* =========================================
   0元起體驗講座 輪播卡片樣式
========================================= */
[v-cloak] {
  display: none;
}

#free-trial-section #app {
  width: 100%;
}

#free-trial-section .section-container {
  width: 100%;
}

#free-trial-section .swiper-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 36px 80px;
  overflow: hidden;
  box-sizing: border-box;
}

#free-trial-section .mySwiper {
  width: 100%;
  overflow: hidden;
}

#free-trial-section .mySwiper .swiper-wrapper {
  align-items: stretch;
}

#free-trial-section .mySwiper .swiper-slide {
  height: auto;
  display: flex;
  box-sizing: border-box;
  min-width: 0;
}

/* 保留 carousel-card 作為設計師原本的卡片寬度基底 */
#free-trial-section .carousel-card {
  min-height: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  color: inherit;
  font-size: inherit;
}

/* 內容層 */
#free-trial-section .trial-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

#free-trial-section .trial-card-image {
  width: 100%;
  /* aspect-ratio: 3 / 1; */
  height: 140px;
  overflow: hidden;
  background: #f7f7f7;

  display: flex;
  align-items: center;
  justify-content: center;
}

#free-trial-section .trial-card-image img {
  width: 100%;
  height: 100%;
  object-fit: initial;
  display: block;
}

#free-trial-section .trial-card-content {
  display: flex;
  gap: 12px;
  padding: 14px;
  flex: 1;
}

#free-trial-section .trial-card-date {
  width: 60px;
  min-width: 60px;
  border-radius: 14px;
  background: #f38db0;
  color: #fff;
  text-align: center;
  padding: 10px 6px;
  box-sizing: border-box;
  align-self: flex-start;
}

#free-trial-section .trial-card-month {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

#free-trial-section .trial-card-day {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin: 2px 0;
}

#free-trial-section .trial-card-week {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

#free-trial-section .trial-card-body {
  flex: 1;
  min-width: 0;
}

#free-trial-section .trial-card-location {
  font-size: 13px;
  font-weight: 700;
  color: #d75b8a;
  margin-bottom: 6px;
}

#free-trial-section .trial-card-title {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 800;
  color: #333;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#free-trial-section .trial-card-time {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fce3eb;
  color: #c84f7f;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 8px;
}

#free-trial-section .trial-card-intro {
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#free-trial-section .trial-card-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #f06f9d;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
}

#free-trial-section .swiper-button-prev::after,
#free-trial-section .swiper-button-next::after {
  display: none;
}

#free-trial-section .carousel-btn {
  position: absolute;
  top: calc(50% - 40px);
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background-color: #2a5593;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.2s,
    transform 0.2s;
}

#free-trial-section .carousel-btn:hover {
  background-color: #1a3c6d;
  transform: translateY(-50%) scale(1.1);
}

#free-trial-section .prev-btn {
  left: 3px;
}

#free-trial-section .next-btn {
  right: 3px;
}

#free-trial-section .see-more-btn {
  position: absolute;
  right: 10px;
  bottom: 15px;
  background-color: #2a5593;
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 17px;
  text-decoration: none;
  font-weight: bold;
  transition:
    background-color 0.3s,
    transform 0.2s;
  z-index: 15;
  display: inline-flex;
  align-items: center;
}

#free-trial-section .see-more-btn:hover {
  background-color: #333333;
  transform: translateY(-3px);
}

#free-trial-section .see-more-btn::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
  margin-left: 8px;
}

/* =========================================
   0元起體驗講座 課程列表與無限載入 (總覽頁)卡片樣式
========================================= */
[v-cloak] {
  display: none;
}

.load-status-wrap {
  margin: 56px auto 84px;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.observer-sentinel {
  height: 1px;
  width: 100%;
}

#course-grid-app {
  padding-bottom: 24px;
}

.course-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.course-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.course-card.course-card-vertical {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  height: 100%;
}

.course-card-image {
  width: 100%;
  height: 140px;
  overflow: hidden;
  flex-shrink: 0;
}

.course-card-image img {
  width: 100%;
  height: 100%;
  object-fit: initial;
  display: block;
}

.course-card-content {
  display: flex;
  gap: 16px;
  padding: 20px;
  flex: 1;
}

.course-card-date {
  width: 72px;
  min-width: 72px;
  align-self: flex-start;
  border-radius: 18px;
  background: #f38db0;
  color: #fff;
  text-align: center;
  padding: 14px 8px;
  box-sizing: border-box;
}

.course-card-month {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.course-card-day {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  margin: 4px 0;
}

.course-card-week {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.course-card-body {
  flex: 1;
  min-width: 0;
}

.course-card-location {
  font-size: 16px;
  font-weight: 700;
  color: #d75b8a;
  margin-bottom: 8px;
}

.course-card-title {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 800;
  color: #333;
  margin: 0 0 12px;
}

.course-card-time {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fce3eb;
  color: #c84f7f;
  font-weight: 700;
  margin-bottom: 12px;
}

.course-card-intro {
  font-size: 24px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* 最多3行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 0 0 24px 24px;
  background: #f06f9d;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  width: 100%;
  box-sizing: border-box;
}

.course-card-title {
  font-size: 24px;
}

.course-card-intro {
  font-size: 16px;
}

.course-card-action {
  font-size: 18px;
}
