/* style/news.css */

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

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 10px;
}

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #017439;
  border-radius: 2px;
}

/* Hero Section */
.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-color: #f8f8f8;
}

.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;
}

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

.page-news__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: bold;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 18px;
  color: #555555;
  margin-bottom: 30px;
}

.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: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.page-news__cta-button:hover {
  background: #a10707;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

/* Articles Section */
.page-news__articles-section {
  padding: 60px 0;
  background-color: #FFFFFF; /* Light background */
  color: #333333;
}

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

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

.page-news__article-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-news__article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-news__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  color: #017439;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-news__article-meta {
  font-size: 14px;
  color: #999999;
  margin-bottom: 10px;
}

.page-news__read-more {
  display: inline-block;
  color: #017439;
  font-weight: bold;
  text-decoration: none;
  margin-top: auto;
}

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

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

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #FFFFFF; /* Light text for dark background */
}

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

.page-news__faq-section .page-news__section-title::after {
  background-color: #FFFFFF;
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

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

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: rgba(255, 255, 255, 0.2);
}

.page-news__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

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

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
  font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-news__container,
  .page-news__hero-section,
  .page-news__articles-section,
  .page-news__faq-section,
  .page-news__articles-grid,
  .page-news__article-card,
  .page-news__view-all,
  .page-news__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-news__main-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

  .page-news__description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-news__cta-button,
  .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 20px;
    font-size: 16px;
  }

  .page-news__articles-section,
  .page-news__faq-section {
    padding: 40px 0;
  }

  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-news__article-title {
    font-size: 18px;
  }

  .page-news__article-excerpt {
    font-size: 14px;
  }

  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px;
  }

  .page-news__faq-qtext {
    font-size: 16px;
  }

  .page-news__faq-toggle {
    font-size: 20px;
  }

  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__hero-image img {
    border-radius: 4px;
  }
}