/* 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: #000000; /* Ensuring main content uses appropriate text color for dark body */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 80px 0;
  text-align: center;
  background-color: #26A9E0; /* Main brand color for hero */
  color: #ffffff;
  padding-top: calc(var(--header-offset, 120px) + 80px); /* Adjust for fixed header */
}

.page-news__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-news__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #EA7C07; /* Login color for primary CTA */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

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

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

.page-news__btn-secondary:hover {
  background-color: #e6f7ff;
  color: #1a8cc4;
}

/* Section Titles */
.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 50px;
  color: #26A9E0;
  font-weight: bold;
}

/* Latest Updates Section */
.page-news__latest-updates {
  padding: 80px 0;
  background-color: #f0f0f0; /* Light background for contrast */
  color: #333333;
}

.page-news__latest-updates .page-news__section-title {
  color: #26A9E0;
}

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

.page-news__news-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
}

.page-news__news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
}

.page-news__card-content {
  padding: 25px;
}

.page-news__card-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  min-height: 70px; /* Ensure consistent height */
}

.page-news__card-title a {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #1a8cc4;
}

.page-news__card-description {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  min-height: 90px; /* Ensure consistent height */
}

.page-news__read-more {
  display: inline-block;
  color: #EA7C07;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #d16b05;
}

/* Featured Article Section */
.page-news__featured-article {
  padding: 80px 0;
  background-color: #000000; /* Dark background */
  color: #ffffff;
}

.page-news__featured-article .page-news__section-title {
  color: #26A9E0;
}

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

.page-news__article-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 30px;
  display: block;
}

.page-news__article-subtitle {
  font-size: 2em;
  color: #26A9E0;
  margin-bottom: 25px;
  text-align: center;
}

.page-news__article-paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #f0f0f0; /* Light background */
  color: #333333;
}

.page-news__faq-section .page-news__section-title {
  color: #26A9E0;
}

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

.page-news__faq-item {
  background-color: #ffffff;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #fff;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #f5f5f5;
}

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

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

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #666666;
  background-color: #f9f9f9;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to contain content */
  padding: 15px 25px 25px;
}

.page-news__faq-answer p {
  margin: 0;
  padding: 0;
  font-size: 1em;
}

/* Call to Action Section */
.page-news__cta-section {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

.page-news__cta-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 2.8em;
  }

  .page-news__section-title {
    font-size: 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-top: calc(var(--header-offset, 120px) + 40px) !important;
    padding-bottom: 40px;
  }

  .page-news__main-title {
    font-size: 2.2em !important;
    margin-bottom: 15px;
  }

  .page-news__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 300px !important; /* Constrain width for better look */
    margin: 0 auto;
    display: block;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px;
  }

  .page-news__latest-updates,
  .page-news__featured-article,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 50px 0 !important;
  }

  .page-news__grid-layout {
    grid-template-columns: 1fr;
  }

  .page-news__card-title {
    font-size: 1.2em;
    min-height: auto; /* Allow height to adjust */
  }

  .page-news__card-description {
    font-size: 0.9em;
    min-height: auto; /* Allow height to adjust */
  }

  .page-news__article-subtitle {
    font-size: 1.6em;
  }

  .page-news__article-paragraph {
    font-size: 1em;
  }

  .page-news__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

  .page-news__faq-answer {
    padding: 0 20px;
  }

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px 20px;
  }

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

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

  /* Image and Video responsiveness */
  .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__container,
  .page-news__section,
  .page-news__card,
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-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;
  }
}

/* Color Contrast Adjustments for dark body background */
.page-news__dark-section {
  background-color: #000000;
  color: #ffffff;
}

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

/* Ensure all text elements within dark sections are light */
.page-news__dark-section p,
.page-news__dark-section li,
.page-news__dark-section h1,
.page-news__dark-section h2,
.page-news__dark-section h3,
.page-news__dark-section h4 {
  color: #ffffff;
}

.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__article-subtitle {
  color: #26A9E0; /* Brand accent */
}

/* Links in dark sections */
.page-news__dark-section a {
  color: #26A9E0;
}

.page-news__dark-section a:hover {
  color: #EA7C07;
}