/*
 * 文章页面专用高端主题样式
 * 为文章列表和详情页面提供统一的现代化设计
 */

/* ========== 文章页面英雄区域 ========== */
.article-hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 50vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.article-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.article-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.article-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.article-hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.article-stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.article-stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  text-align: center;
}

.article-stat-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.article-stat-icon {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1rem;
  display: block;
}

.article-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.article-stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  font-weight: 500;
}

/* ========== 文章列表区域 ========== */
.article-list-section {
  background: var(--neutral-50);
  padding: 4rem 0;
  position: relative;
}

.article-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.article-section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--neutral-800);
  margin-bottom: 1rem;
}

.article-section-description {
  color: var(--neutral-600);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

/* ========== 文章卡片 ========== */
.article-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--neutral-200);
  transition: all 0.3s ease;
  position: relative;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.article-card-image {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--gradient-primary);
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

.article-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  pointer-events: none;
}

.article-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.article-card-content {
  padding: 1.5rem;
}

.article-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-card-title a:hover {
  color: var(--primary-600);
}

.article-card-excerpt {
  color: var(--neutral-600);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--neutral-500);
  border-top: 1px solid var(--neutral-200);
  padding-top: 1rem;
  margin-top: 1rem;
}

.article-card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-card-author i {
  color: var(--primary-600);
}

.article-card-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-card-date i {
  color: var(--primary-600);
}

.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.article-card-tag {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.article-card-tag:hover {
  background: var(--primary-600);
  color: white;
}

/* ========== 文章详情页面 ========== */
.article-detail-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.article-detail-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.article-detail-breadcrumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

.article-detail-breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-detail-breadcrumb a:hover {
  color: white;
}

.article-detail-breadcrumb .breadcrumb-separator {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0.75rem;
}

.article-detail-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.article-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.article-detail-meta-item i {
  color: rgba(255, 255, 255, 0.7);
}

.article-detail-content-section {
  background: white;
  position: relative;
  z-index: 1;
  margin-top: -50px;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.article-detail-content {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.article-detail-content h1,
.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4,
.article-detail-content h5,
.article-detail-content h6 {
  color: var(--neutral-800);
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-detail-content h2 {
  font-size: 1.75rem;
  border-bottom: 2px solid var(--primary-200);
  padding-bottom: 0.5rem;
}

.article-detail-content h3 {
  font-size: 1.5rem;
}

.article-detail-content p {
  color: var(--neutral-700);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.article-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.article-detail-content blockquote {
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--neutral-700);
}

.article-detail-content ul,
.article-detail-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-detail-content li {
  color: var(--neutral-700);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.article-detail-content code {
  background: var(--neutral-100);
  color: var(--primary-700);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.article-detail-content pre {
  background: var(--neutral-900);
  color: var(--neutral-100);
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
}

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

/* ========== 相关文章区域 ========== */
.article-related-section {
  background: var(--neutral-50);
  padding: 3rem 2rem;
}

.article-related-header {
  text-align: center;
  margin-bottom: 2rem;
}

.article-related-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 0.5rem;
}

.article-related-subtitle {
  color: var(--neutral-600);
  font-size: 1rem;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.article-related-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--neutral-200);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.article-related-card:hover {
  background: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  color: inherit;
}

.article-related-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-related-card-excerpt {
  color: var(--neutral-600);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-related-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--neutral-500);
}

/* ========== 分页导航 ========== */
.article-pagination-wrapper {
  text-align: center;
  margin-top: 3rem;
}

.article-pagination-info {
  margin-bottom: 1rem;
}

.article-pagination-info span {
  color: var(--neutral-600);
  font-size: 0.9rem;
}

.article-pagination-nav {
  display: inline-block;
}

.article-pagination {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-page-item {
  display: block;
}

.article-page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0.5rem;
  background: white;
  color: var(--neutral-700);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid var(--neutral-300);
  font-weight: 600;
  transition: all 0.3s ease;
}

.article-page-link:hover {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.article-page-link.active {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

.article-page-link.disabled {
  background: var(--neutral-100);
  color: var(--neutral-400);
  cursor: not-allowed;
}

.article-page-link.disabled:hover {
  transform: none;
  box-shadow: none;
  background: var(--neutral-100);
  color: var(--neutral-400);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  .article-hero-title {
    font-size: 2rem;
  }
  
  .article-stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .article-stat-card {
    padding: 1.5rem 1rem;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
  }
  
  .article-detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .article-detail-content {
    padding: 2rem 1rem;
  }
  
  .article-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .article-stats-container {
    grid-template-columns: 1fr;
  }
  
  .article-pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========== 动画效果 ========== */
@keyframes articleSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card {
  animation: articleSlideIn 0.6s ease-out;
}

.article-card:nth-child(2) {
  animation-delay: 0.1s;
}

.article-card:nth-child(3) {
  animation-delay: 0.2s;
}

.article-card:nth-child(4) {
  animation-delay: 0.3s;
}

.article-detail-content-section {
  animation: articleSlideIn 0.8s ease-out;
}

