/* =====================================================================
   機電・水電 ｜ 專業與品質（/ElectricityWater/SkillsQuality）
   來源：handoff 設計稿 機電_水電-專業與品質.css（翻譯進 MVC）。
   命名前綴 pq-；本頁自帶頁面級 :root token（tec-shared.css 僅全域定義
   --ink/--red/--paper/--paper-2/--radius/--radius-lg，其餘於此補上）。
   ===================================================================== */
:root {
  --red: #E0121A;
  --red-dark: #B30E14;
  --red-soft: #FEE2E4;
  --ink: #0E0F11;
  --ink-2: #1A1B1F;
  --paper: #F1F1F4;
  --paper-2: #FAFAFB;
  --white: #FFFFFF;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --border: #E5E7EB;
  --yellow: #FACC15;
  --shadow-card: 0 1px 2px rgba(15,17,21,.04), 0 8px 24px rgba(15,17,21,.06);
  --shadow-card-hover: 0 6px 12px rgba(15,17,21,.06), 0 24px 48px rgba(15,17,21,.10);
  --radius-lg: 22px;
}

/* 固定寬度容器（對齊設計稿 width:min(1280px,100%-80px)，不用 Bootstrap .container 以保版型一致） */
.pq-container { width: min(1280px, 100% - 80px); margin-inline: auto; }

/* 區塊小標（紅字 + 黃閃電） */
.pq-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--red);
  letter-spacing: .04em;
  font-family: 'Noto Sans TC', sans-serif;
  margin-bottom: 22px;
}
.pq-eyebrow .bolt {
  width: 14px; height: 14px;
  background: var(--yellow);
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
}

/* 圖片佔位框：真實工程照後補（沿用本站 svc-item-ph 的文字佔位概念） */
.pq-ph {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  box-sizing: border-box;
  background:
    repeating-linear-gradient(135deg, rgba(14,15,17,.022) 0 10px, transparent 10px 20px),
    #EEF0F2;
  color: var(--muted-2);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: .01em;
}

/* ============ 首段：寓意 + 寓意圖 ============ */
.pq-hero {
  background:
    radial-gradient(ellipse 760px 480px at 14% 24%, #F4EFEC 0%, transparent 62%),
    linear-gradient(180deg, #F7F5F2 0%, #FBFAF8 100%);
  border-bottom: 1px solid var(--border);
  padding: 66px 0 72px;
}
.pq-hero-grid {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 60px;
  align-items: stretch;
}
.pq-hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pq-hero-text .pq-eyebrow { margin-bottom: 18px; }
.pq-hero-text h1 {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 800;
  font-size: clamp(33px, 4vw, 52px);
  line-height: 1.13;
  letter-spacing: -.01em;
  margin: 0 0 22px;
  color: var(--ink);
}
.pq-hero-text h1 .accent { color: var(--red); }
.pq-hero-text .lead {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 17.5px;
  line-height: 1.95;
  color: #2A2C31;
  margin: 0;
  text-wrap: pretty;
}
.pq-hero-text .lead strong { color: var(--red); font-weight: 700; }
.pq-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 34px;
  max-width: 540px;
}
.pq-hero-stat .n {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.pq-hero-stat .n .u { font-size: 20px; color: var(--red); margin-left: 2px; }
.pq-hero-stat .l {
  margin-top: 8px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}
.pq-hero-media {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  background: #EEF0F2;
  object-fit: cover;
  /* 覆寫 Voltz main.css 全域 img max-width/max-height:100%，避免自訂高度被卡 */
  max-width: none;
  max-height: none;
}

/* ============ 段落框架 ============ */
.pq-section { padding: 84px 0; }
.pq-section.alt {
  background: var(--paper-2);
  border-block: 1px solid var(--border);
}
.pq-section.dark {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.pq-section.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 92% 0%, rgba(224,18,26,.16) 0, transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 1px, transparent 1px 44px);
  pointer-events: none;
}
.pq-section.dark > .pq-container { position: relative; z-index: 1; }

.pq-head {
  max-width: 860px;
  margin-bottom: 42px;
}
.pq-head .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--red);
  margin-bottom: 14px;
}
.pq-head .kicker .bolt {
  width: 13px; height: 13px;
  background: var(--yellow);
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
}
.pq-head h2 {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 800;
  font-size: clamp(27px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--ink);
}
.pq-section.dark .pq-head h2 { color: #fff; }
.pq-head h2 .accent { color: var(--red); }
.pq-head p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  margin: 14px 0 0;
  text-wrap: pretty;
}
.pq-section.dark .pq-head p { color: #B3B6BD; }
.pq-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: .08em;
  margin-left: 2px;
}

/* ============ 實績照片網格 ============ */
.pq-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pq-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.pq-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.pq-card-media {
  position: relative;
  width: 100%;
  display: block;
}
.pq-card-media .pq-ph { height: 184px; }
/* 變更 5：真實圖片填入卡片，尺寸對齊佔位框並覆寫 Voltz 全域 img 限制，避免版面跳動/變形 */
.pq-card-media img {
  display: block;
  width: 100%;
  height: 184px;
  object-fit: cover;
  max-width: none;
  max-height: none;
}
.pq-card-num {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  height: 32px;
  min-width: 32px;
  padding: 0 9px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13.5px;
  box-shadow: 0 4px 12px rgba(224,18,26,.3);
}
/* 變更 3：所有可放置圖片的卡片一律移除左上角編號紅方塊，簡化畫面（節點保留、僅隱藏） */
.pq-card-num { display: none; }
.pq-card-label {
  padding: 15px 17px 17px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -.005em;
}
.pq-card-label .bolt {
  width: 13px; height: 13px;
  flex: none;
  margin-top: 3px;
  background: var(--yellow);
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
}

/* ============ 精密儀器規格（深色） ============ */
.pq-inst-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pq-inst {
  position: relative;
  background: var(--ink-2);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  transition: transform .25s ease, border-color .2s, background .2s;
  overflow: hidden;
}
.pq-inst::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 2px;
  background: var(--red);
  opacity: 0;
  transition: opacity .2s ease;
}
.pq-inst:hover {
  transform: translateY(-3px);
  border-color: rgba(224,18,26,.55);
  background: #1F2025;
}
.pq-inst:hover::before { opacity: 1; }
.pq-inst .ix {
  display: none;                     /* 變更 4：移除儀器卡片紅色序號（節點保留、僅隱藏） */
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--red);
}
.pq-inst .nm {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.45;
  color: #fff;
  margin: 0;
}
.pq-inst .en {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #8C9098;
  letter-spacing: .01em;
}

/* ============ 能力 / 功能 卡片 ============ */
.pq-feat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.pq-feat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.pq-feat {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s;
}
.pq-feat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}
.pq-feat:hover .pq-feat-ico { background: var(--red); }
.pq-feat:hover .pq-feat-ico .b { background: #fff; }
.pq-feat-ico {
  width: 56px; height: 56px;
  border-radius: 13px;
  background: var(--paper);
  display: grid; place-items: center;
  transition: background .25s ease;
}
.pq-feat-ico .b {
  width: 24px; height: 24px;
  background: var(--yellow);
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
  transition: background .25s ease;
}
.pq-feat .ix {
  position: absolute;
  top: 24px; right: 22px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted-2);
  letter-spacing: .06em;
}
.pq-feat h3 {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -.005em;
  color: var(--ink);
  margin: 0;
}
.pq-feat .en {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
  line-height: 1.5;
}

/* 能力卡片：標題 + 英文副標 */
.pq-card-label .t { display: flex; flex-direction: column; gap: 3px; }
.pq-card-label small.en {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 400; font-size: 11px; letter-spacing: .03em; color: var(--muted);
}

/* ============ 電費節約案例 ============ */
.pq-cost-lead {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 20px;
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  margin-bottom: 30px;
}
.pq-cost-lead .bolt {
  width: 14px; height: 14px;
  flex: none;
  background: var(--yellow);
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
}
.pq-cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pq-case {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pq-case:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.pq-case-media { position: relative; }
.pq-case-media .pq-ph { height: 188px; }
.pq-case-media img {
  display: block;
  width: 100%;
  height: 188px;
  object-fit: cover;
  max-width: none;
  max-height: none;
}
.pq-case-tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--red);
  color: #fff;
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .04em;
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(224,18,26,.3);
}
.pq-case-tag .bolt {
  width: 11px; height: 11px;
  background: #fff;
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
}
.pq-case-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pq-case-body h3 {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
}
.pq-case-body p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

/* ============ 精密儀器：縮圖 + 放大檢視 ============ */
/* 儀器縮圖不設定位基準，讓 .pq-inst-zoom 以整張卡片(.pq-inst position:relative)為基準→顯示在卡片右上角 */
.pq-inst-thumb { width: 96px; height: 72px; flex: none; }
.pq-inst-thumb .pq-ph {
  width: 100%; height: 100%;
  border-radius: 9px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 8px, transparent 8px 16px),
    #2A2C31;
  color: #565a61;
  font-size: 10px;
  padding: 6px;
}
.pq-inst-thumb img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 9px;
  max-width: none;
  max-height: none;
}
.pq-inst-zoom {
  position: absolute; top: 12px; right: 12px; bottom: auto; transform: none;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--red); color: #fff;
  border: 0;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, transform .15s, filter .15s; z-index: 3;
}
.pq-inst-zoom:hover { background: var(--red); filter: brightness(1.1); transform: scale(1.06); }
.pq-inst-zoom svg { width: 15px; height: 15px; }
.pq-inst-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

/* ============ 用電安全講習：客戶卡片（淺色直式卡，儀器式放大檢視） ============ */
.cust-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cust-grid .pq-inst { flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-card); border-radius: 16px; overflow: hidden; }
.cust-grid .pq-inst::before { display: none; }
.cust-grid .pq-inst:hover { background: #fff; border-color: rgba(224,18,26,.45); }
.cust-grid .pq-inst-thumb { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.cust-grid .pq-inst-thumb img { border-radius: 0; }
.cust-grid .pq-cust-zoom { top: 10px; right: 10px; bottom: auto; transform: none; width: 34px; height: 34px; border-radius: 8px; background: var(--red); border: 1px solid rgba(255,255,255,.28); }
.cust-grid .pq-cust-zoom:hover { background: var(--red); filter: brightness(1.08); transform: none; }
.cust-grid .pq-cust-zoom svg { width: 16px; height: 16px; }
.cust-grid .pq-inst-body { text-align: center; padding: 16px 18px 20px; }
.cust-grid .pq-inst-body .nm { color: var(--ink); font-size: 16.5px; line-height: 1.5; }

/* ============ CTA（取自設計稿，scope 於 .pq-cta-section 內，避免與全站 CTA 類別衝突） ============ */
.pq-cta-section { padding: 80px 0 40px; background: var(--paper-2); }
.pq-cta-section .cta-banner {
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 64px 60px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 40px;
  align-items: center;
  z-index: 2;
}
.pq-cta-section .cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(255,255,255,.18) 0, transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 28px, transparent 28px 56px);
  pointer-events: none;
}
.pq-cta-section .cta-banner h2 {
  position: relative;
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.18;
  margin: 0 0 16px;
  color: #fff;
}
.pq-cta-section .cta-banner p {
  position: relative;
  margin: 0 0 28px;
  color: rgba(255,255,255,.92);
  font-size: 16px;
  line-height: 1.75;
  max-width: 520px;
  font-family: 'Noto Sans TC', sans-serif;
}
.pq-cta-section .cta-hotline {
  font-family: 'Manrope', 'Noto Sans TC', sans-serif;
  font-weight: 700;
  font-size: 40px;
  color: #fff;
  margin-bottom: 18px !important;
}
.pq-cta-section .cta-action {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pq-cta-section .cta-action-text {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px;
  color: #fff;
}
.pq-cta-section .cta-btn {
  background: var(--ink);
  color: #fff;
  padding: 16px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background .15s;
}
.pq-cta-section .cta-btn:hover { background: #000; }
.pq-cta-section .cta-figure {
  position: relative;
  aspect-ratio: 3/2;
  display: grid;
  place-items: center;
}
.pq-cta-section .cta-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 覆寫 Voltz 全域 img 尺寸限制 */
  max-width: none;
  max-height: none;
}

/* ============ 儀器說明 Modal ============ */
.pq-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.pq-modal.open { display: flex; }
.pq-modal-backdrop { position: absolute; inset: 0; background: rgba(8,9,11,.74); }
.pq-modal-card {
  position: relative; z-index: 1; width: min(980px, 100%); max-height: 86vh;
  background: #fff; border-radius: 18px; overflow: visible;
  display: grid; grid-template-columns: .9fr 1.1fr;
  /* 變更 1：黑背景下白卡右半黑圖區與背景融合，用品牌黃(--yellow)加外光暈把視窗浮出（原深色投影保留在最底層） */
  box-shadow:
    0 0 0 1px var(--yellow),
    0 0 24px 2px rgba(250,204,21,.55),
    0 0 60px 12px rgba(250,204,21,.28),
    0 30px 80px rgba(0,0,0,.45);
  animation: pqModalIn .22s ease;
}
@keyframes pqModalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pq-modal-info { padding: 40px 38px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; border-radius: 18px 0 0 18px; }
.pq-modal-ix {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px;
  font-weight: 500; letter-spacing: .1em; color: var(--red);
}
.pq-modal-ix .bolt { width: 12px; height: 12px; background: var(--yellow); clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%); }
.pq-modal-info h3 { font-family: 'Noto Sans TC', sans-serif; font-weight: 800; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; color: var(--ink); margin: 0; }
.pq-modal-en { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; letter-spacing: .03em; color: var(--muted); }
.pq-modal-info p { font-family: 'Noto Sans TC', sans-serif; font-size: 15.5px; line-height: 1.95; color: #2A2C31; margin: 6px 0 0; text-wrap: pretty; }
.pq-modal-figure { position: relative; background: #0E0F11; display: flex; flex-direction: column; padding: 20px; min-height: 360px; gap: 14px; border-radius: 0 18px 18px 0; }
/* 多圖圖庫：上大圖檢視 + 下縮圖列 */
.pq-gal-viewer { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.pq-gal-viewer img#instModalImg,
.pq-gal-viewer img#custModalImg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: none; border-radius: 8px;
  /* 覆寫 Voltz 全域 img max-width/max-height:100% */
  max-width: none; max-height: none;
}
/* 有圖時顯示大圖：選擇器需含 id，權重才壓得過上方含 id 的 display:none 底圖規則 */
.pq-modal-figure.has-img #instModalImg,
.pq-modal-figure.has-img #custModalImg { display: block; }
/* 左右切換鈕 + 張數（僅多於 1 張時顯示） */
/* 切換鈕預設即為品牌紅實心，Modal 一開啟就清楚可見（不再是半透明） */
.pq-gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: none; place-items: center; cursor: pointer; z-index: 4; transition: background .15s, transform .15s; }
.pq-gal-viewer.multi .pq-gal-nav { display: grid; }
.pq-gal-nav.prev { left: 4px; }
.pq-gal-nav.next { right: 4px; }
/* hover 須保留 translateY(-50%)，否則按鈕會掉出垂直置中 */
.pq-gal-nav:hover { background: var(--red-dark, var(--red)); transform: translateY(-50%) scale(1.06); }
.pq-gal-nav svg { width: 20px; height: 20px; }
.pq-gal-count { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 4; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .06em; color: #fff; background: rgba(0,0,0,.5); padding: 3px 10px; border-radius: 999px; }
.pq-gal-viewer:not(.multi) .pq-gal-count { display: none; }
/* 縮圖列（資料驅動只渲染實際張數；單張時整列隱藏、多圖才顯示） */
.pq-gal-rail { display: flex; gap: 8px; justify-content: center; flex: none; flex-wrap: wrap; }
.pq-gal-viewer:not(.multi) ~ .pq-gal-rail { display: none; }
.pq-gal-thumb { width: 84px; height: 60px; display: block; object-fit: cover; cursor: pointer; border-radius: 7px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; max-width: none; max-height: none; }
.pq-gal-thumb.pq-gal-active { outline-color: var(--yellow); }
.pq-modal-empty { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; line-height: 1.7; color: #8C9098; text-align: center; max-width: 80%; }
.pq-modal-figure.has-img .pq-modal-empty { display: none; }
.pq-modal-empty small { color: #6B7280; font-size: 11.5px; }
.pq-modal-close {
  position: absolute; top: -18px; right: -18px; z-index: 6;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff;
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s;
}
.pq-modal-close:hover { background: var(--red); transform: scale(1.06); }
.pq-modal-close svg { width: 18px; height: 18px; }

/* ============ 響應式 ============ */
@media (max-width: 1180px) {
  .pq-gallery { grid-template-columns: repeat(3, 1fr); }
  .pq-feat-grid, .pq-feat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .pq-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .pq-hero-media { min-height: 300px; }
  .pq-inst-grid { grid-template-columns: repeat(2, 1fr); }
  .pq-cases { grid-template-columns: 1fr; max-width: 480px; }
  .pq-cta-section .cta-banner { grid-template-columns: 1fr; }
  .pq-cta-section .cta-figure { max-width: 420px; }
}
@media (max-width: 900px) {
  .cust-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .pq-modal { padding: 14px; }
  .pq-modal-card { grid-template-columns: 1fr; height: auto; max-height: 90vh; overflow-y: auto; }
  .pq-modal-info { padding: 26px 22px; border-radius: 0 0 18px 18px; }
  .pq-modal-figure { min-height: 220px; order: -1; border-radius: 18px 18px 0 0; }
  /* 手機卡片改為可捲動，外露關閉鈕會被裁切→移回卡內右上角 */
  .pq-modal-close { top: 10px; right: 10px; }
}
@media (max-width: 720px) {
  .pq-section { padding: 60px 0; }
  .pq-gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pq-card-media .pq-ph, .pq-card-media img { height: 150px; }
  .pq-card-label { font-size: 14.5px; padding: 13px 14px 15px; }
  .pq-inst-grid { grid-template-columns: 1fr; }
  .pq-feat-grid, .pq-feat-grid.cols-4 { grid-template-columns: 1fr; }
  .pq-hero-stats { gap: 8px; }
  .pq-hero-stat .n { font-size: 32px; }
  .pq-cta-section .cta-banner { padding: 44px 28px; }
  .pq-cta-section .cta-hotline { font-size: 32px; }
}
/* 直立窄屏手機：縮圖列必定換行擠壓主照片，改為完全不顯示
   （本區塊須排在 760px 之後，否則 min-height 會被上方的 220px 覆蓋） */
@media (max-width: 600px) {
  .pq-gal-rail { display: none; }
  .pq-modal-figure { min-height: 260px; }
  /* 放大至 44px 最小點擊目標；仍受 .multi 控制，單張圖不顯示 */
  .pq-gal-viewer.multi .pq-gal-nav { display: grid; width: 44px; height: 44px; }
  .pq-gal-nav.prev { left: 8px; }
  .pq-gal-nav.next { right: 8px; }
  .pq-modal-close { top: 8px; right: 8px; }
}
@media (max-width: 440px) {
  .pq-gallery { grid-template-columns: 1fr; }
}
