/* style/news.css */

/* Base styles for the news page, ensuring contrast with dark body background */
.page-news {
  color: #ffffff; /* Default text color for dark background */
  background-color: transparent; /* Body background is handled by shared.css */
}

.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; /* Primary color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-news__dark-bg {
  background-color: #017439; /* Primary color for dark sections */
  color: #ffffff; /* White text on primary background */
}

.page-news__light-bg {
  background-color: #ffffff; /* White background for cards/light sections */
  color: #333333; /* Dark text on white background */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
  overflow: hidden;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-bottom: 40px;
}

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

.page-news__hero-description {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Subtle overlay for text readability */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  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;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure button doesn't overflow */
}

/* Primary Button */
.page-news__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #000000; /* Black text for contrast on #C30808 */
  border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
  color: #ffffff;
}

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

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

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
  background-color: #1a1a1a; /* Dark background for this section */
  color: #ffffff;
}

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

.page-news__news-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-news__news-card:hover {
  transform: translateY(-5px);
}

.page-news__news-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-news__news-card-content {
  padding: 25px;
  color: #333333;
}

.page-news__news-card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

.page-news__news-card-meta {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 15px;
}

.page-news__news-card-excerpt {
  font-size: 1em;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 20px;
}

.page-news__news-card-link {
  display: inline-block;
  color: #C30808; /* Login/Register color for links */
  text-decoration: none;
  font-weight: bold;
}

.page-news__news-card-link:hover {
  text-decoration: underline;
}

.page-news__load-more {
  text-align: center;
  margin-top: 40px;
}

/* Guide Section */
.page-news__guide-section {
  padding: 80px 0;
}

.page-news__guide-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.page-news__guide-content p {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 25px;
  color: #f0f0f0;
}

.page-news__guide-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  text-align: left;
  display: inline-block; /* Center the list items */
}

.page-news__guide-list li {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 10px;
  position: relative;
  padding-left: 30px;
  color: #ffffff;
}

.page-news__guide-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: #C30808; /* Checkmark color */
  font-weight: bold;
}

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

.page-news__video-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-news__video-description {
  font-size: 1.1em;
  line-height: 1.7;
  margin-top: 30px;
  color: #f0f0f0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.page-news__faq-item[open] {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background-color: #017439; /* Primary color for question background */
  color: #ffffff;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  list-style: none; /* Remove default marker */
  user-select: none;
}

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

.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); /* Change + to X or similar */
}

.page-news__faq-answer {
  padding: 20px 25px;
  background-color: #ffffff; /* White background for answer */
  color: #333333; /* Dark text on white background */
  font-size: 1em;
  line-height: 1.6;
}

.page-news__faq-answer p {
  margin-bottom: 10px;
}

.page-news__faq-answer a {
  color: #C30808; /* Link color */
  text-decoration: none;
  font-weight: bold;
}

.page-news__faq-answer a:hover {
  text-decoration: underline;
}

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

.page-news__cta-description {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 40px;
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__news-card-image {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-news__hero-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary, .page-news__btn-secondary {
    width: 100%;
    padding: 12px 20px;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-news__latest-news-section, .page-news__guide-section, .page-news__video-section, .page-news__faq-section, .page-news__cta-section {
    padding: 40px 0;
  }
  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__news-card-image {
    height: 180px;
  }
  .page-news__news-card-content {
    padding: 20px;
  }
  .page-news__news-card-title {
    font-size: 1.2em;
  }
  .page-news__guide-content p, .page-news__guide-list li, .page-news__video-description, .page-news__cta-description {
    font-size: 0.95em;
  }
  .page-news__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 15px 20px;
  }
  /* Mobile image responsiveness */
  .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__video-section, .page-news__video-container, .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-news__video-wrapper {
    padding-bottom: 56.25% !important;
  }
  .page-news video, .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important; /* Keep height 100% for hero overlay */
  }
}

@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;
  }
  .page-news__news-card-image {
    height: 150px;
  }
}