/* style/news.css */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #ffffff;
}

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

.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background: linear-gradient(135deg, #017439, #02a35b);
  color: #ffffff;
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-news__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 15px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2.2rem, 5vw, 3.5rem); /* Using clamp for responsive H1 */
}

.page-news__description {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 30px;
  color: #f0f0f0;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button--yellow {
  background: #FFD700; /* A vibrant yellow for contrast */
  color: #333333;
}

.page-news__cta-button--yellow:hover {
  background: #e6c200;
  color: #000000;
}

.page-news__latest-articles,
.page-news__promo-banner,
.page-news__faq-section {
  padding: 60px 0;
}

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

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

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

.page-news__article-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 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 8px 20px rgba(0, 0, 0, 0.15);
}

.page-news__card-image-wrapper {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-news__card-image-wrapper img {
  width: 100%;
  height: 100%;
  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.35rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

.page-news__card-date {
  font-size: 0.9rem;
  color: #888888;
  margin-bottom: 15px;
}

.page-news__card-summary {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start;
}

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

.page-news__view-all-button-wrapper {
  text-align: center;
  margin-top: 50px;
}

.page-news__promo-banner {
  background: linear-gradient(90deg, #017439, #02a35b);
  color: #ffffff;
  text-align: center;
  padding: 80px 20px;
  border-radius: 10px;
  margin: 40px auto;
  max-width: 1200px;
}

.page-news__banner-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-news__banner-description {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #f0f0f0;
}

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

.page-news__faq-list {
  margin-top: 40px;
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}

details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #f5f5f5;
}

.page-news__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #017439;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 20px;
  background: #fefefe;
  border-radius: 0 0 8px 8px;
  font-size: 1rem;
  color: #555555;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2rem, 5.5vw, 3rem);
  }
  .page-news__banner-title {
    font-size: 2.2rem;
  }
  .page-news__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__hero-image img {
    border-radius: 4px;
  }
  .page-news__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .page-news__description {
    font-size: 1rem;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__latest-articles,
  .page-news__promo-banner,
  .page-news__faq-section {
    padding: 40px 0;
  }
  .page-news__section-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  .page-news__section-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  .page-news__article-grid {
    gap: 20px;
  }
  .page-news__card-image-wrapper {
    height: 180px;
  }
  .page-news__card-title {
    font-size: 1.2rem;
  }
  .page-news__card-summary {
    font-size: 0.9rem;
  }
  .page-news__promo-banner {
    padding: 50px 15px;
    margin: 30px auto;
  }
  .page-news__banner-title {
    font-size: 1.8rem;
  }
  .page-news__banner-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-qtext {
    font-size: 1rem;
  }
  .page-news__faq-toggle {
    font-size: 20px;
    width: 24px;
  }
  details.page-news__faq-item .page-news__faq-answer {
    padding: 0 20px 15px;
  }
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .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;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-news__article-card {
    margin-bottom: 20px; /* Add some space between cards on mobile */
  }
}

@media (max-width: 480px) {
  .page-news__banner-title {
    font-size: 1.5rem;
  }
  .page-news__article-grid {
    grid-template-columns: 1fr;
  }
}

/* Color contrast safety */
.page-news__light-bg {
  color: #333333; /* Light background, dark text */
  background: #ffffff;
}
.page-news__dark-bg {
  color: #ffffff; /* Dark background, light text */
  background: #017439;
}
.page-news__cta-button {
  color: #FFFF00; /* Custom button font color */
  background: #C30808; /* Custom button background color */
}
.page-news__cta-button--yellow {
  background: #FFD700;
  color: #333333;
}