/* style/news.css */

/* General page styling */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: #121212; /* Inherited from shared, but for clarity */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #0d0d0d; /* Dark background for hero */
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  overflow: hidden;
  box-sizing: border-box;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-news__hero-content {
  max-width: 800px;
  z-index: 1;
  color: #ffffff;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size for H1 */
  font-weight: bold;
  color: #26A9E0; /* Brand color for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* Call to Action Buttons */
.page-news__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  width: 100%; /* Ensure container takes full width for wrapping */
  max-width: 100%;
  box-sizing: border-box;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons adapt to container */
}

.page-news__btn-primary {
  background-color: #26A9E0; /* Brand color */
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
  background-color: #1e87bb;
  border-color: #1e87bb;
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #26A9E0; /* Brand color */
  border: 2px solid #26A9E0;
}

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

/* Sections */
.page-news__latest-updates,
.page-news__faq-section,
.page-news__promotion-cta {
  padding: 60px 0;
  text-align: center;
}

.page-news__latest-updates {
  background-color: #1a1a1a; /* Darker background for contrast on text */
  color: #ffffff;
}

.page-news__video-section,
.page-news__promotion-cta {
  background-color: #0d0d0d; /* Even darker background */
  color: #ffffff;
}

.page-news__faq-section {
  background-color: #1a1a1a;
  color: #ffffff;
}

.page-news__section-title {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #26A9E0; /* Brand color */
}

.page-news__section-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

/* News Grid */
.page-news__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__news-card {
  background-color: #222222; /* Card background */
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff; /* Card text color */
  text-align: left;
  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 10px 20px rgba(0, 0, 0, 0.2);
}

.page-news__card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

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

.page-news__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #26A9E0; /* Brand color for card title */
}

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

.page-news__card-excerpt {
  font-size: 1em;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-btn {
  display: inline-block;
  color: #26A9E0;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid #26A9E0;
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-news__read-more-btn:hover {
  color: #1e87bb;
  border-color: #1e87bb;
}

.page-news__view-all-news {
  margin-top: 50px;
}

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

.page-news__video-wrapper {
  position: relative;
  width: 100%; /* Ensure desktop width: 100% is present */
  max-width: 800px; /* Max width for video */
  margin: 40px auto 0 auto;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.page-news__video-link-overlay {
  display: block;
  position: relative;
  cursor: pointer;
}

.page-news__video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* FAQ Section */
.page-news__faq-list {
  max-width: 900px;
  margin: 40px auto;
  text-align: left;
}

.page-news__faq-item {
  background-color: #222222; /* FAQ item background */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.page-news__faq-item:hover {
  background-color: #2a2a2a;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #26A9E0; /* Brand color for question */
  cursor: pointer;
  list-style: none; /* For details/summary */
}

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

.page-news__faq-item summary {
  list-style: none; /* Hide default marker for Firefox/Safari */
}

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

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

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

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

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

.page-news__cta-buttons--faq {
  margin-top: 40px;
}

/* Promotion CTA Section */
.page-news__promotion-cta {
  padding: 80px 20px;
}

/* Ensure no filter on images */
.page-news img {
  filter: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2em, 5vw, 2.5em);
  }
}

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

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__hero-section,
  .page-news__latest-updates,
  .page-news__video-section,
  .page-news__faq-section,
  .page-news__promotion-cta {
    padding: 40px 0;
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* body handles --header-offset */
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 7vw, 2.2em) !important;
  }

  .page-news__section-title {
    font-size: 1.8em;
  }

  .page-news__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding: 0 15px; /* Add padding to container */
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important; /* Full width buttons */
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column layout */
    padding: 0 15px;
  }

  .page-news__news-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Image containers responsive */
  .page-news__hero-image-wrapper,
  .page-news__news-card,
  .page-news__video-wrapper,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent content overflow */
  }

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

  .page-news__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  .page-news__faq-list {
    padding: 0 15px;
  }
}