:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-register: #C30808;
  --button-login: #C30808;
  --button-text-yellow: #FFFF00;
  --body-bg: var(--dark-bg-1); /* Assuming --dark-bg-1 is dark from shared.css */
}

/* Base styles for the news page, ensuring light text on dark body background */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Light text for dark body background */
  background-color: var(--body-bg);
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  text-align: center;
  overflow: hidden;
  background-color: #000000; /* Fallback for image */
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.6); /* Darken image for better text contrast */
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  color: var(--text-light);
  max-width: 800px;
  padding: 20px;
}

.page-news__hero-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-light);
}

.page-news__hero-cta-button {
  display: inline-block;
  background-color: var(--button-register); /* Using #C30808 for register */
  color: var(--button-text-yellow); /* Using #FFFF00 for text */
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
}

.page-news__hero-cta-button:hover {
  background-color: #A80707; /* Slightly darker red for hover */
}

/* Section Titles */
.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-light); /* Default light text */
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
  background-color: var(--body-bg); /* Use body background for main section */
}

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

.page-news__news-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for cards */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-light);
}

.page-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__news-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-news__news-card-content {
  padding: 20px;
}

.page-news__news-card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: var(--text-light);
}

.page-news__news-card-title a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
  color: var(--primary-color);
}

.page-news__news-card-date {
  font-size: 0.9em;
  color: #bbb;
  margin-bottom: 15px;
}

.page-news__news-card-excerpt {
  font-size: 1em;
  color: #ccc;
  margin-bottom: 20px;
}

.page-news__news-card-readmore {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__news-card-readmore:hover {
  text-decoration: underline;
}

/* Pagination */
.page-news__pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 10px;
}

.page-news__pagination-link {
  display: inline-block;
  padding: 10px 15px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  color: var(--primary-color);
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover,
.page-news__pagination-link--active {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Featured Articles Section */
.page-news__featured-articles-section {
  padding: 60px 0;
  background-color: var(--primary-color); /* Use primary color as dark background */
  color: var(--text-light); /* Ensure light text */
}

.page-news__featured-articles-section .page-news__section-title {
  color: var(--text-light);
}

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

.page-news__featured-card {
  display: flex;
  background-color: rgba(0, 0, 0, 0.2); /* Darker background for contrast */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  color: var(--text-light);
}

.page-news__featured-card-image {
  width: 40%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-news__featured-card-content {
  padding: 30px;
  width: 60%;
}

.page-news__featured-card-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-news__featured-card-title a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__featured-card-title a:hover {
  color: var(--secondary-color);
}