/* 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: #1a1a1a; /* Assuming body background from shared.css */
}

.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 40px 0;
  text-align: center;
  background: linear-gradient(135deg, #0A246A, #1a1a1a);
  color: #ffffff;
  padding-top: var(--header-offset, 120px); /* Assuming shared.css does NOT set body padding-top */
}

.page-news__hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-news__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #FFD700; /* Auxiliary color for main title */
  line-height: 1.2;
}

.page-news__intro-text {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.page-news__hero-image {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Content Section */
.page-news__content-section {
  padding: 60px 0;
  background-color: #1a1a1a; /* Dark background */
  color: #ffffff; /* Light text for dark background */
}

.page-news__dark-section {
  background-color: #1a1a1a;
  color: #ffffff;
}

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

.page-news__section-heading {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #FFD700;
}

.page-news__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.8;
  opacity: 0.9;
}

.page-news__news-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 50px;
}

.page-news__category-link {
  display: inline-block;
  padding: 10px 25px;
  background-color: #0A246A;
  color: #ffffff;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 1px solid #0A246A;
}

.page-news__category-link:hover {
  background-color: #FFD700;
  color: #0A246A;
  transform: translateY(-3px);
  border-color: #FFD700;
}

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

.page-news__article-card {
  background-color: #0A246A; /* Dark card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

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

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

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for article images */
  overflow: hidden;
}

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

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

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
  color: #FFD700; /* Auxiliary color for article titles */
  line-height: 1.4;
}

.page-news__article-excerpt {
  font-size: 16px;
  margin-bottom: 15px;
  flex-grow: 1;
  opacity: 0.8;
}

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

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

.page-news__pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
}

.page-news__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #0A246A;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50%;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link.active,
.page-news__pagination-link:hover {
  background-color: #FFD700;
  color: #0A246A;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #f8f9fa; /* Light background for CTA */
  color: #333333; /* Dark text for light background */
}

.page-news__cta-title {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #0A246A;
}

.page-news__cta-description {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto 40px auto;
  opacity: 0.9;
}

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

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

.page-news__btn-primary {
  background-color: #0A246A;
  color: #ffffff;
  border: 2px solid #0A246A;
}

.page-news__btn-primary:hover {
  background-color: #FFD700;
  color: #0A246A;
  border-color: #FFD700;
  transform: translateY(-3px);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #0A246A;
  border: 2px solid #0A246A;
}

.page-news__btn-secondary:hover {
  background-color: #0A246A;
  color: #ffffff;
  transform: translateY(-3px);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #1a1a1a; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-news__faq-main-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 50px;
  color: #FFD700;
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #0A246A;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background-color: #0A246A;
  color: #ffffff;
  border: 1px solid #0A246A;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background-color: #1a3c8a;
  border-color: #1a3c8a;
}

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

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

.page-news__faq-item.active .page-news__faq-toggle {
  color: #ffffff;
  transform: rotate(180deg);
}

.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-color: #1a3c8a; /* Slightly lighter dark background */
  color: #f0f0f0;
  border-radius: 0 0 8px 8px;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Ensure it expands sufficiently */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-news__faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* Global image responsive styles */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 42px;
  }
  .page-news__section-heading {
    font-size: 32px;
  }
  .page-news__cta-title {
    font-size: 32px;
  }
  .page-news__faq-main-title {
    font-size: 32px;
  }
  .page-news__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__hero-section {
    padding-top: var(--header-offset-tablet, 100px);
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 60px 15px 30px 15px;
    padding-top: var(--header-offset-mobile, 80px) !important; /* Ensure mobile header offset */
  }
  .page-news__hero-container {
    padding: 0;
  }
  .page-news__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-news__intro-text {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-news__hero-image {
    border-radius: 8px;
  }
  .page-news__content-section {
    padding: 40px 0;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__section-heading {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-news__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-news__news-categories {
    gap: 10px;
    margin-bottom: 40px;
  }
  .page-news__category-link {
    padding: 8px 20px;
    font-size: 14px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-excerpt {
    font-size: 14px;
  }
  .page-news__pagination {
    margin-top: 30px;
  }
  .page-news__pagination-link {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  .page-news__cta-section {
    padding: 60px 0;
  }
  .page-news__cta-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-news__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important; /* Forced responsive width */
    max-width: 100% !important;
    padding: 12px 25px;
    font-size: 16px;
  }
  .page-news__faq-section {
    padding: 60px 0;
  }
  .page-news__faq-main-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-news__faq-item {
    margin-bottom: 10px;
  }
  .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;
  }
  .page-news__faq-answer p {
    font-size: 15px;
  }

  /* Ensure all images are responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* All containers with images */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-image,
  .page-news__article-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left and padding-right are handled by .page-news__container for overall content */
  }

  /* Specific overrides to prevent horizontal scroll for overall content */
  .page-news {
    overflow-x: hidden;
  }
}