/* style/news.css */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Inherited from shared.css body */
}

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

.page-news__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-news__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 100px 0;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
}

.page-news__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #FFFF00; /* Register/Login font color for emphasis */
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
}

.page-news__btn-primary {
  background-color: #C30808; /* Register color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
  margin: 0 10px;
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Login font color */
  border: 2px solid #FFFF00;
  margin: 0 10px;
}

.page-news__btn-secondary:hover {
  background-color: #FFFF00;
  color: #C30808;
}

/* Section Titles */
.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 50px;
  font-weight: bold;
  color: inherit; /* Inherit color from parent section */
}

/* Featured Articles */
.page-news__featured-articles {
  padding: 80px 0;
}

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

.page-news__article-card {
  background-color: #017439; /* Dark green card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #ffffff;
}

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

.page-news__article-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

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

.page-news__article-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #FFFF00; /* Link color for titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #ffffff;
}

.page-news__article-excerpt {
  font-size: 0.95em;
  margin-bottom: 20px;
  color: #f0f0f0;
}

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

.page-news__read-more:hover {
  color: #ffffff;
}

/* Latest News */
.page-news__latest-news {
  padding: 80px 0;
}

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

.page-news__news-item {
  display: flex;
  background-color: #212121; /* Slightly lighter dark background for items */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: #ffffff;
}

.page-news__news-item:hover {
  transform: translateY(-5px);
}

.page-news__news-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.page-news__news-content {
  padding: 25px;
  flex-grow: 1;
}

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

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

.page-news__news-title a:hover {
  color: #ffffff;
}

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

.page-news__news-excerpt {
  font-size: 0.9em;
  color: #e0e0e0;
}

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

.page-news__pagination-link {
  display: inline-block;
  padding: 10px 18px;
  margin: 0 5px;
  background-color: #212121;
  color: #FFFF00;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover,
.page-news__pagination-link--active {
  background-color: #017439;
  color: #ffffff;
}

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

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

.page-news__cta-title {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: #017439; /* Dark green text on light background */
}

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

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background-color: #212121; /* Slightly lighter dark background */
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background-color: #017439; /* Dark green for question background */
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #028e48;
}

.page-news__faq-question h3 {
  margin: 0;
  color: inherit;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Plus sign rotates to a cross */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #e0e0e0;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 20px 25px;
}

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

.page-news__faq-answer a {
  color: #FFFF00;
  text-decoration: none;
}

.page-news__faq-answer a:hover {
  text-decoration: underline;
}

/* Global image reset for responsiveness and size constraints */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }

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

  .page-news__news-item {
    flex-direction: column;
  }

  .page-news__news-image {
    width: 100%;
    height: 250px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 80px 0;
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-news__hero-title {
    font-size: 2.2em;
  }

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

  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

  .page-news__article-image {
    height: 200px;
  }

  .page-news__news-item {
    border-radius: 0;
    box-shadow: none;
  }

  .page-news__news-content {
    padding: 15px;
  }

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

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

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100%;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    margin: 0;
  }

  .page-news__container,
  .page-news__cta-content,
  .page-news__faq-list,
  .page-news__faq-item {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

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

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

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

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }

  .page-news__hero-description {
    font-size: 0.9em;
  }

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

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

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

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