/* article.css - 文章详情排版（百科/新闻页加载） */

/* Article Layout */
.article-page {
  padding: 3rem 0;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

/* Article Header */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #D0C8BC;
}

.article-header h1 {
  font-size: 1.8rem;
  color: #1B4332;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #666;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.article-meta .category {
  color: #D4A373;
  font-weight: 500;
}

/* Article Content */
.article-content {
  font-size: 1rem;
  line-height: 1.9;
  color: #333;
}

.article-content h2 {
  font-size: 1.5rem;
  color: #1B4332;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #D0C8BC;
}

.article-content h3 {
  font-size: 1.25rem;
  color: #1B4332;
  margin: 2rem 0 0.75rem;
}

.article-content h4 {
  font-size: 1.1rem;
  color: #1B4332;
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.article-content ul li {
  list-style: disc;
  margin-bottom: 0.5rem;
}

.article-content ol li {
  list-style: decimal;
  margin-bottom: 0.5rem;
}

.article-content strong {
  color: #1B4332;
  font-weight: 600;
}

.article-content a {
  color: #1B4332;
  text-decoration: underline;
  text-decoration-color: #D4A373;
}

.article-content a:hover {
  color: #D4A373;
}

.article-content blockquote {
  background: #F5F0EB;
  border-left: 4px solid #D4A373;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #555;
}

.article-content blockquote p {
  margin-bottom: 0;
}

.article-content code {
  background: #f0ece6;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.9em;
}

.article-content pre {
  background: #0F2922;
  color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.article-content th,
.article-content td {
  padding: 0.75rem;
  border: 1px solid #D0C8BC;
  text-align: left;
}

.article-content th {
  background: #1B4332;
  color: #fff;
  font-weight: 500;
}

.article-content tr:nth-child(even) {
  background: #F5F0EB;
}

/* Article Tags */
.article-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #D0C8BC;
}

.article-tags-label {
  font-weight: 600;
  color: #1B4332;
  margin-right: 0.5rem;
}

.article-tags a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #F5F0EB;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #1B4332;
  margin: 0.25rem;
  transition: all 0.3s ease;
}

.article-tags a:hover {
  background: #1B4332;
  color: #fff;
}

/* Article Navigation */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #D0C8BC;
}

.article-nav-prev,
.article-nav-next {
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #D0C8BC;
}

.article-nav-next {
  text-align: right;
}

.article-nav-label {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.article-nav a {
  color: #1B4332;
  font-weight: 500;
}

.article-nav a:hover {
  color: #D4A373;
}

/* Sidebar Styles */
.sidebar-widget {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  color: #1B4332;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #D4A373;
}

.sidebar-article-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0ece6;
}

.sidebar-article-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-article-list a {
  color: #333;
  font-size: 0.9rem;
  display: block;
  line-height: 1.5;
}

.sidebar-article-list a:hover {
  color: #D4A373;
}

.sidebar-article-list .date {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.25rem;
}

/* Hot Articles Ranking */
.hot-ranking li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0ece6;
}

.hot-ranking .rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #D0C8BC;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.hot-ranking .rank.top {
  background: #D4A373;
}

.hot-ranking a {
  color: #333;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hot-ranking a:hover {
  color: #D4A373;
}

/* Article List Page */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-list-item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.article-list-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.article-list-item h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.article-list-item h2 a {
  color: #1B4332;
}

.article-list-item h2 a:hover {
  color: #D4A373;
}

.article-list-item .excerpt {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.article-list-item .meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #999;
}

/* Responsive */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: 1.4rem;
  }
  
  .article-content h2 {
    font-size: 1.25rem;
  }
  
  .article-content h3 {
    font-size: 1.1rem;
  }
  
  .article-nav {
    grid-template-columns: 1fr;
  }
  
  .article-nav-next {
    text-align: left;
  }
}
