/* style/news.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #050505;
  --background-light-card: rgba(255, 255, 255, 0.1);
  --background-white: #ffffff;
  --border-color: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--background-dark); /* Inherited from body */
}

/* Fixed navigation bar spacing */
.page-news__hero-banner {
  padding-top: 120px; /* Desktop: Adjust based on fixed header height */
}

@media (max-width: 768px) {
  .page-news__hero-banner {
    padding-top: 100px !important; /* Mobile: Adjust based on fixed header height */
  }
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-light);
}

.page-news__light-bg .page-news__section-title {
  color: var(--text-dark);
}

/* Hero Banner Section */
.page-news__hero-banner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px;
  background: linear-gradient(135deg, #007bff, #0056b3); /* Darker blue gradient */
  color: var(--text-light);
}

.page-news__hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-news__hero-title {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-news__cta-button:hover {
  background: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
  background-color: #f1f3f5; /* Light background for news articles */
  color: var(--text-dark);
}

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

.page-news__article-card {
  background: var(--background-white);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
}

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

.page-news__article-title a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-news__article-excerpt {
  font-size: 16px;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: var(--background-light-card);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-news__faq-question:hover {
  background: #0056b3;
  border-color: #0056b3;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__faq-question:active {
  background: #004085;
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-light);
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--text-light);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Change + to X visually */
  color: var(--secondary-color);
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  background: var(--background-light-card);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 0 8px 8px;
  color: var(--text-light);
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
}

.page-news__faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 40px;
  }
  .page-news__hero-description {
    font-size: 18px;
  }
  .page-news__section-title {
    font-size: 30px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__article-excerpt {
    font-size: 15px;
  }
  .page-news__faq-question h3 {
    font-size: 17px;
  }
  .page-news__faq-toggle {
    font-size: 26px;
    width: 30px;
    height: 30px;
  }
  .page-news__faq-answer p {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__hero-banner {
    padding-bottom: 40px;
  }
  .page-news__hero-title {
    font-size: 32px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-news__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  .page-news__latest-articles, .page-news__faq-section {
    padding: 40px 0;
  }
  .page-news__article-grid {
    gap: 20px;
  }
  .page-news__article-image {
    height: 160px;
  }
  .page-news__article-content {
    padding: 20px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-excerpt {
    font-size: 14px;
  }
  .page-news__read-more-link {
    font-size: 14px;
  }
  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-question h3 {
    font-size: 16px;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-news__faq-answer {
    padding: 0 20px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }

  /* Mobile image adaptation */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__hero-banner,
  .page-news__latest-articles,
  .page-news__faq-section,
  .page-news__container,
  .page-news__article-card,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Ensure contrast for light background sections */
.page-news__light-bg {
  color: var(--text-dark);
}

.page-news__light-bg .page-news__article-card {
  background: var(--background-white);
  color: var(--text-dark);
}

.page-news__light-bg .page-news__article-title a {
  color: var(--text-dark);
}

.page-news__light-bg .page-news__article-excerpt {
  color: #555555;
}

/* Ensure contrast for dark background sections */
.page-news__dark-bg {
  color: var(--text-light);
}

.page-news__dark-bg .page-news__faq-item {
  background-color: var(--background-light-card);
  color: var(--text-light);
}

.page-news__dark-bg .page-news__faq-question {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-news__dark-bg .page-news__faq-question h3 {
  color: var(--text-light);
}

.page-news__dark-bg .page-news__faq-toggle {
  color: var(--text-light);
}

.page-news__dark-bg .page-news__faq-item.active .page-news__faq-toggle {
  color: var(--secondary-color);
}

.page-news__dark-bg .page-news__faq-answer {
  background: var(--background-light-card);
  color: var(--text-light);
}