/* style/news.css */
/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */

/* Base styles for the page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
}

/* Ensure images are responsive and don't get small */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Section styling */
.page-news__section {
  padding: 80px 0;
  text-align: center;
}

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

.page-news__section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Using clamp for H1/H2 font size */
  font-weight: bold;
  margin-bottom: 20px;
  color: #F2FFF6; /* Text Main */
}

.page-news__section-subtitle {
  font-size: 1.2rem;
  color: #A7D9B8; /* Text Secondary */
  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;
  align-items: center;
  padding: 10px 0 80px 0; /* Small top padding, body handles header offset */
  background-color: #08160F; /* Background */
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 40px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

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

.page-news__main-title {
  font-size: clamp(2.8rem, 6vw, 4rem); /* H1 font size with clamp */
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.2rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 40px;
}

/* Buttons */
.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6; /* Text Main */
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

.page-news__btn-secondary {
  background: transparent;
  color: #2AD16F; /* A lighter green from the gradient for contrast */
  border: 2px solid #2AD16F; /* Border color from button gradient */
}

.page-news__btn-secondary:hover {
  background: rgba(42, 209, 111, 0.1);
  transform: translateY(-2px);
}

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

.page-news__article-card {
  background-color: #11271B; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.page-news__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-news__article-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-news__article-title:hover {
  color: #2AD16F; /* Highlight on hover */
}

.page-news__article-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-news__article-date {
  font-size: 0.9rem;
  color: #2E7A4E; /* Border color for subtle date */
  display: block;
  margin-bottom: 15px;
}

.page-news__read-more {
  display: inline-block;
  font-size: 1rem;
  font-weight: bold;
  color: #2AD16F; /* Button primary color for link */
  text-decoration: none;
}

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

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

/* Categories Section */
.page-news__dark-section {
  background-color: #11271B; /* Card BG, used for dark sections */
}

.page-news__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.page-news__category-item {
  background-color: rgba(17, 168, 78, 0.1); /* Semi-transparent main color */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  padding: 25px 15px;
  text-decoration: none;
  color: #F2FFF6; /* Text Main */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.page-news__category-item:hover {
  background-color: #11A84E; /* Main color on hover */
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(17, 168, 78, 0.4);
}

.page-news__category-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.page-news__category-title {
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
}

/* About Section - uses content-area for text styles */
.page-news__content-area {
  text-align: left;
}

.page-news__content-area p {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
}

.page-news__content-area a {
  color: #2AD16F; /* Button primary color for links */
  text-decoration: underline;
}

.page-news__content-area a:hover {
  color: #57E38D; /* Glow color on hover */
}

/* FAQ Section */
.page-news__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-news__faq-item {
  background-color: #0A4B2C; /* Deep Green */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  transition: background-color 0.3s ease;
}

.page-news__faq-item summary:hover {
  background-color: rgba(17, 168, 78, 0.2); /* Subtle hover */
}

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

.page-news__faq-qtext {
  flex-grow: 1;
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  margin-left: 20px;
  color: #2AD16F; /* Button primary color for toggle */
}

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
}

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

.page-news__faq-answer a {
  color: #2AD16F;
  text-decoration: underline;
}

.page-news__faq-answer a:hover {
  color: #57E38D;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-news__section {
    padding: 60px 0;
  }
  
  .page-news__hero-section {
    padding: 10px 0 60px 0;
  }

  .page-news__main-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
  }

  .page-news__description {
    font-size: 1.1rem;
  }

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

  .page-news__category-item {
    padding: 20px 10px;
  }
}

@media (max-width: 768px) {
  .page-news__section {
    padding: 40px 0;
  }
  
  .page-news__hero-section {
    padding: 10px 0 40px 0;
  }

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

  .page-news__description {
    font-size: 1rem;
  }

  /* Mobile mandatory image rules */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__section,
  .page-news__container,
  .page-news__articles-grid,
  .page-news__categories-grid,
  .page-news__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Mobile mandatory button rules */
  .page-news__cta-button,
  .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__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-direction: column !important; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-news__article-image {
    height: 180px; /* Adjust height for mobile */
  }

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

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

  .page-news__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .page-news__section-title {
    font-size: 2rem;
  }

  .page-news__section-subtitle {
    font-size: 1rem;
  }

  .page-news__category-icon {
    font-size: 2rem;
  }

  .page-news__category-title {
    font-size: 1rem;
  }
}