/* ========== BASE ========== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: #2A4A66;
  background-color: #FAF7F0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Noto Serif SC", "Songti SC", serif;
}

/* ========== CONTAINER ========== */
.section-container {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .section-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .section-container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (min-width: 1280px) {
  .section-container {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #B8974F;
  color: #fff;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary:hover {
  background-color: #8C6F2F;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: 1px solid #B8974F;
  color: #B8974F;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  background-color: transparent;
}

.btn-secondary:hover {
  background-color: #FAF6EF;
}

/* ========== CARD HOVER ========== */
.card-hover {
  transition: all 0.3s;
}

.card-hover:hover {
  transform: translateY(-4px);
}

/* ========== LINE CLAMP ========== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== PROSE ========== */
.prose p {
  margin-bottom: 1rem;
  line-height: 1.625;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ========== MOBILE BOTTOM NAV FIX ========== */
@media (max-width: 767px) {
  body {
    padding-bottom: 4rem;
  }
}

/* ========== NAVBAR STATES ========== */
#main-navbar {
  transition: background-color 0.3s, box-shadow 0.3s;
}

/* --- Transparent State --- */
.nav-state-transparent {
  background-color: transparent;
  box-shadow: none;
}

.nav-state-transparent .nav-logo-text {
  color: #ffffff;
  transition: color 0.3s;
}

.nav-state-transparent .nav-logo-box {
  background-color: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
  transition: all 0.3s;
}

.nav-state-transparent .nav-logo-icon {
  color: #ffffff;
  transition: color 0.3s;
}

.nav-state-transparent .nav-link-item {
  transition: all 0.3s;
}

.nav-state-transparent .nav-link-item.nav-active {
  color: #B8974F;
  background-color: #FAF6EF;
}

.nav-state-transparent .nav-link-item:not(.nav-active) {
  color: rgba(255,255,255,0.9);
}

.nav-state-transparent .nav-link-item:not(.nav-active):hover {
  color: #ffffff;
  background-color: rgba(255,255,255,0.1);
}

.nav-state-transparent .nav-cta-btn {
  background-color: rgba(255,255,255,0.2);
  color: #ffffff;
  transition: all 0.3s;
}

.nav-state-transparent .nav-cta-btn:hover {
  background-color: rgba(255,255,255,0.3);
}

.nav-state-transparent .nav-menu-btn {
  color: #ffffff;
  transition: all 0.3s;
}

.nav-state-transparent .nav-menu-btn:hover {
  background-color: rgba(255,255,255,0.1);
}

/* --- Scrolled / Solid State --- */
.nav-state-scrolled {
  background-color: rgba(255,255,255,0.95);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
}

.nav-state-scrolled .nav-logo-text {
  color: #B8974F;
  transition: color 0.3s;
}

.nav-state-scrolled .nav-logo-box {
  background-color: rgba(184,151,79,0.1);
  border-color: rgba(184,151,79,0.2);
  transition: all 0.3s;
}

.nav-state-scrolled .nav-logo-icon {
  color: #B8974F;
  transition: color 0.3s;
}

.nav-state-scrolled .nav-link-item {
  transition: all 0.3s;
}

.nav-state-scrolled .nav-link-item.nav-active {
  color: #B8974F;
  background-color: #FAF6EF;
}

.nav-state-scrolled .nav-link-item:not(.nav-active) {
  color: #2A4A66;
}

.nav-state-scrolled .nav-link-item:not(.nav-active):hover {
  color: #B8974F;
  background-color: #FAF6EF;
}

.nav-state-scrolled .nav-cta-btn {
  background-color: #B8974F;
  color: #ffffff;
  transition: all 0.3s;
}

.nav-state-scrolled .nav-cta-btn:hover {
  background-color: #8C6F2F;
}

.nav-state-scrolled .nav-menu-btn {
  color: #2A4A66;
  transition: all 0.3s;
}

.nav-state-scrolled .nav-menu-btn:hover {
  background-color: rgba(42,74,102,0.05);
}

/* ========== HERO PATTERN SVG ========== */
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23B8974F' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23B8974F' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* ========== BOTTOM NAV ACTIVE ========== */
.bottom-nav-active {
  color: #B8974F !important;
}

/* ========== ARTICLE CONTENT ========== */
.article-content p {
  font-size: 0.875rem;
  line-height: 1.625;
  margin-bottom: 1rem;
  color: #5D829E;
}

@media (min-width: 768px) {
  .article-content p {
    font-size: 1rem;
  }
}

/* other-services-03 扩展 */
body {
  font-size: 15px;
}

@media (min-width: 768px) {
  body {
    font-size: 16px;
  }
}

.lawyer-intro-content p {
  margin-bottom: 0.75rem;
  line-height: 1.75;
}

.lawyer-intro-content p:last-child {
  margin-bottom: 0;
}

.share-btn-group button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.js-wechat-copy {
  cursor: pointer;
}

.js-wechat-copy:hover {
  color: #B8974F;
}

.footer-powered {
  margin-top: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: none !important;
  text-align: center;
  font-size: 0.8125rem;
  color: #85A4BD;
  background: #1C3A52;
}

.footer-powered-link {
  color: #D4B978;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer-powered-link:hover {
  color: #B8974F;
}

#toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #152D40;
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  white-space: nowrap;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 768px) {
  #toast {
    bottom: 2rem;
  }
}

@media (max-width: 767px) {
  body.has-bottom-nav {
    padding-bottom: 4rem;
  }
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.watermark {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(0, 0, 0, 0.06);
  transform: rotate(-25deg);
  user-select: none;
}

/* ===== Markdown / 富文本内容 ===== */
.lawyer-intro-content.rich-content,
.rich-content {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: #5D829E;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.rich-content p {
  margin-bottom: 1em;
  line-height: 1.85;
}

.rich-content p:last-child {
  margin-bottom: 0;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  color: #2A4A66;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.rich-content h1:first-child,
.rich-content h2:first-child,
.rich-content h3:first-child,
.rich-content h4:first-child {
  margin-top: 0;
}

.rich-content h1 { font-size: 1.375rem; }
.rich-content h2 { font-size: 1.2rem; }
.rich-content h3 { font-size: 1.05rem; }
.rich-content h4 { font-size: 0.95rem; }

@media (min-width: 768px) {
  .rich-content h1 { font-size: 1.5rem; }
  .rich-content h2 { font-size: 1.3rem; }
  .rich-content h3 { font-size: 1.125rem; }
  .rich-content h4 { font-size: 1rem; }
}

.rich-content ul,
.rich-content ol {
  margin: 0.75rem 0 1rem 1.25rem;
}

.rich-content li {
  margin-bottom: 0.35rem;
  line-height: 1.75;
}

.rich-content li::marker {
  color: #B8974F;
}

.rich-content blockquote {
  margin: 1.25rem 0;
  padding: 0.875rem 1.25rem;
  border-left: 3px solid #B8974F;
  background: #FAF6EF;
  border-radius: 0 0.75rem 0.75rem 0;
  color: #5D829E;
  font-style: normal;
}

.rich-content a {
  color: #B8974F;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rich-content a:hover {
  color: #8C6F2F;
}

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1rem 0;
}

.rich-content strong,
.rich-content b {
  color: #2A4A66;
  font-weight: 600;
}

.rich-content em {
  font-style: italic;
}

.rich-content hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid rgba(42, 74, 102, 0.12);
}

.rich-content pre {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: #F0F4F8;
  border-radius: 0.75rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}

.rich-content code {
  padding: 0.125rem 0.375rem;
  background: #FAF6EF;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #8C6F2F;
}

.rich-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.rich-content table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.875rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rich-content th,
.rich-content td {
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(42, 74, 102, 0.12);
  text-align: left;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .rich-content th,
  .rich-content td {
    white-space: normal;
  }
}

.rich-content th {
  background: #F0F4F8;
  font-weight: 600;
  color: #2A4A66;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  color: #2A4A66;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.article-content ul,
.article-content ol {
  line-height: 1.75;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1rem 0;
}

/* ===== 扩展分类列表 ===== */
.os03-content-list-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid #E8EDF2;
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(42, 74, 102, 0.06);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

@media (min-width: 640px) {
  .os03-content-list-item {
    flex-direction: row;
    align-items: stretch;
  }
}

.os03-content-list-item:hover {
  border-color: rgba(184, 151, 79, 0.35);
  box-shadow: 0 4px 16px rgba(42, 74, 102, 0.08);
  transform: translateY(-2px);
}

.os03-content-list-thumb {
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #F0F4F8;
}

@media (min-width: 640px) {
  .os03-content-list-thumb {
    width: 12rem;
    aspect-ratio: auto;
    min-height: 8.5rem;
  }
}

@media (min-width: 768px) {
  .os03-content-list-thumb {
    width: 14rem;
  }
}

@media (min-width: 1024px) {
  .os03-content-list-thumb {
    width: 18rem;
  }
}

.os03-content-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.os03-content-list-item:hover .os03-content-list-thumb img {
  transform: scale(1.05);
}

.os03-content-list-body {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

@media (min-width: 768px) {
  .os03-content-list-body {
    padding: 1.5rem;
  }
}

.os03-content-list-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  color: #85A4BD;
  font-size: 1.25rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

@media (min-width: 640px) {
  .os03-content-list-arrow {
    display: flex;
  }
}

.os03-content-list-item:hover .os03-content-list-arrow {
  color: #B8974F;
  transform: translateX(2px);
}

/* ===== 列表页分页 ===== */
.os03-pagination-section {
  margin-top: 2rem;
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
}

.os03-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.os03-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: #5D829E;
  background: #fff;
  border: 1px solid #E8EDF2;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.os03-page-btn:hover:not(.disabled):not(.active) {
  background: #FAF6EF;
  color: #2A4A66;
  border-color: rgba(184, 151, 79, 0.4);
}

.os03-page-btn.active {
  background: #B8974F;
  color: #fff;
  border-color: #B8974F;
}

.os03-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.os03-page-btn.os03-page-nav {
  padding: 0 16px;
}

@media (max-width: 479px) {
  .os03-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .os03-page-btn.os03-page-nav {
    padding: 0 12px;
  }
}

/* ===== 详情页分享按钮 ===== */
.os03-share-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #E8EDF2;
}

.os03-share-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: "Noto Serif SC", "Songti SC", serif;
  color: #2A4A66;
  margin-bottom: 1rem;
}

.os03-share-title i {
  color: #B8974F;
  font-size: 1rem;
}

.os03-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.os03-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #5D829E;
  background: #F0F4F8;
  border: 1px solid #E8EDF2;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.os03-share-btn i {
  font-size: 1rem;
  color: #B8974F;
}

.os03-share-btn:hover {
  background: #FAF6EF;
  color: #2A4A66;
  border-color: rgba(184, 151, 79, 0.4);
}

.os03-share-hint {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #85A4BD;
}

@media (max-width: 479px) {
  .os03-share-buttons {
    gap: 8px;
  }

  .os03-share-btn {
    padding: 7px 12px;
    font-size: 0.75rem;
  }
}