/* style/news.css */

/* Base styles and variables */
:root {
  --page-news-primary-color: #003366;
  --page-news-secondary-color: #FFCC00;
  --page-news-text-light: #ffffff;
  --page-news-text-dark: #333333;
  --page-news-background-dark: #000;
  --page-news-background-light: #f5f5f5;
  --page-news-border-color: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--page-news-text-light); /* Default to light text for dark body background */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  text-align: center;
  overflow: hidden;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px); /* Apply header offset */
  background-color: var(--page-news-primary-color);
}

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

.page-news__main-title {
  font-size: 3.5em;
  color: var(--page-news-text-light);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__lead-text {
  font-size: 1.3em;
  color: var(--page-news-text-light);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-news__btn-primary {
  background-color: var(--page-news-secondary-color);
  color: var(--page-news-primary-color);
  border: 2px solid var(--page-news-secondary-color);
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--page-news-text-light);
  border: 2px solid var(--page-news-text-light);
}

.page-news__btn-secondary:hover {
  background-color: var(--page-news-text-light);
  color: var(--page-news-primary-color);
}

/* Section common styles */
.page-news__announcements-section,
.page-news__insights-section,
.page-news__featured-articles-section,
.page-news__cta-section,
.page-news__faq-section {
  padding: 60px 0;
}

.page-news__announcements-section.page-news__light-bg,
.page-news__featured-articles-section.page-news__light-bg,
.page-news__faq-section.page-news__light-bg {
  background-color: var(--page-news-background-light);
  color: var(--page-news-text-dark);
}

.page-news__insights-section.page-news__dark-bg,
.page-news__cta-section.page-news__dark-bg {
  background-color: var(--page-news-primary-color);
  color: var(--page-news-text-light);
}

.page-news__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  text-align: center;
  color: inherit; /* Inherit color from section background */
}

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

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

.page-news__article-card {
  background-color: #ffffff;
  color: var(--page-news-text-dark);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
  min-width: 200px;
  min-height: 200px;
  filter: none !important;
}

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

.page-news__article-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  min-height: 60px; /* Ensure consistent height for titles */
}

.page-news__article-title a {
  color: var(--page-news-primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: var(--page-news-secondary-color);
}

.page-news__article-text {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Limit to 4 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-news__read-more {
  display: inline-flex;
  align-items: center;
  color: var(--page-news-secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: var(--page-news-primary-color);
}

.page-news__arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
  transform: translateX(5px);
}

/* CTA Section specific styles */
.page-news__cta-section {
  text-align: center;
  background-color: var(--page-news-primary-color);
  padding: 80px 0;
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
  color: var(--page-news-text-light);
}

.page-news__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

/* FAQ Section */
.page-news__faq-list {
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid var(--page-news-border-color);
}

.page-news__faq-item {
  border-bottom: 1px solid var(--page-news-border-color);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  color: var(--page-news-text-dark);
  transition: color 0.3s ease;
}

.page-news__faq-question:hover {
  color: var(--page-news-primary-color);
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  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 15px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

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

.page-news__faq-answer p {
  font-size: 1em;
  color: #555;
  padding-bottom: 10px;
}

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

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

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

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

  .page-news__lead-text {
    font-size: 1.1em;
  }

  .page-news__hero-buttons,
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

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

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

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

  .page-news__article-card,
  .page-news__announcements-section,
  .page-news__insights-section,
  .page-news__featured-articles-section,
  .page-news__cta-section,
  .page-news__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

/* Ensure images in content area are at least 200px */
.page-news img {
  min-width: 200px;
  min-height: 200px;
}

/* Specific override for article images to respect min-size if they are smaller than 200px due to parent container */
.page-news__article-image {
  min-width: 200px; /* Ensure article images are not too small */
  min-height: 200px;
}

/* Override for article image height on mobile to be auto */
@media (max-width: 768px) {
  .page-news__article-image {
    height: auto !important;
  }
}

/* No filter for images */
.page-news img {
  filter: none !important;
}