/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #1F2D3D; /* Text Main */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding */
  margin-bottom: 40px;
  background-color: #F4F7FB; /* Background */
  color: #1F2D3D; /* Text Main */
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-news__hero-content {
  max-width: 900px;
  margin: 40px auto;
  text-align: center;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2.5em, 5vw, 3.2em);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #1F2D3D; /* Text Main */
}

.page-news__intro-text {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #1F2D3D; /* Text Main */
}

/* CTA Buttons */
.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: none;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background: #ffffff;
  color: #2F6BFF; /* Main Color */
  border: 2px solid #2F6BFF; /* Main Color */
  margin-left: 15px;
}

.page-news__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.page-news__button-container {
    text-align: center;
    margin-top: 40px;
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background */
  color: #1F2D3D; /* Text Main */
}

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

.page-news__news-card {
  background: #FFFFFF; /* Card BG */
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  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 6px 20px rgba(0, 0, 0, 0.1);
}

.page-news__news-card img {
  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;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  color: #1F2D3D; /* Text Main */
}

.page-news__card-title a {
  text-decoration: none;
  color: #1F2D3D; /* Text Main */
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #2F6BFF; /* Main Color */
}

.page-news__card-excerpt {
  font-size: 0.95em;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  color: #1F2D3D; /* Text Main */
  margin-top: 10px;
}

.page-news__read-more {
  color: #2F6BFF; /* Main Color */
  text-decoration: none;
  font-weight: 600;
}

.page-news__read-more:hover {
  text-decoration: underline;
}

/* Categories Section */
.page-news__categories-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background */
  color: #1F2D3D; /* Text Main */
}

.page-news__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.page-news__category-card {
  background: #FFFFFF; /* Card BG */
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #1F2D3D; /* Text Main */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-news__category-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2F6BFF; /* Main Color */
}

.page-news__category-description {
  font-size: 0.95em;
  color: #1F2D3D; /* Text Main */
}

/* About News Section (Dark Background) */
.page-news__about-news-section {
  padding: 60px 0;
  background-color: #2F6BFF; /* Main Color */
  color: #ffffff; /* Forced white text for dark background */
}

.page-news__about-news-section .page-news__section-title {
  color: #ffffff;
}

.page-news__article-body {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.1em;
  line-height: 1.7;
  padding: 0 20px;
}

.page-news__article-body p {
  margin-bottom: 20px;
}

.page-news__article-body strong {
  font-weight: bold;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background */
  color: #1F2D3D; /* Text Main */
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #D6E2FF; /* Border */
  overflow: hidden;
  background: #FFFFFF; /* Card BG */
}

details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}

details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #f5f5f5;
}

.page-news__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D; /* Text Main */
}

.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #6FA3FF; /* Aux Color */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #F4F7FB; /* Background */
  border-radius: 0 0 5px 5px;
  color: #1F2D3D; /* Text Main */
}

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

/* CTA Section (Bottom) */
.page-news__cta-section {
  padding: 60px 0;
  background-color: #2F6BFF; /* Main Color */
  color: #ffffff;
  text-align: center;
}

.page-news__cta-section .page-news__section-title {
  color: #ffffff;
  margin-bottom: 20px;
}

.page-news__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-news__cta-buttons .page-news__btn-secondary {
  background: #ffffff;
  color: #2F6BFF; /* Main Color */
  border-color: #ffffff;
  margin-left: 0; /* Reset margin for flex gap */
}

.page-news__cta-buttons .page-news__btn-secondary:hover {
  background: #f0f0f0;
  color: #2F6BFF;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-image {
    height: 400px;
  }
  .page-news__main-title {
    font-size: clamp(2em, 4.5vw, 2.8em);
  }
  .page-news__section-title {
    font-size: 32px;
  }
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
  }

  .page-news__hero-image {
    height: auto !important;
    aspect-ratio: unset !important; /* Allow image to adapt its aspect ratio */
  }

  .page-news__hero-image img {
    object-fit: contain !important; /* Ensure image is fully visible, no cropping */
    width: 100% !important;
    height: auto !important;
  }

  .page-news__hero-content {
    margin: 20px auto;
    padding: 0 15px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
  }

  .page-news__intro-text {
    font-size: 1em;
  }

  .page-news__cta-button,
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: 0 !important; /* Reset margin for vertical stacking */
  }
  
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
  }

  .page-news__section-title {
    font-size: 26px;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .page-news__latest-news-section,
  .page-news__categories-section,
  .page-news__about-news-section,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 0;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__news-card img {
     /* Adjust card image height for mobile */
  }

  .page-news__categories-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-news__article-body {
    font-size: 1em;
    padding: 0 15px;
  }

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

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

  .page-news__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }

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

  /* General image responsiveness for all content images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}

/* Text colors for different backgrounds */
.page-news__light-bg {
  color: #1F2D3D; /* Text Main */
  background: #F4F7FB; /* Background */
}

.page-news__dark-bg {
  color: #ffffff; /* Forced white text */
  background: #2F6BFF; /* Main Color */
}