.lawyer-page, .lawyer-page * {
  box-sizing: border-box;
}

.lawyer-page {
  scroll-behavior: smooth;
}

.lawyer-page {
  margin: 0;
  background: #fff;
  color: #292929;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.9;
}

.lawyer-page img {
  max-width: 100%;
}

.lawyer-page a {
  color: inherit;
}

.lawyer-page {
  --dark: #202020;
  --dark2: #292929;
  --gold: #ad8a51;
  --gold2: #c5a36d;
  --cream: #f7f5f1;
  --line: #ddd7ce;
  --text: #333;
}

/* =========================================================
   Hero
   ========================================================= */

.lawyer-page .hero {
  color: #ad8a51;
  min-height: 470px;
  position: relative;
  overflow: visible;
}

.lawyer-page .hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  min-height: 470px;
  padding: 72px 35px 0;
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 70px;
  align-items: center;
}

.lawyer-page .hero-photo {
  width: 370px;
  height: 425px;
  object-fit: cover;
  object-position: center top;
  display: block;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
  position: relative;
  z-index: 2;
}

.lawyer-page .hero-copy {
  padding-bottom: 15px;
}

.lawyer-page .eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  color: #d1b078;
  margin-bottom: 12px;
}

.lawyer-page .hero h1 {
  font-size: 45px;
  font-weight: 500;
  letter-spacing: 4px;
  line-height: 1.35;
  margin: 0 0 8px;
  color: #ad8a51;
}

.lawyer-page .hero-role {
  font-size: 19px;
  color: #b1a38d;
  margin: 0 0 28px;
}

.lawyer-page .hero-summary {
  font-size: 16px;
  line-height: 2.05;
  color: #b1a38d;
  max-width: 640px;
  margin: 0 0 27px;
}

.lawyer-page .license {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #7a7a7a;
  font-size: 14px;
  border-bottom: 1px solid #8d806e;
  padding-bottom: 4px;
}

.lawyer-page .license:hover {
  color: #d4b276;
  border-color: #d4b276;
}

/* =========================================================
   Main
   ========================================================= */

.lawyer-page .main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 35px;
}

.lawyer-page .content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 65px;
  align-items: start;
}

.lawyer-page .left-column {
  padding-top: 70px;
}

/*
 * 讓 right-column 的內容可以直接參與 content-grid 排版。
 * 因此「律師經歷」會維持右欄，
 * 「專業領域」則可以獨立跨滿兩欄。
 */
.lawyer-page .right-column {
  display: contents;
}

/* =========================================================
   專業領域｜滿版
   ========================================================= */

.lawyer-page .practice {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.lawyer-page .practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.lawyer-page .practice-card {
  padding: 25px 17px 23px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 180px;
}

.lawyer-page .practice-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.lawyer-page .practice-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lawyer-page .practice-card h3 {
  font-size: 17px;
  margin: 4px 0 8px;
  color: #222;
}

.lawyer-page .practice-card p {
  font-size: 13px;
  line-height: 1.75;
  color: #666;
  margin: 0;
}

/* =========================================================
   通用 Section
   ========================================================= */

.lawyer-page .section {
  margin-bottom: 65px;
 padding-top: 70px;

}

.lawyer-page .section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 30px;
}

.lawyer-page .section-heading h2 {
  font-size: 27px;
  letter-spacing: 2px;
  font-weight: 600;
  margin: 0;
  color: #ad8a51;
}

.lawyer-page .section-heading:after {
  content: "";
  height: 1px;
  background: var(--line);
  width: 55px;
  margin-left: 6px;
}

.lawyer-page .about {
  padding-top: 0;
}

.lawyer-page .about p {
  font-size: 15.5px;
  line-height: 2.05;
  margin: 0 0 22px;
  color: #4a4a4a;
}

/* =========================================================
   Timeline
   ========================================================= */

.lawyer-page .timeline {
  border-left: 1px solid #d8d0c4;
  margin-left: 12px;
  padding-left: 31px;
}

.lawyer-page .timeline-item {
  position: relative;
  margin: 0 0 27px;
}

.lawyer-page .timeline-item:last-child {
  margin-bottom: 0;
}

.lawyer-page .timeline-item:before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: #fff;
  left: -37px;
  top: 10px;
}

.lawyer-page .timeline h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 600;
  color: #222;
}

.lawyer-page .timeline p {
  margin: 2px 0 0;
  color: #777;
  font-size: 14px;
}

/* =========================================================
   Media
   ========================================================= */

.lawyer-page .media-section {
  padding: 70px 35px 0;
}

.lawyer-page .media-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.lawyer-page .media-source {
  margin: 8px 0 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #777;
  text-align: center;
}

.lawyer-page .media-card {
  background: #fff;
  border: 1px solid #d9d2c7;
  padding: 25px;
  display: grid;
  grid-template-columns: 205px 1fr;
  gap: 28px;
  position: relative;
}

.lawyer-page .media-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  display: block;
}

.lawyer-page .media-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.lawyer-page .media-date {
  font-size: 13px;
  color: #a07e4d;
  letter-spacing: 1px;
  margin-bottom: 7px;
}

.lawyer-page .media-date span {
  color: #777;
  margin-left: 8px;
  letter-spacing: 0;
}

.lawyer-page .media-card h3 {
  font-size: 22px;
  line-height: 1.55;
  margin: 0 0 13px;
  color: #242424;
}

.lawyer-page .media-card p {
  font-size: 14px;
  line-height: 1.9;
  color: #555;
  margin: 0 0 12px;
}

.lawyer-page .media-card strong {
  color: #9b743d;
  font-size: 19px;
}

.lawyer-page .media-link {
  display: inline-block;
  color: #9b743d;
  text-decoration: none;
  border: 1px solid #b99661;
  padding: 7px 18px;
  font-size: 13px;
  margin-top: 4px;
}

.lawyer-page .media-link:hover {
  background: #9b743d;
  color: #fff;
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {

  .lawyer-page .hero-inner {
    grid-template-columns: 300px 1fr;
    gap: 35px;
    padding: 55px 25px;
  }

  .lawyer-page .hero-photo {
    width: 300px;
    height: 370px;
  }

  .lawyer-page .hero h1 {
    font-size: 37px;
  }

  .lawyer-page .main {
    padding: 0 25px;
  }

  .lawyer-page .content-grid {
    gap: 40px;
  }

  .lawyer-page .practice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lawyer-page .media-section {
    padding: 55px 25px;
  }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

  .lawyer-page .hero {
    min-height: 0;
  }

  .lawyer-page .hero-inner {
    display: flex;
    flex-direction: column;
    padding: 42px 20px 55px;
    gap: 28px;
    align-items: stretch;
  }

  .lawyer-page .hero-photo {
    width: 100%;
    max-width: 330px;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    margin: 0 auto;
  }

  .lawyer-page .hero-copy {
    padding: 0;
  }

  .lawyer-page .hero h1 {
    font-size: 33px;
    letter-spacing: 2px;
  }

  .lawyer-page .hero-role {
    font-size: 17px;
  }

  .lawyer-page .hero-summary {
    font-size: 15px;
  }

  .lawyer-page .main {
    padding: 0 20px;
  }

  .lawyer-page .content-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .lawyer-page .left-column {
    padding-top: 52px;
    width: 100%;
  }

  .lawyer-page .right-column {
    display: contents;
  }

  .lawyer-page .section {
    margin-bottom: 55px;
  }

  .lawyer-page .section-heading h2 {
    font-size: 24px;
  }

  .lawyer-page .about p {
    font-size: 15px;
    line-height: 2;
  }

  .lawyer-page .practice {
    width: 100%;
    margin-top: 0;
    margin-bottom: 55px;
  }

  .lawyer-page .practice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .lawyer-page .practice-card {
    min-height: 175px;
    padding: 20px 14px;
  }

  .lawyer-page .practice-card h3 {
    font-size: 16px;
  }

  .lawyer-page .practice-card p {
    font-size: 12.5px;
  }

  .lawyer-page .media-section {
    padding: 50px 20px;
  }

  .lawyer-page .media-card {
  grid-template-columns: minmax(0, 1fr);
  padding: 20px;
  gap: 20px;
  }

  .lawyer-page .media-card > div {
    min-width: 0;
  }

  .lawyer-page .media-image {
    width: 100%;
    height: 230px;
    object-position: center;
  }

  .lawyer-page .media-card h3 {
    font-size: 20px;
  }

}

/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 430px) {

  .lawyer-page .practice-grid {
    grid-template-columns: 1fr;
  }

  .lawyer-page .hero h1 {
    font-size: 30px;
  }

  .lawyer-page .hero-photo {
    max-height: 360px;
  }
}
/* =========================================
   1. 圖片輪播
========================================= */

#text-content .image-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

#text-content .image-slider img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
  scroll-snap-align: start;
}

#text-content .slider-hint {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 8px;
}


/* =========================================
   2. 完整版律師介紹卡片
========================================= */

#text-content .lawyer-card {
  max-width: 980px;
  margin: 32px auto;
  background: #fff;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

#text-content .lawyer-main {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px 36px;
  padding: 34px 38px 30px;
}

#text-content .lawyer-photo {
  width: 250px;
}

#text-content .lawyer-photo img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 6px;
}

#text-content .lawyer-info {
  min-width: 0;
}

#text-content .lawyer-info h3 {
  margin: 0 0 8px;
  color: #333 !important;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
}

#text-content .lawyer-subtitle {
  margin: 0 0 18px;
  color: #0f3d6e;
  font-size: 18px;
  font-weight: 700;
}

#text-content .lawyer-subtitle::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 14px;
  background: #b8944f;
}

#text-content .lawyer-intro {
  margin: 0;
  color: #333;
  font-size: 16px;
  line-height: 1.9;
}

#text-content .lawyer-exp {
  grid-column: 1 / -1;
  margin-top: 4px;
}

#text-content .lawyer-exp h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 18px;
  color: #0c437c !important;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
}

#text-content .lawyer-exp h4::before,
#text-content .lawyer-exp h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8dde6;
}

#text-content .lawyer-exp-cols {
  display: flex;
  gap: 48px;
}

#text-content .lawyer-exp-cols ul {
  flex: 1;
  margin: 0;
  padding-left: 20px;
}

#text-content .lawyer-exp-cols li {
  margin-bottom: 8px;
  color: #333;
  line-height: 1.75;
}

#text-content .lawyer-specialty {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 38px;
  background: #0f3d6e;
}

#text-content .specialty-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

#text-content .specialty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#text-content .specialty-tags span {
  display: inline-block;
  padding: 7px 16px;
  color: #0f3d6e;
  background: #fff;
  border: 1px solid #d7c49b;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
}


/* =========================================
   3. 文章專用精簡律師推薦卡片
========================================= */

#text-content .article-lawyer-card {
  display: block;
  max-width: 980px;
  padding: 28px;
  margin: 32px auto;
  background: #fff;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  box-sizing: border-box;
}

/* 照片與文字左右排列 */
#text-content .article-lawyer-main {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* 律師照片 */
#text-content .article-lawyer-photo {
  flex: 0 0 150px;
  width: 150px;
}

#text-content .article-lawyer-photo img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
}

/* 律師資訊 */
#text-content .article-lawyer-info {
  flex: 1;
  min-width: 0;
}

#text-content .article-lawyer-label {
  margin: 0 0 8px;
  color: #0f3d6e;
  font-size: 13px;
  font-weight: 700;
}

#text-content .article-lawyer-name {
  margin: 0 0 8px;
  color: #333;
  font-size: 24px;
  line-height: 1.4;
}

#text-content .article-lawyer-specialty {
  margin: 0 0 12px;
  color: #0f3d6e;
  font-size: 14px;
}

#text-content .article-lawyer-desc {
  margin: 0;
  color: #444;
  font-size: 15px;
  line-height: 1.8;
}

/* 底部按鈕：左右各一半 */
#text-content .article-lawyer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

/* 按鈕共用樣式 */
#text-content .article-lawyer-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid #0f3d6e;
  border-radius: 6px;
  background: #fff;
  color: #0f3d6e;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  text-align: center;
  transition: background .2s ease, color .2s ease;
}

/* 查看律師介紹：白底藍字 */
#text-content .article-lawyer-actions a:not(.consult-btn) {
  background: #fff !important;
  color: #0f3d6e !important;
}

/* 立即諮詢：藍底白字 */
#text-content .article-lawyer-actions a.consult-btn {
  background: #0f3d6e !important;
  color: #fff !important;
  border-color: #0f3d6e;
}

/* 按鈕滑鼠效果 */
@media (hover: hover) {
  #text-content .article-lawyer-actions a:not(.consult-btn):hover {
    background: #eef3f8 !important;
  }

  #text-content .article-lawyer-actions a.consult-btn:hover {
    background: #092c52 !important;
  }
}


/* =========================================
   4. 表格左右滑動
========================================= */

#text-content .table-scroll {
  width: 100%;
  max-width: 100%;
}


/* =========================================
   5. 侵害配偶權成功案例卡片
========================================= */

#text-content .ap-case-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 40px 0;
}

#text-content .ap-case {
  background: #fff;
  border: 1px solid #d9dee8;
  border-left: 6px solid #40475a;
  border-radius: 12px;
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease;
}

#text-content .ap-case:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(64, 71, 90, .12);
}

#text-content .ap-case-head {
  margin-bottom: 18px;
}

#text-content .ap-case-head h3 {
  margin: 0;
  color: #40475a;
  font-size: 1.45rem;
  line-height: 1.5;
}

#text-content .ap-case-lawyer {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #d9dee8;
  color: #666;
}

#text-content .ap-case-lawyer strong {
  color: #40475a;
}

#text-content .ap-case-content {
  color: #444;
  line-height: 1.9;
}

#text-content .ap-case-result {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #f5f6f9;
  border-left: 4px solid #40475a;
  line-height: 1.8;
}

#text-content .ap-case-result strong {
  color: #40475a;
}

/* 金額標籤 */
#text-content .ap-case-money {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #40475a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
}


/* =========================================
   6. 其他文章樣式
========================================= */

#text-content .hidden {
  display: none !important;
}

#text-content .qa h3 {
  font-size: 18px !important;
}

#text-content .line-btn::after {
  right: 8px !important;
  width: 20px !important;
  height: 20px !important;
}


/* =========================================
   7. 手機版（768px 以下）
========================================= */

@media screen and (max-width: 768px) {

  /* 完整版律師卡片 */
  #text-content .lawyer-main {
    display: block;
    padding: 26px 22px;
  }

  #text-content .lawyer-photo {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 24px;
  }

  #text-content .lawyer-photo img {
    height: auto;
  }

  #text-content .lawyer-info h3 {
    font-size: 26px;
  }

  #text-content .lawyer-info h3,
  #text-content .lawyer-subtitle {
    text-align: center;
  }

  #text-content .lawyer-subtitle::after {
    margin-left: auto;
    margin-right: auto;
  }

  #text-content .lawyer-intro {
    margin-bottom: 24px;
  }

  #text-content .lawyer-exp h4 {
    font-size: 22px;
    gap: 12px;
  }

  #text-content .lawyer-exp-cols {
    display: block;
  }

  #text-content .lawyer-exp-cols ul + ul {
    margin-top: 8px;
  }

  #text-content .lawyer-specialty {
    display: block;
    padding: 20px 22px;
  }

  #text-content .specialty-title {
    margin-bottom: 12px;
    text-align: center;
  }

  #text-content .specialty-tags {
    justify-content: center;
  }

  #text-content .specialty-tags span {
    text-align: center;
  }


  /* 精簡版律師推薦卡片 */
  #text-content .article-lawyer-card {
    padding: 22px;
  }

  #text-content .article-lawyer-main {
    display: block;
  }

  #text-content .article-lawyer-photo {
    width: 140px;
    margin: 0 auto 18px;
  }

  #text-content .article-lawyer-photo img {
    height: 175px;
  }

  #text-content .article-lawyer-label,
  #text-content .article-lawyer-name,
  #text-content .article-lawyer-specialty {
    text-align: center;
  }

  #text-content .article-lawyer-actions {
    gap: 10px;
    margin-top: 20px;
  }

  #text-content .article-lawyer-actions a {
    padding: 12px 8px;
  }


  /* 表格左右滑動 */
  #text-content .table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
  }

  #text-content .table-scroll table {
    width: 100%;
    min-width: 600px;
    margin: 0;
  }

  #text-content .table-scroll th,
  #text-content .table-scroll td {
    white-space: normal;
    word-break: normal;
  }


  /* 成功案例卡片 */
  #text-content .ap-case {
    padding: 22px;
  }

  #text-content .ap-case-head h3 {
    font-size: 1.2rem;
  }

}


/* =========================================
   8. 手機限定換行
========================================= */

@media screen and (min-width: 769px) {
  #text-content br.mobile-br {
    display: none;
  }
}