/* ===== News List ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-item {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.news-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.news-item-cat {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg);
  color: var(--secondary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.news-item-date,
.news-item-views {
  font-size: 13px;
  color: var(--text-light);
}

.news-item-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 10px;
}

.news-item-title a:hover {
  color: var(--secondary);
}

.news-item-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.news-item-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.news-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-light);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}

.news-tag:hover {
  background: var(--secondary);
  color: #fff;
}

.news-tag.active {
  background: var(--primary);
  color: #fff;
}

/* ===== Article Detail ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.article-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-cat {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg);
  color: var(--secondary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.article-date,
.article-views {
  font-size: 14px;
  color: var(--text-light);
}

.article-headline {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 16px;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-body {
  font-size: 16px;
  line-height: 1.9;
  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 ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-body ul li {
  margin-bottom: 10px;
  list-style: disc;
}

.article-body blockquote {
  background: var(--bg);
  border-left: 4px solid var(--secondary);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ===== Article Tables ===== */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.article-body thead th {
  background: var(--secondary);
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 12px 16px;
  border: none;
}

.article-body tbody td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.article-body tbody tr:nth-child(even) {
  background: var(--bg-light);
}

.article-body tbody tr:nth-child(odd) {
  background: var(--card-bg);
}

.article-body tbody tr:hover {
  background: var(--bg);
}

.article-lead {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.article-share a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.article-share a:hover {
  background: var(--secondary);
  color: #fff;
}

/* ===== Related Articles ===== */
.related-articles {
  margin-top: 40px;
}

.related-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-title i {
  color: var(--secondary);
}

.related-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.related-item {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.related-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
  transform: translateY(-3px);
}

.related-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.related-item h4 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
}

.related-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Article Sidebar ===== */
.sidebar-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.sidebar-title i {
  color: var(--secondary);
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-tag:hover {
  background: var(--secondary);
  color: #fff;
}

.sidebar-tag span {
  font-size: 11px;
  opacity: 0.7;
}

.sidebar-articles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-article-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-article-item:last-child {
  border-bottom: none;
}

.sidebar-article-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--secondary);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-article-title {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.sidebar-article-item:hover .sidebar-article-title {
  color: var(--secondary);
}

.sidebar-cta h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.sidebar-cta p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ===== Tags Cloud ===== */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 20px 0;
}

.tags-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.tags-cloud-item:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tags-cloud-count {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ===== Tag Layout ===== */
.tag-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.tag-sidebar .sidebar-tag {
  font-size: 12px;
  padding: 5px 12px;
}

/* ===== Responsive for news/article ===== */
@media (max-width: 1024px) {
  .article-layout,
  .tag-layout {
    grid-template-columns: 1fr;
  }
  
  .article-sidebar,
  .tag-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .sidebar-cta {
    grid-column: span 2;
  }
  
  .related-list {
    grid-template-columns: 1fr;
  }
  
  .article-headline {
    font-size: 22px;
  }

  .article-body h2 {
    font-size: 20px;
  }

  .related-title {
    font-size: 18px;
  }
  
  .news-item {
    padding: 20px 24px;
  }
  
  .news-item-title {
    font-size: 16px;
  }
  
  .article-sidebar,
  .tag-sidebar {
    grid-template-columns: 1fr;
  }
  
  .sidebar-cta {
    grid-column: span 1;
  }

  .article-card {
    padding: 24px;
  }

  .sidebar-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .sidebar-title {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .sidebar-tag {
    padding: 4px 10px;
    font-size: 12px;
  }

  .sidebar-article-item {
    padding: 6px 0;
  }

  .sidebar-cta h4 {
    font-size: 14px;
  }

  .sidebar-cta p {
    font-size: 12px;
  }
  
  .footer-friends {
    display: none;
  }
}

/* ===== Pagination ===== */
.page {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page a,
.page span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.page a:hover,
.page span:hover {
  background: var(--secondary);
  color: #fff;
}

.page a.active,
.page span.active {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  cursor: default;
}


