/* ==========================================================================
   X720 Footer Styles (v2.2)
   檔案路徑：assets/css/components/footer.css
   結構說明：
   1. 上半部 (.footer-top-image)：裝飾圖片，具備 RWD 高度裁切邏輯。
   2. 下半部 (.footer-content)：資訊內容區，使用與側邊選單相同的深色背景。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Footer 容器與佈局
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100%;
  /* 確保 footer 永遠位於頁面最下方 (當主容器使用 flex-direction: column 時生效) */
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   2. 上半部：裝飾圖片區域
   -------------------------------------------------------------------------- */
.footer-top-image {
  width: 100%;
  line-height: 0; /* 消除圖片下方的預設行高間隙 (ghost space) */
  background-color: transparent;
}

.footer-top-image img {
  display: block;
  width: 100%; /* 寬度永遠填滿螢幕 */
  max-width: 1920px; /* 限制最大寬度，避免在超大螢幕過度拉伸 */
  margin: 0 auto; /* 超過 1920px 時置中 */

  /* 預設 (Desktop): 高度自動，保持原始比例 */
  height: auto;

  /* 關鍵屬性：確保裁切時保持比例並置中 */
  object-fit: cover;
  object-position: center;
}

/* --------------------------------------------------------------------------
   3. 下半部：資訊內容區域
   -------------------------------------------------------------------------- */
.footer-content {
  /* 背景色使用變數 (與側邊選單、登入按鈕同色) */
  background-color: var(--secondary-color-1);
  color: var(--color-white);

  /* 上下留白設定 */
  padding: 40px 0 60px;
}

/* --- 品牌標題 --- */
.footer-title {
  font-size: var(--fs-h2); /* 24px */
  font-weight: var(--fw-bold);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

/* --- 聯絡資訊 --- */
.footer-info p {
  font-size: var(--fs-body-base); /* 16px */
  color: var(--color-white);
  line-height: 1.6;
  margin-left: 10px;
}

/* --- 社群圖示按鈕 --- */
.social-btn img {
  width: 44px;
  height: 44px;
  transition: transform 0.2s ease, opacity 0.2s;
}

.social-btn:hover img {
  transform: translateY(-3px); /* Hover 時微微上浮效果 */
  opacity: 0.9;
}

/* --- 底部標章與連結區容器 --- */
.footer-bottom {
  margin-top: 1rem;
}

/* 無障礙標章 */
.footer-badge img {
  height: 36px;
  width: auto;
}

/* 底部連結 (服務條款/隱私權) */
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-body-sm);
  text-decoration: none;
  margin: 0 10px;

  /* 底線設定 */
  border-bottom: 1px solid transparent; /* 預留底線空間 */
  border-bottom-color: var(--color-white); /* 預設顯示底線顏色 */
  transition: all 0.2s;
}

.footer-links a:hover {
  color: var(--color-white);
}

/* ==========================================================================
   RWD 響應式調整 (Media Queries)
   ========================================================================== */

/* ------------------------------------------------
   Tablet 平板版 (768px ~ 1023px)
   需求：圖片高度 150px，左右裁切
   ------------------------------------------------ */
@media (min-width: 768px) and (max-width: 1023px) {
  /* 圖片高度強制設定，搭配 object-fit 自動裁切 */
  .footer-top-image img {
    height: 150px;
  }

  /* 社群圖示縮小 */
  .social-btn img {
    width: 36px;
    height: 36px;
  }

  /* 字體大小調整 (使用變數) */
  .footer-title {
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
  }

  .footer-info p {
    font-size: var(--fs-body-base);
    color: var(--color-white);
    line-height: 1.6;
  }
}

/* ------------------------------------------------
   Mobile 手機版 (< 768px)
   需求：圖片高度 100px，左右裁切
   ------------------------------------------------ */
@media (max-width: 767px) {
  /* 圖片高度強制設定 */
  .footer-top-image img {
    height: 100px;
  }

  /* 調整資訊區上下間距 */
  .footer-content {
    padding: 30px 0 50px;
  }

  /* 社群圖示縮小 */
  .social-btn img {
    width: 36px;
    height: 36px;
  }

  /* 字體大小調整 (使用變數) */
  .footer-title {
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
  }

  .footer-info p {
    font-size: var(--fs-body-base);
    color: var(--color-white);
    line-height: 1.6;
  }
}
