.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: var(--background-color, #FFFFFF); /* Inherit from shared.css */
}

/* Header offset for the first main section */
.page-news__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #f8f8f8; /* Light background for hero */
  padding-bottom: 60px;
  overflow: hidden; /* Prevent image overflow */
}

.page-news__hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-news__hero-title {
  font-size: 2.8em;
  color: #017439; /* Brand color for title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.2em;
  color: #555555;
  margin-bottom: 30px;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box; /* Ensure padding/border are included in width */
  max-width: 100%; /* Important for mobile responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

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

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

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

.page-news__btn-secondary:hover {
  background-color: #C30808;
  color: #FFFF00;
}

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15; /* Subtle background image */
}

.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-news__section-title {
  font-size: 2.2em;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

.page-news__section-title--center {
  text-align: center;
}

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

.page-news__section-description--center {
  text-align: center;
}

.page-news__dark-section {
  background-color: #017439;
  color: #ffffff;
  padding: 60px 0;
}

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

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

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

.page-news__article-card {
  background-color: #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 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
  width: 100%;
  height: 220px; /* 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: 1.4em;
  margin-bottom: 15px;
  color: #017439;
  line-height: 1.3;
}

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

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

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

.page-news__read-more {
  display: inline-flex;
  align-items: center;
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

.page-news__arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
  transform: translateX(5px);
}

.page-news__featured-video {
  padding: 60px 0;
  background-color: #f0f0f0;
  text-align: center;
}

.page-news__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 40px auto 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  cursor: pointer; /* Indicate clickable video */
}

.page-news__video {
  width: 100%;
  height: auto;
  display: block;
}

.page-news__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Dark overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-news__video-wrapper:hover .page-news__video-overlay {
  opacity: 1;
}

.page-news__video-cta {
  background-color: #C30808;
  color: #FFFF00;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

.page-news__video-cta:hover {
  background-color: #a30606;
}

.page-news__in-depth-analysis {
  padding: 60px 0;
  background-color: #f0f0f0;
}

.page-news__analysis-item {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 60px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.page-news__analysis-item:last-child {
  margin-bottom: 0;
}

.page-news__analysis-item--reverse {
  flex-direction: row-reverse;
}

.page-news__analysis-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Ensure min size */
}

.page-news__analysis-content {
  width: 50%;
  padding: 30px;
  box-sizing: border-box;
}

.page-news__analysis-title {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-news__categories {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-news__category-card {
  display: block;
  background-color: #f8f8f8;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: #333333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__category-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 10px;
}

.page-news__category-text {
  font-size: 0.95em;
  color: #666666;
}

.page-news__faq-section {
  padding: 60px 0;
  background-color: #f8f8f8; /* Light background */
}

.page-news__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__faq-item {
  background-color: #ffffff;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #ffffff;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #f0f0f0;
}

.page-news__faq-title {
  font-size: 1.15em;
  color: #017439;
  margin: 0;
  flex-grow: 1;
  text-align: left;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  color: #017439;
  font-weight: bold;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Plus to X (rotate 45deg) or minus */
  content: "−"; /* Visually change to minus */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px; /* Initial padding, will change to 15px top/bottom when active */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: #555555;
  text-align: left;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px !important; /* Adjust padding when open */
}

.page-news__faq-answer p {
  margin: 0;
  padding-bottom: 10px; /* Ensure some spacing at the bottom of the answer */
}

.page-news__cta-banner {
  position: relative;
  padding: 80px 0;
  background-color: #017439; /* Brand color background */
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.page-news__cta-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.page-news__cta-title {
  font-size: 2.5em;
  color: #ffffff;
  margin-bottom: 20px;
}

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

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

.page-news__cta-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15; /* Subtle background image */
  z-index: 1;
}

/* --- Responsive styles --- */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.4em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__cta-title {
    font-size: 2em;
  }
}

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

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

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

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

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section-title {
    font-size: 1.8em;
    padding-top: 30px;
  }

  .page-news__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-news__dark-section,
  .page-news__featured-video,
  .page-news__categories,
  .page-news__faq-section,
  .page-news__cta-banner,
  .page-news__in-depth-analysis {
    padding: 40px 0;
  }

  .page-news__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__article-image {
    height: 180px;
  }

  .page-news__article-content {
    padding: 20px;
  }

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

  /* Image responsiveness for all content images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* Video responsiveness */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .page-news__video-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure video section has correct padding */
  }

  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px; /* Add padding to prevent overflow */
  }

  .page-news__in-depth-analysis {
    padding: 40px 0;
  }
  .page-news__analysis-item,
  .page-news__analysis-item--reverse {
    flex-direction: column;
    margin-bottom: 40px;
  }
  .page-news__analysis-image,
  .page-news__analysis-content {
    width: 100%;
    padding: 0;
  }
  .page-news__analysis-image {
    border-radius: 10px 10px 0 0;
  }
  .page-news__analysis-content {
    padding: 25px;
  }
  .page-news__analysis-title {
    font-size: 1.5em;
  }
  .page-news__analysis-text {
    font-size: 0.95em;
  }

  .page-news__category-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-news__category-card {
    padding: 25px;
  }

  .page-news__faq-question {
    padding: 18px 20px;
  }

  .page-news__faq-title {
    font-size: 1em;
  }

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

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }

  .page-news__cta-title {
    font-size: 1.8em;
  }

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

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to prevent overflow */
  }

  /* Ensure all content containers have proper mobile padding and max-width */
  .page-news__container,
  .page-news__hero-content,
  .page-news__cta-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}