/* style/news.css */

/* Base styles for the page content, ensuring contrast with dark body background */
.page-news {
  color: #ffffff; /* Light text for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body background is handled by shared.css */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.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: #26A9E0; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  color: #f0f0f0; /* Slightly off-white for description */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
  overflow: hidden;
  min-height: 500px;
  background-color: rgba(38, 169, 224, 0.1); /* Subtle brand color overlay */
}

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

.page-news__hero-section .page-news__container {
  position: relative;
  z-index: 1;
}

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

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

.page-news__cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

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

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

.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;
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
  background-color: #0d0d0d; /* Slightly lighter dark background for contrast */
}

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

.page-news__news-card {
  background-color: rgba(255, 255, 255, 0.08); /* Dark card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  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 8px 25px rgba(0, 0, 0, 0.4);
}

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

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

.page-news__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-news__card-title a {
  color: #26A9E0; /* Brand color for link titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-news__card-excerpt {
  color: #cccccc;
  font-size: 0.95em;
  margin-bottom: 15px;
  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: #FFFFFF;
}

/* Categories Section */
.page-news__categories-section {
  padding: 60px 0;
  background-color: #000000; /* Darker background for contrast with previous section */
}

.page-news__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-news__category-item {
  background-color: rgba(38, 169, 224, 0.15);
  border: 1px solid #26A9E0;
  border-radius: 25px;
  padding: 10px 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__category-item:hover {
  background-color: #26A9E0;
  transform: translateY(-3px);
}

.page-news__category-item a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
}

/* Why Us Section */
.page-news__why-us-section {
  padding: 60px 0;
  background-color: #0d0d0d; /* Again, slightly lighter dark background */
}

.page-news__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-news__feature-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__feature-icon {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
  /* filter: brightness(1.2); */ /* Removed filter to comply with rules */
}

.page-news__feature-title {
  font-size: 1.5em;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-news__feature-text {
  color: #cccccc;
  font-size: 0.95em;
}

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

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: rgba(38, 169, 224, 0.15);
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(38, 169, 224, 0.25);
}

.page-news__faq-title {
  font-size: 1.2em;
  color: #FFFFFF;
  margin: 0;
}

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

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Plus to X/minus for open state */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #cccccc;
  font-size: 0.95em;
}

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

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

/* CTA Bottom Section */
.page-news__cta-bottom {
  padding: 80px 0;
  background-color: #26A9E0; /* Strong brand color for final CTA */
  text-align: center;
}

.page-news__cta-bottom .page-news__section-title {
  color: #FFFFFF;
}

.page-news__cta-bottom .page-news__section-description {
  color: #f0f0f0;
}

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

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

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

  .page-news__hero-section {
    padding: 60px 0;
  }

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

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

  .page-news__cta-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

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

  .page-news__news-card {
    margin-bottom: 20px;
  }

  .page-news__card-image {
    height: 180px;
  }

  .page-news__card-title {
    font-size: 1.2em;
  }

  .page-news__category-list {
    flex-direction: column;
    align-items: center;
  }

  .page-news__category-item {
    width: 100%;
    text-align: center;
  }

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

  .page-news__feature-item {
    padding: 20px;
    margin-bottom: 20px;
  }

  .page-news__feature-icon {
    width: 200px !important;
    height: 200px !important;
  }

  .page-news__faq-question {
    padding: 15px;
  }

  .page-news__faq-title {
    font-size: 1.1em;
  }

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

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

  /* Image responsive rules for content area */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/content */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-articles,
  .page-news__categories-section,
  .page-news__why-us-section,
  .page-news__faq-section,
  .page-news__cta-bottom {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }
}

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