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

/* Base styles for the news page */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css (#0a0a0a) */
  padding-top: 0; /* Handled by shared.css or hero section */
}

.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;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-news__section-title--dark {
  color: #017439; /* For sections with light backgrounds */
}

.page-news__section-intro {
  text-align: center;
  margin-bottom: 60px;
  font-size: 1.1em;
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__text-block {
  margin-bottom: 20px;
  font-size: 1.05em;
  line-height: 1.7;
  color: #f0f0f0; /* Light text for dark background */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  box-sizing: border-box;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay for text readability */
  z-index: 2;
}

.page-news__hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 20px;
  color: #ffffff;
}

.page-news__main-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  margin: 10px;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: nowrap; /* Prevent text wrapping on desktop */
}

.page-news__btn-primary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-news__btn-primary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #017439;
  border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
  background-color: rgba(1, 116, 57, 0.1);
  color: #005f2e;
}

/* Specific colors for login/register buttons from custom palette */
.page-news__btn-register {
  background-color: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-news__btn-register:hover {
  background-color: #a00606;
  border-color: #a00606;
  color: #fff; /* Ensure contrast */
}

.page-news__btn-login {
  background-color: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-news__btn-login:hover {
  background-color: #a00606;
  border-color: #a00606;
  color: #fff; /* Ensure contrast */
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: #0a0a0a; /* Dark background from shared.css */
}

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

.page-news__article-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__article-thumbnail {
  width: 100%;
  height: 220px; /* Fixed height for thumbnails */
  overflow: hidden;
}

.page-news__article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-news__article-card:hover .page-news__article-thumbnail img {
  transform: scale(1.05);
}

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

.page-news__article-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-news__article-title a:hover {
  color: #017439;
}

.page-news__article-meta {
  font-size: 0.9em;
  color: #a0a0a0;
  margin-bottom: 15px;
}

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

.page-news__read-more {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
  color: #005f2e;
  text-decoration: underline;
}

.page-news__pagination {
  display: flex;
  justify-content: center;
  margin-top: 60px;
  gap: 10px;
}

.page-news__pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover {
  background-color: #017439;
  color: #ffffff;
}

.page-news__pagination-link--active {
  background-color: #017439;
  color: #ffffff;
  pointer-events: none; /* Disable click on active page */
}

/* Importance Section */
.page-news__importance-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text for light background */
}

.page-news__importance-section .page-news__text-block {
  color: #333333; /* Override text color for light background */
}

/* Promo CTA Section */
.page-news__promo-cta {
  padding: 80px 0;
  background-color: #017439; /* Brand color background */
  color: #ffffff;
  text-align: center;
}

.page-news__promo-cta .page-news__container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__promo-content {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.page-news__promo-image-wrapper {
  flex: 1;
  min-width: 300px;
}

.page-news__promo-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-news__promo-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-news__promo-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  line-height: 1.7;
  color: #f0f0f0;
}

.page-news__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: flex-start; /* Align buttons to the left */
  flex-wrap: wrap; /* Allow buttons to wrap */
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #0a0a0a; /* Dark background */
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for items */
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

.page-news__faq-q-text {
  margin: 0;
  color: #ffffff;
  flex-grow: 1;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
  transition: transform 0.3s ease;
}

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

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

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 20px;
}

.page-news__faq-answer p {
  margin-top: 0;
  margin-bottom: 10px;
  color: #e0e0e0; /* Ensure text color for dark background */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-section {
    height: 500px;
  }
  .page-news__main-title {
    font-size: 2.8em;
  }
  .page-news__hero-description {
    font-size: 1.1em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__promo-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Fixed header offset for mobile in hero section */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    height: 450px;
  }

  .page-news__main-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-news__section-intro {
    font-size: 1em;
    margin-bottom: 40px;
  }

  .page-news__text-block {
    font-size: 1em;
  }

  .page-news__article-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .page-news__article-thumbnail {
    height: 200px;
  }

  .page-news__article-thumbnail img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-news__article-title {
    font-size: 1.3em;
  }

  .page-news__promo-cta .page-news__container {
    flex-direction: column; /* Stack promo content and image */
    gap: 30px;
  }

  .page-news__promo-content {
    text-align: center;
  }
}