/* 全局样式 - 与咨询设计服务页面保持一致 */
:root {
  --primary-color: #1e88e5;
  --primary-dark: #0d47a1;
  --secondary-color: #42a5f5;
  --light-blue: #e3f2fd;
  --white: #ffffff;
  --dark-gray: #333333;
  --light-gray: #f5f5f5;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 资讯内容区域 */
.news-section {
  padding: 80px 0;
  background-color: var(--white);
}

/* 新闻列表 */
.news {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 80%;
  margin: 0 auto 30px;
  margin-top: 40px;
}

.news-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
 
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}


/* 修改特色新闻布局 - 确保左右分布 */
.news-item.featured {
  grid-column: span 3;
  display: flex;
  flex-direction: row;
  min-height: 280px;
}

.news-item.featured .news-link {
  display: flex;
  width: 100%;
  height: 100%;
}

.news-item.featured img {
  width: 45%;
  height: 300px;
  object-fit: cover;
  border-right: 2px solid var(--primary-color);
  border-bottom: none;
}

.news-item.featured .news-text {
  width: 55%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 修复特色新闻文本截断问题 */
.news-item.featured .news-text p {
  /* 强制设置为弹性盒子模型 */
  display: -webkit-box !important;
  display: box !important;
  
  /* 关键属性：限制显示2行 */
  -webkit-line-clamp: 5!important;
  line-clamp: 5 !important; /* 标准属性，增强兼容性 */
  
  /* 确保垂直排列 */
  -webkit-box-orient: vertical !important;
  box-orient: vertical !important;
  
  /* 强制隐藏超出部分 */
  overflow: hidden !important;
  
  /* 显示省略号 */
  text-overflow: ellipsis !important;
  
  /* 确保文本正常换行 */
  white-space: normal !important;
  
  /* 固定行高和高度，确保刚好容纳两行 */
  line-height: 1.6 !important;
  max-height: calc(1.6em * 5) !important; /* 精确控制高度为两行 */
  
  /* 移除可能导致撑开的内边距 */
  padding: 0 !important;
  margin: 0 0 15px !important;
  
  /* 防止文本溢出容器 */
  word-break: break-word;
  /* 添加两端对齐属性 */
  text-align: justify;
  
  /* 解决最后一行可能不对齐的问题（可选） */
  text-justify: inter-ideograph; /* 针对中文的对齐优化 */
}

/* 确保文本容器不会被内容撑开 */
.news-item.featured .news-text {
  overflow: hidden;
  position: relative;
}
    

/* 普通新闻保持上下布局 */
.news-item:not(.featured) {
  flex-direction: column;
}

.news-item:not(.featured) img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid var(--primary-color);
}
.news-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.news-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid var(--primary-color);
}

.news-text {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-text h3 {
  font-size: 1.3em;
  margin: 0 0 15px;
  color: var(--primary-dark);
  line-height: 1.4;
}

.news-text p {
  color: var(--dark-gray);
  font-size: 0.95em;
  line-height: 1.6;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--light-gray);
}

.news-meta time {
  font-size: 0.9em;
  color: #666;
}

.news-meta i {
  margin-right: 5px;
  color: var(--primary-color);
}

/* 点赞区域 */
.like-box {
  position: absolute;
  top: 10px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #ff4757;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1;
}

.news-item.featured .like-box {
  top: 0px;
  right: 15px;
  background-color:  rgba(255, 255, 255, 0.9);
  color:  #ff4757;
}

.like-box i {
  margin-right: 5px;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.pagination-numbers {
  display: flex;
  gap: 10px;
}

.pagination-button {
  width: 40px;
  height: 40px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-gray);
  color: var(--dark-gray);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.pagination-button:hover {
  background: var(--primary-color);
  color: var(--white);
}

.pagination-button.active {
  background: var(--primary-dark);
  color: var(--white);
}


/* 响应式设计 */
@media (max-width: 1200px) {
  .news {
    width: 90%;
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .news {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-item.featured {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .news {
    grid-template-columns: 1fr;
    width: 95%;
  }

  .news-item.featured {
    grid-column: span 1;
    flex-direction: column;
    height: auto;
  }

  .news-item.featured img {
    width: 100%;
    height: 200px;
    border-right: none;
    border-bottom: 3px solid var(--primary-color);
  }

  .news-item.featured .news-text {
    width: 100%;
    padding: 20px;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .cta-button {
    width: 100%;
  }
}
/* 分页容器样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.pagination-numbers {
  display: flex;
  gap: 5px;
}

/* 分页按钮基础样式 */
.pagination-button {
  padding: 5px 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  border-radius: 3px;
  min-width: 32px;
  text-align: center;
}

.pagination-button:hover {
  background: #f0f0f0;
}

.pagination-button.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* 特殊按钮样式 */
.pagination-button.first-group,
.pagination-button.last-group,
.pagination-button.prev-group,
.pagination-button.next-group {
  font-weight: bold;
  background: #f8f9fa;
}

/* 组指示器样式 */
.group-indicator {
  margin-left: 15px;
  padding: 5px 10px;
  color: #666;
  font-size: 14px;
}
/* 禁用按钮样式 */
.pagination-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
}

/* 按钮禁用状态下的悬停效果移除 */
.pagination-button.disabled:hover {
  background: #f8f9fa;
}