/* style/news.css */
.page-news {
  color: #ffffff; /* Default text color for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Rely on body for main header offset */
  overflow: hidden;
  background: #017439; /* Brand color as background */
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
}

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

.page-news__hero-content {
  z-index: 1;
  max-width: 800px;
}

.page-news__main-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

/* Section Titles */
.page-news__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  line-height: 1.3;
}

.page-news__section-subtitle {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  color: inherit;
}

/* Buttons */
.page-news__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

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

.page-news__btn-primary:hover {
  background: #a30606;
  border-color: #a30606;
}

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

.page-news__btn-secondary:hover {
  background: #005a2e;
  border-color: #005a2e;
}

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

.page-news__latest-articles .page-news__section-title,
.page-news__latest-articles .page-news__section-subtitle {
  color: #333333;
}

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

.page-news__article-card {
  background: #f8f8f8;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
}

.page-news__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-news__article-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333333;
}

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

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

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

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

.page-news__read-more {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-news__read-more:hover {
  color: #005a2e;
}

.page-news__view-all-wrapper {
  text-align: center;
}

.page-news__view-all-button {
  background: #017439;
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.page-news__view-all-button:hover {
  background: #005a2e;
}

/* Featured Article Section */
.page-news__featured-article {
  padding: 80px 0;
  background: #017439; /* Brand color as background */
  color: #ffffff; /* White text for contrast */
}

.page-news__featured-article .page-news__section-title {
  color: #ffffff;
  margin-bottom: 40px;
}

.page-news__feature-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 40px;
  object-fit: cover;
}

.page-news__text-block h3 {
  font-size: 1.6rem;
  font-weight: bold;
  color: #FFFF00; /* Custom color for sub-headings */
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-news__text-block p {
  font-size: 1.05rem;
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-news__text-block strong {
  color: #FFFF00; /* Custom color for strong text */
}

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

.page-news__video-section .page-news__section-title,
.page-news__video-section .page-news__section-subtitle {
  color: #333333;
}

.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin-bottom: 30px;
  border-radius: 8px;
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  cursor: pointer;
}

.page-news__video-cta {
  text-align: center;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background: #017439; /* Brand color as background */
  color: #ffffff; /* White text for contrast */
}

.page-news__faq-section .page-news__section-title {
  color: #ffffff;
  margin-bottom: 40px;
}

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

.page-news__faq-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

.page-news__faq-item details > summary {
  list-style: none;
}

.page-news__faq-item details > summary::-webkit-details-marker {
  display: none;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15rem;
  font-weight: bold;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background: rgba(255, 255, 255, 0.1);
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #FFFF00; /* Custom color for toggle icon */
}

.page-news__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: #f0f0f0;
}

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

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-subtitle {
  color: #333333;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* Dark background for elements on light body */
.page-news__dark-bg {
  background: #017439;
  color: #ffffff;
}

.page-news__light-bg {
  background: #ffffff;
  color: #333333;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }
  .page-news__section-title {
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  }
  .page-news__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

  .page-news__hero-section,
  .page-news__latest-articles,
  .page-news__featured-article,
  .page-news__video-section,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 0;
  }

  .page-news__container,
  .page-news__articles-grid,
  .page-news__video-wrapper,
  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  .page-news__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-news__description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-news__section-title {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
    margin-bottom: 20px;
  }

  .page-news__section-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  /* Images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Videos */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__video-wrapper {
    padding-bottom: 56.25% !important; /* Ensure aspect ratio */
    height: 0 !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
  }

  /* Buttons */
  .page-news__cta-button,
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="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;
    margin-left: 0 !important; /* Reset any horizontal margins */
    margin-right: 0 !important;
  }

  .page-news__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
  }

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

  .page-news__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }

  .page-news__faq-toggle {
    font-size: 1.3rem;
  }

  .page-news__faq-answer {
    padding: 10px 20px 15px;
  }
}

@media (max-width: 480px) {
  .page-news__hero-content {
    padding: 0 10px;
  }
  .page-news__main-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }
  .page-news__description {
    font-size: 0.95rem;
  }
  .page-news__section-title {
    font-size: clamp(1.3rem, 6.5vw, 1.8rem);
  }
  .page-news__section-subtitle {
    font-size: 0.9rem;
  }
  .page-news__cta-button {
    padding: 10px 20px;
  }
}