/* 鴻綸科技成果展示 — 極簡日式風（米白＋深藍）＋護眼深色模式，共用樣式 */
:root {
  /* 淺色（預設） */
  --bg: #fdfdfc;
  --bg-soft: #f7f7f5;
  --card: #ffffff;
  --card-hover: #ffffff;
  --line: rgba(0, 0, 0, 0.09);
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --muted-faint: #9a9a96;
  --accent: #1e3a5f;
  --accent-deep: #15293f;
  --accent-gold: #1e3a5f;
  --glow: rgba(30, 58, 95, 0.10);
  --header-bg: rgba(253, 253, 252, 0.92);
  --grid-line: rgba(0, 0, 0, 0.05);
  --hero-glow-1: transparent;
  --hero-glow-2: transparent;
  /* 全站統一 Noto Sans TC。這個變數名沿用 --mono（原本是 JetBrains Mono），
     現在只作為「數字、標籤等次要文字」的字型出口，字型本身已改成跟內文一致 */
  --mono: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  --radius: 4px;
  --maxw: 1080px;
  /* 版面留白：全站垂直節奏集中在這裡，要整體放鬆/收緊改這幾個值即可 */
  --sp-hero-top: 96px;
  --sp-hero-bottom: 104px;
  --sp-section: 56px;
  --sp-head-top: 52px;
  --sp-head-bottom: 32px;
}

:root[data-theme="dark"] {
  /* 護眼深色模式 */
  --bg: #141414;
  --bg-soft: #1b1b1b;
  --card: #1b1b1b;
  --card-hover: #1b1b1b;
  --line: rgba(255, 255, 255, 0.10);
  --text: #f2f2f0;
  --muted: #9a9a96;
  --muted-faint: #6b7280;
  --accent: #7fa8d9;
  --accent-deep: #5f87b8;
  --accent-gold: #7fa8d9;
  --glow: rgba(127, 168, 217, 0.14);
  --header-bg: rgba(20, 20, 20, 0.9);
  --grid-line: rgba(255, 255, 255, 0.05);
  --hero-glow-1: transparent;
  --hero-glow-2: transparent;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 手機端細字重（300）可讀性補償：不改字重，改用字距/行高/邊緣渲染拯救小螢幕強光下的對比度 */
@media (max-width: 768px) {
  body {
    letter-spacing: 0.02em;
    line-height: 1.8;
    -webkit-text-stroke: 0.15px currentColor;
  }
  .btn, .card-body h3, h1, h2 { font-weight: 400; }
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  max-width: 1600px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 1; min-width: 0; max-width: 55%; margin-right: auto; }
.brand img { height: auto; width: auto; max-height: 90px; max-width: 100%; display: block; }
.header-visit-counter {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
  margin-right: 12px;
}
.header-visit-counter span { color: var(--accent); font-weight: 600; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--muted);
  padding: 8px 9px;
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }
.main-nav a.active { color: var(--accent); }
.nav-contact-cta {
  padding: 8px 18px;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #fff;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.nav-contact-cta:hover { opacity: 0.85; color: #fff; text-decoration: none; }
.nav-contact-cta.active { opacity: 0.85; }
.mobile-contact-link {
  display: none;
  color: var(--accent) !important;
  font-weight: 400 !important;
}
.mobile-tools-link {
  display: none;
  color: var(--accent) !important;
  font-weight: 400 !important;
}

.nav-tools { position: relative; flex-shrink: 0; }
.nav-tools-trigger {
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
}
.nav-tools-trigger:hover, .nav-tools-trigger.active { color: #fff; background: var(--accent); text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.3rem;
  padding: 4px 12px;
  cursor: pointer;
}
.theme-toggle {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--sp-hero-top) 0 var(--sp-hero-bottom);
  text-align: left;
  overflow: hidden;
  background: var(--bg);
}
.hero > .wrap { position: relative; max-width: 900px; }
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.hero h1 .grad {
  color: var(--text);
  font-weight: 300;
}
.hero p.lead {
  margin: 20px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.85;
  font-weight: 300;
}
.hero-badge {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  font-weight: 500;
  word-break: keep-all;
}
.hero-cta { margin-top: 36px; display: flex; gap: 24px; justify-content: flex-start; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 2px;
  font-weight: 400;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  transition: opacity 0.2s, border-color 0.2s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { opacity: 0.85; color: #fff; }
.btn-ghost { background: none; border: none; border-bottom: 1px solid var(--muted); color: var(--muted); padding: 15px 0; border-radius: 0; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-sm { padding: 9px 20px; font-size: 0.86rem; }

/* ---------- Sections ---------- */
.section { padding: var(--sp-section) 0; }
.section.alt { background: transparent; border: none; }
.section-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 400; text-align: left; }
.section-sub { text-align: left; color: var(--muted); font-weight: 300; margin: 12px 0 36px; max-width: 620px; }
.eyebrow {
  display: block;
  text-align: left;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  margin-bottom: 14px;
}

/* ---------- Stats ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 40px; }
.stat {
  flex: 1;
  min-width: 160px;
  text-align: left;
}
.stat .num { font-size: 1.9rem; font-weight: 200; color: var(--text); font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif; }
.stat .label { color: var(--muted); font-size: 0.88rem; margin-top: 10px; font-weight: 300; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.card {
  position: relative;
  background: transparent;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}
/* hover 用輕微上移＋圖示區塊變色取代劃線，避免全站線條過多 */
.card:hover { transform: translateY(-3px); }
.card:hover .card-visual { background: var(--glow); }
.card-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  opacity: 0.55;
  display: block;
  margin-bottom: 6px;
}
.card-visual {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  background: var(--bg-soft);
  transition: background 0.3s ease;
}
.card-visual svg { width: 34px; height: 34px; color: var(--accent); stroke-width: 1.4; }
.card-visual img { width: 76px; height: 76px; object-fit: contain; }
/* 情境照片（非圖示）淡淡灰階融入米白背景，hover/靠近卡片時恢復原色 */
.card-visual img.photo,
.svc-photo,
.l-tour-photo {
  filter: grayscale(15%) contrast(97%);
  transition: filter 0.5s ease;
}
.card:hover .card-visual img.photo,
.card:hover .svc-photo,
.tour-zoom-panel:hover .l-tour-photo { filter: grayscale(0%) contrast(100%); }
.card-visual img.food-photo { width: 100%; height: 100%; object-fit: cover; }
/* 情境照片型卡片（活動剪影等）：照片填滿視覺區，不用圖示的 76px 尺寸 */
.card-visual.photo-visual { height: 190px; padding: 0; overflow: hidden; }
.card-visual.photo-visual img { width: 100%; height: 100%; object-fit: cover; }
/* 美食照片容器：磨砂玻璃背景手法（仿Spotify專輯封面）——原圖本身構圖過滿過緊，
   用contain留白會出現像跑版的letterbox黑邊。改用同張圖片模糊放大當背景，前景圖縮小
   置中、加圓角陰影，視覺上緩解特寫照片的壓迫感，不需要重新生成圖片。 */
.card-visual.food-visual {
  height: 190px;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.card-visual.food-visual::before {
  content: "";
  position: absolute;
  inset: -20px;
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.72) saturate(1.1);
  transform: scale(1.15);
  z-index: 0;
}
.card-visual.food-visual img.food-photo {
  position: relative;
  z-index: 1;
  width: 76%;
  height: 76%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}
.v-blue, .v-indigo, .v-cyan, .v-teal, .v-navy { background: var(--bg-soft); }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 8px; }
.h3-icon { width: 18px; height: 18px; vertical-align: -3px; color: var(--accent); stroke-width: 1.6; margin-right: 2px; }
.card-body h3 a { color: var(--text); }
.card-body .tagline { color: var(--accent); font-size: 0.85rem; margin-bottom: 10px; }
.card-body p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.card-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; display: grid; gap: 18px; }
.feature-list li {
  padding-left: 28px;
  position: relative;
  color: var(--muted);
  /* keep-all 讓中文不在詞中間斷行（排版美感），但遇到沒有標點的長中文句
     會無處換行而撐破手機版面，因此加 anywhere 當保險：平常維持 keep-all，
     真的塞不下才允許斷行 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.feature-list li::before {
  content: "▸";
  position: absolute;
  left: 8px;
  color: var(--accent);
}
.feature-list li strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.faq-item summary {
  cursor: pointer;
  padding: 22px 4px;
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 300;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 4px 22px; color: var(--muted); }

/* ---------- Content pages ---------- */
.page-head { padding: var(--sp-head-top) 0 var(--sp-head-bottom); text-align: center; background: var(--bg); }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 400; }
.page-head p { color: var(--muted); margin-top: 14px; max-width: 640px; margin-inline: auto; }
.svc-tabs { display: flex; gap: 8px; justify-content: center; margin-top: 28px; border-bottom: 1px solid var(--grid-line); }
/* 標籤文字不折行；窄螢幕改成整列可橫向滑動，不要把「解決方案」斷成兩行 */
.svc-tab { font: inherit; color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 18px; cursor: pointer; white-space: nowrap; }
.svc-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.svc-tab:hover { color: var(--text); }
@media (max-width: 560px) {
  .svc-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    gap: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .svc-tabs::-webkit-scrollbar { display: none; }
  .svc-tab { padding: 10px 12px; font-size: 0.92rem; }
}
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin: 32px 0 14px; font-size: 1.3rem; font-weight: 400; color: var(--text); }
.prose h3 { margin: 28px 0 12px; font-size: 1.05rem; font-weight: 400; color: var(--text); }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 24px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Tags ---------- */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.tag {
  font-size: 0.76rem;
  padding: 4px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: none;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); max-width: 820px; margin: 0 auto; }
.contact-card {
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 24px 4px;
  text-align: center;
}
.contact-card a { display: block; color: inherit; text-decoration: none; }
/* 固定高度，圖示比例不同時各卡片的標題才會對齊 */
.contact-card .ico { display: flex; justify-content: center; align-items: center; height: 76px; }
.contact-card .ico img { width: 76px; height: 76px; object-fit: contain; }
/* Gmail 標誌是 4:3，不能塞進正方形框，否則會被壓扁 */
.contact-card .ico img[src$=".svg"] { width: 76px; height: 57px; }
.contact-card h3 { margin: 12px 0 6px; font-size: 1rem; font-weight: 500; }
.contact-card p { color: var(--muted); font-size: 0.95rem; }
.contact-card a:hover h3 { color: var(--accent); }
.contact-card a:hover p { text-decoration: underline; }

/* ---------- Partner badge ---------- */
.badge-chip {
  display: inline-block;
  background: #fff;
  padding: 14px 22px;
  line-height: 0;
  border: 1px solid var(--line);
}
.badge-chip img { height: 52px; width: auto; }
@media (max-width: 480px) { .badge-chip img { height: 42px; } }
.badge-chip-lg { padding: 20px 28px; }
.badge-chip-lg img { height: 150px; }
@media (max-width: 480px) { .badge-chip-lg img { height: 110px; } }
/* ---------- Lightbox（點圖放大，見 main.js） ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 10, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox-overlay img {
  max-width: min(90vw, 900px);
  max-height: 88vh;
  width: auto;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lightbox-overlay .lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
}

.prose-figure { margin: 20px 0; }
.prose-figure img { display: block; width: 100%; border: 1px solid var(--line); filter: grayscale(0.15); }
.prose-figure figcaption { margin-top: 8px; font-size: 0.76rem; color: var(--muted-faint); text-align: right; }
.cert-gallery {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  margin: 32px auto 0;
  overflow-x: auto;
  padding-bottom: 4px;
}
.cert-gallery img {
  width: 190px;
  min-width: 150px;
  flex: 1 1 190px;
  height: auto;
  border-width: 3px;
  border-style: solid;
  border-top-color: #4285f4;
  border-right-color: #ea4335;
  border-bottom-color: #fbbc05;
  border-left-color: #34a853;
  background: #fff;
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cert-gallery img:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
@media (max-width: 860px) {
  .cert-gallery {
    justify-content: flex-start;
    mask-image: linear-gradient(to right, black calc(100% - 36px), transparent);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 36px), transparent);
  }
}
.directory-excerpt {
  display: block;
  max-width: 640px;
  width: 100%;
  margin: 28px auto 0;
  border-width: 3px;
  border-style: solid;
  border-top-color: #4285f4;
  border-right-color: #ea4335;
  border-bottom-color: #fbbc05;
  border-left-color: #34a853;
}
.excerpt-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
}
/* 標題裡的 Google wordmark 配色（由 main.js 自動包起來） */
.g-word { white-space: nowrap; font-weight: 500; letter-spacing: 0.005em; }

.partner-badge {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 28px auto 0;
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  /* 與下方 Google 名冊節錄圖一致的四色外框 */
  border-width: 3px;
  border-style: solid;
  border-top-color: #4285f4;
  border-right-color: #ea4335;
  border-bottom-color: #fbbc05;
  border-left-color: #34a853;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 32px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.7fr 1fr 1.35fr; }
/* 頁尾兩欄清單共用同一套節奏：小標題 → 髮絲線分隔的列，hover 時淡底＋往右挪一點 */
.footer-grid h4 {
  color: var(--muted-faint);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; }
.footer-nav, .footer-contact { border-top: 1px solid var(--line); }
.footer-nav li, .footer-contact li { margin: 0; border-bottom: 1px solid var(--line); }
.footer-nav a, .footer-contact a {
  display: grid;
  align-items: baseline;
  gap: 14px;
  padding: 11px 2px;
  min-height: 44px;
  color: var(--muted) !important;
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.footer-nav a { grid-template-columns: 1fr auto; font-size: 0.9rem; color: var(--text) !important; align-items: center; }
.footer-nav a::after { content: "›"; color: var(--muted-faint); font-size: 0.95rem; transition: transform 0.2s ease, color 0.2s ease; }
.footer-nav a:hover::after { color: var(--accent); transform: translateX(3px); }
.footer-nav a:hover, .footer-contact a:hover { background: var(--bg-soft); padding-left: 8px; text-decoration: none !important; }
/* 聯絡方式：名片式細線清單。左欄是固定寬的類別標籤，右欄是可點的內容，
   外部連結補一個右上箭頭。不用圖示，維持頁尾安靜、與全站細線風格一致。 */
.footer-contact a { grid-template-columns: 46px 1fr auto; }
.fc-key {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--muted-faint);
  white-space: nowrap;
}
.footer-contact a:hover .fc-key { color: var(--accent); }
.fc-val { font-size: 0.9rem; color: var(--text); line-height: 1.6; word-break: keep-all; }
.fc-val em {
  display: block;
  font-style: normal;
  font-size: 0.74rem;
  color: var(--muted-faint);
  margin-top: 3px;
  letter-spacing: 0.01em;
}
.fc-go { font-size: 0.78rem; color: var(--muted-faint); transition: transform 0.2s ease, color 0.2s ease; }
.footer-contact a:hover .fc-go { color: var(--accent); transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) {
  .footer-nav a, .footer-nav a::after, .footer-contact a, .fc-go { transition: none; }
}
.footer-logo img { height: 56px; width: auto; margin-bottom: 18px; }
.footer-logo p { line-height: 1.8; margin-bottom: 20px; }
.copyright { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; font-size: 0.8rem; }
.visit-counter { margin-top: 10px; text-align: center; font-size: 0.78rem; color: var(--muted); font-family: var(--mono); }

/* ---------- 浮動聯絡按鈕 ---------- */
.contact-fab {
  position: fixed; right: 20px; bottom: 24px; z-index: 60;
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 30px;
  padding: 8px 12px; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.25);
}
.fab-label {
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  white-space: nowrap; padding: 0 2px;
  animation: fab-label-in 0.5s ease 0.3s both;
}
@keyframes fab-label-in { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: translateX(0); } }
.contact-fab a {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.contact-fab a:hover { transform: scale(1.08); opacity: 0.88; }
.contact-fab a svg { width: 20px; height: 20px; stroke: #fff; }
.contact-fab a.fab-fb { background: #1877F2; }
.contact-fab a.fab-line { background: #06C755; }
.contact-fab a.fab-line svg { width: 22px; height: 22px; fill: #fff; stroke: none; }
.contact-fab a.fab-map { background: #fff; border: 1px solid var(--line); }
.contact-fab a.fab-map img { width: 26px; height: 26px; }
/* Gmail 是彩色標誌，跟地圖那顆一樣給白底才不會糊在深色裡 */
.contact-fab a.fab-mail { background: #fff; border: 1px solid var(--line); }
.contact-fab a.fab-mail img { width: 24px; height: 18px; }
@media (max-width: 480px) {
  .header-visit-counter { display: none; }
  .hero-badge { letter-spacing: 0.12em; }
  .contact-fab { right: 12px; bottom: 16px; padding: 6px 8px; gap: 8px; }
  .fab-label { display: none; }
  .contact-fab a { width: 36px; height: 36px; }
  .contact-fab a svg { width: 18px; height: 18px; }
  .contact-fab a.fab-map img { width: 22px; height: 22px; }
  .contact-fab a.fab-mail img { width: 21px; height: 16px; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Header／導覽列在裝不下前先收成漢堡選單，避免 main-nav 換行造成排版跑掉 ----------
   斷點需 ≥ 單行容納 nav 所需的最小寬度（實測 1502px），加入代理軟體後由 1400px 上調至 1520px */
@media (max-width: 1520px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .nav-contact-cta { display: none; }
  .mobile-contact-link { display: block; }
  .mobile-tools-link { display: block; }
  .nav-tools { display: none; }
}

/* ---------- RWD ---------- */
@media (max-width: 860px) {
  .brand img { max-height: 72px; }
  .header-inner { padding: 10px 16px; }
  .header-visit-counter { font-size: 0.72rem; padding: 4px 10px; margin-right: 6px; }
  .wrap { padding: 0 16px; }
  .section { padding: 40px 0; }
  .btn { padding: 13px 22px; }
  .hero-cta .btn { width: 100%; max-width: 320px; }
  .card-actions .btn { flex: 1; text-align: center; min-width: 120px; }
  .stats { gap: 28px 20px; }
  .stat { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .stat .num { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 44px; }
  .page-head { padding: 36px 0 24px; }
}

/* ---------- Logo 深/淺色切換（放在最後確保覆蓋 .brand img／.footer-logo img） ---------- */
img.logo-dark { display: none; }
:root[data-theme="dark"] img.logo-light { display: none; }
:root[data-theme="dark"] img.logo-dark { display: block; }

/* ---------- 服務項目：可點擊卡片（點進去看該服務的獨立說明頁） ---------- */
a.svc-card { text-decoration: none; color: inherit; }
a.svc-card:hover { text-decoration: none; }
a.svc-card:hover h3 { color: var(--accent); }
.svc-more {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}
a.svc-card:hover .svc-more { transform: translateX(3px); }
.svc-more { transition: transform 0.2s ease; }

/* 服務內頁：麵包屑、CTA 區塊、上下篇導覽 */
.crumbs {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.svc-cta {
  margin-top: 48px;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--card);
}
.svc-cta .btn { margin-right: 10px; margin-top: 8px; }
.svc-pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.svc-pager a { color: var(--muted); }
.svc-pager a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .svc-pager { flex-direction: column; gap: 10px; }
  .svc-cta { padding: 22px; }
}

/* ---------- 台銀標設備類別卡 ---------- */
.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 22px 0 8px;
}
.bot-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.bot-cat:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.bot-cat img { width: 100%; height: 96px; object-fit: contain; }
.bot-cat span { font-size: 0.86rem; text-align: center; line-height: 1.5; }
.bot-cat--text { justify-content: center; min-height: 130px; background: var(--bg-soft); }
.prose .bot-grid a { color: var(--text); }
/* 台銀標類別卡：產品圖多為白底，固定白色底才不會在深色模式浮一塊 */
.card-visual.bot-visual { height: 170px; padding: 16px; background: #fff; }
.card-visual.bot-visual img { width: 100%; height: 100%; object-fit: contain; }
.card:hover .card-visual.bot-visual { background: #fff; }
/* 台銀標各類別子頁的主視覺 */
.bot-hero-img {
  border: 1px solid var(--line);
  background: #fff;
  max-width: 420px;
  margin: 0 auto 32px;
  overflow: hidden;
}
.bot-hero-img img { display: block; width: 100%; height: auto; }
/* ---------- 台銀標契約品項表 ---------- */
.bot-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: flex-end;
  padding: 18px;
  margin: 26px 0 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.bot-filter label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.bot-filter input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}
.bot-filter input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.bot-filter .bot-range { flex-direction: row; align-items: center; gap: 8px; }
.bot-filter .bot-range input { width: 108px; }
.bot-filter button {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.bot-filter button:hover { border-color: var(--accent); color: var(--accent); }
.bot-count { font-size: 0.85rem; color: var(--muted); margin: 0 0 10px; }
/* 表格較寬，讓它自己橫向捲動，不要撐破頁面 */
.bot-table-scroll { overflow-x: auto; border: 1px solid var(--line); }
/* min-width 讓窄螢幕改成整張表橫向捲動，而不是把欄位壓成一行兩個字 */
.bot-table-scroll table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.88rem; }
.bot-table-scroll th,
.bot-table-scroll td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.bot-table-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  font-weight: 500;
  white-space: nowrap;
  z-index: 1;
}
.bot-table-scroll tbody tr:last-child td { border-bottom: 0; }
.bot-table-scroll tbody tr:hover { background: var(--glow); }
.bot-table-scroll .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bot-table-scroll .nowrap { white-space: nowrap; }
.bot-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 768px) {
  .bot-filter { padding: 14px; gap: 12px 14px; }
  .bot-filter .bot-range input { width: 92px; }
  .bot-table-scroll table { font-size: 0.82rem; }
  .bot-table-scroll th, .bot-table-scroll td { padding: 8px 10px; }
  /* 提示表格可以左右滑，否則使用者不會發現右邊還有欄位 */
  .bot-count::after { content: "（表格可左右滑動）"; }
}
:target { scroll-margin-top: 120px; }

/* ---------- 台銀標設備圖示 ---------- */
.bot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 20px 0 8px;
}
.bot-figure { margin: 0; }
.bot-figure img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 10px;
}
.bot-figure figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ---------- Google for Education 產品家族卡 ---------- */
.gfe-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  background: linear-gradient(150deg, rgba(66,133,244,0.07), rgba(52,168,83,0.07) 55%, rgba(251,188,5,0.08));
}
.gfe-card h3 { font-size: 1.35rem; font-weight: 400; margin-bottom: 6px; }
.gfe-card ul { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.gfe-card li { padding-left: 22px; position: relative; color: var(--muted); }
.gfe-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dot, #4285f4);
}
.gfe-card li strong { color: var(--text); font-weight: 500; }
.gfe-card .btn { margin-top: 26px; }

/* ---------- 活動剪影圖文卡片 ---------- */
.event-list { list-style: none; display: grid; gap: 26px; }
.event-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.event-item:last-child { border-bottom: none; padding-bottom: 0; }
.event-item img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  filter: grayscale(0.15);
  transition: filter 0.4s ease;
}
.event-item:hover img { filter: grayscale(0); }
.event-item .event-body { color: var(--muted); }
.event-item .event-title {
  display: block;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 6px;
}
.event-item .event-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted-faint);
  margin-right: 10px;
}
@media (max-width: 640px) {
  .event-item { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- 規格／方案比較表 ---------- */
.spec-table-wrap { overflow-x: auto; margin: 22px 0; }
.spec-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.spec-table th,
.spec-table td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}
.spec-table thead th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 500;
}
.spec-table tbody th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 400;
  white-space: nowrap;
}

/* ---------- 代理軟體：廠商 logo ---------- */
.sw-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 一律白底卡片：多數官方 logo 是深色字，深色模式直接貼會看不見 */
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 16px;
  /* 上方留白要大於與自身標題的距離，否則 logo 會看起來像屬於前一段 */
  margin: 52px 0 12px;
  min-height: 64px;
  min-width: 96px;
}
.prose .sw-logo:first-child { margin-top: 0; }
.prose .sw-logo + h2 { margin-top: 0; }
.sw-logo img {
  display: block;
  max-height: 42px;
  max-width: 168px;
  width: auto;
  height: auto;
}
@media (max-width: 640px) {
  .sw-logo { padding: 8px 12px; min-height: 56px; }
  .sw-logo img { max-height: 34px; max-width: 140px; }
}

/* ---------- 並排小圖（原圖解析度不高時，縮小並排比拉滿一欄清楚） ---------- */
.fig-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.fig-row img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
}
.fig-row figcaption {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--muted-faint);
  text-align: right;
}
@media (max-width: 640px) {
  .fig-row { grid-template-columns: 1fr; gap: 14px; }
}
