/* 自定义样式补充 - 与 Tailwind CDN 配合使用 */

/* 文字平衡 */
.text-balance {
  text-wrap: balance;
}

/* 行数截断 - 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;
}

/* 长宽比兜底 */
.aspect-3-4 {
  aspect-ratio: 3 / 4;
}
.aspect-4-3 {
  aspect-ratio: 4 / 3;
}
.aspect-16-10 {
  aspect-ratio: 16 / 10;
}

/* 文章正文样式 */
.lawyer-intro-content {
  font-size: 0.9375rem;
  line-height: 1.75;
}

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

.home-intro-preview {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .home-intro-preview {
    -webkit-line-clamp: 6;
  }
}

@media (min-width: 1024px) {
  .home-intro-preview {
    -webkit-line-clamp: 7;
    max-height: 14rem;
  }
}

.lawyer-intro-content p,
.article-content p,
.article-prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #3D3D3D;
}

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

.article-content,
.article-prose,
.lawyer-intro-content {
  color: #3D3D3D;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-prose h1,
.article-prose h2,
.article-prose h3,
.article-prose h4,
.lawyer-intro-content h1,
.lawyer-intro-content h2,
.lawyer-intro-content h3,
.lawyer-intro-content h4 {
  font-family: 'Noto Serif SC', serif;
  font-weight: 600;
  color: #171717;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.article-content h1,
.article-prose h1,
.lawyer-intro-content h1 { font-size: 1.375rem; }

.article-content h2,
.article-prose h2,
.lawyer-intro-content h2 { font-size: 1.25rem; }

.article-content h3,
.article-prose h3,
.lawyer-intro-content h3 { font-size: 1.0625rem; }

.article-content h4,
.article-prose h4,
.lawyer-intro-content h4 { font-size: 1rem; font-weight: 600; }

@media (min-width: 768px) {
  .article-content h1,
  .article-prose h1,
  .lawyer-intro-content h1 { font-size: 1.625rem; }

  .article-content h2,
  .article-prose h2,
  .lawyer-intro-content h2 { font-size: 1.375rem; }

  .article-content h3,
  .article-prose h3,
  .lawyer-intro-content h3 { font-size: 1.25rem; }

  .article-content,
  .article-prose {
    font-size: 1rem;
    line-height: 1.8;
  }
}

.article-content > *:first-child,
.article-prose > *:first-child,
.lawyer-intro-content > *:first-child { margin-top: 0; }

.article-content > *:last-child,
.article-prose > *:last-child,
.lawyer-intro-content > *:last-child { margin-bottom: 0; }

.article-content ul,
.article-content ol,
.article-prose ul,
.article-prose ol,
.lawyer-intro-content ul,
.lawyer-intro-content ol {
  margin: 0.75rem 0 1rem 1.25rem;
  padding-left: 0.5rem;
}

.article-content ul,
.article-prose ul,
.lawyer-intro-content ul { list-style: disc; }

.article-content ol,
.article-prose ol,
.lawyer-intro-content ol { list-style: decimal; }

.article-content li,
.article-prose li,
.lawyer-intro-content li {
  margin-bottom: 0.5rem;
  color: #3D3D3D;
}

.article-content strong,
.article-prose strong,
.lawyer-intro-content strong {
  font-weight: 600;
  color: #171717;
}

.article-content blockquote,
.article-prose blockquote,
.lawyer-intro-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid #9A1B3B;
  background: #FDF2F4;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #3D3D3D;
}

.article-content pre,
.article-prose pre,
.lawyer-intro-content pre {
  margin: 1rem 0;
  padding: 1rem;
  background: #171717;
  color: #FAF8F5;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-content code,
.article-prose code,
.lawyer-intro-content code {
  font-size: 0.875em;
  padding: 0.125rem 0.375rem;
  background: #FCE7EB;
  border-radius: 0.25rem;
  color: #7D1631;
}

.article-content pre code,
.article-prose pre code,
.lawyer-intro-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-content hr,
.article-prose hr,
.lawyer-intro-content hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid #EDE7DE;
}

.article-content table,
.article-prose table,
.lawyer-intro-content table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.875rem;
}

@media (max-width: 639px) {
  .article-content table,
  .article-prose table,
  .lawyer-intro-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.article-content th,
.article-content td,
.article-prose th,
.article-prose td,
.lawyer-intro-content th,
.lawyer-intro-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #EDE7DE;
  text-align: left;
}

.article-content th,
.article-prose th,
.lawyer-intro-content th {
  background: #FAF8F5;
  font-weight: 600;
  color: #171717;
}

.article-content a,
.article-prose a,
.lawyer-intro-content a {
  color: #9A1B3B;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover,
.article-prose a:hover,
.lawyer-intro-content a:hover {
  color: #7D1631;
}

.article-content img,
.article-prose img,
.lawyer-intro-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 0.75rem 0;
}

/* 详情页面包屑：仅当前页显示下划线，链接悬停时显示 */
.co05-detail-breadcrumb a {
  text-decoration: none;
}

.co05-detail-breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.co05-detail-breadcrumb .co05-breadcrumb-current {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* 详情页顶栏导航：仅当前栏目显示下划线 */
body[data-page="detail"] header [data-nav-item] {
  text-decoration: none;
}

body[data-page="detail"] header [data-nav-item].text-cream-100.font-medium {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: #FAF8F5;
  text-decoration-thickness: 2px;
}

/* 列表页分区与分页 */
.co05-list-section {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .co05-list-section {
    padding-top: 3.5rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1024px) {
  .co05-list-section {
    padding-bottom: 6rem;
  }
}

.co05-pagination-section {
  margin-top: 1.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

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

.co05-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: #3D3D3D;
  background: #FAF8F5;
  border: 1px solid #EDE7DE;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.co05-page-btn:hover:not(.disabled):not(.active) {
  background: #FDF2F4;
  color: #7D1631;
  border-color: #F9D0D9;
}

.co05-page-btn.active {
  background: #7D1631;
  color: #FAF8F5;
  border-color: #7D1631;
}

.co05-page-btn.disabled {
  color: rgba(61, 61, 61, 0.35);
  cursor: not-allowed;
  pointer-events: none;
}

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

/* 详情页分享按钮 */
.co05-share-buttons {
  gap: 10px;
}

.co05-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #7D1631;
  background: #FDF2F4;
  border: 1px solid #F9D0D9;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.co05-share-btn:hover {
  background: #FCE7EB;
  border-color: #F9D0D9;
  color: #68132B;
  box-shadow: 0 1px 4px rgba(125, 22, 49, 0.1);
}

.co05-share-btn:focus-visible {
  outline: 2px solid #7D1631;
  outline-offset: 2px;
}

.co05-share-btn i {
  font-size: 1rem;
}

.co05-share-btn[data-share-label="微信好友"] i,
.co05-share-btn[data-share-label="朋友圈"] i { color: #07C160; }
.co05-share-btn[data-share-label="微博"] i { color: #E6162D; }
.co05-share-btn[data-share-label="QQ好友"] i,
.co05-share-btn[data-share-label="QQ空间"] i { color: #12B7F5; }
.co05-share-btn[data-share-label="豆瓣"] i { color: #00B51D; }
.co05-share-btn[data-share-label="小红书"] i { color: #FE2C55; }
.co05-share-btn[data-share-label="抖音"] i { color: #2a2a2a; }
.co05-share-btn[data-share-label="头条"] i { color: #FF6600; }

@media (max-width: 479px) {
  .co05-share-buttons { gap: 8px; }
  .co05-share-btn { padding: 7px 12px; font-size: 0.75rem; }
}

@media print {
  .co05-share-section {
    display: none !important;
  }
}

.co05-share-btn.js-share-to:focus-visible {
  outline: 2px solid #7D1631;
  outline-offset: 2px;
}

/* 滚动行为 */
html {
  scroll-behavior: smooth;
}

/* 移动端底部导航占位 */
@media (max-width: 768px) {
  body {
    padding-bottom: 4rem;
  }
}

/* 导航栏滚动后样式 */
header.scrolled {
  background-color: #7D1631 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 字体抗锯齿 */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.65;
}

  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 9999;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  background: rgba(10, 10, 10, 0.92);
  color: #faf8f5;
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.footer-powered {
  margin-top: 0;
  padding-top: 0;
  border-top: none !important;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(250, 248, 245, 0.55);
  padding: 1rem 1rem 1.35rem;
  background-color: #171717;
}

.footer-powered-link {
  color: #faf8f5;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

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

.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(-24deg);
  user-select: none;
}

.pb-mobile {
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .pb-mobile {
    padding-bottom: 0;
  }
}

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

header.scrolled {
  background-color: #7d1631 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 首页顶部：Hero 延伸至导航下方，辅以半透明酒红底保证导航可读 */
header.header-at-hero:not(.scrolled) {
  background: linear-gradient(
    180deg,
    rgba(104, 19, 43, 0.92) 0%,
    rgba(104, 19, 43, 0.72) 55%,
    rgba(104, 19, 43, 0.35) 100%
  );
  backdrop-filter: blur(6px);
}