:root {
  --primary-color: #017439; /* Main color */
  --secondary-color: #FFFFFF; /* Auxiliary color */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #017439; /* Using primary color for dark background */
  --button-register: #C30808;
  --button-login: #C30808;
  --button-text-yellow: #FFFF00;
  --border-color: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--bg-light); /* Explicitly setting for clarity, though body is handled by shared */
}

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

.page-news__section-title {
  font-size: 32px;
  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(--button-register); /* Using a custom color for emphasis */
  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: 10px; /* Small top padding, body handles header offset */
  background-color: var(--bg-light);
}

.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%; /* Ensure full width on desktop before max-width */
}

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

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Ensure image meets min size requirement */
  transition: transform 0.3s ease;
}

.page-news__hero-image img:hover {
  transform: scale(1.02);
}

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

.page-news__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem); /* Using clamp for H1 as allowed, with appropriate range */
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 18px;
  color: var(--text-dark);
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-news__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-news__cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background: var(--button-register); /* Register color */
  color: var(--button-text-yellow); /* Yellow text for contrast */
  border: 2px solid var(--button-register);
}

.page-news__btn-primary:hover {
  background: #A80707; /* Darker shade of #C30808 */
  box-shadow: 0 6px 15px rgba(195, 8, 8, 0.3);
  transform: translateY(-3px);
}

.page-news__btn-secondary {
  background: var(--button-login); /* Login color */
  color: var(--button-text-yellow); /* Yellow text for contrast */
  border: 2px solid var(--button-login);
}

.page-news__btn-secondary:hover {
  background: #A80707; /* Darker shade of #C30808 */
  box-shadow: 0 6px 15px rgba(195, 8, 8, 0.3);
  transform: translateY(-3px);
}

/* Articles Section */
.page-news__articles-section,
.page-news__latest-blog-section,
.page-news__faq-section,
.page-news__cta-section {
  padding: 80px 0;
}

.page-news__articles-section {
  background-color: var(--bg-light);
}

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

.page-news__article-card,
.page-news__blog-card {
  background: #ffffff;
  border-radius: 12px;
  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,
.page-news__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.page-news__article-image,
.page-news__blog-image {
  width: 100%;
  height: 200px; /* Fixed height for cards, ensuring min 200px */
  object-fit: cover;
  display: block;
  min-height: 200px; /* Ensure image meets min size requirement */
}

.page-news__article-content,
.page-news__blog-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-news__article-title,
.page-news__blog-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-excerpt,
.page-news__blog-excerpt {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__article-date,
.page-news__blog-date {
  font-size: 14px;
  color: #777;
  text-align: right;
  display: block;
}

.page-news__view-all {
  text-align: center;
  margin-top: 50px;
}

/* Latest Blog Section */
.page-news__latest-blog-section {
  background-color: var(--bg-dark);
  color: var(--text-light); /* Light text for dark background */
}

.page-news__latest-blog-section .page-news__section-title {
  color: var(--text-light);
}

.page-news__latest-blog-section .page-news__section-title::after {
  background-color: var(--button-text-yellow); /* Yellow line for dark section */
}

.page-news__latest-blog-section .page-news__blog-title {
  color: var(--text-light);
}

.page-news__latest-blog-section .page-news__blog-excerpt {
  color: rgba(255, 255, 255, 0.8);
}

.page-news__latest-blog-section .page-news__blog-date {
  color: rgba(255, 255, 255, 0.6);
}

/* CTA Section */
.page-news__cta-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
  text-align: center;
}

.page-news__cta-section .page-news__section-title {
  color: var(--text-light);
}

.page-news__cta-section .page-news__section-title::after {
  background-color: var(--button-text-yellow);
}

.page-news__cta-section p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: rgba(255, 255, 255, 0.9);
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
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;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}
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;
  line-height: 1.5;
  text-align: left;
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-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: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: var(--text-dark);
}
.page-news__faq-answer p {
  margin-top: 0;
  margin-bottom: 0;
}
.page-news__faq-answer a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-news__section-title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px; /* Add padding for content areas */
  }

  .page-news__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* Ensure small top padding */
  }

  .page-news__hero-image {
    margin-bottom: 20px;
    border-radius: 8px;
  }

  .page-news__hero-content {
    padding: 0 10px;
  }

  .page-news__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem); /* Adjust H1 for mobile, still using clamp */
    margin-bottom: 15px;
  }

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

  .page-news__cta-group {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 15px;
    box-sizing: border-box !important;
  }

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

  .page-news__articles-section,
  .page-news__latest-blog-section,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 0;
  }

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

  .page-news__article-grid,
  .page-news__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__article-card,
  .page-news__blog-card {
    border-radius: 8px;
  }

  .page-news__article-image,
  .page-news__blog-image {
    height: 180px; /* Adjust height for mobile, maintaining min-height for content */
    min-height: 180px; /* Maintain min height */
  }

  .page-news__article-content,
  .page-news__blog-content {
    padding: 15px;
  }

  .page-news__article-title,
  .page-news__blog-title {
    font-size: 18px;
  }

  .page-news__article-excerpt,
  .page-news__blog-excerpt {
    font-size: 14px;
  }

  .page-news__view-all {
    margin-top: 30px;
  }

  details.page-news__faq-item summary.page-news__faq-question { padding: 15px; font-size: 15px; }
  .page-news__faq-qtext { font-size: 15px; }
  .page-news__faq-toggle { font-size: 20px; width: 24px; height: 24px; }
  details.page-news__faq-item .page-news__faq-answer { padding: 0 15px 15px; }

  /* Image responsiveness for all img tags within .page-news */
  .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;
  }
}