/* style/news.css */

/* Base Styles & Typography */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-subtitle {
  font-size: 1.2em;
  color: #f0f0f0;
  text-align: center;
  margin-bottom: 40px;
}

.page-news__dark-text {
  color: #333333;
}

.page-news__dark-link {
  color: #26A9E0;
}

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

.page-news__hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 0;
  transform: translateX(-50%) translateY(-50%);
  background-size: cover;
  background-position: center;
  cursor: pointer; /* Indicate video is clickable */
}

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

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}

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

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

/* 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;
  font-size: 1.1em;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
  margin-right: 15px;
}

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

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

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

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* News Grid & Cards */
.page-news__latest-news-section,
.page-news__community-news-section {
  padding: 80px 0;
  background-color: #000000; /* Dark background from body */
  color: #ffffff;
}

.page-news__featured-articles-section,
.page-news__promotions-updates-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333;
}

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

.page-news__news-card,
.page-news__article-card,
.page-news__community-card,
.page-news__promotion-card {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark sections */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  max-width: 100%; /* Ensure card responsiveness */
  box-sizing: border-box;
}

.page-news__featured-articles-section .page-news__article-card,
.page-news__promotions-updates-section .page-news__promotion-card {
  background-color: #f8f8f8; /* Light background for light sections */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__news-card:hover,
.page-news__article-card:hover,
.page-news__community-card:hover,
.page-news__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

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

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

.page-news__featured-articles-section .page-news__card-title a,
.page-news__promotions-updates-section .page-news__card-title a {
  color: #333333;
}

.page-news__card-title a:hover {
  color: #26A9E0;
}

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

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

.page-news__featured-articles-section .page-news__card-description,
.page-news__promotions-updates-section .page-news__card-description {
  color: #555555;
}

.page-news__card-link {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  margin-top: auto;
}

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

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #000000; /* Dark background */
  color: #ffffff;
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
}

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

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

.page-news__faq-answer a {
  color: #26A9E0;
  text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }
  .page-news__hero-description {
    font-size: 1.1em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__news-grid,
  .page-news__article-grid,
  .page-news__community-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    height: 500px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure content is below fixed header on mobile */
  }
  .page-news__hero-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__section-subtitle {
    font-size: 1em;
  }
  .page-news__news-grid,
  .page-news__article-grid,
  .page-news__community-grid {
    grid-template-columns: 1fr;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    margin-right: 0;
    width: 100% !important; /* Ensure full width on mobile */
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to prevent overflow */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__card-image {
    height: auto !important;
    min-height: 150px !important; /* Adjust min height for mobile if needed */
  }
  .page-news__news-card,
  .page-news__article-card,
  .page-news__community-card,
  .page-news__promotion-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__container {
    padding: 0 15px !important; /* Add padding to containers on mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .page-news__latest-news-section,
  .page-news__featured-articles-section,
  .page-news__community-news-section,
  .page-news__promotions-updates-section,
  .page-news__faq-section {
    padding: 40px 0 !important;
  }

  /* Mobile video responsiveness */
  .page-news video,
  .page-news__hero-video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__hero-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-news__hero-video {
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
  }
  .page-news__hero-overlay {
    display: none; /* Hide overlay on mobile for better video visibility */
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }
  .page-news__hero-description {
    font-size: 0.9em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
  .page-news__card-title {
    font-size: 1.2em;
  }
  .page-news__faq-question {
    font-size: 1em;
    padding: 15px;
  }
  .page-news__faq-answer {
    padding: 0 15px 15px;
  }
}