/* style/news.css */

/* --- General Styles --- */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark, so text is light */
  background-color: var(--black-color); /* Ensure consistency with body background */
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box; /* Ensure padding/border included in width */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

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

.page-news__btn-primary:hover {
  background-color: #1a7bb0;
  border-color: #1a7bb0;
}

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

.page-news__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

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

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 30px; /* Space between image and text */
}

.page-news__hero-content {
  max-width: 900px;
  padding: 0 20px;
  z-index: 1; /* Ensure text is above any potential background elements */
  color: #ffffff;
}

.page-news__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em); /* Responsive font size */
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

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

.page-news__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 400px; /* Limit width for button group */
  margin: 0 auto;
}

/* --- News List Section --- */
.page-news__news-list-section {
  padding: 60px 0;
  background-color: var(--black-color); /* Dark background */
}

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

.page-news__news-card {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards */
  border-radius: 8px;
  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: #f0f0f0; /* Light text for dark card background */
}

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

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

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

.page-news__news-card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: bold;
}

.page-news__news-card-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
  color: #1a7bb0;
}

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

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

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

.page-news__read-more-btn:hover {
  color: #1a7bb0;
}

.page-news__view-all-button-container {
  text-align: center;
  margin-top: 20px;
}

/* --- CTA Section --- */
.page-news__cta-section {
  padding: 80px 20px;
  background-color: #26A9E0; /* Brand primary color for dark section */
  text-align: center;
  color: #ffffff;
}

.page-news__cta-title {
  font-size: 2.2em;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__cta-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.page-news__cta-buttons .page-news__btn-primary {
  background-color: #EA7C07; /* Login color for primary CTA */
  border-color: #EA7C07;
}

.page-news__cta-buttons .page-news__btn-primary:hover {
  background-color: #c96a06;
  border-color: #c96a06;
}

.page-news__cta-buttons .page-news__btn-secondary {
  color: #ffffff;
  border-color: #ffffff;
}

.page-news__cta-buttons .page-news__btn-secondary:hover {
  background-color: #ffffff;
  color: #26A9E0;
}

/* --- FAQ Section --- */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--black-color); /* Dark background */
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for items */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #f0f0f0;
}

.page-news__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  list-style: none; /* Remove default marker */
  color: #26A9E0;
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-news__faq-question {
  flex-grow: 1;
  color: #26A9E0;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

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

/* --- Responsive Design (max-width: 768px) --- */
@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
    padding-bottom: 20px;
  }

  .page-news__hero-image {
    margin-bottom: 20px;
  }

  .page-news__hero-content {
    padding: 0 15px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em); /* Adjust font size for mobile */
    margin-bottom: 10px;
  }

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

  .page-news__hero-cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    max-width: 300px; /* Adjust max-width for mobile buttons */
  }

  /* 通用图片与容器 */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__container,
  .page-news__section,
  .page-news__card,
  .page-news__news-list-section,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__hero-content,
  .page-news__news-content,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 产品展示图区域 (News cards are similar to product cards in layout) */
  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column for news cards */
    gap: 20px;
  }

  .page-news__news-image {
    height: auto; /* Auto height for mobile images */
  }

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

  .page-news__news-excerpt {
    font-size: 0.95em;
  }

  /* 按钮与按钮容器 */
  .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;
  }
  
  .page-news__hero-cta-buttons,
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column; /* Ensure vertical stacking for button groups */
  }
  
  /* 其他内容模块 */
  .page-news__section-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-news__section-description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-news__cta-section {
    padding: 40px 15px;
  }

  .page-news__cta-title {
    font-size: 1.8em;
  }

  .page-news__cta-description {
    font-size: 1em;
  }

  .page-news__faq-section {
    padding: 40px 15px;
  }

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

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

/* --- Color Contrast Fixes (based on body background var(--black-color) which is dark) --- */
.page-news {
  color: #ffffff; /* Default text color for the page */
}

.page-news__dark-section {
  background: #26A9E0; /* Brand color, which is dark enough for white text */
  color: #ffffff;
}

/* Ensure card text is light on its slightly dark background */
.page-news__news-card {
  color: #f0f0f0;
}

.page-news__news-card-title a {
  color: #26A9E0; /* Links can use brand color */
}

.page-news__read-more-btn {
  color: #26A9E0;
}

.page-news__faq-question, .page-news__faq-toggle {
  color: #26A9E0; /* FAQ questions use brand color */
}

/* Ensure all text elements have appropriate color for contrast */
.page-news p,
.page-news li {
  color: #f0f0f0; /* Light grey on dark background */
}