/* 新闻详情页基础样式（复用首页变量，新增特有样式） */
: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: 300px; /* 侧边栏宽度 */
}

/* -------------------------- 新闻详情英雄区 -------------------------- */
.news-detail-hero {
   background-image: url(../images/banner.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  position: relative;
  color: var(--white);
}

.news-detail-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.news-detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.news-detail-hero-container {
  padding: 60px 0;
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  font-size: 14px;
  margin-bottom: 10px;
}

.breadcrumbs a {
  color: var(--white);
  text-decoration: none;
}

.breadcrumbs span {
  color: var(--light-green);
}

.news-detail-title {
  font-size: 36px;
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.2;
}

.news-detail-subtitle {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
}

/* -------------------------- 新闻详情主内容区 -------------------------- */
.news-detail-main {
  padding: 60px 0;
}

.news-detail-main-container {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 40px;
}

/* 左侧文章内容区 */
.article-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 文章主图 */
.article-main-img {
  height: 280px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.article-main-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* 文章顶部元数据 */
.article-meta-top {
  margin-bottom: 20px;
}

.article-category {
  display: inline-block;
  padding: 8px 15px;
  background-color: var(--primary-green);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 15px;
}

.article-title {
  font-size: 32px;
  color: var(--gray-900);
  line-height: 1.4;
  margin-bottom: 15px;
}

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--gray-400);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 文章正文 */
.article-body {
  font-size: 16px;
  color: var(--gray-800);
  line-height: 1.8;
}

.article-body h2 {
  font-size: 22px;
  color: var(--gray-900);
  margin: 30px 0 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

.article-body p {
  margin-bottom: 20px;
}

/* 文章内图片组 */
.article-img-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 25px 0;
}

.article-img-group img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.article-img-group img:hover {
  transform: scale(1.05);
}

/* 文章内列表 */
.article-list {
  margin: 15px 0 25px 20px;
}

.advantages-list {
  list-style: none;
  margin-left: 0;
}

.advantages-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.advantages-list li i {
  color: var(--primary-green);
  font-size: 18px;
  margin-top: 4px;
}

.applications-list li {
  margin-bottom: 8px;
  list-style-type: disc;
}

/* 文章内CTA */
.article-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: var(--light-green);
  padding: 25px;
  border-radius: 4px;
  margin: 30px 0;
}

.cta-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
  flex-shrink: 0;
}

.cta-text h3 {
  font-size: 20px;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.cta-text p {
  font-size: 15px;
  color: var(--gray-800);
  max-width: 500px;
}

.cta-quote-btn {
  margin-left: auto;
  background-color: var(--primary-green);
  color: var(--white);
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cta-quote-btn:hover {
  background-color: var(--dark-green);
  transform: translateY(-2px);
}

/* 分享按钮 */
.article-share {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.article-share p {
  font-size: 15px;
  color: var(--gray-800);
  font-weight: 600;
  margin: 0;
}

.share-icons {
  display: flex;
  gap: 10px;
}

.share-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--gray-100);
  color: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.share-icons a:hover {
  background-color: var(--primary-green);
  color: var(--white);
  transform: translateY(-2px);
}

/* 文章分页导航 */
.article-pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.prev-post, .next-post {
  width: 48%;
  padding: 15px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  text-decoration: none;
  color: var(--gray-800);
  transition: all 0.3s ease;
}

.prev-post:hover, .next-post:hover {
  border-color: var(--primary-green);
  background-color: var(--light-green);
}

.prev-post span, .next-post span {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gray-400);
  display: block;
  margin-bottom: 8px;
}

.prev-post p, .next-post p {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.prev-post {
  text-align: left;
}

.next-post {
  text-align: right;
}

/* 右侧侧边栏样式 */
.news-detail-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);
}

/* 搜索框样式 */
.search-widget .search-box {
  display: flex;
}

.search-box input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--gray-300);
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  color: var(--gray-800);
}

.search-box button {
  width: 45px;
  background-color: var(--primary-green);
  color: var(--white);
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-box button:hover {
  background-color: var(--dark-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;
}

/* 最新文章样式 */
.recent-posts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.recent-posts-list li {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.recent-posts-list li:hover {
  background-color: var(--light-green);
  padding: 5px;
  border-radius: 4px;
  margin: -5px;
}

.recent-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;
}

/* 定制方案样式 */
.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);
}

/* -------------------------- 响应式适配 -------------------------- */
@media (max-width: 992px) {
  .news-detail-main-container {
    grid-template-columns: 1fr;
  }

  .news-detail-title {
    font-size: 28px;
  }

  .article-cta {
    flex-direction: column;
    text-align: center;
  }

  .cta-quote-btn {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .article-img-group {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-pagination {
    flex-direction: column;
    gap: 15px;
  }

  .prev-post, .next-post {
    width: 100%;
    text-align: left;
  }

  .news-detail-hero-container {
    padding: 40px 0;
  }

  .news-detail-main {
    padding: 40px 0;
  }
}

@media (max-width: 576px) {
  .article-img-group {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: 24px;
  }

  .article-meta {
    flex-direction: column;
    gap: 10px;
  }

  .article-share {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-icons {
    width: 100%;
    justify-content: flex-start;
  }
}