.page-news {
  color: #333333; /* Default text color for light body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--background-color, #ffffff);
}

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

/* HERO Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  background: linear-gradient(135deg, #017439, #FFFFFF);
  color: #ffffff;
  overflow: hidden;
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-news__hero-image {
  width: 100%;
  margin-bottom: 30px;
  z-index: 1;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
  border-radius: 8px;
}

.page-news__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #FFFF00; /* Yellow for prominence */
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.page-news__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #ffffff;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #C30808; /* Red for Register/Login */
  color: #FFFF00; /* Yellow for font */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-button:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-news__latest-articles,
.page-news__cta-section,
.page-news__more-resources {
  padding: 60px 0;
}

.page-news__category-section {
  padding: 60px 0;
  background-color: #017439; /* Primary color background */
  color: #ffffff;
}

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

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #017439;
}

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

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

.page-news__article-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-news__article-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__article-title a {
  color: #017439;
  text-decoration: none;
}

.page-news__article-title a:hover {
  text-decoration: underline;
}

.page-news__article-summary {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
}

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

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

.page-news__read-more--light {
  color: #FFFF00;
}

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

/* Categories Grid */
.page-news__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-news__category-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding: 20px;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__category-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.2);
}

.page-news__category-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.page-news__category-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #FFFF00;
}

.page-news__category-description {
  font-size: 15px;
  color: #f0f0f0;
}

/* CTA Section */
.page-news__cta-container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: linear-gradient(45deg, #017439, #005a2e);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.page-news__cta-title {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #FFFF00;
}

.page-news__cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.6;
  color: #f0f0f0;
}

.page-news__cta-button--large {
  padding: 18px 50px;
  font-size: 20px;
  background: #C30808; /* Red for Register/Login */
  color: #FFFF00; /* Yellow for font */
}

/* Resources Grid */
.page-news__resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-news__resource-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__resource-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-news__resource-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.page-news__resource-title a {
  color: #FFFF00;
  text-decoration: none;
}

.page-news__resource-title a:hover {
  text-decoration: underline;
}

.page-news__resource-summary {
  font-size: 15px;
  color: #f0f0f0;
  margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 40px;
  }
  .page-news__section-title {
    font-size: 30px;
  }
  .page-news__cta-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
  }
  .page-news__hero-title {
    font-size: 32px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-news__articles-grid,
  .page-news__categories-grid,
  .page-news__resources-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__latest-articles,
  .page-news__category-section,
  .page-news__cta-section,
  .page-news__more-resources {
    padding: 40px 0;
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__category-title {
    font-size: 20px;
  }
  .page-news__cta-container {
    padding: 30px 20px;
    border-radius: 8px;
  }
  .page-news__cta-title {
    font-size: 28px;
  }
  .page-news__cta-description {
    font-size: 16px;
  }
  .page-news__cta-button--large {
    padding: 15px 40px;
    font-size: 18px;
  }

  /* Mobile specific image and container rules */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__container,
  .page-news__hero-container,
  .page-news__articles-grid,
  .page-news__categories-grid,
  .page-news__resources-grid,
  .page-news__article-card,
  .page-news__category-card,
  .page-news__resource-item,
  .page-news__cta-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .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;
  }
}