/* style/news.css */

/* --- Base Styles --- */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light background */
  background-color: #FFFFFF; /* Body background is white */
}

.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; /* Brand primary color */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

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

.page-news__section-description--white {
  color: #f0f0f0;
}

.page-news__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn--primary {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-news__btn--primary:hover {
  background-color: #005a2c;
  border-color: #005a2c;
}

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

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

/* Custom colors for register/login buttons */
.page-news__btn--register {
  background-color: #C30808; /* Custom red */
  color: #FFFF00; /* Custom yellow font */
  border: 2px solid #C30808;
}

.page-news__btn--register:hover {
  background-color: #9e0606;
  border-color: #9e0606;
}

.page-news__btn--login {
  background-color: #C30808; /* Custom red */
  color: #FFFF00; /* Custom yellow font */
  border: 2px solid #C30808;
  margin-left: 15px;
}

.page-news__btn--login:hover {
  background-color: #9e0606;
  border-color: #9e0606;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__cta-buttons--center {
  justify-content: center;
}

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

.page-news__dark-bg {
  background-color: #017439;
  color: #FFFFFF;
}

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
  overflow: hidden;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  /* No filter property */
}

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: -1;
}

.page-news__hero-section .page-news__container {
  position: relative;
  z-index: 1;
}

.page-news__main-title {
  font-size: 3.5em;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-news__intro-text {
  font-size: 1.3em;
  color: #f0f0f0;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

/* --- Latest Articles Section --- */
.page-news__latest-articles {
  padding: 80px 0;
}

.page-news__article-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;
  height: 100%; /* Ensure cards have equal height */
}

.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;
  /* No filter property */
}

.page-news__article-content {
  padding: 25px;
  flex-grow: 1; /* Allow content to grow */
  display: flex;
  flex-direction: column;
}

.page-news__article-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
}

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

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

.page-news__article-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__read-more-link {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start; /* Align link to the start */
}

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

/* --- Video Section --- */
.page-news__video-section {
  padding: 80px 0;
  text-align: center;
}

.page-news__video-wrapper {
  max-width: 1000px; /* Max width for video */
  margin: 0 auto 40px auto;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio (height / width * 100%) */
  height: 0;
  overflow: hidden;
  background-color: #000; /* Fallback background */
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__video-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  cursor: pointer; /* Indicate clickable */
}

/* --- FAQ Section --- */
.page-news__faq-section {
  padding: 80px 0;
}

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

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

.page-news__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  outline: none;
  list-style: none; /* Remove default marker */
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit */
}

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

.page-news__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: #017439;
}

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

/* --- Call to Action Section --- */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-news__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__cta-title {
  font-size: 2.8em;
  color: #FFFFFF;
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 3em;
  }
  .page-news__intro-text {
    font-size: 1.2em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__cta-title {
    font-size: 2.2em;
  }
  .page-news__hero-section {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Fixed header spacing for mobile, if not handled by shared.css body padding */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    height: 400px;
  }

  .page-news__main-title {
    font-size: 2.2em;
  }
  .page-news__intro-text {
    font-size: 1.1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__section-description {
    font-size: 1em;
  }
  .page-news__cta-title {
    font-size: 1.8em;
  }
  .page-news__cta-description {
    font-size: 1.1em;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

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

  .page-news__btn--login {
    margin-left: 0; /* Remove margin for stacked buttons */
  }

  /* Image responsive rules */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__article-image {
    height: 200px; /* Adjust height for mobile */
  }
  
  /* Container responsive rules */
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-articles,
  .page-news__video-section,
  .page-news__faq-section,
  .page-news__cta-section,
  .page-news__article-card,
  .page-news__video-wrapper,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  /* Video responsive rules */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__video-wrapper {
    padding-bottom: 56.25% !important; /* Maintain aspect ratio */
    height: 0 !important;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__intro-text {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
  .page-news__cta-title {
    font-size: 1.6em;
  }
  .page-news__hero-section {
    height: 350px;
  }
  .page-news__faq-item summary {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px 15px;
  }
}