/* style/news.css */
/* Base styles for the news page */
.page-news {
  font-family: 'Arial', sans-serif;
  background-color: #08160F; /* Custom background color */
  color: #F2FFF6; /* Main text color */
  line-height: 1.6;
  padding-bottom: 50px; /* Add some padding at the bottom */
}

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

/* Section titles */
.page-news__section-title {
  font-size: 2.5rem;
  color: #F2FFF6;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  position: relative;
  padding-bottom: 10px;
}

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #11A84E, #22C768);
  border-radius: 2px;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 60px;
  background-color: #08160F; /* Ensure background matches body */
}

.page-news__hero-image-wrapper {
  width: 100%;
  position: relative;
  z-index: 1; /* Ensure image is below content for visual stacking, but not text overlay */
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.7; /* Slightly dim the image to make text more readable */
}

.page-news__hero-content {
  position: relative; /* Position relative to allow z-index */
  z-index: 2; /* Ensure content is above the image visually if needed, but not overlaying */
  max-width: 900px;
  margin-top: -100px; /* Pull content up slightly over the image, but not directly on it */
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Clamp for responsive H1 */
  color: #F2FFF6;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  max-width: 100%; /* Ensure H1 doesn't overflow */
}

.page-news__intro-text {
  font-size: 1.2rem;
  color: #A7D9B8;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-news__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__btn-tertiary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6;
  border: none;
}

.page-news__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

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

.page-news__btn-secondary:hover {
  background-color: #2AD16F;
  color: #F2FFF6;
  transform: translateY(-2px);
}

.page-news__btn-tertiary { /* For smaller CTA buttons */
  background-color: #11A84E;
  color: #F2FFF6;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
}

.page-news__btn-tertiary:hover {
  background-color: #22C768;
  transform: translateY(-2px);
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green */
}

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

.page-news__news-card {
  background-color: #11271B; /* Card Background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border color */
}

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

.page-news__card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-news__card-content {
  padding: 25px;
}

.page-news__card-title {
  font-size: 1.4rem;
  color: #F2FFF6;
  margin-bottom: 10px;
  line-height: 1.4;
  height: 68px; /* Fixed height for title to prevent layout shifts */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-news__card-date {
  font-size: 0.9rem;
  color: #A7D9B8;
  margin-bottom: 15px;
  display: block;
}

.page-news__card-excerpt {
  font-size: 1rem;
  color: #A7D9B8;
  margin-bottom: 20px;
  line-height: 1.5;
  height: 75px; /* Fixed height for excerpt */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.page-news__read-more {
  display: inline-block;
  color: #2AD16F;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #57E38D; /* Glow color */
}

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

/* Featured Articles Section */
.page-news__featured-articles-section {
  padding: 80px 0;
  background-color: #08160F;
}

.page-news__article-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.page-news__article-item {
  background-color: #11271B;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E;
}

.page-news__article-heading {
  font-size: 1.8rem;
  color: #F2FFF6;
  margin-bottom: 10px;
}

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

.page-news__article-text {
  font-size: 1rem;
  color: #A7D9B8;
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-news__read-more-link {
  color: #2AD16F;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
  color: #57E38D;
}

/* Promotional Updates Section */
.page-news__promotional-updates-section {
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green */
}

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

.page-news__promotion-item {
  background-color: #11271B;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E;
  text-align: center;
}

.page-news__promotion-title {
  font-size: 1.5rem;
  color: #F2FFF6;
  margin-bottom: 15px;
}

.page-news__promotion-text {
  font-size: 1rem;
  color: #A7D9B8;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Platform Updates Section */
.page-news__platform-updates-section {
  padding: 80px 0;
  background-color: #08160F;
}

.page-news__update-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-news__update-item {
  background-color: #11271B;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E;
}

.page-news__update-heading {
  font-size: 1.6rem;
  color: #F2FFF6;
  margin-bottom: 10px;
}

.page-news__update-meta {
  font-size: 0.9rem;
  color: #A7D9B8;
  margin-bottom: 15px;
}

.page-news__update-text {
  font-size: 1rem;
  color: #A7D9B8;
  line-height: 1.6;
}

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

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

.page-news__faq-item {
  background-color: #11271B;
  border: 1px solid #2E7A4E;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-news__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: bold;
  color: #F2FFF6;
  background-color: #11271B;
  user-select: none;
  list-style: none; /* Remove default marker */
}

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

.page-news__faq-question {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-news__faq-qtext {
  margin-right: 15px;
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  color: #2AD16F;
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg);
}

.page-news__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #A7D9B8;
  line-height: 1.6;
}

/* Bottom CTA Section */
.page-news__cta-bottom-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 100px 0;
  background-color: #08160F; /* Fallback background */
}

.page-news__cta-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-news__cta-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle background image */
}

.page-news__cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-news__cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #F2FFF6;
  font-weight: bold;
  margin-bottom: 20px;
}

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

/* General image styling for content areas */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-news__section-title {
    font-size: 2rem;
  }
  .page-news__intro-text {
    font-size: 1.1rem;
  }
}

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

  .page-news__hero-section {
    padding-bottom: 40px;
  }

  .page-news__hero-content {
    margin-top: -50px; /* Adjust for smaller screens */
  }

  .page-news__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-news__intro-text {
    font-size: 1rem;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news__btn-tertiary {
    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__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-news__latest-news-section,
  .page-news__featured-articles-section,
  .page-news__promotional-updates-section,
  .page-news__platform-updates-section,
  .page-news__faq-section,
  .page-news__cta-bottom-section {
    padding: 40px 0;
  }

  .page-news__section-title {
    font-size: 1.8rem;
  }
  .page-news__section-description {
    font-size: 0.95rem;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr;
  }

  .page-news__card-image {
    height: 180px;
  }

  .page-news__card-title {
    font-size: 1.2rem;
    height: auto; /* Allow auto height on mobile for readability */
    -webkit-line-clamp: unset;
  }
  .page-news__card-excerpt {
    font-size: 0.9rem;
    height: auto; /* Allow auto height on mobile for readability */
    -webkit-line-clamp: unset;
  }

  .page-news__article-heading {
    font-size: 1.4rem;
  }
  .page-news__promotion-title {
    font-size: 1.3rem;
  }
  .page-news__update-heading {
    font-size: 1.3rem;
  }
  .page-news__faq-item summary {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px 15px;
  }

  /* Mobile image and video responsive adaptation */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-image-wrapper,
  .page-news__cta-background {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-news__hero-section {
    padding-top: 10px !important;
  }

  .page-news__video-section {
    padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
  }
}

@media (max-width: 480px) {
  .page-news__section-title {
    font-size: 1.5rem;
  }
  .page-news__main-title {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }
  .page-news__cta-title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }
}