.index_main .index_content_sort_title_block {
  display: flex;
  justify-content: center; /* 整行置中 */
  align-items: center; /* 改為置中對齊 */
  padding: 0; /* 移除原本的左右 padding */
  margin: 55px auto 40px auto; /* 保持原本的上下間距 */
  width: 96%;
  max-width: 1290px;
  position: relative; /* 為絕對定位的按鈕提供定位基準 */
}

/* 主標題文字 - 縮減寬度 */
.index_main .index_content_sort_title_block > span,
.index_main .index_content_sort_title_block > div:first-child {
  flex: 0 0 auto; /* 不要伸縮，保持內容寬度 */
  font-size: 48px;
  line-height: 54px;
  color: #fff;
  font-weight: 600;
  margin: 0; /* 移除原本的 margin */
}

/* 右側區塊包裝 */
.index_main .index_content_sort_title_btn_block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: absolute; /* 絕對定位讓按鈕不影響標題置中 */
  right: 0; /* 靠右對齊 */
  top: 50%; /* 垂直置中 */
  transform: translateY(-50%); /* 精確垂直置中 */
}

/* 副標題樣式 */
.index_main .index_content_sort_title_block_sub_text {
  font-size: 14px;
  line-height: 20px;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  order: 2; /* 放在按鈕下方 */
}

.index_main .index_content_sort_title_block_sub_text a {
  color: #fff;
  text-decoration: underline;
}

.index_main .index_content_sort_title_block_sub_text a:hover {
  color: #229ad3;
}

/* 覆蓋原本按鈕的絕對定位 */
.index_main .index_content_sort_title_btn {
  position: static; /* 取消絕對定位 */
  margin: 0;
  width: 90px;
  height: 36px;
  order: 1; /* 放在副標題上方 */
}

/* 手機版響應式 */
@media all and (max-width: 991px) {
  .index_main .index_content_sort_title_block {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 93%;
    margin: 55px auto 20px auto;
    position: static; /* 手機版取消相對定位 */
  }
  
  .index_main .index_content_sort_title_block > span,
  .index_main .index_content_sort_title_block > div:first-child {
    font-size: 24px;
    line-height: 29px;
  }
  
  .index_main .index_content_sort_title_btn_block {
    position: static; /* 手機版取消絕對定位 */
    align-items: center;
    margin-top: 15px;
    gap: 12px;
    transform: none; /* 取消變形 */
  }
  
  .index_main .index_content_sort_title_block_sub_text {
    font-size: 13px;
    line-height: 18px;
    text-align: center;
  }
  
  /* 手機版隱藏桌面版按鈕，顯示手機版按鈕 */
  .index_main .index_content_sort_title_btn {
    display: none;
  }
}