/* 全站頁尾（Avery 10/29 M8）：首頁（沒有 Bootstrap）與內頁（有 Bootstrap）共用同一份 part/footer.blade.php。
   選擇器全部掛在 .zt-footer 底下，不靠 Bootstrap；顏色沿用首頁頁尾（#0b0b0d 底、#cfd2da 字）與 site-header 的品牌色。
   手機單欄、服務分組與縣市用原生 details 摺疊；1100px 以上四欄，details 由頁尾小腳本展開、summary 變成純標題。 */
.zt-footer{
  --bg:#0b0b0d;--panel:#15171c;--panel-2:#1d1e23;--line:#23252b;--text:#cfd2da;--muted:#8d919b;--head:#fff;
  --orange:#f39801;--orange-d:#d98500;--ink:#231f20;--green:#06c755;--green-d:#05a848;
  --ff:"Noto Sans TC","PingFang TC","Heiti TC","Microsoft JhengHei",system-ui,sans-serif;
  background:var(--bg);color:var(--text);font-family:var(--ff);font-size:15px;line-height:1.7;-webkit-font-smoothing:antialiased;
  padding:clamp(40px,5vw,72px) 0 calc(28px + env(safe-area-inset-bottom,0px));
}
.zt-footer *,.zt-footer *::before,.zt-footer *::after{box-sizing:border-box}
.zt-footer a{color:inherit;text-decoration:none;transition:color .15s}
.zt-footer a:hover{color:var(--head);text-decoration:underline;text-underline-offset:3px}
.zt-footer a:focus-visible{outline:3px solid var(--orange);outline-offset:3px;border-radius:4px}
.zt-footer ul{list-style:none;margin:0;padding:0}
.zt-footer h3,.zt-footer p{margin:0;font-weight:inherit;line-height:inherit}
.zt-footer svg{display:inline-block}
.zt-footer .zt-ft-ic{width:1em;height:1em;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* 版面：手機單欄，順序＝品牌、聯絡、服務、據點、認識、文章、法定；桌機四欄。 */
.zt-ft-in{
  width:min(1240px,100%);margin:0 auto;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));
  display:grid;grid-template-columns:minmax(0,1fr);gap:26px;
  grid-template-areas:"brand" "contact" "services" "offices" "about" "articles" "legal";
}
.zt-ft-brand{grid-area:brand}
.zt-ft-contact{grid-area:contact}
.zt-ft-services{grid-area:services}
.zt-ft-offices{grid-area:offices}
.zt-ft-about{grid-area:about}
.zt-ft-articles{grid-area:articles}
.zt-ft-legal{grid-area:legal}

/* 標題與一般連結列 */
.zt-footer .zt-ft-h{display:block;margin:0 0 10px;font-size:15px;font-weight:700;letter-spacing:.12em;color:var(--head)}
.zt-footer .zt-ft-h a{color:inherit}
.zt-footer .zt-ft-sub{margin:14px 0 6px;font-size:13px;letter-spacing:.1em;color:var(--muted)}
.zt-footer .zt-ft-links{display:grid;gap:2px;font-size:14px}
.zt-footer .zt-ft-links li{min-height:44px;display:flex;align-items:center}
.zt-footer .zt-ft-links a{display:inline-flex;align-items:center;min-height:44px;padding:4px 0}
.zt-footer .zt-ft-two{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 16px}
.zt-footer .zt-ft-more a{color:var(--head);font-weight:600}
.zt-footer .zt-ft-more a::after{content:" →"}

/* 品牌列 */
.zt-ft-brand{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;padding-bottom:22px;border-bottom:1px solid var(--line)}
.zt-footer .zt-ft-logo{display:flex;align-items:center;gap:12px;color:var(--head)}
.zt-footer .zt-ft-logo:hover{text-decoration:none}
.zt-footer .zt-ft-eagle{height:40px;width:auto;fill:currentColor}
.zt-footer .zt-ft-word{height:15px;width:auto;fill:currentColor}
.zt-footer .zt-ft-slogan{font-size:14px;color:var(--muted);flex:1 1 240px}

/* 聯絡：電話（品牌金橙）與 LINE（LINE 綠）兩顆平分，手機排在頁尾最前面 */
.zt-footer .zt-ft-cta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px}
.zt-footer .zt-ft-call,.zt-footer .zt-ft-line{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 14px;border-radius:12px;font-size:20px;line-height:1.1;transition:transform .18s cubic-bezier(.4,0,.6,1),box-shadow .18s}
.zt-footer .zt-ft-call:hover,.zt-footer .zt-ft-line:hover{text-decoration:none;transform:translateY(-2px)}
.zt-footer .zt-ft-call span,.zt-footer .zt-ft-line span{display:flex;flex-direction:column;gap:3px;min-width:0}
.zt-footer .zt-ft-call b,.zt-footer .zt-ft-line b{font-size:17px;font-weight:700;letter-spacing:.02em;white-space:nowrap}
.zt-footer .zt-ft-call small,.zt-footer .zt-ft-line small{font-size:13px;font-weight:500;line-height:1.3} /* Q045：拿掉 opacity .85（LINE 綠底小字 3.79 → 4.63） */
.zt-footer .zt-ft-call{background:var(--orange);color:var(--ink);box-shadow:0 2px 0 var(--orange-d)}
.zt-footer .zt-ft-line{background:var(--green);color:#fff;box-shadow:0 2px 0 var(--green-d)}
.zt-footer .zt-ft-soc{display:flex;gap:10px}
.zt-footer .zt-ft-soc a{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--panel-2);color:var(--head);font-size:20px;transition:background .15s}
.zt-footer .zt-ft-soc a:hover{background:#2a2c33;text-decoration:none}

/* 服務項目：7 分組，手機每組一個 details；據點也用同一個 details 樣式 */
.zt-footer .zt-ft-groups{display:grid;grid-template-columns:minmax(0,1fr);border-top:1px solid var(--line)}
.zt-footer details.zt-ft-group{border-bottom:1px solid var(--line)}
.zt-footer .zt-ft-offices details.zt-ft-group{border-top:1px solid var(--line)}
.zt-footer details.zt-ft-group>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:50px;padding:6px 0;cursor:pointer;list-style:none;font-size:15px;font-weight:700;letter-spacing:.1em;color:var(--head)}
.zt-footer details.zt-ft-group>summary::-webkit-details-marker{display:none}
.zt-footer details.zt-ft-group>summary .zt-ft-h{margin:0}
.zt-footer details.zt-ft-group>summary::after{content:"";width:9px;height:9px;flex:none;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-3px);transition:transform .2s}
.zt-footer details.zt-ft-group[open]>summary::after{transform:rotate(225deg) translateY(-3px)}
.zt-footer details.zt-ft-group>ul{padding:0 0 12px 12px;border-left:2px solid var(--orange);margin-bottom:12px}
.zt-footer .zt-ft-group .zt-ft-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.zt-footer .zt-ft-group .zt-ft-links a{overflow-wrap:anywhere}
.zt-footer .zt-ft-group .zt-ft-more{grid-column:1/-1}
/* 22 縣市：手機三欄小字，桌機兩欄 */
.zt-footer .zt-ft-counties{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 10px}
.zt-footer .zt-ft-counties li{min-height:44px}
.zt-footer .zt-ft-counties a[data-office-overview]{color:var(--muted)}

/* 文章專區：三連結＋最新 3 篇 */
.zt-footer .zt-ft-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 12px}
.zt-footer .zt-ft-tabs a{color:var(--head);font-weight:600}
.zt-footer .zt-ft-latest{display:grid;gap:8px;font-size:14px}
.zt-footer .zt-ft-latest li{display:flex;flex-direction:column;gap:2px;padding:8px 0;border-top:1px solid var(--line)}
.zt-footer .zt-ft-latest a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}
.zt-footer .zt-ft-latest time{font-size:12px;color:var(--muted);letter-spacing:.04em}

/* 法定名稱與語言 */
.zt-ft-legal{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px 20px;padding-top:18px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
.zt-footer .zt-ft-langs{display:flex;flex-wrap:wrap;gap:4px 16px}
.zt-footer .zt-ft-langs a{display:inline-flex;align-items:center;padding:4px 0;min-height:44px}
.zt-footer .zt-ft-langs a[aria-current]{color:var(--head);font-weight:600}

/* 日文詞不拆行 */
.zt-footer:lang(ja) a,.zt-footer:lang(ja) summary{word-break:keep-all;overflow-wrap:anywhere}

/* 首頁手機版底部固定列會蓋住頁尾，首頁 body 沒有 .main-body 的留白，這裡補。內頁由 site-header.css 的 .main-body 處理。 */
@media(max-width:1099px){body.zt-home .zt-footer{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}}
/* Q045（WCAG 2.4.11）：內頁也一樣，頁尾最後一排連結捲到底時不被手機底部聯絡列蓋住。 */
@media(max-width:1099px){.zt-footer{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}}

/* 平板：聯絡的兩顆按鈕維持並排，服務分組兩欄 */
@media(min-width:640px) and (max-width:1099px){
  .zt-ft-in{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 28px;grid-template-areas:"brand brand" "contact contact" "services services" "offices about" "articles articles" "legal legal"}
  .zt-footer .zt-ft-cta{max-width:560px}
  .zt-footer .zt-ft-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px}
  .zt-footer .zt-ft-tabs{max-width:480px}
}

/* 桌機四欄：服務 7 組排成 4＋3，底下四欄＝認識梓同、全台據點、文章專區、聯絡我們 */
@media(min-width:1100px){
  .zt-ft-in{grid-template-columns:repeat(4,minmax(0,1fr));gap:40px 32px;grid-template-areas:"brand brand brand brand" "services services services services" "about offices articles contact" "legal legal legal legal"}
  .zt-footer .zt-ft-groups{grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 32px;border-top:0}
  .zt-footer details.zt-ft-group{border:0}
  .zt-footer .zt-ft-offices details.zt-ft-group{border:0}
  .zt-footer details.zt-ft-group>summary{pointer-events:none;min-height:0;padding:0;margin:0 0 10px}
  .zt-footer details.zt-ft-group>summary::after{display:none}
  .zt-footer details.zt-ft-group>ul{padding:0;border-left:0;margin:0}
  /* 觸控 44px 只給手機與平板；桌機維持原本列高 */
  .zt-footer .zt-ft-links li{min-height:36px}
  .zt-footer .zt-ft-links a{min-height:0}
  .zt-footer .zt-ft-group .zt-ft-links{grid-template-columns:minmax(0,1fr);gap:0}
  .zt-footer .zt-ft-group .zt-ft-links li{min-height:32px}
  .zt-footer .zt-ft-counties{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
  .zt-footer .zt-ft-counties li{min-height:32px}
  .zt-footer .zt-ft-two{grid-template-columns:minmax(0,1fr)}
  .zt-footer .zt-ft-tabs{grid-template-columns:minmax(0,1fr)}
  .zt-footer .zt-ft-cta{grid-template-columns:minmax(0,1fr);gap:8px}
  .zt-footer .zt-ft-call,.zt-footer .zt-ft-line{min-height:52px}
  .zt-ft-legal{align-items:center}
}

/* 減少動態：不做位移 */
@media(prefers-reduced-motion:reduce){.zt-footer *{transition:none!important}}
/* R3 10/30（Codex iPhone 15 補拍第 7 點）：電話鈕裡的「0800-666-605」不換行，兩鈕平分時在 390 寬超出 2px、320 寬超出 37px。
   430px 以下：兩鈕放得下就並排、放不下（每鈕不到 166px，例如 320、360 寬）就各占一行；鈕內距與號碼字級各縮一點（17→16px）。 */
@media (max-width: 430px) {
  .zt-footer .zt-ft-cta{grid-template-columns:repeat(auto-fit,minmax(166px,1fr))}
  .zt-footer .zt-ft-call,.zt-footer .zt-ft-line{gap:8px;padding:8px 10px}
  .zt-footer .zt-ft-call b,.zt-footer .zt-ft-line b{font-size:16px;letter-spacing:0}
}
/* R3 10/31 點擊範圍與字級稽核（ADR-0025：可點元素寬高 ≥ 44px、可見文字 ≥ 13px；docs/results/r3-tap-targets/）。
   頁尾每頁都有，修這裡等於修全站：短字連結（抓姦、台北市、日本語、News）補到 44px 寬，標誌補到 44px 高；分組標題連結、最新文章標題用上下內距＋負外距補到 44px（版面不變），
   最新文章日期 12→13px。只加點擊範圍，字級（日期以外）不變。 */
.zt-footer .zt-ft-links a,.zt-footer .zt-ft-langs a{min-width:44px}
.zt-footer .zt-ft-logo{min-height:44px}
.zt-footer .zt-ft-h a{display:inline-block;padding:13px 0;margin:-13px 0}
.zt-footer .zt-ft-latest a{padding:12px 0;margin:-12px 0}
.zt-footer .zt-ft-latest time{font-size:13px}
/* 11/02 設計修正 ④：頁尾 LINE 鈕白字壓 LINE 綠只有 2.26:1，底色加深到 #05873a（白字 4.63:1）。 */
.zt-footer .zt-ft-line{background:#05873a;box-shadow:0 2px 0 #046b2e}
