/*******************
 * Contract-dispute-04
 * 驼色木质 · 合同纠纷
 *******************/

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #FBF8F3;
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.65;
}

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

.font-serif {
  font-family: 'Noto Serif SC', Georgia, serif;
}

.container-lawyer {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

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

.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;
}

/* Navbar */
#navbar.navbar-home {
  background: transparent;
}

#navbar.navbar-inner,
#navbar.navbar-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#navbar.navbar-home #logo-text {
  color: #fff;
}

#navbar.navbar-home .nav-link-item {
  color: rgba(255, 255, 255, 0.9);
}

#navbar.navbar-home .nav-link-item:hover {
  color: #B8956B;
}

#navbar.navbar-home .nav-link-item.is-active {
  color: #A67C52;
}

#navbar.navbar-home #consult-btn {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

#navbar.navbar-home #consult-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

#navbar.navbar-home #mobile-btn {
  color: #fff;
}

#navbar.navbar-scrolled #logo-text,
#navbar.navbar-inner #logo-text {
  color: #1f2937 !important;
}

#navbar.navbar-scrolled .nav-link-item,
#navbar.navbar-inner .nav-link-item {
  color: #374151;
}

#navbar.navbar-scrolled .nav-link-item.is-active,
#navbar.navbar-inner .nav-link-item.is-active {
  color: #A67C52;
}

#navbar.navbar-scrolled #consult-btn,
#navbar.navbar-inner #consult-btn {
  border-color: #B8956B;
  color: #A67C52;
}

#navbar.navbar-scrolled #consult-btn:hover,
#navbar.navbar-inner #consult-btn:hover {
  background: #FAF5EF;
}

#navbar.navbar-scrolled #mobile-btn,
#navbar.navbar-inner #mobile-btn {
  color: #1f2937;
}

#mobile-menu {
  display: none;
}

#mobile-menu.is-open {
  display: block;
}

.profile-tab-btn.is-active {
  background-color: #B8956B;
  color: #fff;
}

.profile-tab-panel.hidden {
  display: none;
}

.article-prose p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: #4b5563;
}

.lawyer-intro-content p {
  margin-bottom: 0.875rem;
}

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

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #1f2937;
  color: #fff;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.3s ease;
  pointer-events: none;
}

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

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

.footer-powered {
  margin-top: 0;
  padding-top: 0;
  border-top: none !important;
  text-align: center;
  font-size: 0.8125rem;
  color: #9ca3af;
  padding-bottom: 1.25rem;
}

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

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

.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;
}

@media (max-width: 768px) {
  body.pb-mobile-nav {
    padding-bottom: 4rem;
  }
}

/* ===== 首页律师简介 ===== */
@media (min-width: 1024px) {
  .cd04-home-intro-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }

  .cd04-home-intro-portrait {
    width: 42%;
    max-width: 480px;
    flex-shrink: 0;
  }

  .cd04-home-intro-body {
    flex: 1 1 0%;
    min-width: 0;
    width: auto;
  }
}

.home-intro-card {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 1.75rem;
  background: linear-gradient(135deg, #FBF8F3 0%, #F5EFE6 100%);
  border-radius: 0.75rem;
  border: 1px solid #EDE4D3;
  border-left: 4px solid #B8956B;
  box-shadow: 0 4px 20px rgba(184, 149, 107, 0.1);
  width: 100%;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.home-intro-card::before {
  content: '\201C';
  position: absolute;
  top: 0.35rem;
  left: 0.65rem;
  font-family: 'Noto Serif SC', serif;
  font-size: 2.5rem;
  line-height: 1;
  color: #B8956B;
  opacity: 0.25;
  pointer-events: none;
}

.home-intro-stat {
  padding: 0.75rem 1rem;
  background: #F5EFE6;
  border-radius: 0.5rem;
  border: 1px solid #EDE4D3;
}

.home-intro-stat-label {
  display: block;
  font-size: 0.6875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

.home-intro-stat-value {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #A67C52;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .home-intro-card {
    padding: 1.5rem 1.75rem 1.5rem 2.25rem;
  }

  .home-intro-card::before {
    font-size: 3rem;
    top: 0.5rem;
    left: 0.85rem;
  }
}

/* ===== Markdown / 富文本内容 ===== */
.lawyer-intro-content.rich-content,
.rich-content {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: #4b5563;
  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 {
  font-family: 'Noto Serif SC', serif;
  color: #1f2937;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.75em;
  margin-bottom: 0.65em;
}

.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; }

.rich-content ul,
.rich-content ol {
  list-style: revert;
  padding-left: 1.35em;
  margin-bottom: 1em;
}

.rich-content li {
  margin-bottom: 0.4em;
}

.rich-content blockquote {
  margin: 1.25em 0;
  padding: 14px 18px;
  background: #F5EFE6;
  border-radius: 12px;
  border-left: 3px solid #B8956B;
  color: #4b5563;
}

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

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

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 12px 0;
}

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

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

.rich-content hr {
  border: none;
  border-top: 1px solid #EDE4D3;
  margin: 2em 0;
}

.rich-content pre {
  margin: 1.25em 0;
  padding: 16px 18px;
  background: #1f2937;
  color: #FBF8F3;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}

.rich-content code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  font-size: 0.875em;
  background: #F5EFE6;
  color: #A67C52;
  padding: 2px 6px;
  border-radius: 4px;
}

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

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

.rich-content th,
.rich-content td {
  border: 1px solid #EDE4D3;
  padding: 8px 12px;
  text-align: left;
}

.rich-content th {
  background: #F5EFE6;
  color: #1f2937;
  font-weight: 600;
}

.detail-content-card {
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #EDE4D3;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .detail-content-card {
    padding: 2rem 2.5rem;
  }

  .lawyer-intro-content.rich-content,
  .rich-content {
    font-size: 1rem;
  }
}

/* ===== 内容列表分页 ===== */
.cd04-pagination-section {
  padding-top: 8px;
  margin-top: 40px;
}

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

.cd04-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: #4b5563;
  background: #FBF8F3;
  border: 1px solid #EDE4D3;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.cd04-page-btn:hover:not(.disabled):not(.active) {
  background: #F5EFE6;
  color: #A67C52;
  border-color: #B8956B;
}

.cd04-page-btn.active {
  background: #A67C52;
  color: #FBF8F3;
  border-color: #A67C52;
}

.cd04-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

/* ===== 详情页分享按钮 ===== */
.cd04-share-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(184, 149, 107, 0.2);
}

.cd04-share-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Serif SC', serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.cd04-share-title i {
  color: #B8956B;
  font-size: 1rem;
}

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

.cd04-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid #EDE4D3;
  background: #F5EFE6;
  font-size: 0.8125rem;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cd04-share-btn i {
  font-size: 0.9375rem;
}

.cd04-share-btn:hover {
  border-color: #B8956B;
  background: #FBF8F3;
  color: #A67C52;
}

.cd04-share-btn[data-platform="wechat"] i,
.cd04-share-btn[data-platform="wechat-moments"] i { color: #07C160; }
.cd04-share-btn[data-platform="weibo"] i { color: #E6162D; }
.cd04-share-btn[data-platform="qq"] i { color: #12B7F5; }
.cd04-share-btn[data-platform="qzone"] i { color: #FBC427; }
.cd04-share-btn[data-platform="douban"] i { color: #00B51D; }
.cd04-share-btn[data-platform="xiaohongshu"] i { color: #FE2C55; }
.cd04-share-btn[data-platform="douyin"] i { color: #1f2937; }
.cd04-share-btn[data-platform="copy"] i { color: #6b7280; }

.cd04-share-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
}

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

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

  .cd04-share-buttons {
    gap: 8px;
  }

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

  .lawyer-intro-content.rich-content,
  .rich-content {
    font-size: 0.875rem;
  }
}
