/**
 * 搬家地區頁面樣式
 *
 * @package mytheme
 */
.area-page {
  color: #53bf6f;
}

/* area category section */
.area-section {
  display: flex;
  flex-direction: column;
  gap: 44px;
  margin: 48px auto 140px;
}
.area-container {
  display: flex;
  gap: 35px;
  width: 100%;
  max-width: 1140px;
  height: 350px;
}

.area-des-link {
  display: flex;
  width: 100%;
  max-width: 455px;
}
.area-des-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: auto;
  background-image: url(../../images/green_subtract.webp);
  background-repeat: no-repeat;
  background-size: contain;
  position: relative;
  justify-content: center;
  align-items: center;
}
.area-title {
  color: #5a8164;
  font-size: 1.875rem;
  margin-bottom: 10px;
  font-weight: 600;
}
.area-sub {
  font-size: 1.75rem;
  color: #53bf6f;
  margin-bottom: 34px;
  font-weight: 500;
}
.area-text {
  max-width: 376px;
  text-align: center;
}

.area-cta-btn {
  position: absolute;
  right: -4px;
  bottom: -4px;
  transition: all 0.3s ease;
  width: 100px;
}

.area-cta-btn img {
  transition: all 0.3s ease;
}

.area-des-link:hover .area-cta-btn img {
  filter: brightness(1.1);
  transform: scale(1.03);
}

.tnk-des-items {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 6px;
}
.tnk-des-item {
  display: flex;
  gap: 12px;
  align-items: center;
}
.tnk-img {
}
.tnk-item-text {
}

/* thm area */
.thm-items {
  display: flex;
  flex-direction: column;
  gap: 42px;
  width: 100%;
  margin-top: 3px;
}

.thm-item {
  display: flex;
  gap: 12px;
  max-width: 764px;
}
.tnk-img {
}
.thm-des-wrapper {
  display: flex;
  gap: 12px;
}
.thm-note {
  font-size: 20px;
  color: #fff;
  background: #53bf6f;
  padding: 0 13px;
  align-content: center;
  white-space: nowrap;
}
.thm-weight {
  min-width: 60px;
  max-width: 192px;
  width: 100%;
  white-space: nowrap;
}

/* 1. 車型：最小 */
.thm-item .thm-des-wrapper:nth-child(2) {
  flex: 0 0 60px; /* 不伸縮，固定在較小的寬度 */
}

/* 2. 適用坪數：最寬 */
.thm-item .thm-des-wrapper:nth-child(3) {
  flex: 1; /* 自動撐滿剩餘空間，所以會最寬 */
}

/* tnc area */
.tcn-items {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 3px;
}
.tcn-item {
  display: flex;
  gap: 9px;
  align-items: center;
}
.tcn-title {
  color: #fff;
  background: #53bf6f;
  padding: 0 15px;
  align-content: center;
  line-height: 40px;
}
.tcn-text {
}

/* yct area */
.yct-des-items {
  margin-top: 14px;
}
.ytc-des-title {
  margin-bottom: 40px;
}
.yct-des-wrapper {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 36px 106px;
}
.yct-des-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tnk-img {
}
.tnk-item-text {
}

/* kp area */
.kp-items {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 3px;
}
.kp-item {
  display: flex;
  gap: 9px;
}
.kp-title {
  color: #fff;
  background: #53bf6f;
  padding: 0 15px;
  text-align: center;
  align-content: center;
  width: 100%;
  max-width: 160px;
  height: fit-content;
  line-height: 40px;
}

.kp-text {
}

/* ==============
    下拉選單樣式
   ============== */
.filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 30px 10px;
}

.filter-group {
  position: relative;
  min-width: 150px;
}

/* 主按鈕：大氣、圓角、陰影 */
.filter-main-btn {
  width: 100%;
  padding: 16px 28px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  background-color: #fff;
  border: 2px solid #eee;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.filter-main-btn:hover {
  border-color: #53bf6f; /* 懸停變綠色 (呼應你的箭頭) */
  transform: translateY(-2px);
}

.filter-main-btn.no-arrow {
  justify-content: center;
  text-decoration: none;
}

/* 圖示容器與圖片/X 切換 */
.toggle-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
}

.arrow-svg {
  width: 100%;
  height: auto;
  transition: all 0.3s ease;
}

/* 啟動狀態樣式 */
.filter-group.active .filter-main-btn {
  background-color: #ffac27; /* 開啟時變橘色 */
  border-color: #ffac27;
  color: #fff;
}

.filter-group.active .arrow-svg {
  transform: rotate(180deg);
}

/* 下拉選單動畫 */
.filter-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    padding 0.3s ease;
}

.filter-group.active .filter-dropdown {
  max-height: 350px;
  opacity: 1;
  padding: 10px 0;
}

/* 下拉連結 */
.filter-dropdown a {
  display: block;
  padding: 12px 20px;
  color: #000;
  text-decoration: none;
  font-size: 17px;
  text-align: center;
  transition: all 0.2s ease;
}

.filter-dropdown a:hover {
  background-color: #e5ffecb6;
  color: #53bf6f;
}

/* 錨點平滑滾動修正 */
html {
  scroll-behavior: smooth;
}
[id^="area-"] {
  scroll-margin-top: 120px;
}

/* ==============
   手機版 trigger 按鈕（桌面隱藏）
   ============== */
.filter-mobile-trigger {
  display: none;
}

/* ==============
   手機版 (≤480px)
   ============== */
@media (max-width: 480px) {
  /* 父容器需 relative 讓浮動選單定位 */
  .filter-wrapper {
    position: relative;
    max-width: 188px;
  }

  /* trigger 按鈕：綠色邊框、白底、圓角膠囊 */
  .filter-mobile-trigger {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #53bf6f;
    border-radius: 50px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    z-index: 201;
    width: 100%;
    max-width: 188px;
  }

  .filter-mobile-label {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: #5a8164;
    padding: 0;
    text-align: center;
  }

  /* 中間分隔線 */
  .filter-mobile-divider {
    width: 1.5px;
    height: 100%;
    min-height: 36px;
    background: #53bf6f;
    flex-shrink: 0;
  }

  /* 右側 hamburger 區塊 */
  .filter-mobile-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex: 1;
    flex-shrink: 0;
  }

  .filter-mobile-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #53bf6f;
    border-radius: 1px;
    transition: all 0.3s ease;
  }

  /* hamburger → X 動畫 */
  .filter-mobile-trigger.active .filter-mobile-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }
  .filter-mobile-trigger.active .filter-mobile-hamburger span:nth-child(2) {
    opacity: 0;
  }
  .filter-mobile-trigger.active .filter-mobile-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  /* filter-container 手機版：浮動下拉，不推擠內容 */
  .filter-container {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 200;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    gap: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition:
      max-height 0.4s ease,
      padding 0.3s ease;
  }

  .filter-container.mobile-open {
    max-height: 800px;
    padding: 5px 0;
    overflow-y: auto;
  }

  /* filter-group 手機版：全寬 */
  .filter-group {
    width: 100%;
    min-width: unset;
  }

  .filter-group:last-child .filter-main-btn {
    border-bottom: none;
  }

  /* filter-main-btn 手機版：平面列表樣式 */
  .filter-main-btn {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #eee;
    box-shadow: none;
    padding: 12px 20px;
    font-size: 12px;
  }

  .filter-main-btn:hover {
    transform: none;
  }

  .filter-main-btn.no-arrow {
    text-align: left;
    justify-content: flex-start;
  }

  /* toggle icon 手機版 */
  .toggle-icon {
    width: 10px;
    height: 10px;
  }

  /* filter-dropdown 手機版：靜態展開（在浮動面板內） */
  .filter-dropdown {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: #f5f5f5;
  }

  .filter-group.active .filter-dropdown {
    padding: 5px 0;
  }

  .filter-dropdown a {
    font-size: 12px;
    padding: 10px 32px;
    text-align: left;
  }

  /* des items */
  .tnk-des-items,
  .thm-items,
  .tcn-items,
  .yct-des-items,
  .kp-items,
  .iht-des,
  .intl-des {
    display: none;
  }

  /* area section */
  .area-section {
    margin: 16px auto 106px;
    gap: 40px;
  }

  .area-container {
    height: 172px;
    justify-content: center;
  }
  .area-des-link {
    justify-content: center;
  }
  .area-des-wrapper {
    max-width: 221px;
  }

  .area-cta-btn {
    right: 0;
    bottom: 0;
    width: 44px;
    height: auto;
  }

  .area-title {
    font-size: 1rem !important;
    margin-bottom: 5px;
    font-weight: 500;
  }
  .area-sub {
    font-size: 12px;
    margin-bottom: 16px;
  }
  .area-text {
    font-size: 10px !important;
    max-width: 188px;
    line-height: normal !important;
  }
}
