/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #0a0a0a; /* Ensure consistency with body background */
}

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

.page-news__dark-bg {
  background-color: #0a0a0a;
  color: #ffffff;
}

.page-news__light-bg {
  background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
  color: #ffffff;
}

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

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3;
}

.page-news__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #26A9E0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* General 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;
  word-wrap: break-word;
  max-width: 100%;
}

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

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

.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__btn-large {
    padding: 18px 35px;
    font-size: 1.1em;
}

/* Sections */
.page-news__latest-articles,
.page-news__cta-section,
.page-news__video-section,
.page-news__faq-section,
.page-news__download-app-cta {
  padding: 80px 0;
  text-align: center;
}

.page-news__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #26A9E0;
}

.page-news__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Articles Grid */
.page-news__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__article-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for images */
  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: 1.4em;
  margin-bottom: 10px;
  color: #26A9E0;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #26A9E0;
  text-decoration: none;
}

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

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

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

.page-news__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
  color: #1e87c0;
  text-decoration: underline;
}

/* CTA Section */
.page-news__cta-section {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.page-news__cta-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.2;
}

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

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

/* Video Section */
.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 40px auto 0;
  background-color: #000;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

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

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

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

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

.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;
  cursor: pointer;
  list-style: none; /* For details tag */
}

.page-news__faq-question::-webkit-details-marker {
  display: none; /* For details tag */
}

.page-news__faq-qtext {
  flex-grow: 1;
  margin-right: 15px;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #ffffff;
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg);
}

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

/* Download App CTA */
.page-news__download-app-cta {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.page-news__app-promo-image {
  margin-top: 50px;
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__section-title {
    font-size: 2.2em;
  }
  .page-news__cta-title {
    font-size: 2.5em;
  }
}

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

  .page-news__hero-section {
    padding: 80px 0;
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-news__hero-title {
    font-size: 2.5em;
  }

  .page-news__hero-description {
    font-size: 1em;
  }

  .page-news__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .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-left: 15px;
    padding-right: 15px;
  }

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

  .page-news__section-description {
    font-size: 0.95em;
  }

  .page-news__articles-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .page-news__article-card {
    margin-left: 0;
    margin-right: 0;
  }

  .page-news__article-image {
    height: 180px; /* Adjust height for mobile */
  }

  .page-news__cta-title {
    font-size: 2em;
  }

  .page-news__cta-description {
    font-size: 1em;
  }

  .page-news__video-section,
  .page-news__faq-section,
  .page-news__download-app-cta {
    padding: 60px 0;
  }

  .page-news__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 2em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__cta-title {
    font-size: 1.8em;
  }
  .page-news__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px 15px;
  }
  .page-news__btn-large {
    font-size: 1em;
    padding: 15px 25px;
  }
}