/* style/news.css */
:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --accent-color: #CC0000;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Body background is dark, so text should be light */
  background-color: var(--bg-dark); /* Inherited from shared.css, but ensure consistency */
}

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

.page-news__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 60px 0;
}

.page-news__light-bg {
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: 60px 0;
}

/* Ensure the first section has padding-top to avoid being hidden by fixed header */
.page-news__hero-section {
  padding-top: 120px; /* Desktop: Adjust based on fixed header height */
}

.page-news__main-title {
  font-size: 42px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-news__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.page-news__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

.page-news__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

.page-news__section-description {
  font-size: 17px;
  text-align: center;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dark);
}

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

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

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

.page-news__article-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: var(--text-dark);
}

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

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 20px 10px 20px;
  color: var(--primary-color);
  flex-grow: 1;
}

.page-news__article-excerpt {
  font-size: 15px;
  margin: 0 20px 15px 20px;
  color: #555555;
}

.page-news__article-date {
  font-size: 14px;
  color: #888888;
  margin: 0 20px 20px 20px;
  display: block;
}

.page-news__insights-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__sub-title {
  font-size: 28px;
  font-weight: bold;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-news__insights-section p {
  margin-bottom: 15px;
  font-size: 17px;
  line-height: 1.7;
}

.page-news__list {
  list-style: disc inside;
  margin-bottom: 20px;
  padding-left: 20px;
}

.page-news__list li {
  margin-bottom: 10px;
  font-size: 16px;
}

.page-news__insights-cta {
  margin-top: 40px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

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

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Rotate to form 'x' or use '-' */
}

.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 15px;
  opacity: 0;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 38px;
  }
  .page-news__section-title {
    font-size: 32px;
  }
  .page-news__sub-title {
    font-size: 24px;
  }
}

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

  .page-news__main-title {
    font-size: 30px;
    margin-bottom: 15px;
  }

  .page-news__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

  .page-news__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-news__section-title {
    font-size: 28px;
  }

  .page-news__section-description {
    font-size: 15px;
    margin-bottom: 40px;
  }

  .page-news__articles-section,
  .page-news__insights-section,
  .page-news__faq-section {
    padding: 40px 0;
  }

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

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

  .page-news__article-title {
    font-size: 18px;
    margin: 15px;
  }

  .page-news__article-excerpt,
  .page-news__article-date {
    font-size: 13px;
    margin: 0 15px 15px 15px;
  }

  .page-news__sub-title {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-news__insights-section p,
  .page-news__list li {
    font-size: 15px;
  }

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

  .page-news__faq-question h3 {
    font-size: 15px;
  }

  .page-news__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }

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

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

  .page-news__article-card, .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-news__articles-grid {
    gap: 20px;
  }
  
  .page-news__faq-list {
    padding: 0 15px;
    box-sizing: border-box !important;
  }
}