:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f9f9f9; /* Slightly off-white for sections */
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --button-login: #EA7C07;
}

/* Base styles for the news page */
.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white); /* Body background is default white */
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* HERO Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background: linear-gradient(135deg, var(--primary-color) 0%, #a7e0ff 100%); /* Lighter blue gradient */
  color: var(--text-light);
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-news__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-height: 200px; /* Ensure minimum size */
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-news__main-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-login); /* Use specific login color for CTA */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-news__cta-button:hover {
  background: #c76a06; /* Darken on hover */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-news__latest-articles {
  background-color: var(--bg-light);
  padding: 80px 0;
}

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

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

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

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

.page-news__article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  min-height: 200px; /* Ensure minimum size */
}

.page-news__article-card:hover .page-news__article-image img {
  transform: scale(1.05);
}

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

.page-news__article-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-news__article-title a:hover {
  color: #1e85b3; /* Darken on hover */
}

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

.page-news__read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #1e85b3; /* Darken on hover */
}

.page-news__read-more span {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-news__read-more:hover span {
  transform: translateX(5px);
}

/* Featured Article Section */
.page-news__featured-article {
  background-color: var(--primary-color); /* Dark background */
  color: var(--text-light); /* Light text */
  padding: 80px 0;
}

.page-news__featured-article .page-news__section-title {
  color: var(--text-light);
}

.page-news__featured-article .page-news__section-title::after {
  background-color: var(--text-light);
}

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

.page-news__content-area h3 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-news__content-area h4 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-news__content-area p {
  margin-bottom: 15px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-light);
}

.page-news__content-area ol {
  list-style-type: decimal;
  margin-left: 25px;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-news__content-area ol li {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-light);
}

.page-news__content-area strong {
  color: var(--secondary-color); /* Highlight keywords */
}

.page-news__btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-login); /* Use specific login color */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-news__btn-primary:hover {
  background: #c76a06; /* Darken on hover */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-news__faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-news__faq-illustration {
  text-align: center;
}

.page-news__faq-illustration img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  min-height: 200px;
}

.page-news__faq-list {
  display: flex;
  flex-direction: column;
}

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.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 20px;
  opacity: 0;
  background: var(--bg-white);
  color: var(--text-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

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

.page-news__faq-item.active .page-news__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--primary-color);
  background-color: #eaf6fc; /* Lighter shade of primary for active question */
}

.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: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: inherit; /* Inherit color from parent for active state */
}

.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  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: 28px;
  height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--button-login); /* Change color for active toggle */
  transform: rotate(180deg);
}

/* General Link Styling (ensure color contrast) */
.page-news a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-news a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 40px;
  }
  .page-news__hero-description {
    font-size: 18px;
  }
  .page-news__section-title {
    font-size: 32px;
  }
  .page-news__article-title {
    font-size: 22px;
  }
  .page-news__faq-grid {
    grid-template-columns: 1fr;
  }
  .page-news__faq-illustration {
    order: 2; /* Move illustration below FAQ list on smaller screens */
    margin-top: 40px;
  }
  .page-news__faq-list {
    order: 1;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

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

  /* Fixed header offset for mobile */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
  }

  .page-news__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-news__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    margin-top: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

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

  .page-news__article-content {
    padding: 20px;
  }

  .page-news__article-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .page-news__article-summary {
    font-size: 15px;
    margin-bottom: 15px;
  }

  .page-news__read-more {
    font-size: 15px;
  }

  .page-news__content-area {
    padding: 0 15px;
  }
  .page-news__content-area h3 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
  }
  .page-news__content-area h4 {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 10px;
  }
  .page-news__content-area p,
  .page-news__content-area ol li {
    font-size: 16px;
  }
  .page-news__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 25px;
    font-size: 16px;
    margin-top: 25px;
  }

  .page-news__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-news__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-news__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-news__faq-answer {
    padding: 0 15px;
  }
  
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__hero-image img,
  .page-news__article-image img,
  .page-news__faq-illustration img {
    min-width: unset; /* Override min-width for mobile */
    min-height: unset; /* Override min-height for mobile */
  }

  .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;
  }
}