/* 翔通官網樣式
   風格：暖米白底、細線分隔、大字襯線標題、深綠主色、銅色點綴
   顏色只需改下面 :root 的變數 */
:root {
  --bg: #f4efe8;
  --bg-soft: #ebe4da;
  --ink: #1d2523;
  --ink-soft: #46504c;
  --muted: #6e736d;
  --line: rgba(29, 37, 35, .16);
  --green: #1f3a35;
  --green-deep: #152a26;
  --on-dark: #efe9df;
  --on-dark-muted: rgba(239, 233, 223, .68);
  --line-dark: rgba(239, 233, 223, .18);
  --copper: #a8622e;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.8 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.25; margin: 0; letter-spacing: .02em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.wrap { width: min(1240px, 100% - 2 * clamp(20px, 5vw, 64px)); margin-inline: auto; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.85; }
.kicker { font-size: .9rem; color: var(--copper); font-weight: 500; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.text-link { font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; white-space: nowrap; }
.text-link:hover { color: var(--copper); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 30px; border-radius: 999px; background: var(--green); color: var(--on-dark); font: 500 1rem var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: background .2s; }
.btn:hover { background: var(--copper); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* ── 頁首 ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 239, 232, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .12em; }
.brand-en { font-size: .68rem; letter-spacing: .22em; color: var(--muted); }
.brand-en:empty { display: none; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.nav a { text-decoration: none; font-size: .95rem; color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--copper); }
.nav .nav-cta { border: 1px solid var(--ink); color: var(--ink); padding: 8px 20px; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--ink); color: var(--bg); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 7px auto; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px clamp(20px, 5vw, 64px) 24px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .nav-cta { margin-top: 16px; text-align: center; border-bottom: 1px solid var(--ink); }
}

/* ── 主視覺 ── */
.hero { padding-top: clamp(48px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 40px clamp(32px, 6vw, 96px); align-items: end; padding-bottom: clamp(40px, 6vw, 72px); }
.hero-title { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 1.12; letter-spacing: .04em; font-weight: 500; }
.hero-title, .quote-band blockquote { white-space: pre-line; }
.hero-side { display: grid; gap: 28px; justify-items: start; padding-bottom: 12px; }
.hero-intro { font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.85; color: var(--ink-soft); }
.hero-label { grid-column: 1 / -1; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.hero-label:empty { display: none; }
.hero-photo { width: 100%; aspect-ratio: 21 / 8; overflow: hidden; background: var(--green); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 4 / 3; }
}

/* ── 數據 ── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stat { padding: clamp(28px, 4vw, 48px) clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-value { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; color: var(--green); white-space: nowrap; }
.stat-label { margin-top: 10px; color: var(--ink-soft); font-size: .95rem; line-height: 1.6; }
@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ── 區塊 ── */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-line { border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px clamp(32px, 6vw, 96px); margin-bottom: clamp(44px, 6vw, 72px); align-items: start; }
.split-end { align-items: end; }
.split-end .text-link { justify-self: end; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } .split-end .text-link { justify-self: start; } }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose img { margin: 1.6em 0; }
.prose blockquote { margin: 1.6em 0; padding-left: 1.2em; border-left: 2px solid var(--copper); font-family: var(--serif); font-size: 1.15em; }
.prose a { color: var(--copper); }

/* 優勢：Apex 式細直線欄位 */
.columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.column { padding: 32px clamp(16px, 2vw, 28px) 8px; border-left: 1px solid var(--line); }
.column:first-child { border-left: 0; padding-left: 0; }
.column h3 { margin-bottom: 14px; }
.column p { color: var(--ink-soft); }
@media (max-width: 900px) {
  .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .column:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .columns { grid-template-columns: 1fr; }
  .column { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .column:first-child { border-top: 0; }
}

/* 申請類別 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 clamp(24px, 3vw, 40px); }
.cat { border-top: 1px solid var(--line); padding: 26px 0 34px; display: grid; gap: 10px; align-content: start; }
.cat img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; margin-bottom: 10px; }
.cat p { color: var(--ink-soft); }

/* 深色區 */
.dark { background: var(--green); color: var(--on-dark); }
.dark .kicker { color: #d39a63; }
.dark .lead, .dark p { color: var(--on-dark-muted); }
.dark h2, .dark h3 { color: var(--on-dark); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); counter-reset: step; }
.step { counter-increment: step; border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); padding: 26px clamp(16px, 2vw, 26px) 34px; }
.step:first-child { border-left: 0; padding-left: 0; }
.step::before { content: counter(step); font-family: var(--serif); font-size: 2.4rem; color: #d39a63; line-height: 1; display: block; margin-bottom: 22px; }
.step h3 { margin-bottom: 10px; font-size: 1.15rem; }
.step p { font-size: .95rem; }
@media (max-width: 640px) { .step { border-left: 0; padding-left: 0; } }

/* 入境前後 */
.service-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 6vw, 96px); }
.service-cols h3 { padding-bottom: 18px; border-bottom: 1px solid var(--ink); font-size: 1.4rem; }
.check-list { list-style: none; margin: 0 0 40px; padding: 0; }
.check-list li { padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); position: relative; color: var(--ink-soft); }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 25px; width: 10px; height: 5px; border-left: 1.5px solid var(--copper); border-bottom: 1.5px solid var(--copper); transform: rotate(-45deg); }
@media (max-width: 760px) { .service-cols { grid-template-columns: 1fr; } }

/* 理念帶狀圖 */
.quote-band { position: relative; min-height: clamp(420px, 60vw, 620px); display: flex; align-items: center; color: var(--on-dark); overflow: hidden; background: var(--green-deep); }
.quote-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 26, 23, .82), rgba(14, 26, 23, .35)); }
.quote-inner { position: relative; z-index: 1; padding: 80px 0; }
.quote-inner .kicker { color: #d39a63; }
.quote-band blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.9rem, 4.6vw, 3.6rem); line-height: 1.3; max-width: 16em; text-wrap: balance; }
.quote-sub { margin-top: 28px; max-width: 34em; color: var(--on-dark-muted); font-size: 1.05rem; }

/* 證照 */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(20px, 3vw, 36px); }
.cert-frame { aspect-ratio: 3 / 4; background: #fff; border: 1px solid var(--line); padding: 14px; box-shadow: 0 1px 0 var(--line), 0 18px 36px -24px rgba(29, 37, 35, .35); }
.cert-frame img { width: 100%; height: 100%; object-fit: contain; }
.cert h3 { margin-top: 20px; font-size: 1.1rem; }
.cert p { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.cert-zoom { all: unset; cursor: zoom-in; display: block; width: 100%; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14, 20, 18, .88); display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 92vh; width: auto; background: #fff; }

/* 消息列表：編輯式條列 */
.news-list { border-top: 1px solid var(--ink); }
.news-item { display: grid; grid-template-columns: 130px 110px minmax(0, 1fr) 140px; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .2s; }
.news-item:hover { padding-left: 10px; }
.news-item:hover h3 { color: var(--copper); }
.news-item time { color: var(--muted); font-size: .92rem; white-space: nowrap; }
.news-item h3 { font-size: clamp(1.08rem, 1.6vw, 1.3rem); transition: color .2s; }
.news-item .summary { color: var(--muted); font-size: .92rem; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.news-item.no-cover { grid-template-columns: 130px 110px minmax(0, 1fr); }
.tag { display: inline-block; font-size: .82rem; color: var(--copper); border: 1px solid currentColor; border-radius: 999px; padding: 1px 12px; white-space: nowrap; justify-self: start; }
@media (max-width: 760px) {
  .news-item, .news-item.no-cover { grid-template-columns: auto 1fr; gap: 8px 14px; }
  .news-item .news-text { grid-column: 1 / -1; }
  .news-item img { display: none; }
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filters button { font: inherit; min-height: 40px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.empty { color: var(--muted); padding: 32px 0; }

/* 子頁 */
.page { padding: clamp(56px, 8vw, 100px) 0 clamp(80px, 10vw, 130px); min-height: 60vh; }
.page-head { margin-bottom: 44px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.post { max-width: 820px; }
.post-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; color: var(--muted); font-size: .92rem; }
.post h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.3; }
.post-cover { margin: 40px 0; width: 100%; }
.post .prose { font-size: 1.07rem; margin-top: 36px; }
.back { display: inline-block; margin-top: 56px; }
.thanks { text-align: center; }
.thanks h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 18px; }
.thanks .btn { margin-top: 36px; }

/* 聯絡 */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-grid h2 { margin-bottom: 24px; }
.contact-info { margin: 40px 0 0; border-top: 1px solid var(--line-dark); }
.contact-info div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.contact-info dt { color: var(--on-dark-muted); }
.contact-info dd { margin: 0; color: var(--on-dark); }
.contact-info a { text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.contact-form { background: var(--bg); color: var(--ink); padding: clamp(24px, 4vw, 44px); display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.contact-form label { display: grid; gap: 6px; font-size: .92rem; color: var(--ink-soft); }
.contact-form input, .contact-form select, .contact-form textarea { font: 16px var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; border-radius: 0; }
.contact-form select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231d2523' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; }
.contact-form textarea { resize: vertical; border: 1px solid var(--line); padding: 12px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--green); }
.contact-form .btn { justify-self: start; margin-top: 6px; }
.form-note { font-size: .92rem; color: var(--green); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* 頁尾 */
.site-footer { background: var(--green-deep); color: var(--on-dark-muted); padding: 72px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line-dark); }
.footer-name { font-family: var(--serif); color: var(--on-dark); font-size: 1.2rem; margin-bottom: 14px; }
.footer-meta { line-height: 2; }
.footer-title { color: var(--on-dark); margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover, .to-top:hover { color: var(--on-dark); }
.footer-hotline { font-family: var(--serif); font-size: 2.4rem; color: var(--on-dark); line-height: 1.1; margin-bottom: 8px; }
.footer-small { font-size: .85rem; line-height: 1.7; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: .85rem; }
.to-top { text-decoration: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
