/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #FFFFFF; /* Explicitly set for clarity */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px; /* Ensure sufficient height */
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
  padding: 80px 0; /* Internal padding, assuming body padding-top is handled by shared */
  background-color: #017439; /* Brand primary color */
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.6; /* Slightly dim image to ensure text readability */
}

.page-news__hero-container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4); /* Dark overlay for text contrast */
  border-radius: 8px;
}

.page-news__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #FFFFFF;
  line-height: 1.2;
}

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

.page-news__hero-button {
  display: inline-block;
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-news__hero-button:hover {
  background-color: #a00606;
}

/* Section Titles and Descriptions */
.page-news__section-title {
  font-size: 2.5em;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  margin-top: 60px;
}

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

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

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
  background-color: #f8f8f8;
}

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

.page-news__news-card {
  background-color: #FFFFFF;
  border-radius: 8px;
  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__news-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-news__news-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__news-card-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-news__news-card-title a:hover {
  color: #00562d;
}

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

.page-news__read-more-button {
  display: inline-block;
  background-color: #017439;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more-button:hover {
  background-color: #00562d;
}

.page-news__view-more-container {
  text-align: center;
  margin-top: 50px;
}

.page-news__view-more-button {
  display: inline-block;
  background-color: #017439;
  color: #FFFFFF;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-news__view-more-button:hover {
  background-color: #00562d;
}

/* Analysis Section */
.page-news__analysis-section {
  padding: 60px 0;
  background-color: #FFFFFF;
}

.page-news__dark-section {
  background-color: #017439; /* Brand primary color */
  color: #FFFFFF;
  padding: 60px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__analysis-content {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

.page-news__analysis-text {
  flex: 2;
}

.page-news__analysis-text p {
  margin-bottom: 20px;
  font-size: 1.1em;
  color: #F0F0F0; /* Light text for dark background */
}

.page-news__analysis-image {
  flex: 1;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Minimum size requirement */
}

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

.page-news__cta-section .page-news__section-title {
  color: #017439;
  margin-bottom: 20px;
}

.page-news__cta-section .page-news__section-description {
  color: #555555;
  margin-bottom: 40px;
}

.page-news__cta-button {
  display: inline-block;
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  padding: 18px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-news__cta-button:hover {
  background-color: #a00606;
}

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

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

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

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

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

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  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 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #FFFFFF;
}

.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: 0;
  color: #555555;
}

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

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

  .page-news__analysis-content {
    flex-direction: column;
    align-items: center;
  }

  .page-news__analysis-image {
    margin-top: 30px;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  /* Fixed header offset for mobile, handled by shared.css on body, so no extra padding here */
  .page-news__hero-section {
    padding: 60px 0;
    min-height: 400px;
  }

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

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

  .page-news__hero-button {
    padding: 12px 25px;
    font-size: 1em;
  }

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

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

  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .page-news__read-more-button {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .page-news__view-more-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-news__analysis-text p {
    font-size: 1em;
  }

  .page-news__cta-section {
    padding: 50px 0;
  }

  .page-news__cta-button {
    padding: 15px 30px;
    font-size: 1.1em;
  }

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

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

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

  /* Mobile content area padding */
  .page-news__container {
    padding: 0 15px;
  }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__hero-image,
  .page-news__news-card-image,
  .page-news__analysis-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Mobile button responsiveness */
  .page-news__hero-button,
  .page-news__read-more-button,
  .page-news__view-more-button,
  .page-news__cta-button,
  .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;
  }
  
  /* Button containers for mobile */
  .page-news__hero-container,
  .page-news__view-more-container,
  .page-news__cta-section .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-news__articles-grid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__dark-section {
    padding: 40px 15px;
  }

  .page-news__faq-list {
    padding: 0 15px;
  }
}

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

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

  .page-news__news-card-title {
    font-size: 1.1em;
  }
}