/* 新闻页基础样式（复用首页变量，新增特有样式） */
:root {
  --primary-green: #2A8C47; /* 主绿 */
  --dark-green: #1A5E30; /* 深绿 */
  --light-green: #F0F8F2; /* 浅绿背景 */
  --gray-100: #F8F8F8; /* 浅灰 */
  --gray-200: #E8E8E8; /* 分割线/边框 */
  --gray-300: #D8D8D8; /* 次要边框 */
  --gray-400: #B8B8B8; /* 元数据颜色 */
  --gray-800: #333333; /* 正文 */
  --gray-900: #1A1A1A; /* 标题 */
  --white: #FFFFFF;
  --black: #000000;
  --sidebar-width: 280px; /* 侧边栏宽度 */
  --category-green: #2A8C47; /* 分类标签绿 */
  --category-blue: #2A6C8C; /* 应用分类蓝 */
  --category-orange: #8C5A2A; /* 行业新闻橙 */
  --category-purple: #6C2A8C; /* 安装指南紫 */
}

/* -------------------------- 新闻英雄区 -------------------------- */
.news-hero {
   background-image: url(../images/banner.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  position: relative;
  color: var(--white);
}

.news-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.news-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.news-hero-container {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  font-size: 14px;
  margin-bottom: 15px;
}

.breadcrumbs a {
  color: var(--white);
  text-decoration: none;
}

.breadcrumbs span {
  color: var(--light-green);
}

.news-hero .news-title {
  color:#ffffff;
  font-size: 48px;
  text-transform: uppercase;
  margin-bottom: 15px;
  line-height: 1.2;
}

.news-subtitle {
  font-size: 18px;
  max-width: 700px;
  opacity: 0.9;
  line-height: 1.6;
}

/* -------------------------- 新闻主内容区 -------------------------- */
.news-main {
  padding: 60px 0;
}

.news-main-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 40px;
}

/* 左侧侧边栏样式 */
.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 20px;
}

.widget-title {
  font-size: 18px;
  text-transform: uppercase;
  color: var(--gray-900);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-green);
}

/* 分类列表样式 */
.categories-list {
  list-style: none;
}

.categories-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.categories-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.categories-list li a {
  display: flex;
  justify-content: space-between;
  color: var(--gray-800);
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 8px 10px;
  border-radius: 4px;
}

.categories-list li.active a {
  background-color: var(--primary-green);
  color: var(--white);
}

.categories-list li a:hover:not(.active) {
  background-color: var(--light-green);
  color: var(--primary-green);
}

.categories-list li a span {
  font-weight: 600;
}

/* 定制方案样式 */
.custom-solution-widget {
  background-color: var(--primary-green);
  color: var(--white);
  text-align: center;
}

.custom-solution-widget .widget-title {
  border-bottom-color: var(--white);
  color: var(--white);
}

.custom-solution-widget i {
  font-size: 36px;
  margin-bottom: 15px;
  opacity: 0.9;
}

.custom-solution-widget p {
  margin-bottom: 20px;
  line-height: 1.6;
}

.contact-widget-btn {
  background-color: var(--white);
  color: var(--primary-green);
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border-radius: 4px;
}

.contact-widget-btn:hover {
  background-color: var(--light-green);
  transform: translateY(-2px);
}

/* 热门文章样式 */
.popular-posts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.popular-posts-list li {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.popular-posts-list li:hover {
  background-color: var(--light-green);
  padding: 5px;
  border-radius: 4px;
  margin: -5px;
}

.popular-posts-list li img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.post-info a {
  color: var(--gray-900);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-info a:hover {
  color: var(--primary-green);
}

.post-info span {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 5px;
  display: block;
}

/* 右侧新闻内容区样式 */
.news-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 工具栏样式 */
.news-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.results-count {
  font-size: 14px;
  color: var(--gray-800);
}

.sort-by select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 14px;
  color: var(--gray-800);
  background-color: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

/* 新闻网格样式 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-card {
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  transform: translateY(-5px);
  border-color: var(--primary-green);
}

.news-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-img img {
  transform: scale(1.05);
}

.news-category {
  display: inline-block;
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 15px;
  border-radius: 4px;
}

/* 不同分类标签颜色 */
.news-category.PRODUCT-GUIDE {
  background-color: var(--category-green);
  color: var(--white);
}

.news-category.APPLICATION {
  background-color: var(--category-blue);
  color: var(--white);
}

.news-category.INDUSTRY-NEWS {
  background-color: var(--category-orange);
  color: var(--white);
}

.news-category.INSTALLATION-GUIDE {
  background-color: var(--category-purple);
  color: var(--white);
}

.news-title {
  font-size: 18px;
  color: var(--gray-900);
  padding: 0 15px 10px;
  line-height: 1.4;
}

.news-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-title a:hover {
  color: var(--primary-green);
}

.news-excerpt {
  font-size: 14px;
  color: var(--gray-800);
  padding: 0 15px 15px;
  line-height: 1.6;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px 15px;
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-400);
}

.news-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pagination-list {
  display: flex;
  list-style: none;
  gap: 5px;
  align-items: center;
}

.page-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  color: var(--gray-800);
  text-decoration: none;
  transition: all 0.3s ease;
}

.page-item.active a {
  background-color: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.page-item a:hover:not(.active) {
  background-color: var(--light-green);
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.page-item.next a {
  width: auto;
  padding: 0 15px;
}

/* -------------------------- 响应式适配 -------------------------- */
@media (max-width: 1200px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .news-main-container {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .news-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .sort-by {
    width: 100%;
  }

  .sort-by select {
    width: 100%;
  }

  .news-sidebar {
    grid-template-columns: 1fr;
  }

  .news-hero-container {
    padding: 60px 0;
  }
}

@media (max-width: 576px) {
  .news-title {
    font-size: 28px;
  }

  .news-main {
    padding: 40px 0;
  }

  .pagination-list {
    flex-wrap: wrap;
    justify-content: center;
  }

  .news-img {
    height: 180px;
  }
}