/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: #ffffff;
}

/* Section spacing and container */
.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: #017439;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* Hero Section */
.page-news__hero-section {
  background-color: #f5f5f5;
  padding: 80px 20px;
  text-align: center;
  color: #333333;
}

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

.page-news__hero-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-news__btn-primary {
  display: inline-block;
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
}

.page-news__btn-primary:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

/* Articles Grid Section */
.page-news__articles-grid {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-news__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;
  color: #333333;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
  width: 100%;
  height: 250px; /* 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__article-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: bold;
}

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

.page-news__article-link:hover {
  color: #005f2f;
  text-decoration: underline;
}

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

.page-news__article-summary {
  font-size: 1em;
  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;
}

.page-news__read-more:hover {
  color: #005f2f;
  text-decoration: underline;
}

/* Featured Article Section */
.page-news__featured-article {
  background-color: #017439;
  color: #ffffff;
  padding: 80px 0;
}

.page-news__featured-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-news__featured-image {
  width: 50%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.page-news__featured-text {
  width: 50%;
}

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

.page-news__featured-summary,
.page-news__featured-paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-news__btn-secondary {
  display: inline-block;
  background-color: #ffffff;
  color: #017439;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
  border: 2px solid #017439;
  cursor: pointer;
  font-size: 1.1em;
}

.page-news__btn-secondary:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
}

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

.page-news__cta-description {
  font-size: 1.2em;
  max-width: 700px;
  margin: 0 auto 40px;
}

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

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

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

.page-news__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

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

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

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(0deg); /* No rotation for minus sign */
}

.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; /* Sufficiently large to show content */
  padding: 15px 25px;
}

.page-news__faq-answer p {
  margin-bottom: 0;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__featured-content {
    flex-direction: column;
  }
  .page-news__featured-image,
  .page-news__featured-text {
    width: 100%;
  }
  .page-news__article-image {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__hero-section,
  .page-news__articles-grid,
  .page-news__featured-article,
  .page-news__cta-section,
  .page-news__faq-section {
    padding: 40px 0;
  }
  .page-news__hero-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-news__grid {
    grid-template-columns: 1fr;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .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: 12px 15px;
    font-size: 1em;
  }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__articles-grid,
  .page-news__featured-article,
  .page-news__cta-section,
  .page-news__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Ensure padding-top for video section if it were present */
  .page-news__video-section {
    padding-top: var(--header-offset, 120px) !important; 
  }
  .page-news__featured-image {
    height: auto; /* Allow image to scale proportionally */
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
  .page-news__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 10px 20px;
  }
}