/* style/news.css */

/* --- Base Styles --- */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #ffffff; /* Default for dark background, overridden for light sections */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  color: #f0f0f0; /* Slightly lighter for descriptions, overridden for light sections */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__btn-primary {
  display: inline-block;
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  background-color: #1e87b0;
}

.page-news__btn-secondary {
  display: inline-block;
  background-color: #ffffff;
  color: #26A9E0; /* Primary brand color for text */
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b0;
  border-color: #1e87b0;
}

.page-news__btn-text {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__btn-text:hover {
  color: #1e87b0;
  text-decoration: underline;
}

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  padding: 120px 0 80px; /* Adjusted padding-top for header offset */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  min-height: 500px;
  box-sizing: border-box;
  color: #ffffff; /* Ensure light text on dark background */
  background-color: #0d0d0d; /* Fallback for dark background if var(--black-color) is not applied */
  padding-top: var(--header-offset, 120px); /* Apply header offset */
}

.page-news__hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Overlay for readability */
  z-index: 1;
}

.page-news__hero-section .page-news__container {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.page-news__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-news__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-news__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.7); /* Darken image for text readability, not color change */
}

/* --- Latest News Section --- */
.page-news__latest-news-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text for light background */
}

.page-news__latest-news-section .page-news__section-title,
.page-news__latest-news-section .page-news__section-description {
  color: #333333;
}

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

.page-news__news-card {
  background-color: #f8f8f8;
  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__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.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;
}

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

.page-news__card-title a:hover {
  color: #1e87b0;
  text-decoration: underline;
}

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

.page-news__card-date {
  font-size: 0.85em;
  color: #888888;
  margin-bottom: 15px;
  display: block;
}

/* --- Featured Articles Section --- */
.page-news__featured-articles-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Primary brand color as background */
  color: #ffffff; /* Light text for dark background */
}

.page-news__featured-articles-section .page-news__section-title,
.page-news__featured-articles-section .page-news__section-description {
  color: #ffffff;
}

.page-news__featured-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default to single column */
  gap: 40px;
}

.page-news__featured-card {
  background-color: rgba(255, 255, 255, 0.15); /* Slightly transparent white */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__featured-card .page-news__card-image {
  width: 100%;
  height: 450px; /* Larger fixed height */
  object-fit: cover;
  display: block;
}

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

.page-news__featured-card .page-news__card-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  line-height: 1.2;
}

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

.page-news__featured-card .page-news__card-title a:hover {
  color: #f0f0f0;
  text-decoration: underline;
}

.page-news__featured-card .page-news__card-excerpt {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* --- FAQ Section --- */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text for light background */
}

.page-news__faq-section .page-news__section-title {
  color: #333333;
}

.page-news__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__faq-item {
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 10px;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  font-size: 1.2em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  transition: color 0.3s ease;
}

.page-news__faq-question:hover {
  color: #26A9E0;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg);
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 15px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
  font-size: 1em;
  line-height: 1.6;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large */
  padding: 15px;
}

.page-news__faq-answer p {
  margin-bottom: 0;
  color: #555555; /* Ensure text color is readable */
}

/* --- CTA Section --- */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #0d0d0d; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
  color: #ffffff;
}

.page-news__btn-large {
  padding: 15px 35px;
  font-size: 1.2em;
}

/* --- Responsive Design --- */
@media (min-width: 769px) {
  .page-news__featured-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns for desktop */
  }
}

@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
}

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

  .page-news__container {
    padding: 0 15px; /* Adjust padding for smaller screens */
  }

  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
    padding-bottom: 60px;
  }

  .page-news__hero-title {
    font-size: 2.2em;
  }

  .page-news__hero-description {
    font-size: 1.1em;
  }

  .page-news__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section-title {
    font-size: 2em;
  }

  .page-news__section-description {
    font-size: 1em;
  }

  .page-news__news-grid,
  .page-news__featured-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
  }

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

  .page-news__featured-card .page-news__card-image {
    height: 250px; /* Adjust image height for mobile featured cards */
  }

  .page-news__faq-question {
    font-size: 1.1em;
  }

  /* Image responsiveness for all img tags within .page-news */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/videos/buttons must be responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-news-section,
  .page-news__featured-articles-section,
  .page-news__faq-section,
  .page-news__cta-section,
  .page-news__hero-cta-buttons,
  .page-news__news-card,
  .page-news__featured-card,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  /* Ensure padding for containers on mobile to prevent content touching edges */
  .page-news__latest-news-section .page-news__container,
  .page-news__featured-articles-section .page-news__container,
  .page-news__faq-section .page-news__container,
  .page-news__cta-section .page-news__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* --- Color Contrast Assurance --- */
/* Default text color for .page-news (assuming body is dark) */
.page-news {
  color: #ffffff;
}

/* Sections with light backgrounds should have dark text */
.page-news__latest-news-section,
.page-news__faq-section {
  background-color: #ffffff;
  color: #333333;
}
.page-news__latest-news-section .page-news__section-title,
.page-news__latest-news-section .page-news__section-description,
.page-news__faq-section .page-news__section-title,
.page-news__faq-question,
.page-news__faq-answer p {
  color: #333333;
}
.page-news__card-excerpt, .page-news__card-date {
  color: #555555;
}

/* Sections with dark backgrounds should have light text */
.page-news__hero-section,
.page-news__cta-section {
  background-color: #0d0d0d; /* Assuming --black-color is dark */
  color: #ffffff;
}
.page-news__featured-articles-section {
  background-color: #26A9E0; /* Brand color as background */
  color: #ffffff;
}
.page-news__hero-title,
.page-news__hero-description,
.page-news__featured-articles-section .page-news__section-title,
.page-news__featured-articles-section .page-news__section-description,
.page-news__featured-card .page-news__card-title a,
.page-news__featured-card .page-news__card-excerpt,
.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
  color: #ffffff;
}

/* Buttons */
.page-news__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
}
.page-news__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
}
.page-news__btn-text {
  color: #26A9E0;
}