/* ==========================================================================
   1. 變數與 Reset
   ========================================================================== */
:root {
  --color-primary-orange: #f16321;
  --color-step-red: #9a1700;
  --color-dark-red: #861400;
  --color-gray-text: #686868;
  --color-bg-orange: #f28a2b;       /* 備用背景橘色 */
  --color-footer-mobile: #f7f5f0;   /* 手機版 Footer 底色 */
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background-color: var(--color-bg-orange);
  line-height: 1.5;
}

/* 圖片通用重置 */
.banner-img,
.step-img,
.btn-member img,
.footer-logo,
.back-to-top img {
  display: block;
}

.banner-img,
.step-img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   2. 框架與容器 (Layout)
   ========================================================================== */
.page-wrapper {
  width: 100%;
  background-color: var(--color-bg-orange);
  background-image: url('images/bg-pc.png');
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% auto;
  display: flex;
  justify-content: center;
}

.main-container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
}

.content-card {
  position: relative;
  width: 75%;
  max-width: 1610px;
  margin: 30px auto 50px auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 2;
}

/* ==========================================================================
   3. 通用元件與按鈕
   ========================================================================== */
.btn-member,
.back-to-top {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-member {
  display: inline-block;
}

.btn-member:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.btn-member img {
  width: 80%;
  margin: 0 auto;
  height: auto;
}

/* ==========================================================================
   4. Tab 頁籤系統
   ========================================================================== */
.nav-tabs {
  display: flex;
  width: 100%;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 8px;
  font-weight: bold;
  cursor: pointer;
}

.tab-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

/* --- 第一層 Tab --- */
.primary-tabs {
  position: relative;
  background-color: transparent;
  border-bottom: 3px solid var(--color-primary-orange);
}

.primary-tabs .tab-btn {
  position: relative;
  padding: 16px 8px;
  border: none;
  font-size: 2.35rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(to bottom, #ffffff 0%, #f9e7d0 100%);
  color: rgba(241, 99, 33, 0.5);
}

.primary-tabs .tab-btn.active {
  background: linear-gradient(to bottom, #ffb340 0%, #f16321 100%);
  color: #ffffff;
}

.primary-tabs .tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary-orange);
}

/* --- 第二層 Tab --- */
.secondary-tabs {
  display: flex;
  width: 100%;
  gap: 0;
  background: transparent;
  margin: 20px 0 0 0;
  overflow: visible;
}

.secondary-tabs .tab-btn {
  flex: 1;
  position: relative;
  border: none;
  padding: 15px 8px;
  font-size: 2.35rem;
  font-weight: bold;
  color: #ffffff;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(to bottom, #ffb340 0%, #f16321 100%);
  opacity: 0.5;
}

.secondary-tabs .tab-btn.active {
  opacity: 1;
}

.secondary-tabs .tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 8px 0 8px;
  border-color: #f16321 transparent transparent transparent;
  z-index: 2;
}

/* --- Panel 控制 --- */
.tab-panel,
.sub-panel {
  display: none;
  padding: 44px 24px;
}

.sub-panel {
  background: #fdf7ee;
}

.tab-panel.active,
.sub-panel.active {
  display: block;
}

/* ==========================================================================
   5. 集點方式區塊
   ========================================================================== */
.notice-box-yellow {
  background-color: #fdda50;
  margin: 10vw -24px -44px -24px;
  padding: 30px 20px;
  border-radius: 0 0 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.memo-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1362 / 702;
  background-image: url('images/steps-memo.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  padding: 8% 5% 5% 5%;
  margin: 0 0 20px 0;
  container-type: inline-size;
  display: flex;
  justify-content: center;
  align-items: center;
}

.memo-card p {
  color: #9a1700;
  margin: 0;
  text-align: center;
  font-size: 3.8cqw;
  line-height: 1.5;
}

.memo-cat {
  position: absolute;
  top: 0;
  left: 70px;
  transform: translateY(-50%);
  width: 40%;
  height: auto;
  pointer-events: none;
  z-index: 2;
}

.points-content {
  position: relative;
  padding: 40px 30px;
}

.points-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #861400;
  font-size: 34px;
  line-height: 1.4;
}

.points-list li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding-bottom: 30px;
  margin-bottom: 30px;
}

/* 肉掌 Icon 置中 */
.points-list li::before {
  content: "";
  display: inline-block;
  width: 2em;
  height: 2em;
  flex-shrink: 0;
  align-self: center;
  background-image: url('images/palm.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.points-list li::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background-image: url('images/line.png');
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: contain;
}

.decoration-cat {
  position: absolute;
  right: 5%;
  bottom: 30px;
  width: 250px;
  height: auto;
  pointer-events: none;
  z-index: 2;
}

/* ==========================================================================
   6. 使用點數 - 直接換 (Course Card)
   ========================================================================== */
.course-card {
  background-color: #ffffff;
  border: 2px solid #ffd7a8;
  border-radius: 12px;
  padding: 20px;
  max-width: 100%;
  margin: 0 auto;
}

.course-title {
  color: #8c2716;
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
}

.course-banner {
  /* 將寬度設為 100% 加上 padding 的兩倍 */
  width: calc(100% + 40px); /* 因為左右 padding 各 20px */
  margin-left: -20px; /* 抵消左邊的 padding */
  margin-right: -20px; /* 抵消右邊的 padding */
  margin-bottom: 15px;
  overflow: hidden; /* 防止內容溢出 */
}

.course-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.course-details {
  display: none;
  color: #686868;
  font-size: 1rem;
  line-height: 1.6;
  padding: 15px 5px 5px 5px;
}

.course-details p {
  margin-bottom: 8px;
}

.course-details ol {
  padding-left: 1.2em;
  margin: 0;
}

.course-details li {
  margin-bottom: 6px;
}

.btn-toggle-course {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: #f16321;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  padding: 10px 0 5px 0;
  transition: opacity 0.2s ease;
}

.btn-toggle-course:hover {
  opacity: 0.85;
}

/* 純 CSS 圓圈加減號 Icon */
.icon-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  border: 2.5px solid #f16321;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.icon-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2.5px;
  background-color: #f16321;
  transform: translate(-50%, -50%);
}

.icon-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.5px;
  height: 16px;
  background-color: #f16321;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-toggle-course.active .icon-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

/* ==========================================================================
   7. 使用點數 - 立即抽 (Lottery Section)
   ========================================================================== */
.lottery-container {
  background-color: #ffffff;
  border: 2px solid #ffd7a8;
  border-radius: 12px;
  padding: 24px;
  max-width: 100%;
  margin: 0 auto;
}

.gifts-banner {
  width: 100%;
  margin-bottom: 25px;
}

.gifts-banner img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.info-link-box {
  text-align: center;
  color: #e56a38;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 25px;
}

.info-link-box p {
  margin: 0;
}

.info-link-box .info-link {
  color: #e56a38;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
}

.info-link-box .info-link:hover {
  opacity: 0.8;
}

/* 橘色通用注意事項卡片 */
.notice-card-orange {
  background-color: #f16321;
  border-radius: 8px;
  padding: 20px 24px;
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
}

.notice-list li {
  /* 改用 Flex 排版，不再需要 position: relative */
  display: flex;
  align-items: flex-start; /* 讓箭頭對齊第一行文字 */
  gap: 12px;               /* 箭頭與文字之間的間距 */
  margin-bottom: 0;
}

.notice-list li::before {
  content: "";
  flex-shrink: 0;          /* 防止箭頭被擠壓變形 */
  margin-top: 0.7em;       /* 讓箭頭向下偏移，精準對齊第一行文字中線 */
  transform: translateY(-50%);
  
  /* 箭頭形狀 */
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fdda50;
}

/* 分隔線與間距設定 */
.notice-list li + li {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   8. 使用點數 - 月月抽 (Monthly Draw Section)
   ========================================================================== */
/* ==========================================================================
   8. 使用點數 - 月月抽 (Monthly Draw Section)
   ========================================================================== */
.monthly-container {
  position: relative;
  background-color: #ffffff;
  border: 2px solid #ffd7a8;
  border-radius: 12px;
  padding: 30px 24px 24px 24px;
  max-width: 100%;
  margin: 0 auto;
}

/* 新增標題包裹層，實現水平居中與相對定位 */
.monthly-header .title-wrapper {
  position: relative;
  display: inline-block; /* 寬度隨文字內容縮放，利於定位 */
  text-align: center;
}

/* 禮物盒圖示定位於標題左邊 */
.giftbox-icon {
  position: absolute;
  top: -75px;         /* 依視覺需求上下微調 */
  left: -80px;        /* 放在標題左側，依寬度微調 */
  width: 75px;        /* 稍微縮小尺寸以免過於搶眼 */
  height: auto;
  pointer-events: none;
}

.monthly-header {
  text-align: center;
  margin-bottom: 20px;
  padding-top: 10px;
}

.monthly-header .title-main {
  color: #8c2716;
  font-size: 32px;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 12px;
}

.monthly-header .title-sub {
  color: #686868;
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.monthly-info-card {
  background: linear-gradient(to bottom, #f2f2f2 0%, #ffffff 100%);
  border-radius: 8px;
  padding: 20px 15px;
  text-align: center;
  margin-bottom: 20px;
}

.monthly-info-card .info-row {
  color: #686868;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
  padding: 12px 0;
}

.monthly-info-card .info-row + .info-row {
  border-top: 1px dashed #cccccc;
}

.highlight-orange {
  color: #f16321;
}

.monthly-detail-link {
  display: inline-block;
  color: #f16321;
  font-size: 20px;
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 15px;
  transition: opacity 0.2s ease;
}

.monthly-detail-link:hover {
  opacity: 0.8;
}

/* ==========================================================================
   9. 頁尾 Footer
   ========================================================================== */
.site-footer {
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid #e8e8e8;
  padding: 20px 0;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  height: 40px;
  width: auto;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--color-gray-text);
  line-height: 1.4;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: bold;
}

.footer-links a,
.footer-links .separator {
  color: var(--color-primary-orange);
}

.footer-links a {
  text-decoration: none;
}

.footer-links .separator {
  font-size: 0.8rem;
}

.back-to-top {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-left: 15px;
  display: flex;
  align-items: center;
}

.back-to-top:hover {
  opacity: 0.8;
}

.back-to-top img {
  width: 42px;
}

/* ==========================================================================
   10. 響應式媒體查詢 (RWD - Mobile)
   ========================================================================== */
@media (max-width: 767px) {
  /* 背景與 Tab */
  .page-wrapper {
    background-image: url('images/bg-mobile.png');
  }
  
  
	.content-card {
	  width: 92%;
	}
  
  .primary-tabs {
    border-bottom: 1px solid var(--color-primary-orange);
  }
  .primary-tabs .tab-btn,
  .secondary-tabs .tab-btn {
    font-size: 1.20rem;
  }

  .secondary-tabs .tab-btn .tab-content img {
    width: 22px;
  }

.tab-content {
  gap: 6px;
}

  /* 集點清單與貓咪 */
  .points-list {
    font-size: 20px;
  }

  .points-list li {
    gap: 10px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

	/* 肉掌 Icon 置中 */
	.points-list li::before {
	  width: 1.5em;
	  height: 1.5em;
	}

  .decoration-cat {
    width: 150px;
    bottom: 35px;
  }

  /* 課程卡片 */
  .course-card {
    padding: 15px 20px;
  }

  .course-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .btn-toggle-course {
    font-size: 20px;
  }

  .icon-toggle {
    width: 24px;
    height: 24px;
    border-width: 2px;
  }

  .icon-toggle::before {
    width: 12px;
    height: 2px;
  }

  .icon-toggle::after {
    width: 2px;
    height: 12px;
  }

  .course-details {
    font-size: 0.85rem;
  }

  /* 立即抽區塊 */
  .lottery-container {
    padding: 16px 12px;
  }

  .gifts-banner {
    margin-bottom: 15px;
  }

  .info-link-box {
    font-size: 18px;
    margin-bottom: 18px;
  }

  .notice-card-orange {
    padding: 16px;
  }

  .notice-list {
    font-size: 18px;
    line-height: 1.5;
  }

  .notice-list li {
    padding-left: 18px;
  }

  .notice-list li::before {
    top: 6px;
    border-width: 5px 0 5px 8px;
  }

	/* 月月抽區塊 - 手機版 */
	.monthly-container {
	  padding: 24px 12px 16px 12px;
	}

	/* 微調手機版禮物盒圖示位置與大小 */
	.giftbox-icon {
	  top: -60px;
	  left: -50px;
	  width: 50px;
	}

	.monthly-header .title-main {
	  font-size: 22px;
	  margin-bottom: 8px;
	}

	.monthly-header .title-sub {
	  font-size: 18px;
	}

  .monthly-info-card {
    padding: 15px 10px;
  }

  .monthly-info-card .info-row {
    font-size: 18px;
    padding: 10px 0;
  }

  .monthly-detail-link {
    font-size: 18px;
    margin-top: 10px;
  }

  /* Footer 手機版調整 */
  .site-footer {
    background-color: var(--color-footer-mobile);
    padding: 30px 16px 20px 16px;
  }

  .footer-container {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 0;
    gap: 16px;
  }

  .footer-brand {
    flex-direction: column;
    gap: 10px;
  }

  .footer-logo {
    height: 45px;
    margin: 0 auto;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }

  .footer-links {
    font-size: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .back-to-top {
    position: absolute;
    top: -55px;
    right: 16px;
    margin-left: 0;
  }
}