/* =====================================================================
   MAXQDA 繁體中文網站 - 公共樣式 common.css
   作者：APSGO&SOFTHEAD（臺灣授權經銷商）
   說明：全站共享的基礎樣式、配色變數、排版、按鈕、導航與頁尾。
        頁面專屬的區塊樣式請寫在各自頁面 <style> 中，避免衝突。
   編碼：UTF-8（無 BOM）
   ===================================================================== */

/* ---------- 1. 設計變數 ---------- */
:root {
  --brand-blue: #0A2E80;
  --brand-blue-700: #082563;
  --brand-blue-50: #eef2fb;
  --brand-orange: #F45413;
  --brand-red: #DB3B2B;

  --ink-900: #0d1530;
  --ink-700: #2b3450;
  --ink-500: #5a627a;
  --ink-300: #9aa1b5;

  --line: #e7eaf2;
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --bg-soft-2: #eef2fb;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 10px rgba(10, 46, 128, .06);
  --shadow: 0 12px 34px rgba(10, 46, 128, .10);
  --shadow-lg: 0 24px 60px rgba(10, 46, 128, .16);

  --container: 1200px;
  --header-h: 76px;

  --font-cn: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif;
  --font-en: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font: var(--font-en), var(--font-cn);
}

/* ---------- 2. 基礎重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-700);
  background: var(--bg);
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand-blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-orange); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 3. 佈局工具 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section__eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-orange); margin-bottom: 14px;
}
.section__title { font-size: clamp(26px, 3.4vw, 40px); }
.section__lead { font-size: 17px; color: var(--ink-500); }
.text-grad {
  background: linear-gradient(100deg, var(--brand-blue), var(--brand-red) 60%, var(--brand-orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- 4. 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary {
  background: linear-gradient(120deg, var(--brand-orange), var(--brand-red));
  color: #fff; box-shadow: 0 10px 24px rgba(244, 84, 19, .32);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(244, 84, 19, .42); }
.btn--ghost {
  background: transparent; color: var(--brand-blue); border-color: var(--line);
}
.btn--ghost:hover { color: var(--brand-blue); border-color: var(--brand-blue); background: var(--brand-blue-50); }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 16px 30px; font-size: 16px; }

/* ---------- 4b. 通用幻燈片控制元件（slider.js 複用）---------- */
.slider-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; }
.slider-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand-blue); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.slider-btn:hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); transform: translateY(-2px); }
.slider-btn svg { width: 20px; height: 20px; }
.slider-dots { display: flex; align-items: center; gap: 8px; }
.slider-dot { width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; background: #d4dcef; cursor: pointer; transition: width .25s ease, background .25s ease; }
.slider-dot.is-active { width: 26px; border-radius: 6px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange)); }

/* =====================================================================
   5. 導航 HEADER（由 nav.js 注入，樣式全站共用）
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { height: var(--header-h); display: flex; align-items: center; gap: 16px; position: relative; }
.nav__brand { display: flex; align-items: center; gap: 12px; flex: none; }
.nav__logo { height: 38px; width: auto; }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav__brand-name { font-size: 19px; font-weight: 800; color: var(--brand-blue); letter-spacing: .02em; }
.nav__brand-sub { font-size: 11px; color: var(--ink-300); font-weight: 500; }
.nav__menu { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
.nav__item { position: relative; flex: none; }
.nav__link {
  display: inline-flex; align-items: center; gap: 4px; padding: 9px 11px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--ink-700); white-space: nowrap;
  background: none; border: none; cursor: pointer; font-family: inherit; line-height: 1.4;
}
.nav__link:hover, .nav__item:hover > .nav__link { color: var(--brand-blue); background: var(--brand-blue-50); }
.nav__link.is-active { color: var(--brand-blue); }
.nav__chev { width: 15px; height: 15px; transition: transform .25s ease; opacity: .7; }
.nav__item--has:hover .nav__chev { transform: rotate(180deg); }

/* 下拉麵板 */
.nav__drop {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 268px; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 1001;
}
.nav__item--has:hover .nav__drop, .nav__item--has:focus-within .nav__drop {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav__drop::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.nav__drop-inner {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px;
}
.nav__drop-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-radius: 10px; }
.nav__drop-link:hover { background: var(--brand-blue-50); }
.nav__drop-link.is-active { background: var(--brand-blue-50); }
.nav__drop-text { display: block; }
.nav__drop-label { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink-900); }
.nav__drop-link:hover .nav__drop-label { color: var(--brand-blue); }
.nav__drop-en { display: block; font-size: 12px; color: var(--ink-300); margin-top: 1px; }
.nav__drop-arrow { width: 18px; height: 18px; flex: none; color: var(--brand-blue); opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .2s ease; }
.nav__drop-link:hover .nav__drop-arrow,
.nav__drop-link.is-active .nav__drop-arrow { opacity: 1; transform: translateX(0); }
.nav__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* 語言切換（桌面端） */
.nav__lang { position: relative; }
.nav__lang-btn { padding: 9px 11px; }
.nav__globe { width: 18px; height: 18px; opacity: .85; }
.nav__lang-cur { font-size: 14px; }
.nav__drop--right { left: auto; right: 0; transform: translateY(8px); min-width: 220px; }
.nav__item--has:hover .nav__drop--right,
.nav__item--has:focus-within .nav__drop--right { transform: translateY(0); }
.nav__drop--right::before { left: 0; right: 0; }

/* 語言切換（移動端） */
.mnav__lang { margin: 18px 0 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.mnav__lang-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-300); margin-bottom: 12px; }
.mnav__lang-head svg { width: 18px; height: 18px; }
.mnav__lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mnav__lang-link { display: flex; align-items: center; justify-content: center; padding: 11px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-700); text-decoration: none; }
.mnav__lang-link.is-active { border-color: var(--brand-blue); color: var(--brand-blue); background: var(--brand-blue-50); }
.nav__burger {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex: none;
}
.nav__burger span { position: relative; width: 22px; height: 2px; background: var(--brand-blue); border-radius: 2px; transition: .25s; }
.nav__burger span::before, .nav__burger span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--brand-blue); border-radius: 2px; transition: .25s;
}
.nav__burger span::before { top: -7px; }
.nav__burger span::after { top: 7px; }
.nav__burger.is-open span { background: transparent; }
.nav__burger.is-open span::before { top: 0; transform: rotate(45deg); }
.nav__burger.is-open span::after { top: 0; transform: rotate(-45deg); }

/* ---------- 移動端抽屜選單 ---------- */
.mnav { position: fixed; inset: 0; z-index: 1100; visibility: hidden; }
.mnav.is-open { visibility: visible; }
.mnav__overlay {
  position: absolute; inset: 0; background: rgba(10, 46, 128, .38);
  opacity: 0; transition: opacity .3s ease; backdrop-filter: blur(2px);
}
.mnav.is-open .mnav__overlay { opacity: 1; }
.mnav__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(86vw, 360px);
  background: #fff; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,.0,.2,1);
  display: flex; flex-direction: column; padding: 22px;
  overflow-y: auto;
}
.mnav.is-open .mnav__panel { transform: translateX(0); }
.mnav__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mnav__brand { display: flex; align-items: center; gap: 10px; }
.mnav__brand img { height: 32px; }
.mnav__brand b { color: var(--brand-blue); font-size: 17px; }
.mnav__close { width: 40px; height: 40px; border: none; background: var(--bg-soft); border-radius: 10px; font-size: 22px; color: var(--ink-700); cursor: pointer; line-height: 1; }
.mnav__links { margin: 18px 0; border-top: 1px solid var(--line); }
.mnav__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 6px; font-size: 17px; font-weight: 600; color: var(--ink-900);
  border-bottom: 1px solid var(--line);
}
.mnav__link span { color: var(--brand-orange); }
/* 移動端二級手風琴 */
.mnav__group { border-bottom: 1px solid var(--line); }
.mnav__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 6px; font-size: 17px; font-weight: 600; color: var(--ink-900);
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.mnav__toggle .nav__chev { width: 18px; height: 18px; transition: transform .25s ease; color: var(--ink-300); }
.mnav__group.is-open .mnav__toggle { color: var(--brand-blue); }
.mnav__group.is-open .mnav__toggle .nav__chev { transform: rotate(180deg); color: var(--brand-blue); }
.mnav__sub { display: grid; overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.mnav__group.is-open .mnav__sub { max-height: 460px; }
.mnav__sublink { padding: 12px 6px 12px 18px; font-size: 15px; font-weight: 500; color: var(--ink-700); border-top: 1px solid var(--line); }
.mnav__sublink:first-child { border-top: none; }
.mnav__sublink.is-active, .mnav__sublink:hover { color: var(--brand-blue); }
.mnav__sub { padding-bottom: 6px; }
.mnav__cta { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; }
.mnav__contact { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-500); }
.mnav__contact a { font-weight: 600; }

/* =====================================================================
   6. 頁尾 FOOTER（由 footer.js 注入，樣式全站共用）
   ===================================================================== */
.site-footer {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #061540 0%, #0a1d4f 45%, var(--brand-blue) 100%);
  color: #c7d0ea; padding: 70px 0 0;
}
.site-footer::before {
  content: ""; position: absolute; top: -140px; right: -120px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(244,84,19,.18), transparent 70%); pointer-events: none;
}
.foot__inner { position: relative; z-index: 1; }
.foot__top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; padding-bottom: 40px; }
.foot__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.foot__brand img { height: 44px; background: #fff; border-radius: 12px; padding: 7px; }
.foot__brand b { color: #fff; font-size: 21px; display: block; line-height: 1.2; }
.foot__brand span { font-size: 12px; color: #9fb0db; }
.foot__desc { max-width: 480px; font-size: 14.5px; line-height: 1.9; color: #b6c2e3; margin: 0; }

/* 聯絡卡 */
.foot__contact { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 24px; display: grid; gap: 4px; align-content: start; }
.foot__contact-title { color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.foot__contact-item { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 9px 0; }
.foot__contact-item + .foot__contact-item { border-top: 1px solid rgba(255,255,255,.1); }
.foot__contact-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(244,84,19,.16); border: 1px solid rgba(244,84,19,.36); color: #ffb699; }
.foot__contact-ic svg { width: 19px; height: 19px; }
.foot__contact-item a, .foot__contact-item span { color: #fff; font-weight: 600; }

/* 經銷商雙語宣告 */
.foot__notice {
  display: flex; gap: 16px; align-items: flex-start;
  background: rgba(244, 84, 19, .12); border: 1px solid rgba(244, 84, 19, .34);
  border-radius: var(--radius); padding: 20px 24px; margin: 8px 0 40px;
}
.foot__notice-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: rgba(244,84,19,.2); color: #ffc7b2; }
.foot__notice-ic svg { width: 21px; height: 21px; }
.foot__notice p { margin: 0; font-size: 13.5px; line-height: 1.8; color: #e3d2c8; }
.foot__notice p.zh { color: #ffe2d6; font-weight: 600; }
.foot__notice p.en { color: #b6c2e3; margin-top: 4px; }
.foot__notice b { color: #fff; }

.foot__bottom {
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  align-items: center; padding: 22px 0; font-size: 13px; color: #9fb0db;
  border-top: 1px solid rgba(255,255,255,.12);
}
.foot__bottom a { color: #c7d0ea; }

/* ---------- 7. 響應式 ---------- */
@media (max-width: 980px) {
  .nav__menu, .nav__actions .btn, .nav__lang { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__actions { margin-left: auto; }
  .foot__top { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .container { padding: 0 18px; }

  /* 頁尾手機最佳化 */
  .site-footer { padding-top: 52px; }
  .foot__top { gap: 24px; padding-bottom: 30px; }
  .foot__contact { padding: 20px; }
  .foot__notice { flex-direction: column; gap: 12px; padding: 18px; margin: 4px 0 30px; }
  .foot__notice p { font-size: 13px; }
  .foot__bottom { flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 0; }
}
