@charset "utf-8";

/* ============================================================
   xlCompare 香港官網 公共樣式 common.css
   主題色：#0B9E49  淺色主題
   字體：系統字體（不使用 Google 字體）
   ============================================================ */

/* ---------- 變量 ---------- */
:root {
  --brand: #0B9E49;
  --brand-dark: #08833C;
  --brand-light: #E7F6EE;
  --brand-soft: #F2FBF6;
  --ink: #16261C;
  --text: #2C3A32;
  --muted: #6B7A71;
  --line: #E4EAE6;
  --bg: #FFFFFF;
  --bg-alt: #F6F9F7;
  --shadow-sm: 0 2px 10px rgba(11, 158, 73, .06);
  --shadow-md: 0 12px 34px rgba(16, 40, 26, .10);
  --radius: 14px;
  --maxw: 1200px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
}

/* ---------- 重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   導航 header 樣式
   ============================================================ */
/* 包裹容器不參與佈局，確保 sticky 以頁面為定位基準（否則隨容器滾走丟失） */
#site-header { display: contents; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { width: 40px; height: 40px; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand-name { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: .2px; }
.nav-brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; }

.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-menu a {
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: background .2s, color .2s;
}
.nav-menu a:hover { background: var(--brand-light); color: var(--brand-dark); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* 語言切換（桌面端下拉） */
.lang-switch { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.lang-trigger:hover { border-color: var(--brand); background: var(--brand-soft); }
.lang-trigger svg { width: 17px; height: 17px; flex: none; }
.lang-trigger .lang-current { white-space: nowrap; }
.lang-trigger .lang-caret { width: 14px; height: 14px; transition: transform .25s; }
.lang-switch.open .lang-trigger { border-color: var(--brand); background: var(--brand-soft); }
.lang-switch.open .lang-trigger .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s; z-index: 1200;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap;
  transition: background .15s, color .15s;
}
.lang-option:hover { background: var(--brand-light); color: var(--brand-dark); }
.lang-option.active { color: var(--brand-dark); }
.lang-option svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

/* 語言切換（移動端抽屜） */
.drawer-lang { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.drawer-lang-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.drawer-lang-title svg { width: 16px; height: 16px; }
.drawer-lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-lang-item {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: border-color .2s, background .2s, color .2s;
}
.drawer-lang-item:hover { border-color: var(--brand); }
.drawer-lang-item.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s, box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
/* 弱化：下載試用 */
.btn-ghost {
  background: #fff;
  color: var(--brand-dark);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
/* 突顯：立即購買 */
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--brand-dark); box-shadow: var(--shadow-md); }

/* 漢堡按鈕 */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移動端抽屜菜單 */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}
.mobile-drawer .drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(16, 40, 26, .45);
  opacity: 0;
  transition: opacity .3s;
}
.mobile-drawer .drawer-panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(82%, 340px);
  background: #fff;
  box-shadow: -16px 0 40px rgba(16, 40, 26, .18);
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  overflow-y: auto;
}
.mobile-drawer.open { pointer-events: auto; }
.mobile-drawer.open .drawer-mask { opacity: 1; }
.mobile-drawer.open .drawer-panel { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.drawer-head .nav-brand-name { font-size: 18px; }
.drawer-close {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}
.drawer-links { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.drawer-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: var(--brand-soft);
  border: 1px solid transparent;
  transition: border-color .2s, transform .15s;
}
.drawer-links a:active { transform: scale(.98); }
.drawer-links a:hover { border-color: var(--brand); }
.drawer-links a .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  flex: none;
}
.drawer-actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.drawer-actions .btn { width: 100%; justify-content: center; padding: 14px; }
.drawer-foot { margin-top: 22px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ============================================================
   頁腳 footer 樣式
   ============================================================ */
.site-footer {
  background: linear-gradient(180deg, #0E2A1A 0%, #0A1F13 100%);
  color: #C7D6CD;
  padding: 64px 0 28px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { max-width: 420px; }
.footer-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand-row .fb-name { font-size: 22px; font-weight: 800; color: #fff; }
.footer-brand-row .fb-sub { font-size: 13px; color: #8FB0A0; }
.footer-desc { font-size: 14px; line-height: 1.8; color: #A9BFB4; }
.footer-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 158, 73, .18);
  border: 1px solid rgba(11, 158, 73, .4);
  color: #6FE3A0;
  font-size: 13px;
  font-weight: 600;
}
.footer-contact { min-width: 260px; }
.footer-contact h4 { color: #fff; font-size: 16px; margin-bottom: 18px; font-weight: 700; }
.footer-contact .contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 15px;
  color: #C7D6CD;
}
.footer-contact .contact-item svg { width: 20px; height: 20px; flex: none; color: var(--brand); }
.footer-contact .contact-item a:hover { color: #fff; }
.footer-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 40px;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(11, 158, 73, .10);
  border: 1px solid rgba(11, 158, 73, .28);
}
.footer-notice .fn-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(11, 158, 73, .18);
  color: #6FE3A0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 1px;
}
.footer-notice .fn-ico svg { width: 19px; height: 19px; }
.footer-notice .fn-text { display: flex; flex-direction: column; gap: 6px; }
.footer-notice .fn-zh { font-size: 13.5px; line-height: 1.7; color: #D6E4DC; font-weight: 600; }
.footer-notice .fn-en { font-size: 12.5px; line-height: 1.7; color: #8FB0A0; }
.footer-divider { height: 1px; background: rgba(255, 255, 255, .1); margin: 36px 0 22px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #87A293;
}

/* ============================================================
   響應式
   ============================================================ */
@media (max-width: 900px) {
  .nav-menu, .nav-actions { display: none; }
  .nav-toggle { display: flex; }
  .nav-bar { height: 64px; }
}
@media (max-width: 768px) {
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-brand { max-width: none; }
  .footer-contact { min-width: 0; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .container { padding: 0 18px; }
  .site-footer { padding: 48px 0 24px; }
  .footer-brand-row .fb-name { font-size: 20px; }
  .footer-desc { font-size: 13.5px; }
  .footer-notice { margin-top: 32px; padding: 16px 16px; gap: 12px; }
  .footer-notice .fn-zh { font-size: 13px; }
  .footer-notice .fn-en { font-size: 12px; }
  .footer-divider { margin: 28px 0 18px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12.5px; }
}
