/* 常霖法律事務所 — 共用樣式（繁中、簡中、英文三語共用）
   語言差異：簡中字型用 html[lang="zh-CN"] 切換；英文字型與排版微調在 styles_en.css。
-------------------------------------------------- */

/* 1. 設計變數
-------------------------------------------------- */
:root {
  --ink: #0E1A2B;          /* 深墨藍：標題、主按鈕、深色區塊 */
  --ink-2: #16263D;
  --ivory: #F6F3EE;        /* 象牙白：頁面底色 */
  --paper: #EFEAE2;        /* 區塊底色（.bg-light） */
  --charcoal: #2B2F36;     /* 內文 */
  --muted: #5A6270;        /* 次要文字 */
  --gold: #A8875A;         /* 銅金：細線、裝飾、深底上的字 */
  --gold-dark: #7A5F38;    /* 淺底上的小字金色（對比 ≥ 4.5:1） */
  --gold-light: #C9AE82;   /* 深底上的金色小字與焦點框 */
  --on-ink: #F6F3EE;
  --on-ink-muted: #B9BFC8;
  --on-ink-soft: #9AA3AF;
  --line: #D9D2C5;         /* 細線 */
  --line-strong: #C4BBAA;
  --line-on-ink: rgba(255, 255, 255, 0.12);

  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;

  --container: 75rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-space: clamp(4rem, 8vw, 7.5rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --mobile-bar: 3.75rem;
}

html[lang="zh-CN"] {
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* 2. 基礎
-------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background-color: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

h1, h2, h3, h4 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

ul {
  margin: 0;
  padding: 0;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

::selection {
  background: var(--gold-light);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
  border-radius: 1px;
}

.header-top :focus-visible,
.hero-left :focus-visible,
.footer :focus-visible {
  outline-color: var(--gold-light);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.main {
  display: block;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.ml-3 { margin-left: 1.5rem; }

.desktop-only { display: block; }
.mobile-only { display: none; }

/* 3. 按鈕與文字連結
-------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2.1rem;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.btn-primary:hover {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.btn-link,
.btn.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0 0.2rem;
  border: 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  color: var(--gold-dark);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: background-size 0.35s var(--ease), color 0.25s var(--ease);
}

.btn-link:hover,
.btn-link:focus-visible {
  background-size: 100% 1px;
  color: var(--ink);
}

/* 4. 頁首
-------------------------------------------------- */
.header {
  position: sticky;
  top: var(--stick, 0px);
  z-index: 100;
}

/* 4-1 頂部聯絡資訊列 */
.header-top {
  background-color: var(--ink);
  color: var(--on-ink-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.header-top-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  min-height: 2.5rem;
}

.contact-brief {
  min-width: 0;
}

.contact-brief span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  overflow-wrap: anywhere;
}

.contact-brief i,
.contact-info i,
.footer-widget i {
  color: var(--gold-light);
  font-size: 0.8em;
}

.language-selector {
  display: flex;
  align-items: center;
}

.language-selector a {
  position: relative;
  padding: 0.3rem 0.7rem;
  color: var(--on-ink-muted);
}

.language-selector a + a {
  border-left: 1px solid var(--line-on-ink);
}

.language-selector a:last-child {
  padding-right: 0;
}

.language-selector a:hover {
  color: var(--on-ink);
}

.language-selector a.active {
  color: var(--on-ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-light);
  text-underline-offset: 0.45em;
  text-decoration-thickness: 1px;
}

/* 4-2 內頁刊頭（事務所名稱＋聯絡資訊） */
.header > .container {
  background-color: var(--ivory);
  box-shadow: 0 0 0 100vmax var(--ivory);
  clip-path: inset(0 -100vmax);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: 1.5rem;
}

.logo {
  flex-shrink: 0;
}

.logo-text .logo-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.logo-text .logo-tagline {
  margin: 0.4rem 0 0;
  padding-top: 0.4rem;
  border-top: 1px solid var(--gold);
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gold-dark);
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1.75rem;
  min-width: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.contact-info p {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.contact-info i {
  color: var(--gold-dark);
}

/* 4-3 主導覽 */
.navbar {
  background-color: var(--ivory);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header.scrolled .navbar {
  background-color: rgba(246, 243, 238, 0.92);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
  box-shadow: 0 14px 30px -24px rgba(14, 26, 43, 0.45);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header.scrolled .navbar {
    background-color: var(--ivory);
  }
}

.navbar .container {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.25rem, 3vw, 2.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: block;
  padding: 1.05rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-link:hover {
  color: var(--gold-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  font-weight: 700;
}

.hamburger {
  display: none;
}

/* 5. 首頁主視覺
-------------------------------------------------- */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: clamp(34rem, 80vh, 50rem);
  background-color: var(--ink);
}

.hero-left {
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 5vw, 5rem);
  background-color: var(--ink);
  color: var(--on-ink);
}

.hero-left::after {
  content: "";
  position: absolute;
  top: clamp(2rem, 6vw, 5rem);
  bottom: clamp(2rem, 6vw, 5rem);
  right: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.6;
}

.hero-left-inner {
  width: 100%;
  max-width: 30rem;
  min-width: 0;
}

.hero-left-inner::before {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-bottom: 2rem;
  background-color: var(--gold);
}

.hero-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 4.2vw, 4.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--on-ink);
}

.hero-subtitle {
  max-width: 26rem;
  margin: 0 0 2.5rem;
  font-size: clamp(1rem, 0.3vw + 0.95rem, 1.125rem);
  line-height: 1.9;
  color: var(--on-ink-muted);
}

.hero-pillars {
  margin-bottom: 2.75rem;
  border-top: 1px solid rgba(201, 174, 130, 0.4);
}

.hero-pillar {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-on-ink);
}

.pillar-num {
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.pillar-text {
  min-width: 0;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--on-ink);
}

.btn-hero {
  border-color: var(--gold-light);
  color: var(--on-ink);
}

.btn-hero:hover {
  background-color: var(--gold-light);
  color: var(--ink);
}

.hero-right {
  position: relative;
  min-height: 20rem;
  background: var(--ink-2) url("../images/law_office_hero.png") center / cover no-repeat;
}

.hero-right-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 26, 43, 0.55) 0%, rgba(14, 26, 43, 0) 45%),
    linear-gradient(0deg, rgba(14, 26, 43, 0.45) 0%, rgba(14, 26, 43, 0) 45%);
}

.hero-right-badge {
  position: absolute;
  left: clamp(1rem, 3vw, 2.75rem);
  bottom: clamp(1rem, 3vw, 2.75rem);
  max-width: calc(100% - 2rem);
  padding: 1.25rem 1.75rem;
  background-color: var(--ivory);
  border-top: 2px solid var(--gold);
}

.badge-inner {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.badge-year {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.badge-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.badge-desc {
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* 6. 內頁標題區
-------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(17rem, 32vw, 26rem);
  background-color: var(--ink);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(14, 26, 43, 0.94) 0%, rgba(14, 26, 43, 0.84) 50%, rgba(14, 26, 43, 0.5) 100%);
}

.hero--firm { background-image: url("../images/office-firm.png"); background-position: center 45%; }
.hero--team { background-image: url("../images/office-team.png"); background-position: center 40%; }
.hero--expertise { background-image: url("../images/office-expertise.png"); }
.hero--news { background-image: url("../images/office-news.png"); }
.hero--contact { background-image: url("../images/office-contact.png"); }

.hero-content {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  color: var(--on-ink);
}

.hero-content h1 {
  position: relative;
  margin: 0 0 1rem;
  padding-top: 1.5rem;
  font-size: clamp(2.25rem, 3vw + 1.25rem, 3.75rem);
  letter-spacing: 0.1em;
  line-height: 1.25;
  color: var(--on-ink);
}

.hero-content h1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background-color: var(--gold);
}

.hero-content p {
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.1875rem);
  letter-spacing: 0.08em;
  color: #D5D9DF;
}

/* 7. 區塊與標題
-------------------------------------------------- */
.section {
  padding-block: var(--section-space);
}

.bg-light {
  background-color: var(--paper);
}

.section-title {
  position: relative;
  margin: 0 0 clamp(2rem, 4vw, 3.5rem);
  padding-top: 1.25rem;
  font-size: clamp(1.75rem, 1.6vw + 1.1rem, 2.625rem);
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.section-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background-color: var(--gold);
}

/* 8. 事務所簡介（首頁、關於常霖）
-------------------------------------------------- */
.identity-statement:has(> .identity-details) {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.identity-quote {
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
  border-left: 2px solid var(--gold);
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1vw + 1rem, 2rem);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
}

.identity-details {
  display: grid;
  gap: 1.5rem;
}

.identity-details p,
.identity-details-stacked p {
  color: var(--charcoal);
}

.identity-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.identity-split-content .identity-quote {
  margin-bottom: 2.5rem;
}

.identity-details-stacked {
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
}

.about-image img,
.framed {
  width: 100%;
  border: 1px solid var(--line);
}

.identity-split .about-image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

.about-content {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.about-content .about-image img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.about-text > p {
  font-size: 1.0625rem;
  color: var(--ink);
}

/* 9. 細線格（服務項目、事務所理念、服務概覽）
-------------------------------------------------- */
.expertise-grid-alt {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.expertise-item-alt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(1.5rem, 2.5vw, 2.5rem);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transition: background-color 0.35s var(--ease);
}

.expertise-item-alt::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background-color: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.expertise-item-alt:hover {
  background-color: rgba(255, 255, 255, 0.55);
}

.expertise-item-alt:hover::before,
.expertise-item-alt:focus-within::before {
  transform: scaleX(1);
}

.expertise-item-alt h3 {
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
  letter-spacing: 0.05em;
}

.expertise-item-alt p {
  flex-grow: 1;
  font-size: 0.9375rem;
  color: var(--muted);
}

.expertise-item-alt .btn-link {
  margin-top: auto;
}

.expertise-item-alt.text-center {
  align-items: center;
}

.expertise-item-alt > .fas {
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
  color: var(--gold-dark);
}

/* 服務概覽（服務項目頁頂） */
.overview-grid .expertise-item-alt {
  padding-block: 1.75rem 1rem;
}

.overview-grid .btn-link {
  padding-bottom: 0.15rem;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.overview-grid .btn-link:hover,
.overview-grid .btn-link:focus-visible {
  color: var(--gold-dark);
}

/* 10. 專業團隊（首頁）
-------------------------------------------------- */
.team-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.team-member-alt {
  min-width: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.team-member-alt img {
  width: 100%;
  max-width: 15rem;
  aspect-ratio: 4 / 5;
  margin-bottom: 1.5rem;
  object-fit: cover;
  object-position: center top;
  background-color: var(--paper);
}

.team-member-alt h3 {
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.team-member-alt p {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* 11. 時間軸列表（最新消息、歷史沿革）
-------------------------------------------------- */
.journal-view,
.news-archive-view {
  position: relative;
  border-top: 1px solid var(--line-strong);
}

.journal-view::before,
.news-archive-view::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.3rem;
  width: 1px;
  background-color: var(--line-strong);
}

.journal-view:empty::before,
.news-archive-view:empty::before {
  display: none;
}

.journal-item {
  position: relative;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding: 1.6rem 0 1.6rem 2rem;
  border-bottom: 1px solid var(--line);
}

.journal-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2.15rem;
  width: 0.6rem;
  height: 0.6rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background-color: var(--ivory);
  transition: background-color 0.3s var(--ease);
}

.bg-light .journal-item::before {
  background-color: var(--paper);
}

.journal-item:hover::before {
  background-color: var(--gold);
}

.journal-date {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.journal-title {
  min-width: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
}

.journal-link {
  justify-self: end;
}

/* 新聞存檔頁：日期＋內容兩欄 */
.news-archive-view .journal-item {
  grid-template-columns: 8.5rem minmax(0, 1fr);
}

.journal-content {
  min-width: 0;
}

.journal-content .journal-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.55;
}

/* 「閱讀全文」收合：預設最多三行，真的被截才在第三行尾出現省略號；按鈕切換 .expanded 展開全文。
   行高沿用原本 recent-news.html inline <style> 的 1.8。 */
.news-item-content {
  line-height: 1.8;
}

.news-item-content p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.news-item-content:not(.expanded) p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.pagination:empty {
  display: none;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.pagination a:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.pagination a.active {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

/* 12. 服務項目詳情（服務項目頁、關於常霖願景、交通資訊）
-------------------------------------------------- */
.section[id^="srv"] > .container {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.section[id^="srv"] .section-title {
  position: sticky;
  top: 5.5rem;
  margin-bottom: 0;
}

.service-detail {
  min-width: 0;
}

.service-detail > p.mb-4 {
  font-size: 1.0625rem;
  color: var(--ink);
}

.service-detail .plain-list > li:not(.bulleted) {
  padding: 0.95rem 0.25rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease), color 0.3s var(--ease);
}

.service-detail .plain-list > li:not(.bulleted):first-child {
  border-top: 1px solid var(--line);
}

.service-detail .plain-list > li:not(.bulleted):hover {
  padding-left: 0.75rem;
  color: var(--ink);
}

.service-note {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--gold);
  color: var(--muted);
}

.sub-heading {
  margin: 2.75rem 0 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-strong);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.service-detail > .sub-heading:first-child {
  margin-top: 0;
}

/* 帶「•」的清單 */
.bulleted {
  position: relative;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.bullet {
  position: absolute;
  left: 0.15rem;
  top: 0;
  color: var(--gold-dark);
}

/* 13. 律師與團隊頁
-------------------------------------------------- */
.team-intro {
  max-width: 48rem;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  font-size: 1.0625rem;
  color: var(--muted);
}

.lawyer-detail {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line-strong);
}

.lawyer-image-container {
  position: sticky;
  top: 5.5rem;
  align-self: start;
}

.lawyer-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background-color: var(--paper);
  border: 1px solid var(--line);
}

.lawyer-info {
  min-width: 0;
}

.lawyer-info > h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.75rem, 1.5vw + 1.1rem, 2.25rem);
  letter-spacing: 0.1em;
}

.lawyer-title {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.lawyer-specialty {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lawyer-specialty-item {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--charcoal);
}

.detail-heading {
  margin: 2.25rem 0 1rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--gold);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.lawyer-info .bulleted {
  color: var(--charcoal);
}

/* 實習律師、行政助理 */
.support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.expertise-item-alt.support-card {
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.support-photo {
  flex-shrink: 0;
  width: 6.5rem;
}

.support-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;
}

.support-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.375rem;
}

.support-card .lawyer-title {
  margin: 0;
}

/* 14. 聯絡我們頁
-------------------------------------------------- */
.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
}

.col-6,
.col-12 {
  min-width: 0;
}

.col-12 {
  grid-column: 1 / -1;
}

.contact-card h3 {
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.contact-info-item {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-info-item:first-of-type {
  border-top: 1px solid var(--line);
}

.contact-info-item i {
  margin-top: 0.45rem;
  color: var(--gold-dark);
}

.contact-info-item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.map-frame {
  border: 1px solid var(--line-strong);
  background-color: var(--paper);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: clamp(20rem, 38vw, 28rem);
  border: 0;
  filter: grayscale(0.35);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 4.5rem);
}

.faq-item {
  min-width: 0;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.faq-item:nth-child(-n + 2) {
  border-top: 1px solid var(--line-strong);
}

.faq-q {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.faq-a {
  margin: 0;
  color: var(--muted);
}

/* 15. 頁尾
-------------------------------------------------- */
.footer {
  background-color: var(--ink);
  color: var(--on-ink-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}

.footer-widget {
  min-width: 0;
}

.footer-widget h3 {
  margin: 0 0 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(201, 174, 130, 0.35);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  color: var(--on-ink);
}

.footer-widget p {
  margin: 0 0 0.6rem;
  overflow-wrap: anywhere;
}

.footer-widget i {
  width: 1.25rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: var(--on-ink-muted);
}

.footer-links a:hover {
  color: var(--on-ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-light);
  text-underline-offset: 0.3em;
}

.footer-bottom {
  border-top: 1px solid var(--line-on-ink);
  padding-block: 1.5rem;
  font-size: 0.8125rem;
  color: var(--on-ink-soft);
}

.footer-bottom p {
  margin: 0;
}

/* 16. 響應式
-------------------------------------------------- */
@media (max-width: 1100px) {
  .header-main .contact-info {
    max-width: 60%;
  }
}

@media (max-width: 960px) {
  .expertise-grid-alt {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expertise-grid-alt:not(:has(> :nth-child(4))) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .support-grid.expertise-grid-alt {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section[id^="srv"] > .container {
    grid-template-columns: minmax(0, 1fr);
  }

  .section[id^="srv"] .section-title {
    position: relative;
    top: auto;
    margin-bottom: 1rem;
  }
}

/* 手機與窄平板：漢堡選單 */
@media (max-width: 860px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }

  .header {
    top: 0;
  }

  .header-top-content {
    min-height: var(--mobile-bar);
  }

  .mobile-bar {
    width: 100%;
  }

  .mobile-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding-right: 3.25rem;
  }

  .mobile-bar-inner > div:first-child {
    min-width: 0;
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.35;
    color: var(--on-ink);
  }

  .mobile-bar .language-selector {
    flex-shrink: 0;
  }

  .mobile-bar .language-selector a {
    padding: 0.55rem 0.55rem;
  }

  .header-main {
    display: none;
  }

  .header > .container {
    box-shadow: none;
    clip-path: none;
    background: transparent;
  }

  .navbar,
  .header.scrolled .navbar {
    background: transparent;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .navbar .container {
    display: block;
    padding: 0;
  }

  .hamburger {
    position: absolute;
    top: calc((var(--mobile-bar) - 2.75rem) / 2);
    right: calc(var(--gutter) - 0.6rem);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .hamburger:focus-visible {
    outline-color: var(--gold-light);
    outline-offset: 0;
  }

  .hamburger-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: var(--on-ink);
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  }

  .hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100dvh - var(--mobile-bar));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.5rem var(--gutter) 2rem;
    background-color: var(--ink);
    border-top: 1px solid rgba(201, 174, 130, 0.4);
    box-shadow: 0 24px 40px -20px rgba(14, 26, 43, 0.6);
  }

  .nav-list.show {
    display: block;
    animation: nav-drop 0.25s var(--ease);
  }

  .nav-item {
    border-bottom: 1px solid var(--line-on-ink);
  }

  .nav-link {
    padding: 1rem 0 1rem 1rem;
    border-left: 2px solid transparent;
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    color: var(--on-ink);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--gold-light);
  }

  .nav-link.active {
    border-left-color: var(--gold);
  }

  .nav-link:focus-visible {
    outline-color: var(--gold-light);
    outline-offset: -2px;
  }

  .hero-split {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero-left::after {
    display: none;
  }

  .hero-left-inner {
    max-width: 36rem;
  }

  .hero-right {
    min-height: clamp(16rem, 60vw, 26rem);
  }

  .hero::before {
    background: linear-gradient(0deg, rgba(14, 26, 43, 0.9) 0%, rgba(14, 26, 43, 0.82) 100%);
  }

  .identity-statement:has(> .identity-details),
  .identity-split,
  .about-content,
  .row,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-item:nth-child(2) {
    border-top: 0;
  }

  .identity-split .about-image img {
    aspect-ratio: 3 / 2;
  }

  .identity-details-stacked {
    padding-left: 0;
  }
}

@media (max-width: 700px) {
  .expertise-grid-alt,
  .expertise-grid-alt:not(:has(> :nth-child(4))),
  .support-grid.expertise-grid-alt {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-showcase {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .team-member-alt {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 1.25rem;
    padding-block: 1.5rem;
  }

  .team-member-alt img {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .team-member-alt .btn-link {
    justify-self: start;
    align-self: start;
  }

  .journal-item,
  .news-archive-view .journal-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
    padding-left: 1.75rem;
  }

  .journal-item::before {
    top: 2.05rem;
  }

  .journal-link {
    justify-self: start;
    margin-top: 0.35rem;
  }

  .lawyer-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .lawyer-image-container {
    position: static;
    max-width: 12rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-right-badge {
    padding: 1rem 1.25rem;
  }
}

/* 17. 動態：進場（只在支援捲動時間軸、且使用者未要求減少動態時啟用）
-------------------------------------------------- */
@keyframes nav-drop {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes rise-in {
      from {
        opacity: 0;
        translate: 0 1.25rem;
      }
    }

    .identity-statement,
    .expertise-item-alt,
    .team-member-alt,
    .journal-item,
    .lawyer-detail,
    .faq-item,
    .service-detail,
    .about-image {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 18. 高對比模式
-------------------------------------------------- */
@media (forced-colors: active) {
  .nav-link.active {
    text-decoration: underline;
  }

  .hamburger-line {
    background-color: ButtonText;
  }

  .section-title::before,
  .hero-content h1::before,
  .hero-left-inner::before {
    background-color: CanvasText;
  }
}
