/* Motionnex 自訂樣式（不動 main.css 編譯產物）— 2026-08-27 */
/* 後台編輯器產生的規格表：仿設計稿 .specs-table 視覺 */
.specs-editor-html { position: relative; }
.specs-editor-html .spec-model-tag {
  font-size: 28px; font-weight: 800; color: #e9411f; margin-bottom: 14px; letter-spacing: .02em;
}
.specs-editor-html table.mx-spec-table,
.specs-editor-html table {
  width: 100%; border-collapse: collapse; font-size: 15px;
}
.specs-editor-html th {
  text-align: left; padding: 14px 16px; background: #1a1a1a; color: #fff;
  font-weight: 700; letter-spacing: .06em; font-size: 13px;
}
.specs-editor-html td {
  padding: 13px 16px; border-bottom: 1px solid #e3e3e0; vertical-align: top;
}
.specs-editor-html td:first-child { font-weight: 700; width: 26%; }
.specs-editor-html ul { margin: 0; padding-left: 18px; }
@media (max-width: 768px) {
  .specs-editor-html { overflow-x: auto; }
}

/* ── 產品詳細頁 影片專區（2026-09-07 客戶：表格下方放四則影片，一排兩則）──
   桌機跟 main.css 一樣用 vw（設計稿 1920 寬），手機一排一則 */
#product-detail .detail-videos { background: #fff; padding: 0 0 4.1666666667vw; }
#product-detail .detail-videos .videos-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.0833333333vw 1.6666666667vw;
}
#product-detail .detail-videos .video-card__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 0.8333333333vw; background: #0b192c;
}
#product-detail .detail-videos .video-card__frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
#product-detail .detail-videos .video-card__title {
  margin: 0.8333333333vw 0 0; font-size: 0.9375vw; font-weight: 600; color: #2b394a; line-height: 1.5;
}
@media (max-width: 1023px) {
  #product-detail .detail-videos { padding: 0 0 13.3333333333vw; }
  #product-detail .detail-videos .videos-grid { grid-template-columns: 1fr; gap: 6.4vw; }
  #product-detail .detail-videos .video-card__frame { border-radius: 2.6666666667vw; }
  #product-detail .detail-videos .video-card__title { margin-top: 2.6666666667vw; font-size: 3.7333333333vw; }
}

/* ── Header 下拉選單對齊（2026-09-14 使用者回報：Solutions / Products / Case / EN 展開沒對齊）──
   main.css 把 .dropdown 放在選單項目「正中央」（left:50% + translateX(-50%)），
   但下拉裡的文字是靠左的，所以每個選單的下拉文字都比上面的字往左偏，
   而且偏多少看項目寬度（Case 偏 43px、Solutions 偏 19px）看起來就是歪的。
   改成下拉的「文字」左邊對齊上面選單字的左邊：往左退 下拉 padding + 連結 padding。
   EN 語系那顆是 button、比左邊選單矮 17px，下拉就比別人高 9px；改成撐滿 actions 高度，
   下拉的 top 就跟其他四個一樣。只動桌機（≥1024px），手機是手風琴不受影響。 */
@media (min-width: 1024px) {
  .main-nav__item.has-dropdown > .dropdown {
    left: calc(-1 * (0.5208333333vw + 0.7291666667vw));
    right: auto;
    transform: translateX(0) translateY(0.4166666667vw);
  }
  .main-nav__item.has-dropdown:hover > .dropdown,
  .main-nav__item.has-dropdown:focus-within > .dropdown {
    transform: translateX(0) translateY(0);
  }
  .site-header__actions .lang-switch {
    display: flex; align-items: center; align-self: stretch;
  }
  /* 語系下拉靠右對齊 EN 那顆，文字右緣也對齊：內容改靠右。
     top 改用「中線 + 半個選單項目高 + 原本的間距」，跟左邊四個下拉的 top 同一條線
     （選單項目高：一般 2.5vw、捲動後 2vw，由 main.css 的字級／padding 推算）。 */
  .site-header__actions .lang-dropdown {
    right: calc(-1 * (0.5208333333vw + 0.7291666667vw));
    top: calc(50% + 1.25vw + 0.9375vw);
  }
  .site-header.is-scrolled .site-header__actions .lang-dropdown {
    top: calc(50% + 1vw + 0.9375vw);
  }
  .site-header__actions .lang-dropdown li a { text-align: right; }
  /* 下拉寬度依內容決定（使用者 2026-09-14：語系那個不用這麼寬）。
     main.css 給每個下拉固定 min-width 10.4vw（200px），內容短的也撐到 200；改成貼著最長那行。 */
  .has-dropdown .dropdown { min-width: 0; width: max-content; }
}

/* ── 繁中版（2026-09-14 多語系）：中文字型與排版微調，只在 <html lang="zh-Hant"> 生效 ──
   main.css 全站只指定 Montserrat，中文會掉到系統字；layout 本來就有載 Noto Sans TC，這裡接上。
   英文版完全不受影響。 */
html[lang="zh-Hant"] body,
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2, html[lang="zh-Hant"] h3, html[lang="zh-Hant"] h4,
html[lang="zh-Hant"] p, html[lang="zh-Hant"] a, html[lang="zh-Hant"] button, html[lang="zh-Hant"] input,
html[lang="zh-Hant"] textarea, html[lang="zh-Hant"] select {
  font-family: "Montserrat", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
/* 中文標題字距不要沿用英文的負字距／大寫字距 */
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2, html[lang="zh-Hant"] h3 { letter-spacing: 0.02em; }
/* 聯絡頁 banner 標題在 flex 列裡會被壓成一個字一行（中文沒有空格可斷） */
html[lang="zh-Hant"] #contact-page .contact-section .contact-banner .banner-text h1 { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 1023px) {
  html[lang="zh-Hant"] #contact-page .contact-section .contact-banner .banner-text h1 { white-space: normal; }
}

/* ── 2026-09-15 靜態條款頁（隱私權政策／網站使用條款） ── */
.static-page { padding: 8.3333333333vw 0 5.2083333333vw; background: #fff; }
.static-page .container { max-width: 900px; }
.static-page__title { font-size: 2.0833333333vw; font-weight: 700; color: #1f2937; margin: 0 0 1.5625vw; }
.static-page__body { font-size: 0.9375vw; line-height: 1.9; color: #374151; }
.static-page__body h2 { font-size: 1.4583333333vw; margin: 2.0833333333vw 0 0.625vw; color: #111827; }
.static-page__body h3 { font-size: 1.1458333333vw; margin: 1.5625vw 0 0.5208333333vw; color: #111827; }
.static-page__body h4, .static-page__body h5 { font-size: 1.0416666667vw; margin: 1.25vw 0 0.4166666667vw; color: #e9134c; }
.static-page__body p { margin: 0 0 0.8333333333vw; }
.static-page__body ul, .static-page__body ol { margin: 0 0 0.8333333333vw 1.5625vw; padding-left: 1.0416666667vw; }
.static-page__body ul { list-style: disc; }
.static-page__body ol { list-style: decimal; }
.static-page__body li { margin-bottom: 0.2083333333vw; }
.static-page__body a { color: #e9134c; text-decoration: underline; word-break: break-all; }
@media (max-width: 1023px) {
  .static-page { padding: 32vw 0 12vw; }
  .static-page__title { font-size: 7.4666666667vw; margin-bottom: 4.2666666667vw; }
  .static-page__body { font-size: 4vw; }
  .static-page__body h2 { font-size: 5.3333333333vw; margin: 6.4vw 0 2.1333333333vw; }
  .static-page__body h3 { font-size: 4.8vw; margin: 5.3333333333vw 0 1.6vw; }
  .static-page__body h4, .static-page__body h5 { font-size: 4.2666666667vw; margin: 4.2666666667vw 0 1.6vw; }
  .static-page__body p { margin-bottom: 3.2vw; }
  .static-page__body ul, .static-page__body ol { margin: 0 0 3.2vw 5.3333333333vw; }
}

/* ── 2026-09-21 SEO 標題層級（客戶 TG 09-21：每頁一個 h1、h2/h3 不跳級）──
   改了標籤的元素沿用原本的樣式。main.css 是設計師的檔不能動，這裡用同一組選擇器把新標籤補上，
   數值照抄 main.css 2026-09-21 線上版（含 .zh-tw 與手機版），畫面不變。 */
/* 首頁 banner 第一張 h2 → h1 */
#home #banner .item .text h1 { width: 100%; color: #fff; font-size: 3.75vw; font-weight: 500; padding-top: 5.2083333333vw; }
.zh-tw #home #banner .item .text h1 { font-size: 3vw; }
/* Products 分類卡 h3 → h2 */
#products .products-categories .category-card h2 { font-size: 1.25vw; font-weight: 700; color: #183eeb; margin: 0 0 1.25vw 0; }
.zh-tw #products .products-categories .category-card h2 { font-size: 1vw; }
#products .products-categories .category-card.active h2,
#products .products-categories .category-card:hover h2 { color: #fff; }
/* Case 分類卡 h3 → h2、區塊副標 h4 → h3 */
#case .case-categories .category-card .info h2 { font-size: 1.875vw; font-weight: 600; color: #0d1b2a; margin: 0 0 0.4166666667vw 0; }
.zh-tw #case .case-categories .category-card .info h2 { font-size: 1.5vw; }
#case .case-categories .category-card.active .info h2,
#case .case-categories .category-card:hover .info h2 { color: #fff; }
#case .case-categories .section-header .desc h3 { font-size: 1.4583333333vw; font-weight: 600; color: #333; margin: 0 0 0.78125vw 0; }
.zh-tw #case .case-categories .section-header .desc h3 { font-size: 1.1666666666vw; }
#case .featured-missions .section-header .desc h3 { font-size: 1.4583333333vw; font-weight: 600; color: #333; margin: 0 0 1.0416666667vw 0; }
.zh-tw #case .featured-missions .section-header .desc h3 { font-size: 1.1666666666vw; }
/* Contact 資訊標籤 h4 → h2、營業時間 h5 → h3 */
#contact-page .contact-section .info-card .info-group h2 { font-size: 1.25vw; font-weight: 700; color: #000; margin: 0 0 0.625vw 0; text-transform: uppercase; }
.zh-tw #contact-page .contact-section .info-card .info-group h2 { font-size: 1vw; }
#contact-page .contact-section .info-card .hours-row .hours-col h3.text-blue { font-size: 1.0416666667vw; font-weight: 600; color: #183eeb; margin: 0 0 0.2083333333vw 0; }
.zh-tw #contact-page .contact-section .info-card .hours-row .hours-col h3.text-blue { font-size: 0.8333333334vw; }
/* Solutions 推薦系統卡片：只有副標時副標升成 h3，維持 h4 的字級 */
#solutions .solutions-systems .system-card .card-info h3.as-h4 { font-size: 1.25vw; font-weight: 600; color: #333; margin: 0 0 2.6041666667vw 0; line-height: 1.4; }
.zh-tw #solutions .solutions-systems .system-card .card-info h3.as-h4 { font-size: 1vw; }
/* Footer 欄位標題 h4 → h2 */
.site-footer h2 { color: #ffffff; font-size: 1.1458333333vw; letter-spacing: 0.025vw; text-transform: uppercase; margin-bottom: 1.0416666667vw; }
.zh-tw .site-footer h2 { font-size: 0.9166666666vw; }
/* 編輯器內文（新聞內頁）被 Seo::normalizeHeadings 改過層級的標題：用原本層級的字級（main.css 的 h1～h4 通用字級） */
#news-detail .article-body .as-h1 { font-size: 2.9166666667vw; }
#news-detail .article-body .as-h2 { font-size: 2.2916666667vw; }
#news-detail .article-body .as-h3 { font-size: 1.4583333333vw; }
#news-detail .article-body .as-h4 { font-size: 1.1458333333vw; }
.zh-tw #news-detail .article-body .as-h1 { font-size: 2.3333333334vw; }
.zh-tw #news-detail .article-body .as-h2 { font-size: 1.8333333334vw; }
.zh-tw #news-detail .article-body .as-h3 { font-size: 1.1666666666vw; }
.zh-tw #news-detail .article-body .as-h4 { font-size: 0.9166666666vw; }
/* 原本是 h4／h5 的元素升成 h2／h3 後，不要吃到上面 html[lang="zh-Hant"] h1/h2/h3 的中文字距，維持 main.css 通用的 0.0083vw／各自原本的值 */
html[lang="zh-Hant"] .site-footer h2 { letter-spacing: 0.025vw; }
/* 聯絡頁營業時間原本是 h5，沒吃到上面繁中字型那條（h1～h4），維持原本的字型 */
html[lang="zh-Hant"] #contact-page .contact-section .info-card .hours-row .hours-col h3.text-blue { font-family: "Montserrat", sans-serif; }
html[lang="zh-Hant"] #contact-page .contact-section .info-card .info-group h2,
html[lang="zh-Hant"] #contact-page .contact-section .info-card .hours-row .hours-col h3.text-blue,
html[lang="zh-Hant"] #case .case-categories .section-header .desc h3,
html[lang="zh-Hant"] #case .featured-missions .section-header .desc h3,
html[lang="zh-Hant"] #solutions .solutions-systems .system-card .card-info h3.as-h4,
html[lang="zh-Hant"] #news-detail .article-body .as-h4,
html[lang="zh-Hant"] .static-page__body .as-h4,
html[lang="zh-Hant"] .static-page__body .as-h5 { letter-spacing: 0.0083333333vw; }
/* 隱私權／條款頁被改過層級的標題：沿用 .static-page__body 原本各層級的樣式 */
.static-page__body .as-h2 { font-size: 1.4583333333vw; margin: 2.0833333333vw 0 0.625vw; color: #111827; }
.static-page__body .as-h3 { font-size: 1.1458333333vw; margin: 1.5625vw 0 0.5208333333vw; color: #111827; }
.static-page__body .as-h4, .static-page__body .as-h5 { font-size: 1.0416666667vw; margin: 1.25vw 0 0.4166666667vw; color: #e9134c; }
@media (max-width: 1023px) {
  #home #banner .item .text h1 { font-size: 10.6666666667vw; }
  .zh-tw #home #banner .item .text h1 { font-size: 8.5333333334vw; }
  #products .products-categories .category-card h2 { font-size: 5.3333333333vw; margin-bottom: 4.2666666667vw; }
  .zh-tw #products .products-categories .category-card h2 { font-size: 4.2666666666vw; }
  #case .case-categories .category-card .info h2 { font-size: 5.3333333333vw; }
  .zh-tw #case .case-categories .category-card .info h2 { font-size: 4.2666666666vw; }
  #case .case-categories .section-header .desc h3,
  #case .featured-missions .section-header .desc h3 { font-size: 4.2666666667vw; }
  .zh-tw #case .case-categories .section-header .desc h3,
  .zh-tw #case .featured-missions .section-header .desc h3 { font-size: 3.4133333334vw; }
  #contact-page .contact-section .info-card .info-group h2 { font-size: 3.4666666667vw; }
  .zh-tw #contact-page .contact-section .info-card .info-group h2 { font-size: 2.7733333334vw; }
  #contact-page .contact-section .info-card .hours-row .hours-col h3.text-blue { font-size: 3.7333333333vw; }
  .zh-tw #contact-page .contact-section .info-card .hours-row .hours-col h3.text-blue { font-size: 2.9866666666vw; }
  #solutions .solutions-systems .system-card .card-info h3.as-h4 { font-size: 4vw; margin-bottom: 3.2vw; }
  .zh-tw #solutions .solutions-systems .system-card .card-info h3.as-h4 { font-size: 3.2vw; }
  .site-footer h2 { font-size: 3.2vw; }
  .zh-tw .site-footer h2 { font-size: 2.56vw; }
  #news-detail .article-body .as-h1 { font-size: 8.4vw; }
  #news-detail .article-body .as-h2 { font-size: 7vw; }
  #news-detail .article-body .as-h3 { font-size: 5.6vw; }
  #news-detail .article-body .as-h4 { font-size: 5.5vw; }
  .zh-tw #news-detail .article-body .as-h1 { font-size: 6.72vw; }
  .zh-tw #news-detail .article-body .as-h2 { font-size: 5.6vw; }
  .zh-tw #news-detail .article-body .as-h3 { font-size: 4.48vw; }
  .zh-tw #news-detail .article-body .as-h4 { font-size: 4.4vw; }
  .static-page__body .as-h2 { font-size: 5.3333333333vw; margin: 6.4vw 0 2.1333333333vw; }
  .static-page__body .as-h3 { font-size: 4.8vw; margin: 5.3333333333vw 0 1.6vw; }
  .static-page__body .as-h4, .static-page__body .as-h5 { font-size: 4.2666666667vw; margin: 4.2666666667vw 0 1.6vw; }
}

/* ── 2026-09-29 聯絡表單送出 ──────────────────────────────── */
/* 防機器人欄位：真人看不到（不用 display:none，部分機器人會略過隱藏欄位） */
#contact-page .contact-form .mx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#contact-page .contact-form .mx-form-msg { margin: 0 0 16px; padding: 12px 16px; border-radius: 6px; font-size: 15px; line-height: 1.6; }
#contact-page .contact-form .mx-form-msg.is-ok { background: #e8f5ec; color: #1d6b35; }
#contact-page .contact-form .mx-form-msg.is-err { background: #fdecea; color: #b3261e; }
#contact-page .contact-form .is-invalid { outline: 2px solid #e2231a; outline-offset: 1px; }
#contact-page .contact-form .submit-btn[disabled] { opacity: .6; cursor: wait; }
