/* Base Styles */
.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--Text-Main); /* Default text color for light backgrounds */
  background-color: var(--Deep-Navy); /* Ensure content has proper background */
}

.page-news__section-padding {
  padding: 60px 0;
}

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

.page-news__section-title {
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  color: var(--Text-Main);
}

.page-news__section-subtitle {
  font-size: 18px;
  text-align: center;
  color: var(--Text-Secondary);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
}

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

.page-news__hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  box-sizing: border-box;
}

.page-news__main-title {
  color: var(--Text-Main);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 900px;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.page-news__hero-description {
  color: var(--Text-Secondary);
  font-size: 20px;
  max-width: 700px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-news__btn-primary {
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-news__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* News Grid Layout */
.page-news__latest-updates {
  background-color: var(--Deep-Navy);
  color: var(--Text-Main);
}

.page-news__grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.page-news__news-card {
  background-color: var(--Card-B-G);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  border: 1px solid var(--Border);
}

.page-news__news-card:hover {
  transform: translateY(-8px);
}

.page-news__card-link {
  text-decoration: none;
  display: block;
  height: 100%;
  color: inherit;
}

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

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

.page-news__card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--Text-Main);
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__card-meta {
  font-size: 14px;
  color: var(--Text-Secondary);
  margin-bottom: 15px;
}

.page-news__card-description {
  font-size: 16px;
  color: var(--Text-Secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-news__read-more {
  display: inline-flex;
  align-items: center;
  color: var(--Auxiliary-Color);
  font-weight: 600;
  font-size: 16px;
}

.page-news__read-more span[aria-hidden="true"] {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-news__news-card:hover .page-news__read-more span[aria-hidden="true"] {
  transform: translateX(5px);
}

/* Pagination */
.page-news__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  gap: 10px;
}

.page-news__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--Text-Secondary);
  background-color: var(--Card-B-G);
  border: 1px solid var(--Border);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  font-weight: 500;
}

.page-news__pagination-link:hover:not(.page-news__pagination-link--active):not(.page-news__pagination-link--disabled) {
  background-color: #1a3a69;
  color: var(--Text-Main);
  border-color: var(--Auxiliary-Color);
}

.page-news__pagination-link--active {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  border-color: #2B73F6;
  cursor: default;
}

.page-news__pagination-link--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Category News Section */
.page-news__category-news {
  background-color: var(--Deep-Navy);
  color: var(--Text-Main);
}

.page-news__category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
}

.page-news__category-card {
  background-color: var(--Card-B-G);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--Border);
}

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

.page-news__category-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--Text-Main);
  margin-bottom: 10px;
}

.page-news__category-count {
  font-size: 16px;
  color: var(--Text-Secondary);
}

/* Featured Articles */
.page-news__featured-articles {
  background-color: var(--Deep-Navy);
  color: var(--Text-Main);
}

.page-news__featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.page-news__featured-card {
  background-color: var(--Card-B-G);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  border: 1px solid var(--Border);
}

.page-news__featured-card:hover {
  transform: translateY(-8px);
}

/* FAQ Section */
.page-news__faq-section {
  background-color: var(--Deep-Navy);
  color: var(--Text-Main);
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid var(--Border);
  overflow: hidden;
  background: var(--Card-B-G);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  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: #1a3a69; /* Slightly lighter Card-B-G for hover */
}

.page-news__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--Text-Main);
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--Auxiliary-Color);
  flex-shrink: 0;
  margin-left: 20px;
  width: 32px;
  text-align: center;
}

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 25px;
  background: var(--Card-B-G);
  border-radius: 0 0 12px 12px;
  color: var(--Text-Secondary);
  font-size: 16px;
  line-height: 1.6;
}

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

/* General Image and Button Responsiveness */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensures images fill their space nicely */
}

.page-news__btn-primary,
.page-news__btn-secondary,
.page-news a[class*="button"],
.page-news a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-buttons,
.page-news__button-group,
.page-news__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media Queries for Responsiveness */

/* Tablet and Mobile */
@media (max-width: 1024px) {
  .page-news__hero-image {
    height: 600px;
  }

  .page-news__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .page-news__hero-description {
    font-size: 18px;
  }

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

  .page-news__section-subtitle {
    font-size: 16px;
  }

  .page-news__grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

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

  .page-news__card-title {
    font-size: 20px;
  }

  .page-news__category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .page-news__category-title {
    font-size: 22px;
  }

  .page-news__featured-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

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

  .page-news__faq-toggle {
    font-size: 26px;
    width: 30px;
  }

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

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Hero Section Mobile */
  .page-news__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
  }

  .page-news__hero-image {
    height: 400px; /* Adjust height for mobile */
    object-fit: cover; /* Ensure it covers the area */
    object-position: center; /* Center the image */
  }

  .page-news__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    padding: 0 10px;
  }

  .page-news__hero-description {
    font-size: 16px;
    padding: 0 10px;
  }

  .page-news__btn-primary {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* News Grid Mobile */
  .page-news__grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__card-image {
    height: 160px;
  }

  .page-news__card-title {
    font-size: 18px;
  }

  .page-news__card-description {
    font-size: 15px;
  }

  .page-news__pagination-link {
    min-width: 36px;
    height: 36px;
    font-size: 14px;
  }

  /* Category News Mobile */
  .page-news__category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .page-news__category-card {
    padding: 20px 15px;
  }

  .page-news__category-title {
    font-size: 18px;
  }

  .page-news__category-count {
    font-size: 14px;
  }

  /* Featured Articles Mobile */
  .page-news__featured-grid {
    grid-template-columns: 1fr;
  }

  /* FAQ Mobile */
  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px;
  }

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

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

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

  .page-news__section-padding {
    padding: 40px 0;
  }

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

  .page-news__section-subtitle {
    font-size: 15px;
    margin-bottom: 30px;
  }

  /* General Button Responsiveness */
  .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;
  }

  .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-wrap: wrap !important;
    gap: 10px;
  }

  .page-news__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}