  /* =========================================================
   1. BASE (基礎設定)
   ========================================================= */
  body.menu-open {
    overflow: hidden;
    /* 鎖背景（Menu 開啟時） */
  }

  /* =========================
   [Layout] Header 變體切換
========================= */
  /* --- 預設：首頁 (Logo 置中，Menu 在下) --- */
  .site-header {
    display: flex;
    flex-direction: column;

  }

  /* --- 變體：內頁 (Logo 與 Menu 併排) --- */
  @media (min-width: 992px) {

    /* 內頁模式下，讓內部容器不要自己縮在中間 */
    .is-inner-page .site-header__top {
      grid-column: 1 / -1;
      /* 讓 Top Bar 橫跨所有欄位 */
    }

    .is-inner-page .site-header__brand .container,
    .is-inner-page .site-header__main .container {
      max-width: none !important;
      width: 100%;
      margin: 0;
      padding: 0;
    }

    /* 當 header 有 .is-inner-page 時啟動 */
    .site-header.is-inner-page {
      display: grid;
      /* 定義兩列：左邊 Logo 自動寬度，右邊選單填滿剩餘空間 */
      grid-template-columns: auto 1fr;
      align-items: center;
      max-width: 1200px;
      /* 跟隨 Bootstrap container 寬度或自訂 */
      margin: 0 auto;
      padding-top: 20px;
    }

    /* 內頁：強行拿掉原本的 padding 與寬度限制 */
    .is-inner-page .site-header__brand,
    .is-inner-page .site-header__main {
      padding-bottom: 0 !important;
    }

    /* 內頁：Logo 靠左 */
    .is-inner-page .site-header__brand .container {
      justify-content: flex-start !important;
      width: auto;
      margin: 0;
    }

    /* 內頁：選單靠右 */
    .is-inner-page .site-header__main {
      justify-self: end;
    }

    .is-inner-page .c-main-menu .container {
      justify-content: flex-end !important;
    }

    /* 內頁：分隔線距離調整（選單靠右後可能需要縮小間距） */
    .is-inner-page .c-main-menu__list {
      gap: 30px;
    }
  }

  /* =========================================================
   2. [Component] LOGO 家族
   ========================================================= */
  .c-logo h1 {
    margin-bottom: 0;
  }

  .c-logo h1 a {
    display: block;
    width: 200px;
    height: 50px;
    background-image: url("/images/site-logo.png");
    background-position: left;
    background-repeat: no-repeat;
    background-size: cover;
    text-indent: 101%;
    overflow: hidden;
    white-space: nowrap;
  }

  /* Logo 媒體查詢 */
  @media (min-width: 768px) {
    .c-logo h1 a {
      width: 270px;
      margin-right: 10px;

    }
  }

  .site-header__brand .c-logo {
    width: 200px;
    /* text-align: center; */
  }

  @media (min-width: 992px) {
    .site-header__brand .c-logo {
      width: 220px;
    }
  }

  /* =========================================================
   3. [Layout] HEADER 框架排版
   ========================================================= */
  .site-header__top {
    padding: 6px 0;
  }

  .site-header__brand .container {
    justify-content: space-between;
  }

  .top-link {
    color: #888;
    text-decoration: none;
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  .top-link:hover {
    color: #333;
  }

 .u-fill-space {
    min-width: 40px;
  }
  
 @media (min-width: 768px) {
 .u-fill-space {
    min-width: 140px;
  }
 }
  @media (min-width: 992px) {
    .site-header__brand .container {
      justify-content: center;
    }

    .site-header__brand .u-fill-space {
      display: none;
    }
  }

  /* =========================================================
   4. [Component] SEARCH (搜尋組件)
   ========================================================= */
  .c-search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 0px;
  }

  /* 🔍 按鈕與 Icon 控制 */
  .c-search-box__toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    z-index: 2;
  }

  .c-search-box__icon--close {
    display: none;
  }

  .c-search-box.active .c-search-box__icon--open {
    display: none;
  }

  .c-search-box.active .c-search-box__icon--close {
    display: inline;
  }

  /* 核心：表單與輸入框動畫 */
  /* 核心：將 form 改為絕對定位 */
  .c-search-box__form {
    position: absolute;
    right: 100%;
    /* 從按鈕左側開始延伸 */
    top: 50%;
    transform: translateY(-50%);

    width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #fff;
    /* 加上背景色才不會透出下方的文字 */
    z-index: 1;
  }

  /* Input 不需要再 margin-left，因為我們是用定位控制 */
  .c-search-box__input {
    width: 100%;
    opacity: 0;
    border: none;
    border-bottom: 1px solid #333;
    outline: none;
    transition: all 0.3s ease;
    padding: 2px 0;
  }

  /* 展開狀態 */
  .c-search-box.active .c-search-box__form {
    width: 300px;
    max-width: calc(100vw - 50px); /* 確保搜尋框再怎麼噴，都不會超過螢幕寬度 */
    padding-right: 10px;
  }

  .c-search-box.active .c-search-box__input {
    opacity: 1;
  }

  /* 搜尋 RWD 邏輯 */
  .header-top-search {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
  }

  .header-top-search.active {
    max-height: 100px;
    opacity: 1;
  }

  /* @media (max-width: 991px) {
    .c-search-box.active .c-search-box__form {
      width: 140px;
    }

    .c-search-box__input {
      width: 100%;
      opacity: 1;
    }
  } */

  @media (min-width: 992px) {
    .header-top-search {
      max-height: none;
      opacity: 1;
      display: block;
    }
  }

  /* =========================================================
   5. [Component] MAIN MENU (主選單組件)
   ========================================================= */
  /* 高質感漢堡按鈕 */
  .c-hamburger {
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    position: relative;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-left: 1em;
  }

  .c-hamburger__line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #b1b1b1;
    /* 顏色可自訂 */
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    transform-origin: left center;
  }

  /* --- 動畫狀態切換 --- */

  /* 1. 第一條線順時針轉 45 度 */
  .menu-open .c-hamburger__line:nth-child(1) {
    transform: rotate(45deg);
    background-color: #fff;
    /* 開啟時變白色，配合黑底遮罩 */
  }

  /* 2. 中間線消失 */
  .menu-open .c-hamburger__line:nth-child(2) {
    width: 0%;
    opacity: 0;
  }

  /* 3. 第三條線逆時針轉 45 度 */
  .menu-open .c-hamburger__line:nth-child(3) {
    transform: rotate(-45deg);
    background-color: #fff;
  }

  /* 手機版遮罩樣式 */
  .c-main-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 9999;
  }

  .c-main-menu.active {
    opacity: 1;
    visibility: visible;
  }

  /* 選單內部元件 */
  .c-main-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
  }

  .c-main-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .c-main-menu__link {
    color: #fff;
    font-size: 1.6rem;
    text-decoration: none;
  }

  /* 列表進場動畫 */
  .c-main-menu__list li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }

  .c-main-menu.active .c-main-menu__list li {
    opacity: 1;
    transform: translateY(0);
  }

  /* 延遲動畫設定 */
  .c-main-menu__list li:nth-child(1) {
    transition-delay: 0.05s;
  }

  .c-main-menu__list li:nth-child(2) {
    transition-delay: 0.10s;
  }

  .c-main-menu__list li:nth-child(3) {
    transition-delay: 0.15s;
  }

  .c-main-menu__list li:nth-child(4) {
    transition-delay: 0.20s;
  }

  .c-main-menu__list li:nth-child(5) {
    transition-delay: 0.25s;
  }

  .c-main-menu__list li:nth-child(6) {
    transition-delay: 0.30s;
  }

  .c-main-menu__list li:nth-child(7) {
    transition-delay: 0.35s;
  }

  .c-main-menu__list li:nth-child(8) {
    transition-delay: 0.40s;
  }

  /* 桌機版樣式轉換 (>=992px) */

  @media (min-width: 992px) {
    .c-main-menu {
      position: static;
      inset: unset;
      background: transparent;
      opacity: 1;
      visibility: visible;
      display: block;
    }

    .c-main-menu .container {
      display: flex;
      justify-content: center;
    }

    /* menu list li width */
    .c-main-menu__list {
      flex-direction: row;
      justify-content: center;
      gap: 50px;
    }

    .c-main-menu__link {
      position: relative;

      font-family: "GenSenRounded2TW", sans-serif;
      font-weight: 500;
      font-size: 1.5rem;
      color: #1a4fa3;
      
      /* 增加質感的三個秘密參數 */
      letter-spacing: 0.04em;
      /* 中文字體一定要推開一點點才不擁擠 */
      line-height: 1.4;
      /* 給予垂直空間的呼吸感 */

      /* 強制瀏覽器使用更精細的渲染方式 */
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
    }

    /* Hover 底線動畫 */
    .c-main-menu__link::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -5px;
      width: 0;
      height: 2px;
      background: #1a4fa3;
      transition: width 0.3s ease;
    }

    .c-main-menu__link:hover::after {
      width: 100%;
    }

    /* 項目分隔線 */
    .c-main-menu__item {
      position: relative;
    }

    .c-main-menu__item:not(:last-child)::after {
      content: "";
      position: absolute;
      right: -25px;
      top: 50%;
      transform: translateY(-50%);
      width: 2px;
      height: 1.5rem;
      background: #ccc;
    }

    /* 桌機版取消動畫 */
    .c-main-menu__list li {
      opacity: 1;
      transform: none;
    }

    .c-hamburger {
      display: none;
    }

    @media (min-width: 992px) {

      /* 1. 縮小間距，防止選單掉下去 */
      .is-inner-page .c-main-menu__list {
        gap: 40px;
        /* 原本 60px 太寬了，內頁建議 25-30px */
      }

      /* 2. 調整字體大小 */
      .is-inner-page .c-main-menu__link {
        font-size: 1.225rem;
        /* 原本 1.5rem 在內頁併排時可能會太大，建議微調小一點 */
      }

      /* 3. 調整分隔線位置 */
      .is-inner-page .c-main-menu__item:not(:last-child)::after {
        right: -20px;
        /* 因為 gap 縮小了，分隔線也要往內移，才不會偏心 */
      }

      /* 讓內頁 Logo 稍微縮小，騰出空間給選單 */
      .is-inner-page .c-logo h1 a {
        transform: scale(0.85);
        transform-origin: left center;
        /* 確保縮小時是往左靠，不會飄移 */
      }

    }
  }