/* General styles for .page-news scope */
.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--text-main, #F2FFF6); /* Default text color for the page */
  background-color: var(--site-bg); /* Inherit from shared */
}

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

.page-news__section-spacing {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-news__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-main, #F2FFF6);
}

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

/* Hero Section */
.page-news__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  background-color: var(--bg, #08160F);
  text-align: center;
}

.page-news__hero-section .page-news__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-news__hero-image {
  width: 100%;
  max-width: 1200px; /* Adjust based on container */
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  filter: none; /* Ensure no filter is applied */
}

.page-news__hero-content {
  max-width: 800px;
  text-align: center;
}

.page-news__main-title {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main, #F2FFF6);
  margin-top: 0;
  margin-bottom: 20px;
}

.page-news__hero-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 0;
}

/* Articles Section */
.page-news__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-news__article-card {
  background-color: var(--card-bg, #11271B);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border, #2E7A4E);
}

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

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

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  filter: none; /* Ensure no filter is applied */
}

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

.page-news__article-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main, #F2FFF6);
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__article-date {
  font-size: 14px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 15px;
}

.page-news__article-summary {
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
  line-height: 1.5;
  margin-bottom: 15px;
}

.page-news__read-more {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--main-color, #11A84E); /* Using main brand color */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: var(--aux-color, #22C768); /* Using aux brand color */
}

.page-news__view-all-wrapper {
  text-align: center;
}

/* FAQ Section */
.page-news__faq-section {
  background-color: var(--deep-green, #0A4B2C); /* Darker background for contrast */
  color: #ffffff; /* Light text for dark background */
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border, #2E7A4E);
  overflow: hidden;
  background: var(--card-bg, #11271B); /* Dark card background */
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-main, #F2FFF6);
  font-size: 18px;
  font-weight: 600;
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}
details.page-news__faq-item summary.page-news__faq-question:hover {
  background: rgba(17, 168, 78, 0.1); /* Lighter hover for dark card */
}
.page-news__faq-qtext {
  flex: 1;
  line-height: 1.5;
  text-align: left;
}
.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--glow, #57E38D); /* Glow color for toggle */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 20px;
  background: rgba(17, 39, 27, 0.8); /* Slightly transparent dark background */
  border-radius: 0 0 10px 10px;
  color: var(--text-secondary, #A7D9B8);
  font-size: 16px;
  line-height: 1.6;
}
.page-news__faq-answer p {
  margin-top: 0;
  margin-bottom: 0;
}

/* CTA Section */
.page-news__cta-section {
  background-color: var(--bg, #08160F);
  text-align: center;
}

.page-news__cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  background-color: var(--card-bg, #11271B);
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border, #2E7A4E);
}

.page-news__cta-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  filter: none; /* Ensure no filter is applied */
}

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

.page-news__cta-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
}

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

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

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--border, #2E7A4E);
}

.page-news__btn-secondary:hover {
  background-color: rgba(17, 168, 78, 0.1);
  color: var(--glow, #57E38D);
  border-color: var(--glow, #57E38D);
}

/* Global image styles */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: none; /* Explicitly ensure no filter */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__section-title {
    font-size: 32px;
  }
  .page-news__main-title {
    font-size: 48px; /* Slightly smaller for tablets */
  }
  .page-news__hero-description,
  .page-news__cta-description {
    font-size: 17px;
  }
  .page-news__article-title {
    font-size: 19px;
  }
  .page-news__faq-item summary.page-news__faq-question {
    font-size: 17px;
    padding: 16px 20px;
  }
  .page-news__faq-answer {
    font-size: 15px;
    padding: 0 20px 18px;
  }
  .page-news__cta-container {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  /* 1. Hero Section */
  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
    padding-bottom: 30px;
  }
  .page-news__hero-section .page-news__container {
    gap: 20px;
  }
  .page-news__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-news__hero-description {
    font-size: 15px;
  }
  .page-news__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 2. Articles Section (General image and container rules apply) */
  .page-news__section-spacing {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: 200px !important;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-summary {
    font-size: 15px;
  }

  /* 3. FAQ Section */
  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px;
    font-size: 16px;
    flex-wrap: wrap;
  }
  .page-news__faq-qtext {
    width: calc(100% - 40px);
    margin-bottom: 5px;
  }
  .page-news__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  details.page-news__faq-item .page-news__faq-answer {
    padding: 0 15px 15px;
    font-size: 14px;
  }
  .page-news__faq-answer p {
    font-size: 14px;
  }

  /* 4. CTA Section */
  .page-news__cta-container {
    padding: 25px;
    flex-direction: column;
    gap: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__cta-description {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    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 {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* 5. Generic Image & Container Responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__articles-section,
  .page-news__faq-section,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}