/* style/news.css */

/* --- General Page Styling --- */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff; /* Explicitly set for clarity, though shared.css might handle body */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

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

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

.page-news__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

.page-news__section-description--white {
  color: #f0f0f0;
}

/* --- Hero Section --- */
.page-news__hero-section {
  background: linear-gradient(135deg, #017439, #28a745); /* A slightly darker green for gradient effect */
  padding: 80px 0;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex; /* Use flexbox for layout */
  justify-content: center;
  align-items: center;
  min-height: 500px; /* Ensure some height for hero */
}

.page-news__hero-container {
  max-width: 1200px; /* Increased max-width to accommodate image */
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-news__hero-image {
  width: 100%;
  max-width: 100%; /* Ensure image is responsive */
  height: auto;
  display: block;
  border-radius: 10px;
  margin-bottom: 30px; /* Space between image and content */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
  position: relative;
  z-index: 3; /* Ensure content is above image if needed */
  width: 100%;
  max-width: 800px; /* Constrain content width */
  background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent overlay for text readability */
  padding: 30px;
  border-radius: 10px;
  margin-top: -100px; /* Overlap content on image slightly */
}

/* --- Buttons --- */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  max-width: 100%; /* Responsive button */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border-color: #C30808;
}

.page-news__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-news__btn-secondary {
  background-color: #017439; /* Primary brand color */
  color: #ffffff;
  border-color: #017439;
}

.page-news__btn-secondary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

/* --- Latest News Section (Cards) --- */
.page-news__latest-news-section {
  padding: 60px 0;
}

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

.page-news__news-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-news__news-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
}

.page-news__news-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}