/* style/news.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* --- Base Styles --- */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #0a0a0a; /* Inherited from shared, explicitly set for clarity */
}

.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-news__section-title {
  font-size: 2.5em;
  color: #ffffff; /* Default for dark sections */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  color: #f0f0f0; /* Slightly lighter for descriptions */
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* --- Buttons --- */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__hero-cta-button,
.page-news__read-more-button,
.page-news__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center; /* Ensure text is centered */
  box-sizing: border-box; /* Include padding in width calculation */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary,
.page-news__hero-cta-button {
  background-color: #017439; /* Main brand color */
  color: #ffffff; /* White text for contrast */
  border: 2px solid #017439;
}

.page-news__btn-primary:hover,
.page-news__hero-cta-button:hover {
  background-color: #005f2e; /* Darker green on hover */
  border-color: #005f2e;
}

.page-news__btn-secondary,
.page-news__read-more-button {
  background-color: #ffffff; /* White background */
  color: #017439; /* Main brand color text */
  border: 2px solid #017439;
}

.page-news__btn-secondary:hover,
.page-news__read-more-button:hover {
  background-color: #f0f0f0;
  color: #005f2e;
  border-color: #005f2e;
}

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background-color: #017439; /* Brand color for hero background */
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-news__hero-content {
  max-width: 900px;
  z-index: 1;
  position: relative;
  padding: 20px;
}

.page-news__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-news__hero-cta-button {
  font-size: 1.1em;
  padding: 15px 35px;
}

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15; /* Subtle background image */
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* filter: grayscale(50%); */ /* Removed as per instruction: '禁止使用CSS filter改变图片颜色' */
}

/* --- Latest Articles Section --- */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text for contrast */
}

.page-news__latest-articles .page-news__section-title {
  color: #017439; /* Brand color for titles on light background */
}

.page-news__latest-articles .page-news__section-description {
  color: #555555;
}

.page-news__article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-news__article-card {
  background-color: #f8f8f8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-news__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__article-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #017439; /* Brand color for article titles */
}

.page-news__article-title a {
  text-decoration: none;
  color: #017439;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #005f2e;
  text-decoration: underline;
}

.page-news__article-excerpt {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-button {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 0.9em;
}

/* --- Why Important Section --- */
.page-news__why-important {
  padding: 80px 0;
  background-color: #0a0a0a; /* Dark background from body */
  color: #ffffff;
}

.page-news__why-important .page-news__section-title {
  color: #ffffff;
}

.page-news__why-important .page-news__section-description {
  color: #f0f0f0;
}

.page-news__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-news__feature-item {
  background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent white on dark background */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__feature-title {
  font-size: 1.8em;
  color: #ffffff;
  margin-bottom: 15px;
}

.page-news__feature-item p {
  color: #f0f0f0;
}

/* --- News Categories Section --- */
.page-news__news-categories {
  padding: 80px 0;
  background-color: #f0f0f0; /* Light background */
  color: #333333;
}

.page-news__news-categories .page-news__section-title {
  color: #017439;
}

.page-news__news-categories .page-news__section-description {
  color: #555555;
}

.page-news__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-news__category-card {
  display: block; /* Make the whole card clickable */
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none; /* Remove underline from link */
  color: #333333; /* Default text color */
}

.page-news__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-news__category-title {
  font-size: 1.6em;
  color: #017439; /* Brand color for category titles */
  margin-bottom: 15px;
}

.page-news__category-card p {
  color: #666666;
}

/* --- FAQ Section --- */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #017439; /* Brand color background for FAQ */
  color: #ffffff;
}

.page-news__faq-section .page-news__section-title {
  color: #ffffff;
}

.page-news__faq-section .page-news__section-description {
  color: #f0f0f0;
}

.page-news__faq-list {
  max-width: 800px;
  margin: 50px auto 0 auto;
}

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-question h3 {
  margin: 0;
  color: inherit; /* Inherit color from parent */
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Plus to X */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: #f0f0f0;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large */
  padding: 15px 25px 25px 25px;
}

/* --- CTA Section --- */
.page-news__cta-section {
  padding: 80px 0;
  background-color: #f0f0f0; /* Light background */
  color: #333333;
  text-align: center;
}

.page-news__cta-section .page-news__section-title {
  color: #017439;
}

.page-news__cta-section .page-news__section-description {
  color: #555555;
}

.page-news__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__cta-title {
  font-size: 2.5em;
  color: #017439;
  margin-bottom: 20px;
}

.page-news__cta-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 40px;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__article-grid,
  .page-news__feature-grid,
  .page-news__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__hero-section {
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
  }
  .page-news__hero-title {
    font-size: 2.5em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__hero-cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__article-image {
    height: auto; /* Allow auto height on mobile */
  }

  /* Containers responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-articles,
  .page-news__why-important,
  .page-news__news-categories,
  .page-news__faq-section,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }
  .page-news__latest-articles,
  .page-news__why-important,
  .page-news__news-categories,
  .page-news__faq-section,
  .page-news__cta-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  
  /* Buttons responsive */
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news__hero-cta-button,
  .page-news__read-more-button,
.page-news a[class*="button"],
.page-news a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 10px 20px 20px 20px;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 2em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
  .page-news__article-grid,
  .page-news__feature-grid,
  .page-news__category-grid {
    grid-template-columns: 1fr;
  }
}