/* =========================================
   區塊一：主視覺 (視差滾動)
========================================= */
.banner-container {
  position: relative;
  width: 100%;
  height: auto;
  /* 高度隨圖片內容自動撐開 */
  overflow: hidden;
  background-color: #000;
}

.parallax-bg {
  position: absolute;
  /* 關鍵修正：不僅是左右，我們將 top 與 height 也稍微擴展，徹底包覆 */
  top: -10%;
  left: -10%;
  width: 120%;
  /* 寬度拉大至 120% */
  height: 120%;
  /* 高度同步拉大至 120% */
  background-image: url('../images/mainbg.png');
  /* cover 會自動縮放以確保填滿，配合上面的 120% 尺寸，無論螢幕多寬都不會露餡 */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 1;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.parallax-front {
  position: relative;
  /* 改為相對定位，參與文檔流 */
  width: 100%;
  z-index: 2;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* 讓鴨鴨永遠貼齊底部 */
}

/* 圖片本體：滿版且不裁切的核心 */
.front-content {
  width: 100%;
  /* 寬度強制填滿左右 */
  height: auto;
  /* 高度依據圖片比例自動計算，這是保證內容「不被裁切」的關鍵 */
  display: block;
  /* 消除 img 下方的預設間隙 */
  object-fit: contain;
  /* 保證圖片比例永遠維持，絕不變形 */
}

@media (min-width: 1600px) {
  .banner-container {
    /* 限制最大高度，防止圖片被無限拉伸導致破綻 */
    max-height: 90vh;
  }
}

/* =========================================
   區塊二：外層版面與背景色切換
========================================= */
.haosu-section {
  width: 100%;
  margin-top: -1px;
}

.haosu-container {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

/* =========================================
   修正後的雙色過渡排版與 SVG 曲線
========================================= */

/* 白色上半部：獨立白色背景，並拉高層級 */
.top-white-section {
  position: relative;
  background-color: #ffffff;
  padding: 60px 20px 60px;
  /* 增加底部 Padding，確保曲線有顯示空間 */
  z-index: 1;
}

.bottom-pink-section {
  position: relative;
  background-color: #ffebe5;
  padding: 60px 20px 80px;
  z-index: 0;
  /* 粉色在白色之下 */
}

.section-divider {
  position: absolute;
  bottom: 0;
  /* 貼齊白色區塊底部 */
  left: 0;
  width: 100%;
  height: 60px;
  /* SVG 高度 */
  z-index: 2;
  /* 確保浮在最上方 */
  pointer-events: none;
  padding-bottom: 3rem;
  background-color: #ffebe5;
}

.section-divider svg {
  display: block;
  width: 100%;
  height: 100%;
  /* 強制 SVG 填滿容器，防止被裁切 */
}

/* =========================================
   一般標題與 SVG 曲線標題
========================================= */
.main-title {
  text-align: center;
  font-size: 36px;
  color: #333;
  font-weight: bold;
  margin-bottom: 50px;
  letter-spacing: 1px;
}

.curved-title-container {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  text-align: center;
  overflow: visible;
}

.curved-title-svg {
  width: 100%;
  height: auto;
  display: block;
}

.curved-title-text {
  font-size: 36px;
  fill: #333;
  font-weight: bold;
  letter-spacing: 1px;
}

/* =========================================
   六大優勢 (Features)
========================================= */
.features-wrapper {
  margin-bottom: 40px;
  /* 稍微縮小以配合分隔線 */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  text-align: center;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-placeholder {
  width: 80px;
  height: 80px;
  color: #ff8c00;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 15px;
}

.icon-placeholder img {
  width: 80px;
  height: 80px;
}

.feature-title {
  font-size: 22px;
  color: #000;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.feature-desc {
  font-size: 16px;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

/* =========================================
   四大方案 (Plans) 與卡片設計
========================================= */
.plans-wrapper {
  margin-bottom: 50px;
  padding-top: 3rem;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 40px;
  padding-top: 20px;
}

.plan-cards {
  position: relative;
  background-color: #fddbcf;
  border-radius: 60px;
  padding: 40px 0 0 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border: 6px solid #ffffff;
  /* 移除 overflow: hidden 讓標籤能顯示 */
}

.card-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  background: linear-gradient(75deg, rgba(255, 255, 255, 1) 0%, rgba(235, 235, 235, 1) 50%, rgba(255, 255, 255, 1) 100%);
  color: #ff7433;
  font-size: 24px;
  font-weight: bold;
  padding: 8px 40px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(255, 116, 51, 0.15);
  border: 3px solid #ffffff;
  white-space: nowrap;
  z-index: 5;
}

.card-content {
  flex: 1;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  z-index: 2;
}

.card-title {
  font-size: 26px;
  color: #1b1c1e;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.card-desc {
  font-size: 18px;
  color: #1b1c1e;
  line-height: 1.6;
  margin: 0 0 30px 0;
}

.btn-black {
  background-color: #1a1a1a;
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.2s;
}

.btn-black:hover {
  background-color: #ff6700;
}

.card-img-placeholder {
  flex: 1;
  max-width: 55%;
  /* 補足卡片右下角的圓角 */
  border-radius: 0 0 54px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 10px;
  align-self: flex-end;
  min-height: 220px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right bottom;
}

#bg1 {
  background-image: url('../images/planbg1.png');
}

#bg2 {
  background-image: url('../images/planbg2.png');
}

#bg3 {
  background-image: url('../images/planbg3.png');
}

#bg4 {
  background-image: url('../images/planbg4.png');
}

/* =========================================
   底部 CTA 查詢按鈕
========================================= */
.cta-wrapper {
  text-align: center;
  margin-top: 40px;
}

.btn-orange-lg {
  display: inline-block;
  background: linear-gradient(90deg, #ff8c00 0%, #ff5e00 100%);
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  padding: 15px 40px;
  border-radius: 50px;
  box-shadow: 0 8px 20px rgba(255, 94, 0, 0.3);
  transition: transform 0.2s;
}

.btn-orange-lg:hover {
  transform: translateY(-3px);
}

/* =========================================
   RWD 響應式斷點設定
========================================= */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 20px;
  }
}

@media (max-width: 768px) {
  .main-title {
    font-size: 22px;
    margin-bottom: 30px;
  }

  .curved-title-container {
    margin-bottom: 0;
  }

  .curved-title-text {
    font-size: 24px;
  }

  .feature-title {
    font-size: 18px;
  }

  .feature-desc {
    font-size: 14px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  /* 確保卡片內的排列完全為垂直堆疊 */
  .plan-cards {
    flex-direction: column;
    /* 文字在上，圖在下 */
    padding: 50px 0 0 0;
    /* 標籤區間 */
    align-items: center;
    /* 強制所有內容水平置中 */
  }

  /* 調整卡片內的文案區 */
  .card-content {
    width: 100%;
    /* 文字區塊強制撐滿 100% */
    padding-bottom: 20px;
    /* 縮小與下方圖片的間距 */
    align-items: center;
    /* 文字內容水平置中 */
    text-align: center;
    /* 文字對齊置中 */
  }

  /* 調整下方鴨鴨圖片 Placeholder */
  .card-img-placeholder {
    width: 100%;
    /* 圖片寬度強制 100% */
    max-width: 100%;
    /* 移除原本的 45% 限制 */
    margin-top: -10px;
    /* 與上方文字間距 */
    border-radius: 0 0 54px 54px;
    /* 調整圓角以貼合卡片底部 */
    min-height: 200px;
    /* 確保高度顯示 */
    order: 2;
    /* 確保圖片在視覺順序最後方 */
  }

  .plans-wrapper {
    padding-top: 0;
  }

  .card-desc {
    margin-bottom: 15px;
  }

  .top-white-section {
    padding-top: 30px;
    padding-bottom: 40px;
  }

  .section-divider {
    height: auto;
    padding-bottom: 0;
  }

  .bottom-pink-section {
    padding-top: 20px;
    margin-top: -2px;
    padding-bottom: 60px;
  }
}