/* === eHeading 語言切換（06-language.css）
   語言按鈕放在導覽列「聯絡我們」與「開始項目」之間；
   手機版同樣留在導覽列，收成一個地球圖示，排在三線選單鈕左邊。 */

/* ---------- 按鈕 ---------- */
.lang-switcher{position:relative;flex:none}
.lang-toggle{display:flex;align-items:center;gap:9px;height:42px;padding:0 14px;border:1px solid #dbeafb;background:#eef6ff;border-radius:50px;color:#113a7b;font-size:15px;font-weight:650;line-height:1;letter-spacing:.01em;white-space:nowrap;cursor:pointer;transition:background .2s,border-color .2s,color .2s,box-shadow .2s}
.lang-toggle:hover{background:#e3f0ff;border-color:#bcd9fb;color:#0869f6}
.lang-toggle[aria-expanded="true"]{background:#e3f0ff;border-color:#96c6fb;color:#0869f6;box-shadow:0 8px 20px #0867ff1f}
.lang-icon{width:19px;height:19px;flex:none}
.lang-caret{width:10px;height:7px;flex:none;transition:transform .2s}
.lang-toggle[aria-expanded="true"] .lang-caret{transform:rotate(180deg)}
.lang-current{font-variant-numeric:tabular-nums}

/* ---------- 下拉選單 ---------- */
.lang-menu{position:absolute;top:calc(100% + 10px);right:0;min-width:178px;margin:0;padding:7px;list-style:none;background:#fff;border:1px solid #dce7f8;border-radius:14px;box-shadow:0 18px 40px #1f4d9a1f;z-index:70}
.lang-menu[hidden]{display:none!important}
.lang-menu li+li{margin-top:2px}
.lang-menu button{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:10px 13px;border:0;border-radius:9px;background:none;color:#213a63;font-size:15px;font-weight:600;text-align:left;cursor:pointer;transition:background .18s,color .18s}
.lang-menu button:hover{background:#eef6ff;color:#0869f6}
.lang-menu button.is-active{color:#0869f6}
.lang-menu button.is-active:after{content:"✓";font-size:14px;font-weight:800;line-height:1}
.lang-menu button:focus-visible{outline:3px solid #06b6ff;outline-offset:-2px}

/* ---------- 語言專屬字型 ---------- */
html[data-lang="zh-Hans"] body{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Noto Sans CJK SC","PingFang SC","Microsoft YaHei",sans-serif}
html[data-lang="en"] body{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif}

/* ---------- 響應式 ---------- */
@media(max-width:1300px){
  .lang-toggle{height:39px;padding:0 12px;font-size:14px;gap:7px}
  .lang-icon{width:17px;height:17px}
}
@media(max-width:1050px){
  .lang-toggle{height:37px;font-size:13.5px;padding:0 11px}
  .lang-icon{width:16px;height:16px}
  .lang-menu{min-width:162px}
  .lang-menu button{font-size:14px}
}
@media(max-width:780px){
  /* 手機版：語言按鈕收成地球圖示，留在導覽列、排在三線選單鈕左邊 */
  .header{gap:10px}
  .header>.lang-switcher{margin-left:auto}
  .header>.lang-switcher .lang-toggle{width:42px;height:42px;padding:0;justify-content:center;gap:0;border-radius:12px}
  .header>.lang-switcher .lang-current,
  .header>.lang-switcher .lang-caret{display:none}
  .header>.lang-switcher .lang-icon{width:20px;height:20px}
  .lang-menu{min-width:158px}
  .lang-menu button{font-size:14px;padding:10px 12px}
  /* 極窄螢幕：讓標誌先讓位，語言圖示同選單鈕保持 42px 觸控目標 */
  .header>.brand{flex:0 1 auto;min-width:0}
  .header>.brand img{max-width:100%}
  .header>.mobile-menu-button{flex:none}
}
