/* CSS 变量定义 - 东方信息网配色方案 */
:root {
  /* 颜色变量 - 东方蓝主题 */
  --primary-color: #1e5bb5;
  --primary-hover: #164a94;
  --secondary-color: #0f4c81;
  --accent-color: #e67e22;
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg-white: #ffffff;
  --bg-gray: #f8fafc;
  --bg-light: #f1f5f9;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  
  /* 阴影变量 */
  --shadow-sm: 0 1px 3px rgba(30, 91, 181, 0.08);
  --shadow-md: 0 4px 12px rgba(30, 91, 181, 0.12);
  --shadow-lg: 0 8px 24px rgba(30, 91, 181, 0.15);
  
  /* 动画变量 */
  --transition: all 0.3s ease;
  
  /* 圆角变量 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* 统一间距变量 - 响应式外边距 */
  --spacing-fixed: 16px;  /* 统一固定外边距 16px */
  --spacing-fixed-rem: 1rem;  /* 统一固定外边距 1rem */
  
  /* 容器内边距变量 - 基于固定间距计算 */
  --container-padding: calc(var(--spacing-fixed) * 1); /* 16px */
  --container-padding-mobile: calc(var(--spacing-fixed) * 0.75); /* 12px */
  --container-padding-small: calc(var(--spacing-fixed) * 0.625); /* 10px */
  
  /* 布局间距变量 */
  --section-gap: calc(var(--spacing-fixed) * 2.5); /* 40px */
  --component-gap: calc(var(--spacing-fixed) * 1.25); /* 20px */
  --element-gap: var(--spacing-fixed); /* 16px */
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-white);
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

input, button, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ========================================
   布局容器
   ======================================== */
.container {
  width: 100%;
  max-width: 1280px; /* 大屏幕下最大宽度1280px */
  margin: 0 auto;     /* 水平居中 */
  padding: 0 var(--container-padding); /* 使用CSS变量统一边距 */
}

/* 响应式容器设计 - 保持统一外边距策略 */
@media (max-width: 1279px) {
  .container {
    max-width: 1140px; /* 中等大屏幕 */
  }
}

@media (max-width: 1199px) {
  .container {
    max-width: 960px;  /* 中等屏幕 */
    padding: 0 var(--container-padding); /* 保持统一 16px 边距 */
  }
}

@media (max-width: 991px) {
  .container {
    max-width: 720px;  /* 小屏幕/平板 */
    padding: 0 var(--container-padding); /* 保持统一 16px 边距 */
  }
}

@media (max-width: 767px) {
  .container {
    max-width: 540px;  /* 大手机屏幕 */
    padding: 0 var(--container-padding-mobile); /* 移动端调整 12px，但仍保持一致性 */
  }
}

@media (max-width: 575px) {
  .container {
    max-width: 100%;   /* 小手机屏幕使用全宽 */
    padding: 0 var(--container-padding-small); /* 小屏幕 10px 边距 */
  }
}

/* 主内容区域和侧边栏响应式间距优化 */
.main-content,
.sidebar {
  padding-left: var(--spacing-fixed);
  padding-right: var(--spacing-fixed);
}

/* 移动端优化：确保主内容和侧边栏间距一致 */
@media (max-width: 991px) {
  .main-content,
  .sidebar {
    padding-left: var(--spacing-fixed);
    padding-right: var(--spacing-fixed);
  }
}

@media (max-width: 767px) {
  .main-content,
  .sidebar {
    padding-left: var(--container-padding-mobile);
    padding-right: var(--container-padding-mobile);
  }
}

@media (max-width: 575px) {
  .main-content,
  .sidebar {
    padding-left: var(--container-padding-small);
    padding-right: var(--container-padding-small);
  }
}

/* 全局布局组件统一边距 */
.main-wrapper {
  display: flex;
  gap: var(--section-gap);
  padding: var(--component-gap) 0;
}

.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--component-gap);
  margin-bottom: var(--component-gap);
  border: 1px solid var(--border-light);
}

.main-wrapper {
  display: flex;
  gap: 20px;
  padding: 20px 0;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 420px;
  flex-shrink: 0;
}

@media (max-width: 1199px) {
  /* 中等屏幕下调整侧边栏宽度 */
  .sidebar {
    width: 360px; /* 进一步增加侧边栏宽度 */
  }
}

@media (max-width: 991px) {
  .main-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
  
  /* 调整主内容区的内边距 - 使用统一变量 */
  .main-content {
    margin-bottom: calc(var(--spacing-fixed) * 2);
  }
}

/* ========================================
   顶部导航
   ======================================== */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary-color);
  color: var(--bg-white);
  padding: 10px 0;
  font-size: 14px;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top a {
  color: rgba(255,255,255,0.9);
}

.header-top a:hover {
  color: var(--bg-white);
}

.top-links {
  display: flex;
  gap: 20px;
}

.top-links a {
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-main {
  padding: 15px 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-size: 20px;
  font-weight: bold;
}

.logo-text {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
}

.logo-text span {
  color: var(--text-color);
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.nav-menu a {
  padding: 10px 18px;
  font-size: 17px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
  background: rgba(30, 91, 181, 0.08);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary-color);
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-gray);
  border-radius: 20px;
  padding: 5px 5px 5px 15px;
  width: 280px;
  transition: var(--transition);
}

.search-box:focus-within {
  background: var(--bg-white);
  box-shadow: 0 0 0 2px rgba(30, 91, 181, 0.2);
}

.search-box input {
  flex: 1;
  background: transparent;
  padding: 5px;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-box button {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.search-box button:hover {
  background: var(--primary-hover);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-color);
  background: transparent;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-left: auto;  /* 将汉堡菜单推到右侧 */
}

.mobile-menu-btn:hover {
  background: var(--bg-gray);
  color: var(--primary-color);
}

/* 响应式导航 - 小于991px时隐藏nav，显示汉堡菜单 */
@media (max-width: 991px) {
  .header-main .container {
    justify-content: space-between;  /* Logo左，汉堡菜单右 */
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: var(--spacing-fixed);
    box-shadow: var(--shadow-md);
    gap: 0;
    z-index: 999;
    border-top: 1px solid var(--border-light);
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-menu a {
    width: 100%;
    padding: 16px var(--spacing-fixed);
    font-size: 18px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
  }
  
  .nav-menu a:last-child {
    border-bottom: none;
  }
  
  .nav-menu a:hover,
  .nav-menu a.active {
    background: rgba(30, 91, 181, 0.08);
    padding-left: calc(var(--spacing-fixed) + 8px);
  }
  
  .nav-menu a.active::after {
    display: none;  /* 移动端不显示底部指示线 */
  }
  
  .search-box {
    display: none;  /* 991px以下隐藏搜索框 */
  }
  
  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 991px) {
  .header-top {
    font-size: 13px;
  }
  
  .top-links {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }
  
  .header-main {
    padding: 12px 0;
  }
  
  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .logo-text {
    font-size: 24px;
  }
  
  /* 移动端导航优化 */
  .nav-menu {
    padding: 12px;
  }
  
  .nav-menu a {
    padding: 14px;
    font-size: 17px;
  }
  
  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  
  /* 移动端优化触摸目标 */
  .share-btn,
  .action-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* 文章内容移动端优化 */
  .article-content {
    font-size: 15px;
    line-height: 1.8;
  }
  
  .article-content h2 {
    font-size: 20px;
    margin-top: 25px;
  }
  
  .article-content h3 {
    font-size: 17px;
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  /* 超小屏幕优化 */
  .container {
    padding: 0 8px;
  }

  .article-title {
    font-size: 22px;
    line-height: 1.3;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
  }

  /* 小屏幕下侧边栏组件优化 - 防止图片溢出 */
  .sidebar-widget {
    padding: 12px;
    min-width: 0;
    overflow: hidden;
  }

  /* 确保精选文章列表项不溢出 */
  .featured-news-item {
    min-width: 0;
    max-width: 100%;
  }

  /* 图片容器确保不溢出 */
  .featured-news-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .featured-news-image img {
    max-width: 100%;
    height: 100%;
    display: block;
  }

  /* 标题允许换行，防止溢出 */
  .featured-news-title {
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
  }

  /* 元信息区域优化 */
  .featured-news-meta {
    flex-wrap: wrap;
    gap: 4px;
  }

  .featured-news-info {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  /* 移动端隐藏文章元信息中的特定元素 */
  .article-source {
    display: none;
  }
  
  .article-meta span:has(> .ri-user-line),
  .article-meta span:has(> .ri-message-3-line) {
    display: none;
  }
  
  /* 评论区域移动端优化 */
  .comment-form {
    flex-direction: column;
    gap: 12px;
  }

  .comment-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* 超小屏幕下进一步减小 footer 间距 */
  .footer {
    padding-top: 20px;        /* 进一步减小到 20px */
    margin-top: 20px;         /* 进一步减小到 20px */
  }

  .footer-bottom {
    padding: 12px 0;          /* 底部内边距进一步减小 */
    font-size: 12px;          /* 字体稍微减小 */
  }

  .footer-bottom p {
    line-height: 1.5;         /* 增加行高便于阅读 */
  }
}

/* ========================================
   面包屑导航
   ======================================== */
.breadcrumb {
  padding: var(--spacing-fixed) 0;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb .separator {
  margin: 0 8px;
  color: var(--text-light);
}

.breadcrumb .current {
  color: var(--text-color);
}

/* ========================================
   文章卡片
   ======================================== */
.news-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card-image {
  position: relative;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: var(--transition);
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary-color);
  color: var(--bg-white);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.news-card-content {
  padding: var(--spacing-fixed);
}

.news-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--text-light);
}

.news-card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 列表样式卡片 */
.news-list-item {
  display: flex;
  gap: var(--component-gap);
  padding: var(--component-gap) 0;
  border-bottom: 1px solid var(--border-light);
}

.news-list-item:last-child {
  border-bottom: none;
}

.news-list-image {
  width: 240px;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.news-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.news-list-item:hover .news-list-image img {
  transform: scale(1.05);
}

.news-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-list-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.5;
}

.news-list-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-list-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-light);
}

@media (max-width: 1199px) {
  /* 中等屏幕下调整卡片网格 */
  .news-card-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .news-card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .news-card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-list-item {
    flex-direction: column;
    gap: 12px;
  }
  
  .news-list-image {
    width: 100%;
    height: 200px;
  }
  
  .news-card-grid-4,
  .news-card-grid-3,
  .news-card-grid-2 {
    grid-template-columns: 1fr;
  }
  
  /* 单卡片布局优化 */
  .news-card-image img {
    aspect-ratio: 16/9;
  }
}

/* ========================================
   标题栏
   ======================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--component-gap);
  padding-bottom: calc(var(--spacing-fixed) - 4px);
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-color);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--primary-color);
}

.section-more {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.section-more:hover {
  color: var(--primary-color);
}

/* ========================================
   侧边栏组件
   ======================================== */
.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

/* ========================================
   精选文章模块 - sidebar-widget2 独立样式
   ======================================== */
.sidebar-widget2 {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--component-gap);
  margin-bottom: var(--component-gap);
  border: 1px solid var(--border-light);
}

.sidebar-widget2 .widget-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-widget2 .widget-title i {
  color: var(--primary-color);
}

/* 精选文章列表容器 */
.sidebar-widget2 .featured-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 精选文章单项 */
.sidebar-widget2 .featured-news-item {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sidebar-widget2 .featured-news-item:hover {
  background: var(--bg-light);
}

.sidebar-widget2 .featured-news-item:hover .featured-news-title {
  color: var(--primary-color);
}

/* 精选文章图片容器 */
.sidebar-widget2 .featured-news-image {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}

.sidebar-widget2 .featured-news-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.sidebar-widget2 .featured-news-item:hover .featured-news-image img {
  transform: scale(1.03);
}

/* 精选文章标题 */
.sidebar-widget2 .featured-news-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-color);
  transition: var(--transition);
}

/* 精选文章元信息 */
.sidebar-widget2 .featured-news-meta {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}

.sidebar-widget2 .featured-news-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-widget2 .featured-news-info i {
  font-size: 12px;
}

.sidebar-widget2 .featured-news-date {
  color: var(--text-muted);
}

.sidebar-widget2 .featured-news-views {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

/* 桌面端大屏（≥1200px）优化 */
@media (min-width: 1200px) {
  .sidebar-widget2 {
    padding: 24px;
  }
  
  .sidebar-widget2 .widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }
  
  .sidebar-widget2 .featured-news-list {
    gap: 20px;
  }
  
  .sidebar-widget2 .featured-news-title {
    font-size: 15px;
    line-height: 1.6;
  }
  
  .sidebar-widget2 .featured-news-meta {
    font-size: 13px;
  }
}

/* 中等屏幕（≤1199px）适配 */
@media (max-width: 1199px) {
  .sidebar-widget2 {
    padding: 18px;
  }
  
  .sidebar-widget2 .featured-news-list {
    gap: 14px;
  }
  
  .sidebar-widget2 .featured-news-title {
    font-size: 13px;
  }
}

/* 平板端（≤991px）- 横向排列优化 */
@media (max-width: 991px) {
  .sidebar-widget2 {
    padding: 20px;
    margin-bottom: 24px;
  }
  
  .sidebar-widget2 .featured-news-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .sidebar-widget2 .featured-news-image {
    margin-bottom: 12px;
  }
  
  .sidebar-widget2 .featured-news-title {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }
}

/* 移动端（≤768px）- 单列布局 */
@media (max-width: 768px) {
  .sidebar-widget2 {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
  }
  
  .sidebar-widget2 .widget-title {
    font-size: 16px;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }
  
  .sidebar-widget2 .featured-news-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .sidebar-widget2 .featured-news-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }
  
  .sidebar-widget2 .featured-news-image {
    flex-shrink: 0;
    margin-bottom: 0;
  }
  
  .sidebar-widget2 .featured-news-image img {
    width: 100%;
    aspect-ratio: auto;
  }
  
  .sidebar-widget2 .featured-news-title {
    font-size: 14px;
    margin-bottom: 6px;
    -webkit-line-clamp: 2;
  }
  
  .sidebar-widget2 .featured-news-meta {
    font-size: 11px;
  }
}

/* 小屏移动端（≤575px）- 紧凑布局 */
@media (max-width: 575px) {
  .sidebar-widget2 {
    padding: 14px;
    margin-bottom: 16px;
  }
  
  .sidebar-widget2 .widget-title {
    font-size: 15px;
    margin-bottom: 12px;
  }
  
  .sidebar-widget2 .featured-news-list {
    gap: 14px;
  }
  
  .sidebar-widget2 .featured-news-item {
    gap: 10px;
  }

  .sidebar-widget2 .featured-news-title {
    font-size: 13px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
  }
  
  .sidebar-widget2 .featured-news-meta {
    font-size: 11px;
  }
  
  .sidebar-widget2 .featured-news-info {
    gap: 6px;
  }
}

.widget-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title i {
  color: var(--primary-color);
}

/* 精选文章列表 - 三行式布局 */
.featured-news-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-fixed);
}

.featured-news-item {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-fixed) / 2);
  padding-bottom: var(--spacing-fixed);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.featured-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.featured-news-item:hover .featured-news-title {
  color: var(--primary-color);
}

/* 第一行：文章配图 - 5:3比例 */
.featured-news-image {
  width: 100%;
  aspect-ratio: 5 / 3;  /* 5:3 宽高比 */
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.featured-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.featured-news-item:hover .featured-news-image img {
  transform: scale(1.05);
}

/* 第二行：文章标题 */
.featured-news-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-color);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* 第三行：时间 + 阅读量（左对齐，带时钟图标） */
.featured-news-meta {
  display: flex;
  justify-content: flex-start;  /* 左对齐 */
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}

.featured-news-info {
  display: flex;
  align-items: center;
  gap: 6px;  /* 图标与文本间距 */
}

.featured-news-info i {
  font-size: 13px;
  color: var(--text-light);
}

.featured-news-date {
  font-weight: 500;
  margin-right: 8px;  /* 时间与阅读量间距 */
}

.featured-news-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.featured-news-views i {
  font-size: 14px;
}

/* 精选文章列表响应式 */
@media (max-width: 991px) {
  .featured-news-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-fixed);
  }
  
  .featured-news-item {
    padding-bottom: 0;
    border-bottom: none;
  }
}

@media (max-width: 575px) {
  .featured-news-list {
    grid-template-columns: 1fr;
  }
}

/* 热门文章 */
.hot-news-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.hot-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hot-news-rank {
  width: 24px;
  height: 24px;
  background: var(--bg-gray);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.hot-news-item:nth-child(1) .hot-news-rank {
  background: #e67e22;
  color: var(--bg-white);
}

.hot-news-item:nth-child(2) .hot-news-rank {
  background: #f39c12;
  color: var(--bg-white);
}

.hot-news-item:nth-child(3) .hot-news-rank {
  background: #3498db;
  color: var(--bg-white);
}

.hot-news-content {
  flex: 1;
}

.hot-news-title {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-news-meta {
  font-size: 12px;
  color: var(--text-light);
}

/* ========================================
   文章详情页
   ======================================== */
.article-header {
  margin-bottom: calc(var(--spacing-fixed) + 9px);
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-source {
  color: var(--primary-color);
  font-weight: 500;
}

.article-content {
  font-size: 16px;
  line-height: 1.9;
}

.article-content p {
  margin-bottom: var(--component-gap);
  text-align: justify;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--component-gap) auto;
  object-fit: contain;
  display: block;
}

.article-content h2 {
  font-size: 22px;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.article-content h3 {
  font-size: 18px;
  margin: 25px 0 12px;
}

.article-content blockquote {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-muted);
}

/* 分享工具栏 */
.share-toolbar {
  display: flex;
  align-items: center;
  gap: var(--spacing-fixed);
  padding: var(--component-gap) 0;
  margin: calc(var(--spacing-fixed) * 2) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.share-label {
  font-size: 14px;
  color: var(--text-muted);
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--bg-white);
  transition: var(--transition);
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn.wechat { background: #07c160; }
.share-btn.weibo { background: #e6162d; }
.share-btn.qq { background: #12b7f5; }
.share-btn.link { background: var(--text-light); }

.share-right {
  margin-left: auto;
  display: flex;
  gap: 15px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-gray);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.action-btn:hover {
  background: rgba(30, 91, 181, 0.1);
  color: var(--primary-color);
}

.action-btn.active {
  background: var(--primary-color);
  color: var(--bg-white);
}

/* 评论区域 */
.comment-section {
  margin-top: calc(var(--spacing-fixed) * 2.5);
}

.comment-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.comment-count {
  color: var(--primary-color);
}

.comment-form {
  display: flex;
  gap: var(--spacing-fixed);
  margin-bottom: calc(var(--spacing-fixed) * 2);
}

.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-light);
  flex-shrink: 0;
}

.comment-input-wrapper {
  flex: 1;
}

.comment-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 80px;
  transition: var(--transition);
}

.comment-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 91, 181, 0.1);
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.comment-tools {
  display: flex;
  gap: 15px;
  color: var(--text-light);
  font-size: 18px;
}

.comment-tools button:hover {
  color: var(--primary-color);
}

.comment-submit {
  padding: 8px 24px;
  background: var(--primary-color);
  color: var(--bg-white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
}

.comment-submit:hover {
  background: var(--primary-hover);
}

/* 评论列表 */
.comment-item {
  display: flex;
  gap: var(--spacing-fixed);
  padding: var(--component-gap) 0;
  border-bottom: 1px solid var(--border-light);
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  margin-bottom: 5px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 10px;
}

.comment-footer {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-light);
}

.comment-footer button {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-light);
}

.comment-footer button:hover {
  color: var(--primary-color);
}

/* ========================================
   首页特色区域 (修复版)
   ======================================== */
.hero-section {
  padding: 20px 0;
}

/* 布局容器：移动端优先，默认单列堆叠 */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* 桌面端 (>=1200px): 左右分栏 (2:1) */
@media (min-width: 1200px) {
  .hero-grid {
    grid-template-columns: 2fr 1fr;
    align-items: stretch; /* 强制等高 */
  }
}

/* 主轮播区域 */
.hero-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%; /* 填充 Grid 单元格高度 */
}

/* 修复图片比例失调：统一 16:9 */
.hero-main img, 
.carousel-item img {
  width: 100%;
  height: auto !important; /* 覆盖可能得固定高度 */
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

/* 遮罩层 */
.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--bg-white);
  pointer-events: none; /* 防止遮挡点击 */
  z-index: 2;
}

.hero-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-meta {
  font-size: 13px;
  opacity: 0.8;
}

/* 侧边栏区域 */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%; /* 桌面端跟随主区域高度 */
}

.hero-side-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 1; /* 均分高度 */
  display: flex; /* 确保内部绝对定位生效 */
}

/* 侧边栏图片 */
.hero-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute; /* 绝对定位填满容器 */
  top: 0;
  left: 0;
}

.hero-side-item .hero-overlay {
  padding: 15px;
}

.hero-side-item .hero-title {
  font-size: 15px;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 平板端优化 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .hero-side {
    flex-direction: row; /* 横向排列 */
    height: auto;
  }
  
  .hero-side-item {
    height: 200px; /* 固定高度 */
    flex: 1;
  }
  
  .hero-side-item img {
    position: relative; /* 恢复相对定位 */
  }
}

/* 移动端 ( < 768px) */
@media (max-width: 767px) {
  .hero-main img, 
  .carousel-item img {
    aspect-ratio: 16/9;
  }
  
  .hero-side {
    height: auto;
  }

  .hero-side-item {
    height: 180px;
    flex: none;
  }
  
  .hero-side-item img {
    position: relative;
  }
  
  .hero-title {
    font-size: 18px;
  }
  
  .hero-side-item .hero-overlay {
    padding: 10px;
  }
  
  .hero-side-item .hero-title {
    font-size: 14px;
  }
}

/* ========================================
   分页样式 - 纯CSS元素选择器实现
   ======================================== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  padding: 30px 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 分页列表项 */
.pagination li {
  display: inline-block;
}

/* 分页链接 */
.pagination li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-color);
  transition: var(--transition);
}

/* 分页链接悬停 */
.pagination li a:hover {
  background: var(--bg-gray);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 分页链接激活/点击状态 */
.pagination li a:active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-white);
}

/* 当前页 - span元素 */
.pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--bg-white);
  cursor: default;
}

/* 上一页/下一页 */
.pagination li:first-child a,
.pagination li:last-child a {
  padding: 0 16px;
}

/* 禁用状态（通过CSS实现） */
.pagination li:first-child span,
.pagination li:last-child span {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-white);
}

/* ========================================
   底部Footer
   ======================================== */
.footer {
  background: var(--secondary-color);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 0;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-text {
  color: var(--bg-white);
  margin-bottom: 15px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-size: 16px;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 16px;
  color: var(--bg-white);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--bg-white);
  padding-left: 5px;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

@media (max-width: 991px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    display: none;
  }

  /* 小屏幕下减小 footer 上方间距 */
  .footer {
    padding-top: 30px;        /* 从 50px 减小到 30px */
    margin-top: 30px;         /* 从 50px 减小到 30px */
  }

  .footer-bottom {
    padding: 15px 0;          /* 适当减小底部内边距 */
  }

  /* 移动端隐藏文章来源标签 */
  .article-source {
    display: none !important;
  }

  /* 分享工具栏移动端优化 */
  .share-toolbar {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .share-right {
    display: none;
  }

  .share-buttons {
    gap: 8px;
  }

  .share-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* 防止文章内图片溢出 */
  .article-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
}

/* ========================================
   轮播图
   ======================================== */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
  position: relative;
}

/* Removed fixed height, handled by hero-section rules */
/* .carousel-item img { ... } */

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--bg-white);
}

.carousel-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-indicator.active {
  background: var(--bg-white);
  width: 24px;
  border-radius: 4px;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.carousel:hover .carousel-control {
  opacity: 1;
}

.carousel-control:hover {
  background: rgba(0,0,0,0.6);
}

.carousel-control.prev { left: 15px; }
.carousel-control.next { right: 15px; }

@media (max-width: 768px) {
  /* .carousel-item img height handled by aspect-ratio rule */
  
  .carousel-title {
    font-size: 16px;
  }
  
  .carousel-control {
    display: none;
  }
}

/* ========================================
   侧边栏模块 - 图集列表 (Module 1)
   ======================================== */
.side-visual-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-visual-list__item {
  width: 100%;
}

.visual-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.visual-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.visual-card__link {
  display: block;
  width: 100%;
}

.visual-card__figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  margin: 0;
}

.visual-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.visual-card:hover .visual-card__img {
  transform: scale(1.05);
}

.visual-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.visual-card__category {
  display: inline-block;
  font-size: 11px;
  background: var(--primary-color);
  color: #fff;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 4px;
  align-self: flex-start;
}

.visual-card__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.visual-card__time {
  font-size: 11px;
  opacity: 0.8;
}

/* ========================================
   侧边栏模块 - 图文卡片 (Module 2)
   ======================================== */
.side-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card-list__item {
  width: 100%;
}

.side-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.side-card:hover .side-card__title {
  color: var(--primary-color);
}

.side-card__link {
  display: block;
}

.side-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
}

.side-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.side-card:hover .side-card__img {
  transform: scale(1.05);
}

.side-card__category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary-color);
  color: var(--bg-white);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.side-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.side-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
}

.side-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.side-card__icon {
  display: block;
  opacity: 0.7;
}

/* ========================================
   返回顶部
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary-color);
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* ========================================
   工具类
   ======================================== */
.text-primary { color: var(--primary-color) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-light { color: var(--text-light) !important; }
.bg-white { background: var(--bg-white) !important; }
.bg-gray { background: var(--bg-gray) !important; }

.mt-20 { margin-top: 20px !important; }
.mb-20 { margin-bottom: 20px !important; }
.p-20 { padding: 20px !important; }

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 图片懒加载占位 */
.img-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
