/* ===================================================================
   index.css — 首頁（index.aspx）專屬響應式（RWD）樣式
   僅由 index.aspx 引用，不影響其他頁面與全站共用的 style.css。
   目的：解除全站「強制 992px、橫向捲動」對首頁的限制，讓手機 / 平板
   能正常縮放堆疊，避免下方「委託單位 / 操作諮詢」聯絡資訊看不到。
   所有規則皆以 .indexBody 限定，作用範圍僅首頁。
   =================================================================== */

/* 全尺寸通用：全站 body / #content 設了 overflow:hidden，內容超出視窗即被
   裁掉且無法捲動（寬版、窄版皆然）。首頁改為垂直可捲、#content 不裁切。 */
.indexBody {
  overflow-x: hidden;
  overflow-y: auto;
}
.indexBody #content {
  overflow: visible;
}

@media screen and (max-width: 991px) {
  /* 解除全站 #content min-width:992px（避免窄版被撐出橫向捲動） */
  .indexBody #content {
    min-width: 0;
  }
  .indexBody .container {
    margin: 0 16px;
    width: auto;
  }

  /* 頂部功能連結：取消浮動、允許換行並縮小、置中 */
  .indexBody .header-top .container {
    text-align: center;
  }
  .indexBody .header-top-link {
    float: none;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
  }
  .indexBody .header-top-link li {
    padding-right: 8px;
  }
  .indexBody .header-top-link a {
    font-size: 15px;
    padding: 5px 10px;
  }
  .indexBody .header-top-link2 {
    float: none;
    display: inline-block;
    margin-top: 8px;
  }
  .indexBody .header-logo {
    float: none;
    font-size: 26px;
    margin: 16px 0;
  }
  .indexBody .header-logo a {
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
  }
  .indexBody .header-logo a img {
    width: 48px;
    margin-right: 10px;
  }

  /* 主區塊：最新消息與登入兩欄改為上下堆疊，移除中間虛線與裝飾魚圖 */
  .indexBody .indexMain-item-area {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }
  .indexBody .indexMain-item-area:before {
    display: none;
  }
  .indexBody .indexMain-item:nth-of-type(1),
  .indexBody .indexMain-item:nth-of-type(2) {
    padding-left: 0;
    padding-right: 0;
  }
  .indexBody .indexMain-img1,
  .indexBody .indexMain-img2,
  .indexBody .indexMain-cp-img2 {
    display: none;
  }

  /* 頁尾：取消靠右與固定高度，改為自然流式堆疊，確保聯絡資訊完整顯示 */
  .indexBody .indexFooter .container {
    display: block;
    min-height: 0;
  }
  .indexBody .indexFooter-img {
    display: none;
  }
  .indexBody .indexFooter-info {
    padding-top: 24px;
    padding-bottom: 16px;
  }
}

/* 小尺寸手機（≤480px）再微調登入表單，避免欄位與標籤過擠 */
@media screen and (max-width: 480px) {
  .indexBody .indexMain-item-form-item-input {
    max-width: none;
  }
  .indexBody .header-top-link a {
    font-size: 14px;
    padding: 4px 8px;
  }
}
