/* ============================================
   新闻/文章样式
   ============================================ */

/* 文章列表页面 */
.news-section {

}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .section-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-color, #111827);
  margin-bottom: 15px;
  font-family: var(--font-barlow);
}

/* Force layout reset for categories/dropdown to avoid display issues (important to override other rules) */
.news-categories__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.news-categories__item {
  list-style: none;
}
.news-categories__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--text-color, #333);
  text-decoration: none;
}

.archive-description {
  font-size: 1.1rem;
  color: var(--text-color);
  opacity: 0.8;
  max-width: 800px;
  margin: 0 auto;
}

/* Google News风格布局 - 所有文章都是紧凑卡片，一行一个 */
.google-news-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 60px;
}

/* 紧凑卡片（所有文章） */
.news-card.compact-card {
  grid-column: span 1;
  display: flex;
  flex-direction: row;
  gap: 20px;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  padding: 20px;
}

.news-card.compact-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.compact-thumbnail {
  width: 200px;
  min-width: 200px;
  height: 150px;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--bg-lighter);
  flex-shrink: 0;
}

.compact-thumbnail a {
  display: block;
  width: 100%;
  height: 100%;
}

.compact-thumbnail .news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card.compact-card:hover .news-image {
  transform: scale(1.1);
}

.compact-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.news-source {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.compact-title {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.compact-title a:hover {
  color: var(--primary-color);
}

.compact-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  margin-top: auto;
}

.news-time {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.6;
}

/* 元信息行样式 */
.news-meta-row {
  display: flex;
  justify-content: space-between;
  /* align-items: center; */
  margin-bottom: 12px;
}

/* 作者信息样式 */
.news-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  line-height: 1.2;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .news-card.compact-card {
    flex-direction: column;
  }

  .compact-thumbnail {
    width: 100%;
    height: 200px;
    min-width: 100%;
  }
}

/* 分页样式 */
.pagination-wrapper {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.pagination-wrapper .page-numbers {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.pagination-wrapper .page-numbers a:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.pagination-wrapper .page-numbers .current {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-wrapper .page-numbers .prev,
.pagination-wrapper .page-numbers .next {
  gap: 8px;
}

/* 无文章提示 */
.no-posts {
  text-align: center;
  padding: 80px 20px;
}

.no-posts-content {
  max-width: 500px;
  margin: 0 auto;
}

.no-posts h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.no-posts p {
  font-size: 1.1rem;
  color: var(--text-color);
  opacity: 0.7;
}

/* Single post styles moved to modules/17-single-post.css to avoid duplication */

/* Page-specific dropdown and category styles were moved back to assets/css/page-news.css */

/* Styles extracted from page-news.php dropdown */
.news-filter-dropdown {
  position: relative;
  display: inline-block;
}
.news-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  font-size: 14px;
  color: #333;
  border-radius: 18px;
}
.news-filter-toggle.is-active {
  background: var(--primary-color, #0073aa);
  color: #fff;
}
.news-filter-toggle.is-active .news-filter-caret { color: rgba(255,255,255,0.9); }
.news-filter-caret {
  font-size: 12px;
  color: #666;
}
.news-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  /* min-width: 200px; */
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  z-index: 60;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 160ms ease, transform 160ms ease;
  display: block;
}
.news-filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  text-decoration: none;
  color: #222;
  font-size: 14px;
  white-space: nowrap;
}
.news-filter-item:hover {
  background: rgba(0, 0, 0, 0.03);
}
.news-filter-item.is-active {
  color: var(--primary-color, #00a86b); /* use theme primary color */
  font-weight: 600;
}
.news-filter-check {
  color: var(--primary-color, #00a86b);
  margin-left: 8px;
}
/* when dropdown has open class, show menu and rotate caret */
.news-filter-dropdown.open .news-filter-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.news-filter-dropdown.open .news-filter-caret {
  transform: rotate(180deg);
  transition: transform 160ms ease;
}

/* Categories list styles (moved from inline template) */
.news-categories {
  margin-bottom: 24px;
}
.news-categories__list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-categories__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #e3e6eb;
  border-radius: 18px;
  color: #333;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  font-size: 14px;
}
.news-categories__link:hover {
  border-color: var(--primary-color, #0073aa);
  color: var(--primary-color, #0073aa);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.news-categories__item.is-active .news-categories__link {
  background: var(--primary-color, #0073aa);
  color: #fff;
  border-color: var(--primary-color, #0073aa);
  box-shadow: 0 6px 14px rgba(0, 115, 170, 0.25);
}
.news-categories__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}
.news-categories__item.is-active .news-categories__count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Pagination styles (moved from inline template) */
.news-pagination .pagination-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-pagination .pagination-item a,
.news-pagination .pagination-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 18px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
}
.news-pagination .pagination-item a:hover {
  border-color: var(--primary-color, #0073aa);
  color: var(--primary-color, #0073aa);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.news-pagination .pagination-item .current {
  background: var(--primary-color, #0073aa);
  border-color: var(--primary-color, #0073aa);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 115, 170, 0.25);
}
.news-pagination .pagination-item .dots {
  border: none;
  box-shadow: none;
}

/* 置顶文章图标样式 */
.news-category-sticky {
  display: flex;
  gap: 8px;
}

.sticky-icon {
  color: var(--primary-color);
  font-size: 20px;
  display: flex;
  margin-left: 20px;
}

.sticky-icon .dashicons {
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: var(--primary-color);
}

.news-sticky-icon .sticky-icon {
  margin-left: 0;
  margin-right: 0;
}