/* style/news.css */

:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --text-main-color: #333333;
  --card-bg-color: #FFFFFF;
  --background-color-page: #F5F7FA;
  --border-color: #E0E0E0;
}

.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color); /* Default text color for light background */
  background-color: var(--background-color-page);
}

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

.page-news__dark-section {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: #ffffff; /* White text for dark background */
}

.page-news__light-bg {
  background-color: var(--background-color-page);
  color: var(--text-main-color);
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px;
}

.page-news__hero-content {
  position: relative; /* Ensure content is above image if z-index is used, though we avoid overlaying */
  padding: 20px;
  max-width: 800px;
  z-index: 2; /* To ensure it's above any subtle background elements if present */
  margin-top: 20px;
}

.page-news__hero-title {
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff;
  max-width: 100%;
}

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

/* Section Titles */
.page-news__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

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

/* Text Blocks */
.page-news__text-block {
  margin-bottom: 20px;
  font-size: 1.05em;
  line-height: 1.7;
  text-align: justify;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: #ffffff;
  border: none;
  margin-right: 15px;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background: var(--card-bg-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Article Grid */
.page-news__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-news__article-card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  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 6px 20px rgba(0, 0, 0, 0.12);
}

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
}

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

.page-news__article-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__article-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-news__article-title a:hover {
  text-decoration: underline;
}

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

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

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
}

.page-news__read-more:hover {
  text-decoration: underline;
}

.page-news__view-all {
  text-align: center;
  margin-top: 50px;
}

/* CTA Section */
.page-news__cta-section {
  padding: 60px 20px;
  text-align: center;
}

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

.page-news__cta-section .page-news__section-title {
  margin-bottom: 20px;
}

.page-news__cta-section .page-news__text-block {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 20px;
}

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

.page-news__faq-item {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-news__faq-item[open] {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  position: relative;
  list-style: none;
}

.page-news__faq-question::-webkit-details-marker,
.page-news__faq-question::marker {
  display: none;
}

.page-news__faq-qtext {
  flex-grow: 1;
  pointer-events: none; /* Prevent text selection from interfering with click */
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--primary-color);
  pointer-events: none; /* Prevent icon from interfering with click */
}

.page-news__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #555;
  line-height: 1.7;
}

.page-news__faq-answer p {
  margin: 0;
}

/* --- Responsive Styles --- */

/* Desktop/Tablet common styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.5em;
  }

  .page-news__section-title {
    font-size: 2em;
  }

  .page-news__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile Styles (max-width: 768px) - MUST INCLUDE ALL REQUIRED SECTIONS */
@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news__container {
    padding: 15px;
  }

  /* HERO 主图区域 */
  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
    padding-bottom: 30px;
  }

  .page-news__hero-title {
    font-size: 2em !important;
    margin-bottom: 10px;
  }

  .page-news__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  /* 产品展示图区域 (N/A for news page, but generic image rules apply) */
  /* If this were a homepage with product grids, specific rules would be here. */
  /* For news, it's about article cards. */
  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__article-card {
    margin-left: 0;
    margin-right: 0;
  }

  /* 通用图片与容器 */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .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;
    padding-left: 15px;
    padding-right: 15px;
    margin-right: 0 !important; /* Remove margin for single column layout */
    margin-bottom: 10px; /* Add space between stacked buttons */
  }

  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px;
  }

  /* 其他内容模块 */
  .page-news__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px;
  }

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

  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-news__faq-answer {
    padding: 0 20px 15px;
  }

  .page-news__introduction-section,
  .page-news__latest-news-section,
  .page-news__cta-section,
  .page-news__faq-section {
    padding: 30px 0; /* Adjust section padding */
  }
}