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

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

.page-news__section-title {
  font-size: 2.5em;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-title--white {
  color: #FFFFFF;
}

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

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust height as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 2;
}

.page-news__hero-content {
  position: relative;
  z-index: 3;
  color: #FFFFFF;
  max-width: 900px;
  padding: 20px;
}

.page-news__main-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  line-height: 1.5;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

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

.page-news__btn-secondary:hover {
  background-color: #FFFFFF;
  color: #017439;
}

.page-news__btn-register {
  background-color: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-news__btn-register:hover {
  background-color: #E00B0B;
  border-color: #E00B0B;
}

.page-news__btn-login {
  background-color: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-news__btn-login:hover {
  background-color: #E00B0B;
  border-color: #E00B0B;
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 80px 0;
}

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

.page-news__article-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  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: 250px;
  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: 10px;
  font-weight: bold;
  line-height: 1.3;
}

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

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

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

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

.page-news__read-more {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

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

.page-news__arrow {
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

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

.page-news__view-all {
  text-align: center;
  margin-top: 60px;
}

/* Featured Video Section */
.page-news__featured-video {
  padding: 80px 0;
  background-color: #017439; /* Brand primary color */
  text-align: center;
}

.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-news__video-link-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
}

/* Why Read News Section */
.page-news__why-read-news {
  padding: 80px 0;
}

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

.page-news__benefit-item {
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-news__benefit-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__benefit-item p {
  color: #555555;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  background-color: #FFFFFF;
  transition: background-color 0.3s ease;
  border-bottom: 1px solid #eee;
}

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

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

.page-news__faq-item.active .page-news__faq-question {
  background-color: #e6ffe6;
  border-bottom: none;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Plus sign becomes an X or minus */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Use !important to ensure it overrides */
  padding: 15px 25px 25px;
}

/* CTA Section */
.page-news__cta-section {
  background-color: #017439; /* Brand primary color */
  padding: 80px 0;
  text-align: center;
}

.page-news__cta-content {
  max-width: 800px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 3em;
  }
  .page-news__hero-description {
    font-size: 1.2em;
  }
}

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

  .page-news__hero-section {
    height: 500px;
  }

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

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

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100%;
    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__container {
    padding: 0 15px;
  }

  .page-news__section-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

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

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

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

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

  .page-news__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

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

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

  /* Mobile specific image and video responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper,
  .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;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  .page-news__video-wrapper {
    padding-bottom: 56.25% !important; /* Ensure aspect ratio */
  }
  
  .page-news__cta-actions {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__hero-section {
    height: 400px;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
}