/* 详情页样式 */

/* 页面头部 */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 0 40px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  opacity: 0.9;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 文章布局 */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0 60px;
}

/* 文章内容 */
.article-content {
  background: var(--bg);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.article-body p {
  margin-bottom: 20px;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text);
}

.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.article-body img {
  width: 100%;
  border-radius: 8px;
  margin: 24px 0;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  background: var(--bg-gray);
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body ul,
.article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 8px;
}

/* 文章底部 */
.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-tags-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-share-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.share-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* 上一篇/下一篇 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.article-nav-item {
  padding: 20px;
  background: var(--bg-gray);
  border-radius: 8px;
  transition: var(--transition);
}

.article-nav-item:hover {
  background: rgba(196, 30, 36, 0.06);
}

.article-nav-label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.article-nav-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.article-nav-item:hover .article-nav-title {
  color: var(--primary);
}

.article-nav-next {
  text-align: right;
}

/* 侧边栏 */
.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.related-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-thumb {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.related-info {
  flex: 1;
}

.related-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 6px;
}

.related-title:hover {
  color: var(--primary);
}

.related-date {
  font-size: 12px;
  color: var(--text-light);
}

/* 热门标签 */
.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-tags .tag {
  cursor: pointer;
}

.hot-tags .tag:hover {
  background: var(--primary);
  color: #fff;
}

/* 响应式 */
@media (max-width: 1199px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 767px) {
  .page-header {
    padding: 40px 0 30px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .article-meta {
    font-size: 13px;
    gap: 12px;
  }

  .article-layout {
    padding: 24px 0 40px;
  }

  .article-content {
    padding: 24px;
  }

  .article-body {
    font-size: 15px;
  }

  .article-body h2 {
    font-size: 18px;
  }

  .article-body h3 {
    font-size: 16px;
  }

  .article-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav-next {
    text-align: left;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }
}
