/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #ffffff; /* Explicitly set for content area if needed, but body is white */
  padding-top: 0; /* body already handles padding-top: var(--header-offset) */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, text below */
  align-items: center;
  justify-content: center;
  padding-bottom: 40px;
  background-color: #f8f8f8;
  padding-top: 10px; /* Small top padding, not header-offset */
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-news__hero-content {
  max-width: 1000px;
  width: 100%; /* Ensure content takes full width up to max-width */
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  color: #017439;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 20px;
}

/* General Section Styling */
.page-news__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  margin-top: 60px;
  font-weight: 600;
}

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

/* News Grid */
.page-news__featured-news-section,
.page-news__guides-section,
.page-news__about-section,
.page-news__contact-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

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

.page-news__news-card,
.page-news__guide-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.page-news__card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency, object-fit will handle aspect ratio */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Minimal width requirement */
  min-height: 200px; /* Minimal height requirement */
}

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

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

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

.page-news__card-title a:hover {
  color: #005f2b; /* Slightly darker green on hover */
}

.page-news__card-meta {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 15px;
}

.page-news__card-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-btn,
.page-news__contact-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  align-self: flex-start; /* Align button to start of flex item */
}

.page-news__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color */
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  background-color: #a30606; /* Darker red on hover */
}

.page-news__btn-secondary {
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
  background-color: #e0e0e0;
  color: #017439;
  border-color: #005f2b;
}

/* About Section */
.page-news__about-content {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.page-news__about-subtitle {
  font-size: 1.6em;
  color: #017439;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-news__about-subtitle:first-of-type {
  margin-top: 0;
}

.page-news__text-block {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
}

/* Contact Section */
.page-news__contact-wrapper {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: 30px;
  align-items: center;
  background-color: #f0fdf5; /* Light green background */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-news__contact-image {
  flex: 1 1 400px; /* Allows image to grow/shrink, min-width 400px */
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  min-width: 200px;
  min-height: 200px;
}

.page-news__contact-content {
  flex: 2 1 400px; /* Allows content to grow/shrink, min-width 400px */
}


/* CTA Section (Dark Background) */
.page-news__cta-section {
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
  text-align: center;
  padding: 60px 20px;
  margin-top: 60px;
  box-sizing: border-box;
}

.page-news__description--light {
  color: #f0f0f0;
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-news__cta-btn {
  font-size: 1.2em;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-news__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }

  .page-news__section-title {
    font-size: clamp(1.6em, 4.5vw, 2.2em);
  }

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

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

  .page-news__contact-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .page-news__contact-image {
    flex: none;
    width: 100%;
    max-width: 500px; /* Limit image width on tablets */
  }

  .page-news__contact-content {
    flex: none;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news__hero-section {
    padding-bottom: 30px;
    padding-top: 10px !important; /* Ensure small top padding */
  }

  .page-news__main-title {
    font-size: clamp(1.6em, 6vw, 2.5em);
    margin-bottom: 10px;
  }

  .page-news__description {
    font-size: 1em;
  }

  .page-news__section-title {
    font-size: clamp(1.5em, 5.5vw, 2em);
    margin-top: 40px;
    margin-bottom: 30px;
  }

  .page-news__featured-news-section,
  .page-news__guides-section,
  .page-news__about-section,
  .page-news__contact-section,
  .page-news__cta-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__news-grid,
  .page-news__guides-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
  }

  .page-news__card-image {
    height: 180px; /* Adjust card image height for mobile */
  }

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

  .page-news__read-more-btn,
  .page-news__contact-btn,
  .page-news__cta-btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Ensure all images are responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Ensure video (if any) is responsive */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

/* Ensure content area images are at least 200px */
/* The specific card image height (225px) ensures it meets the 200px min-height for content, and width is 100% */
.page-news__contact-image {
  min-width: 200px;
  min-height: 200px;
}