/* ============================================
   News Detail Page — Editorial Article Layout
   独特的编辑式文章排版，避免同质化
   ============================================ */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  z-index: 1100;
  transition: width 0.1s linear;
}

/* Breadcrumb Top Bar */
.detail-topbar {
  margin-top: 120px;
  background: var(--off-white);
  border-bottom: 1px solid var(--border-gray);
  padding: 14px 0;
}

.detail-topbar-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-gray);
}

.detail-breadcrumb a {
  color: var(--text-gray);
  transition: color 0.2s;
}

.detail-breadcrumb a:hover {
  color: var(--primary);
}

.detail-breadcrumb-sep {
  color: var(--border-gray);
  font-size: 11px;
  user-select: none;
}

.detail-breadcrumb-current {
  color: var(--dark-gray);
  font-weight: 500;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   Two-Column Grid
   ============================================ */
.detail-layout {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 48px var(--container-padding) 72px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}

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

/* ============================================
   Article Header — 独特的标题区域
   ============================================ */
.detail-article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  position: relative;
}

/* 左侧装饰竖线 */
.detail-article-header::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0;
}

.detail-article-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 40%, transparent 100%);
}

.detail-category-tag {
  display: inline-block;
  padding: 4px 16px;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  position: relative;
}

/* 标签右侧小三角 */
.detail-category-tag::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 13px solid var(--primary);
  border-bottom: 13px solid var(--primary);
  border-right: 8px solid transparent;
}

.detail-title {
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  color: var(--dark-gray);
  line-height: 1.45;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-gray);
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-meta-item i {
  color: var(--accent);
  font-size: 13px;
}

/* ============================================
   Featured Image — 带装饰的特色图
   ============================================ */
.detail-featured-image {
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

/* 图片底部渐变遮罩 */
.detail-featured-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(255,255,255,0.6));
  pointer-events: none;
}

.detail-featured-image img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.detail-featured-image img[src=""] {
  display: none;
}

/* ============================================
   Article Body (Rich Text) — 精致的正文排版
   ============================================ */
.detail-body {
  font-size: 16px;
  line-height: 2;
  color: var(--dark-gray);
  word-break: break-word;
}

.detail-body p {
  margin-bottom: 22px;
  text-align: justify;
  text-indent: 2em;
}

/* 首段首字母不缩进，用于摘要段 */
.detail-body p:first-child {
  text-indent: 0;
  font-size: 17px;
  color: #444;
}

.detail-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-gray);
  margin: 40px 0 18px;
  padding: 10px 0 10px 18px;
  border-left: 4px solid var(--primary);
  position: relative;
  line-height: 1.4;
}

/* h2 底部装饰线 */
.detail-body h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.detail-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-gray);
  margin: 32px 0 14px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.detail-body h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-gray);
  margin: 24px 0 12px;
}

.detail-body ul,
.detail-body ol {
  margin-bottom: 22px;
  padding-left: 28px;
}

.detail-body ul {
  list-style: none;
}

.detail-body ul li {
  position: relative;
  padding-left: 16px;
}

/* 自定义列表圆点 */
.detail-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.detail-body ol {
  list-style: decimal;
  counter-reset: none;
}

.detail-body li {
  margin-bottom: 10px;
  line-height: 1.9;
}

.detail-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--off-white) 0%, #f5f0e8 100%);
  border-left: 4px solid var(--accent);
  color: #555;
  font-style: italic;
  position: relative;
  line-height: 1.9;
}

/* 引用符号装饰 */
.detail-body blockquote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 48px;
  color: var(--accent);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.detail-body img {
  max-width: 100%;
  height: auto;
  margin: 28px 0;
  display: block;
}

.detail-body a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.detail-body a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

.detail-body strong {
  font-weight: 600;
  color: var(--primary);
}

.detail-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
}

.detail-body th,
.detail-body td {
  padding: 12px 16px;
  border: 1px solid var(--border-gray);
  text-align: left;
}

.detail-body th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  border-color: var(--primary-dark);
}

.detail-body tr:nth-child(even) td {
  background: var(--off-white);
}

/* ============================================
   Tags — 标签区域
   ============================================ */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-gray);
}

.detail-tags[hidden] {
  display: none;
}

.detail-tags-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-gray);
}

.detail-tag {
  display: inline-block;
  font-size: 12px;
  padding: 5px 14px;
  background: var(--off-white);
  border: 1px solid var(--border-gray);
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.25s;
}

.detail-tag:hover {
  border-color: var(--primary);
  color: var(--white);
  background: var(--primary);
}

/* ============================================
   Related Practice Areas
   ============================================ */
.detail-practice-areas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.detail-practice-areas[hidden] {
  display: none;
}

.detail-areas-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-gray);
}

.detail-areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-area-link {
  display: inline-block;
  font-size: 12px;
  padding: 5px 14px;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  transition: all 0.25s;
}

.detail-area-link:hover {
  background: var(--primary);
  color: var(--white);
}

/* ============================================
   Sidebar — 右侧栏
   ============================================ */
.detail-sidebar {
  position: sticky;
  top: 140px;
}

/* 律师卡片列表 */
.sidebar-lawyers-list {
  display: flex;
  flex-direction: column;
}

.sidebar-lawyer-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-gray);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  position: relative;
}

.sidebar-lawyer-card:first-child {
  padding-top: 0;
}

.sidebar-lawyer-card:last-child {
  border-bottom: none;
}

/* 悬停时左侧出现金色指示条 */
.sidebar-lawyer-card::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-lawyer-card:hover::before {
  height: 40px;
}

.sidebar-lawyer-photo {
  width: 72px;
  height: 90px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--light-gray);
  position: relative;
}

/* 照片底部渐变 */
.sidebar-lawyer-photo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.08));
  pointer-events: none;
}

.sidebar-lawyer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sidebar-lawyer-card:hover .sidebar-lawyer-photo img {
  transform: scale(1.05);
}

.sidebar-lawyer-info {
  flex: 1;
  min-width: 0;
}

.sidebar-lawyer-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 2px;
  line-height: 1.3;
  transition: color 0.2s;
}

.sidebar-lawyer-card:hover .sidebar-lawyer-name {
  color: var(--primary);
}

.sidebar-lawyer-position {
  font-size: 13px;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.sidebar-lawyer-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-lawyer-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.4;
}

.sidebar-lawyer-contact-item i {
  color: var(--accent);
  width: 12px;
  font-size: 11px;
  flex-shrink: 0;
}

.sidebar-lawyer-contact-item a {
  color: var(--text-gray);
  text-decoration: none;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-lawyer-contact-item a:hover {
  color: var(--primary);
}

/* ============================================
   Share Section
   ============================================ */
.sidebar-share {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-gray);
}

.sidebar-share-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-share-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-gray);
}

.sidebar-share-actions {
  display: flex;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--off-white);
  border: 1px solid var(--border-gray);
  color: var(--text-gray);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.25s;
}

.share-btn:hover {
  border-color: var(--primary);
  color: var(--white);
  background: var(--primary);
}

.share-btn i {
  font-size: 12px;
}

/* ============================================
   Toast Notification
   ============================================ */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark-gray);
  color: var(--white);
  padding: 10px 24px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

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

/* ============================================
   More News Section — 底部更多新闻
   ============================================ */
.more-news-section {
  background: var(--off-white);
  padding: 56px 0 72px;
  position: relative;
}

/* 顶部装饰线 */
.more-news-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 20%, var(--accent) 20%, var(--accent) 30%, transparent 30%);
}

.more-news-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.more-news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.more-news-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-gray);
  position: relative;
  padding-left: 16px;
}

.more-news-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary);
}

.more-news-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s, gap 0.2s;
}

.more-news-link:hover {
  color: var(--accent-dark);
  gap: 10px;
}

.more-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* 更多新闻卡片样式 */
.more-news-grid .news-card {
  background: var(--white);
  border: 1px solid var(--border-gray);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.more-news-grid .news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  border-color: var(--accent);
}

.more-news-grid .news-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.more-news-grid .news-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.more-news-grid .news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.more-news-grid .news-card:hover .news-image img {
  transform: scale(1.06);
}

.more-news-grid .news-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.more-news-grid .news-content {
  padding: 20px;
}

.more-news-grid .news-meta {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 10px;
}

.more-news-grid .news-date i {
  color: var(--accent);
  margin-right: 4px;
}

.more-news-grid .news-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-gray);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.more-news-grid .news-card:hover .news-title {
  color: var(--primary);
}

.more-news-grid .news-summary {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .detail-layout {
    grid-template-columns: 1fr 260px;
    gap: 36px;
  }

  .more-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .detail-topbar {
    margin-top: 80px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 24px var(--container-padding) 40px;
  }

  .detail-sidebar {
    position: static;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border-gray);
  }

  .detail-title {
    font-size: 22px;
  }

  .detail-body {
    font-size: 15px;
  }

  .detail-body p {
    text-indent: 0;
  }

  .detail-article-header::before {
    display: none;
  }

  .sidebar-lawyer-card {
    padding: 16px 0;
  }

  .sidebar-lawyer-card::before {
    display: none;
  }

  .more-news-grid {
    grid-template-columns: 1fr;
  }

  .more-news-section {
    padding: 40px 0 56px;
  }
}

@media (max-width: 480px) {
  .detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .sidebar-share-actions {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .detail-category-tag::after {
    display: none;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .header-classic,
  .detail-topbar,
  .detail-sidebar,
  .more-news-section,
  .footer-classic,
  .back-to-top,
  .skip-link,
  .reading-progress {
    display: none !important;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .detail-title {
    font-size: 24px;
  }

  .detail-body {
    font-size: 14px;
    line-height: 1.7;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .detail-sidebar {
    position: static;
  }

  .reading-progress {
    display: none;
  }

  .sidebar-lawyer-card::before,
  .sidebar-lawyer-photo img,
  .more-news-grid .news-card,
  .more-news-grid .news-image img {
    transition: none !important;
  }
}
