/* style/news.css */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: var(--secondary-color); /* #FFFFFF */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

.page-news__hero-section {
  text-align: center;
  padding: 80px 0;
  background-color: #f8f8f8; /* Light background for hero section */
  color: #333333;
}

.page-news__hero-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #017439; /* Primary brand color for main title */
}

.page-news__hero-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #017439; /* Primary color for CTA button */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-news__cta-button:hover {
  background: #005a2e; /* Slightly darker primary on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-news__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #017439; /* Primary brand color for section titles */
}

.page-news__latest-news-section,
.page-news__categories-section,
.page-news__articles-list-section {
  padding: 60px 0;
}

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

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

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

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

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

.page-news__article-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #017439; /* Primary brand color for article titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-news__article-summary {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background: #f0f0f0;
  color: #017439;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more-button:hover {
  background: #e0e0e0;
}

.page-news__categories-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-news__category-item {
  display: inline-block;
  padding: 12px 25px;
  background: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__category-item:hover {
  background: #005a2e;
  transform: translateY(-2px);
}

.page-news__article-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.page-news__list-item {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-news__list-image {
  width: 300px; /* Fixed width for list image */
  height: 200px; /* Fixed height for list image */
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

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

.page-news__list-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-news__list-title a:hover {
  color: #005a2e;
}

.page-news__list-meta {
  font-size: 14px;
  color: #888888;
  margin-bottom: 15px;
}

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

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

.page-news__dark-bg {
  background: #017439; /* Primary brand color as background */
  color: #ffffff; /* White text for dark background */
}

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

.page-news__cta-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #f0f0f0;
}

/* Ensure all images are responsive and not small icons */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Default for most images */
}

/* Mobile responsiveness */
@media (max-width: 992px) {
  .page-news__hero-title {
    font-size: 36px;
  }
  .page-news__section-title {
    font-size: 28px;
  }
  .page-news__cta-title {
    font-size: 32px;
  }
  .page-news__article-image {
    height: 220px;
  }
  .page-news__list-item {
    flex-direction: column;
  }
  .page-news__list-image {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__hero-section,
  .page-news__latest-news-section,
  .page-news__categories-section,
  .page-news__articles-list-section,
  .page-news__cta-section {
    padding: 40px 0;
  }

  .page-news__hero-title {
    font-size: 30px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

  .page-news__article-card {
    margin-bottom: 20px;
  }
  .page-news__article-image {
    height: 180px;
  }

  .page-news__categories-list {
    flex-direction: column;
    align-items: center;
  }

  .page-news__category-item {
    width: 100%;
    max-width: 250px;
    text-align: center;
    padding: 10px 20px;
  }

  .page-news__list-item {
    flex-direction: column;
  }
  .page-news__list-image {
    width: 100%;
    height: 180px;
  }
  .page-news__list-content {
    padding: 15px;
  }
  .page-news__list-title {
    font-size: 18px;
  }
  .page-news__list-summary {
    font-size: 14px;
  }

  .page-news__cta-title {
    font-size: 28px;
  }
  .page-news__cta-description {
    font-size: 16px;
  }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__articles-grid,
  .page-news__articles-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Specific override for sections that might have padding: 0 auto; */
  .page-news__hero-section .page-news__container,
  .page-news__latest-news-section .page-news__container,
  .page-news__categories-section .page-news__container,
  .page-news__articles-list-section .page-news__container,
  .page-news__cta-section .page-news__container {
      padding-left: 15px !important;
      padding-right: 15px !important;
  }

  /* Button container mobile adaptation */
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}