/* ==========================================================================
   佳大科技有限公司 (CHIADA TECHNOLOGY) - 正式版企業官網樣式表
   配色系統：方案 A — 極簡白灰 ＋ 柔和磚紅橘點綴（純 CSS3 · 完整 RWD）
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-tint: #fef2ef;
  --navy: #1f2937;
  --navy-mid: #374151;
  --primary: #d64033;
  --primary-dark: #b83024;
  --accent: #ea6a2a;
  --brand-gradient: linear-gradient(135deg, #d64033 0%, #ea6a2a 100%);
  --brand-gradient-hover: linear-gradient(135deg, #b83024 0%, #d4581b 100%);
  --teal: #0f766e;
  --text: #4b5563;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --border-warm: #f3d5ce;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.1);
  --container: 1200px;
  --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.62;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s, background-color .2s, border-color .2s, transform .2s; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3, h4, h5 { margin: 0 0 8px; color: var(--navy); font-weight: 700; line-height: 1.28; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; cursor: pointer; line-height: 1.2; white-space: nowrap;
}
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 6px 18px rgba(214, 64, 51, 0.24); }
.btn-primary:hover { background: var(--brand-gradient-hover); color: #fff; transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--navy); border-color: #d1d5db; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-soft); }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05ad4a; color: #fff; transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo img { height: 42px; width: auto; }
.footer-logo img { height: 38px; width: auto; }

.main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 10px 13px;
  color: var(--navy); font-size: 15px; font-weight: 600; border-radius: 6px; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--bg-soft); }

.nav-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 265px;
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--primary);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 8px;
  list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 6px;
  color: var(--navy); font-size: 14px; font-weight: 600;
}
.nav-dropdown a small { font-size: 12px; font-weight: 400; color: var(--text-light); }
.nav-dropdown a:hover { background: var(--bg-soft); color: var(--primary); }

.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-phone { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.header-phone:hover { color: var(--primary); }
.header-phone-mobile {
  display: none; width: 40px; height: 40px; border-radius: 8px; background: var(--bg-tint);
  color: var(--primary); align-items: center; justify-content: center; flex-shrink: 0;
}
.mobile-nav-cta { display: none; }
.menu-toggle {
  display: none; background: transparent; border: 1.5px solid var(--border); border-radius: 8px;
  width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; color: var(--navy);
}

/* ---------- Hero Section (Compact & High Visual Weight) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 88% 15%, rgba(234, 106, 42, 0.065) 0%, transparent 45%),
    linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  padding: 36px 0 44px; border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(31, 41, 55, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 41, 55, 0.032) 1px, transparent 1px);
  background-size: 36px 36px;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 0.98fr 1.02fr; gap: 34px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  color: var(--navy); font-size: 12.5px; font-weight: 700; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.hero h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.2; margin-bottom: 12px; }
.hero h1 .highlight { color: var(--primary); }
.hero-lead { font-size: 15.5px; line-height: 1.68; color: var(--text); margin-bottom: 20px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--text-light); }
.hero-tags span { display: inline-flex; align-items: center; gap: 5px; }
.hero-tags svg { color: var(--teal); flex-shrink: 0; }

.hero-visual { position: relative; }
.hero-frame {
  border-radius: var(--radius-md); overflow: hidden; border: 5px solid #fff;
  box-shadow: var(--shadow-lg); background: #fff; aspect-ratio: 16 / 10;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-float-card {
  position: absolute; bottom: -14px; left: -14px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px; max-width: 280px;
}
.float-icon {
  width: 38px; height: 38px; border-radius: 8px; background: var(--brand-gradient);
  color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.float-title { font-size: 13.5px; font-weight: 700; color: var(--navy); line-height: 1.25; }
.float-sub { font-size: 11.5px; color: var(--text-light); }
.hero-float-badge {
  position: absolute; top: 14px; right: -10px; background: #fff; color: var(--navy);
  border: 1px solid var(--border); padding: 7px 14px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); font-size: 12.5px; font-weight: 600;
}
.hero-float-badge strong { color: var(--primary); font-size: 15px; font-weight: 800; }

/* ---------- Sections & Compact Visual Page Hero ---------- */
.section { padding: 44px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 740px; margin-bottom: 24px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-label {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 5px;
}
.section-head h2 { font-size: clamp(23px, 2.6vw, 30px); margin-bottom: 8px; }
.section-head p { font-size: 14.5px; color: var(--text-light); }

.page-hero {
  background:
    radial-gradient(circle at 90% 20%, rgba(234, 106, 42, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #f8f9fb 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border); padding: 28px 0 32px;
}
.page-hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 30px; align-items: center;
}
.page-hero-img {
  border-radius: var(--radius-md); overflow: hidden; border: 4px solid #fff;
  box-shadow: var(--shadow-md); aspect-ratio: 16 / 9; background: #fff;
}
.page-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-light); margin-bottom: 8px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb strong { color: var(--primary); }
.page-hero h1 { font-size: clamp(25px, 3vw, 34px); margin-bottom: 8px; }
.page-hero p { font-size: 15px; color: var(--text); max-width: 640px; }

/* ---------- KPI & Grids (Tight Rhythm) ---------- */
.kpi-bar { background: #fff; padding: 20px 0; border-bottom: 1px solid var(--border); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-item { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-soft); border: 1px solid var(--border); text-align: center; }
.kpi-num { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1.15; margin-bottom: 2px; }
.kpi-label { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.kpi-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.cards-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cards-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }

/* ---------- Visual Image-Header Cards (~40% Photo Weight) ---------- */
.solution-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.solution-card.has-photo { padding: 0; }
.card-photo {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #eef1f5;
  border-bottom: 1px solid var(--border);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.solution-card:hover .card-photo img { transform: scale(1.04); }
.card-photo .photo-badge {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 99px;
  background: rgba(31, 41, 55, 0.84); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(4px);
}
.card-photo .photo-badge.hot { background: var(--brand-gradient); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.solution-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-warm); }
.solution-card.featured { border-color: var(--border-warm); }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--bg-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.solution-card h3 { font-size: 17.5px; margin-bottom: 6px; }
.solution-card p { font-size: 13.5px; color: var(--text-light); margin-bottom: 10px; line-height: 1.55; }
.card-badge {
  display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 99px; background: var(--bg-tint); color: var(--primary); margin-bottom: 8px;
}
.check-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--text); }
.check-list li { display: flex; align-items: flex-start; gap: 7px; line-height: 1.48; }
.check-list li::before { content: "✓"; color: var(--primary); font-weight: 800; flex-shrink: 0; }
.card-link { margin-top: auto; display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; color: var(--primary); }
.card-link:hover { gap: 9px; }

/* Visual Gallery Strip */
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-tile {
  position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 10;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-tile:hover img { transform: scale(1.05); }
.photo-tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.82));
  color: #fff; font-size: 13px; font-weight: 700;
}

/* ---------- Architecture Diagram Frame ---------- */
.arch-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm); overflow-x: auto;
}
.arch-box svg { width: 100%; min-width: 720px; height: auto; display: block; margin: 0 auto; }
.arch-caption { margin-top: 14px; font-size: 13.5px; color: var(--text-light); text-align: center; }

/* ---------- Native SEO FAQ Accordion (<details>) ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 920px; margin: 0 auto; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--border-warm); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 15px;
  color: var(--navy); display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1; flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-ans { padding: 0 18px 16px; font-size: 14px; color: var(--text); line-height: 1.68; border-top: 1px solid #f3f4f6; padding-top: 12px; }

/* ---------- Proposal / Tier Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table thead th { background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; }
.spec-table tbody tr:nth-child(even) { background: #fafbfc; }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table td strong { color: var(--navy); }
.tier-tag {
  display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;
  background: var(--bg-tint); color: var(--primary); margin-bottom: 4px;
}

/* ---------- Interactive Needs Advisor ---------- */
.advisor-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow-md); display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 36px; align-items: start;
}
.advisor-step-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.advisor-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.advisor-pill {
  padding: 8px 15px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff;
  color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.advisor-pill:hover { border-color: var(--primary); color: var(--primary); }
.advisor-pill.active { background: var(--brand-gradient); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(214, 64, 51, 0.22); }
.advisor-result {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-md); padding: 24px;
}
.advisor-result h3 { font-size: 19px; margin-bottom: 8px; }
.advisor-result p { font-size: 14px; color: var(--text); margin-bottom: 14px; }

/* ---------- Tabs ---------- */
.tabs-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tab-btn {
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff;
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--brand-gradient); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(214, 64, 51, 0.22); }
.tab-panel { display: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.tab-panel.active { display: block; }

.media-box { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); background: #fff; }
.media-box img { width: 100%; height: 100%; object-fit: cover; }
.spec-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.spec-pill { padding: 5px 12px; border-radius: 6px; background: var(--bg-tint); color: var(--primary-dark); font-size: 13px; font-weight: 600; }

/* ---------- 7-Step Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.process-step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 12px; text-align: center; }
.step-num {
  width: 34px; height: 34px; margin: 0 auto 10px; border-radius: 50%; background: var(--bg-tint);
  color: var(--primary); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.process-step h4 { font-size: 14.5px; margin-bottom: 6px; }
.process-step p { font-size: 12.5px; line-height: 1.55; color: var(--text-light); }

/* ---------- Before / After Interactive Comparison Slider ---------- */
.ba-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-md); aspect-ratio: 16 / 9; max-height: 460px; user-select: none; background: #111;
}
.ba-layer { position: absolute; inset: 0; }
.ba-layer img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { filter: grayscale(45%) contrast(92%) brightness(82%); clip-path: inset(0 50% 0 0); }
.ba-label {
  position: absolute; top: 16px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; z-index: 3;
}
.ba-label.left { left: 16px; background: rgba(31, 41, 55, 0.85); color: #fff; }
.ba-label.right { right: 16px; background: var(--brand-gradient); color: #fff; }
.ba-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; z-index: 4; pointer-events: none; box-shadow: 0 0 10px rgba(0,0,0,.4); }
.ba-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px;
  border-radius: 50%; background: #fff; color: var(--primary); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); z-index: 5; pointer-events: none;
}
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 6; margin: 0; }

/* ---------- Brand Wall (Uniformly Large & Trimmed Brand Logos) ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.brand-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 164px;
  cursor: default;
}
.brand-logo-wrap {
  width: 100%; height: 86px; display: flex; align-items: center; justify-content: center;
}
.brand-card img { max-height: 82px; max-width: 215px; width: auto; height: auto; object-fit: contain; }
.brand-card img.wide-logo { width: 92%; max-width: 215px; max-height: 78px; }
.brand-card span { font-size: 13px; color: var(--text-light); font-weight: 600; text-align: center; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active { background: var(--brand-gradient); border-color: transparent; color: #fff; }
.search-input {
  padding: 9px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; min-width: 240px; color: var(--navy); background: #fff;
}
.search-input:focus { outline: none; border-color: var(--primary); }

.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cert-card, .product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cert-card { cursor: pointer; }
.cert-card:hover, .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-warm); }
.cert-thumb, .product-thumb {
  aspect-ratio: 4 / 3; background: var(--bg-soft); padding: 14px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cert-thumb img, .product-thumb img { max-height: 100%; max-width: 100%; object-fit: contain; }
.cert-meta, .product-meta { padding: 15px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; flex: 1; }
.cert-cat, .product-brand {
  display: inline-block; align-self: flex-start; font-size: 11.5px; font-weight: 700;
  color: var(--primary); background: var(--bg-tint); padding: 2px 8px; border-radius: 99px; margin-bottom: 6px;
}
.cert-title, .product-name { font-size: 15px; font-weight: 700; color: var(--navy); line-height: 1.4; margin-bottom: 6px; }
.product-spec { font-size: 13px; color: var(--text-light); line-height: 1.55; margin-bottom: 12px; }

/* Featured High-Value Project Cards */
.case-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.case-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.case-amount {
  padding: 4px 12px; border-radius: 999px; background: var(--bg-tint); color: var(--primary-dark);
  font-size: 12.5px; font-weight: 800; white-space: nowrap;
}
.case-ind { font-size: 12px; font-weight: 700; color: var(--text-light); }
.case-card h3 { font-size: 18px; margin: 4px 0 12px; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project-ind { font-size: 12px; font-weight: 700; color: var(--primary); }
.project-amt { font-size: 11.5px; font-weight: 800; color: var(--primary-dark); background: var(--bg-tint); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.project-name { font-size: 14.5px; font-weight: 600; color: var(--navy); }

/* Universal Accessible Modals (100% Legacy iOS & Modern Browser Compatible) */
.lightbox {
  position: fixed; inset: 0; top: 0; right: 0; bottom: 0; left: 0; z-index: 2000;
  background: rgba(15, 23, 42, 0.82); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  background: #fff; border-radius: var(--radius-md); max-width: 820px; width: 100%;
  max-height: 90vh; overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 20px; position: relative; text-align: center; box-shadow: var(--shadow-lg);
}
.lightbox-inner img { margin: 0 auto 12px; max-height: 70vh; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--bg-soft); color: var(--navy); font-size: 20px; cursor: pointer;
}
.line-modal-box { max-width: 560px; text-align: left; padding: 24px; }
.line-modal-grid { display: grid; grid-template-columns: 185px 1fr; gap: 20px; align-items: center; margin-top: 14px; }
.line-qr-box { text-align: center; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.line-qr-box img { width: 155px; height: 155px; margin: 0 auto 8px; }
.line-copy-area { width: 100%; font-family: inherit; font-size: 13px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: #fafbfc; color: var(--navy); resize: none; }
@media (max-width: 600px) { .line-modal-grid { grid-template-columns: 1fr; } }

/* ---------- Contact CTA & Form (Tighter) ---------- */
.cta-card {
  background: linear-gradient(135deg, #f8fafc 0%, #fff7f4 100%);
  color: var(--navy); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 30px; align-items: start; box-shadow: var(--shadow-md);
}
.contact-info-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.contact-info-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text); }
.contact-info-list strong { color: var(--navy); }
.cta-form { background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--navy); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 8px 11px; border: 1.5px solid var(--border); border-radius: 6px;
  font-family: inherit; font-size: 14px; color: var(--navy); background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-status { margin-top: 10px; padding: 9px 12px; border-radius: 6px; font-size: 13.5px; display: none; }
.form-status.ok { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-status.err { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- Footer (Compact) ---------- */
.site-footer { background: #f3f5f8; color: var(--text); border-top: 3px solid var(--primary); padding-top: 38px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 0.85fr 1.15fr; gap: 28px; padding-bottom: 28px; }
.footer-col h4 { color: var(--navy); font-size: 15px; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--border); display: inline-block; }
.footer-col p { font-size: 13.5px; color: var(--text-light); line-height: 1.65; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.footer-links a { color: var(--text); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { background: var(--navy); padding: 16px 0; font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- Floating Quick Actions ---------- */
.floating-actions { position: fixed; right: 20px; bottom: 24px; z-index: 850; display: flex; flex-direction: column; gap: 10px; }
.fab {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 6px;
  color: #fff; box-shadow: var(--shadow-md); border: 0; cursor: pointer; font-weight: 800; font-size: 12px;
}
.fab-label { display: none; }
.fab-line { background: #06c755; }
.fab-line:hover { background: #05ad4a; color: #fff; transform: scale(1.06); }
.fab-phone { background: var(--brand-gradient); }
.fab-phone:hover { background: var(--brand-gradient-hover); color: #fff; transform: scale(1.06); }
.fab-top { background: #fff; color: var(--navy); border: 1.5px solid #d1d5db; }
.fab-top:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ---------- Responsive (Tablet & Mobile Optimized) ---------- */
@media (max-width: 1100px) {
  .process-grid { grid-template-columns: repeat(4, 1fr); }
  .brand-grid { grid-template-columns: repeat(4, 1fr); }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .header-phone { display: none; }
}
@media (max-width: 960px) {
  .hero-grid, .page-hero-grid, .split-2, .cta-card, .advisor-box { grid-template-columns: 1fr; gap: 22px; }
  .hero-float-card { left: 10px; bottom: 10px; }
  .hero-float-badge { right: 10px; }
  .kpi-grid, .cards-grid-3, .cards-grid-4, .photo-strip, .project-grid, .brand-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  html { scroll-padding-top: 76px; }
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .btn { white-space: normal; text-align: center; padding: 11px 18px; font-size: 14.5px; }
  .btn-sm { padding: 9px 14px; font-size: 13.5px; }

  /* Mobile Header & Drawer Menu */
  .header-inner { gap: 10px; }
  .brand-logo img { height: 34px; }
  .header-cta { gap: 8px; }
  .header-cta .btn { display: none; }
  .header-phone-mobile { display: inline-flex; }
  .menu-toggle { display: inline-flex; width: 40px; height: 40px; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; width: 100%; z-index: 950; background: #fff;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    padding: 12px 16px 20px; flex-direction: column; align-items: stretch; display: none;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  }
  .main-nav.open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav-link { padding: 11px 10px; font-size: 15.5px; }
  .nav-dropdown {
    position: static; min-width: 0; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-left: 2px solid var(--border-warm); margin: 2px 0 6px 12px; padding: 2px 0 2px 10px;
  }
  .nav-dropdown a { padding: 8px 10px; font-size: 14px; }
  .nav-dropdown a small { display: none; }
  .mobile-nav-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  }

  /* Compact Hero & Sections on Phone */
  .hero { padding: 24px 0 28px; }
  .hero h1 { font-size: 26px; line-height: 1.26; }
  .hero-lead { font-size: 14.5px; margin-bottom: 16px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-tags { gap: 6px 12px; font-size: 12.5px; }
  .hero-frame { border-width: 3px; }
  .hero-float-card { display: none; }
  .hero-float-badge { top: 10px; right: 10px; padding: 5px 10px; font-size: 11.5px; }
  .hero-float-badge strong { font-size: 13.5px; }

  .page-hero { padding: 20px 0 24px; }
  .page-hero h1 { font-size: 23px; }
  .page-hero p { font-size: 14px; }
  .section { padding: 30px 0; }
  .section-head { margin-bottom: 18px; }
  .section-head h2 { font-size: 21px; }
  .section-head p { font-size: 13.5px; }

  /* Smart 2-Column Grids for Compact Mobile Scrolling */
  .kpi-bar { padding: 14px 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-item { padding: 11px 10px; }
  .kpi-num { font-size: 21px; }
  .kpi-label { font-size: 12.5px; }
  .kpi-sub { font-size: 11px; }

  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand-card { min-height: 112px; padding: 12px 10px; gap: 8px; }
  .brand-logo-wrap { height: 54px; }
  .brand-card img { max-height: 50px; max-width: 126px; }
  .brand-card img.wide-logo { width: 92%; max-width: 132px; max-height: 46px; }
  .brand-card span { font-size: 11.5px; line-height: 1.35; }

  .cert-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cert-meta { padding: 10px 12px; }
  .cert-title { font-size: 13px; }

  /* Full-Width Cards & Forms */
  .cards-grid-3, .cards-grid-2, .cards-grid-4, .photo-strip, .process-grid, .project-grid, .form-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .card-body { padding: 14px 15px 16px; }
  .solution-card h3 { font-size: 16.5px; }

  /* Scrollable Tables & SVG Diagrams with Clear Touch Cue */
  .table-wrap, .arch-box { -webkit-overflow-scrolling: touch; }
  .table-wrap::before {
    content: "← 左右滑動查看完整規格 →";
    display: block; text-align: center; font-size: 11.5px; font-weight: 700;
    color: var(--primary); background: var(--bg-tint); padding: 5px 10px; border-bottom: 1px solid var(--border-warm);
  }
  .arch-box { padding: 14px 12px; border-radius: var(--radius-md); }
  .arch-box::before {
    content: "← 左右滑動查看完整架構圖 →";
    display: block; text-align: center; font-size: 11.5px; font-weight: 700;
    color: var(--primary); margin-bottom: 8px;
  }
  .spec-table { font-size: 13.5px; min-width: 560px; }
  .spec-table th, .spec-table td { padding: 10px 12px; }

  /* Filters, Tabs, FAQ & Forms (iOS 16px anti-zoom) */
  .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .search-input { width: 100%; min-width: 0; font-size: 16px; }
  .tabs-nav { gap: 6px; margin-bottom: 16px; }
  .tab-btn { padding: 8px 13px; font-size: 13px; }
  .tab-panel { padding: 18px 14px; border-radius: var(--radius-md); }
  .faq-item summary { padding: 13px 14px; font-size: 14.5px; }
  .faq-ans { padding: 10px 14px 14px; font-size: 13.5px; }

  .cta-card, .advisor-box { padding: 20px 15px; border-radius: var(--radius-md); }
  .cta-form { padding: 16px 14px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; padding: 10px 12px; }
  .form-actions { grid-template-columns: 1fr; }

  /* Footer & Mobile Bottom Action Dock (Zero Content Overlap!) */
  .site-footer { padding-top: 28px; }
  .footer-grid { gap: 20px; padding-bottom: 22px; }
  .footer-bottom { padding: 14px 0 76px; font-size: 12px; }
  .floating-actions {
    left: 0; right: 0; bottom: 0; flex-direction: row; align-items: center; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    z-index: 840;
  }
  .fab { height: 42px; border-radius: var(--radius-sm); box-shadow: none; font-size: 13.5px; }
  .fab-line, .fab-phone { flex: 1; width: auto; padding: 0 10px; }
  .fab-line .fab-short { display: none; }
  .fab-label { display: inline; font-weight: 700; }
  .fab-top { width: 42px; flex-shrink: 0; }
}
@media (max-width: 420px) {
  .hero-actions { grid-template-columns: 1fr; }
}
