/* style/news.css */

/* Base styles and common elements for the news page */
.page-news {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #ffffff; /* Default light background */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  padding: 80px 20px;
  text-align: center;
  color: #ffffff; /* Light text for dark background */
  background: linear-gradient(135deg, #017439, #005a2e); /* Brand color gradient */
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
  box-sizing: border-box;
}

.page-news__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: #FFFF00; /* Register/Login font color for highlight */
}

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

.page-news__btn-primary {
  display: inline-block;
  background-color: #C30808; /* Register/Login button 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.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* Container for consistent content width */
.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Section Titles */
.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 30px;
  color: #017439; /* Brand color for titles */
  font-weight: bold;
}

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

/* Featured News Section */
.page-news__featured-news {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-news__news-card {
  background-color: #f9f9f9;
  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__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-news__card-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__card-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: bold;
  color: #017439;
}

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

.page-news__card-title a:hover {
  color: #005a2e;
  text-decoration: underline;
}

.page-news__card-text {
  font-size: 1em;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: #C30808; /* Register/Login button color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

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

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-news__latest-articles .page-news__section-title {
  color: #ffffff; /* White title for dark background */
}

.page-news__latest-articles .page-news__section-intro-text {
  color: #f0f0f0;
}

.page-news__article-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.page-news__article-item {
  display: flex;
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
  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;
}

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

.page-news__article-image {
  width: 40%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-news__article-content {
  padding: 25px;
  width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-news__article-title {
  font-size: 1.8em;
  margin-bottom: 10px;
  font-weight: bold;
  color: #FFFF00; /* Highlight color for titles */
}

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

.page-news__article-title a:hover {
  color: #fff;
  text-decoration: underline;
}

.page-news__article-text {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 20px;
}

.page-news__latest-articles .page-news__read-more {
  color: #ffffff;
}

.page-news__latest-articles .page-news__read-more:hover {
  color: #FFFF00;
}

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

.page-news__btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
  border: 2px solid #ffffff;
  cursor: pointer;
  font-size: 1.1em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* Promotion Section */
.page-news__promotion-section {
  padding: 60px 0;
  text-align: center;
  background-color: #ffffff;
}

.page-news__promotion-text {
  font-size: 1.2em;
  max-width: 900px;
  margin: 0 auto 30px;
  color: #555555;
}

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

.page-news__btn-register,
.page-news__btn-login {
  display: inline-block;
  background-color: #C30808; /* Register/Login button 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.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__btn-register:hover,
.page-news__btn-login:hover {
  background-color: #a30606;
  transform: translateY(-2px);
}

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

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

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark bg */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #FFFF00; /* Highlight color for FAQ questions */
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none; /* Remove default marker for details summary */
  user-select: none;
}

.page-news__faq-item:last-child .page-news__faq-question {
  border-bottom: none;
}

.page-news__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-news__faq-qtext {
  flex-grow: 1;
}

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

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' or '-' effect */
}

.page-news__faq-answer {
  padding: 0 25px 18px;
  font-size: 1em;
  color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-news__hero-title {
    font-size: 2.5em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__article-item {
    flex-direction: column;
  }
  .page-news__article-image,
  .page-news__article-content {
    width: 100%;
  }
  .page-news__card-image {
    height: 220px; /* Adjust height for smaller screens */
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-news__hero-title {
    font-size: 2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__section-intro-text {
    font-size: 0.95em;
  }
  .page-news__news-grid {
    grid-template-columns: 1fr;
  }
  .page-news__news-card {
    margin-bottom: 20px;
  }
  .page-news__cta-buttons,
  .page-news__promotion-cta {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news__btn-register,
  .page-news__btn-login {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__container {
    padding: 0 15px !important;
  }
  .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__article-item,
  .page-news__promotion-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__card-image {
    height: 200px; /* Ensure minimum height on mobile */
  }
  /* Specific override for faq-question to ensure text wraps */
  .page-news__faq-question {
    flex-wrap: wrap;
    padding: 15px 20px;
  }
  .page-news__faq-qtext {
    width: calc(100% - 30px); /* Leave space for toggle */
    margin-bottom: 5px;
  }
  .page-news__faq-toggle {
    margin-top: 5px;
    margin-left: auto; /* Push to right */
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
  .page-news__card-title {
    font-size: 1.2em;
  }
  .page-news__article-title {
    font-size: 1.4em;
  }
  .page-news__faq-question {
    font-size: 1em;
  }
}

/* Color Contrast Safeguards */
.page-news__dark-bg {
  color: #ffffff;
}

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

/* Ensure all text elements within dark backgrounds have light text */
.page-news__hero-section p,
.page-news__latest-articles p,
.page-news__faq-section p {
  color: #f0f0f0;
}

/* Button contrast */
.page-news__btn-primary,
.page-news__btn-register,
.page-news__btn-login {
  background-color: #C30808;
  color: #FFFF00;
}

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

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

/* Titles on light background */
.page-news__featured-news .page-news__section-title,
.page-news__promotion-section .page-news__section-title {
  color: #017439;
}

/* Text on light background */
.page-news__featured-news .page-news__section-intro-text,
.page-news__featured-news .page-news__card-text,
.page-news__promotion-section .page-news__promotion-text {
  color: #555555;
}

/* Link colors on various backgrounds */
.page-news__card-title a {
  color: #017439;
}
.page-news__card-title a:hover {
  color: #005a2e;
}
.page-news__read-more {
  color: #C30808;
}
.page-news__read-more:hover {
  color: #a30606;
}
.page-news__article-title a {
  color: #FFFF00;
}
.page-news__article-title a:hover {
  color: #ffffff;
}
.page-news__latest-articles .page-news__read-more {
  color: #ffffff;
}
.page-news__latest-articles .page-news__read-more:hover {
  color: #FFFF00;
}