:root {
  --primary-color: #017439;
  --primary-color-darker: #006030; /* Darkened primary color */
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-register: #C30808;
  --button-register-darker: #A00707; /* Darkened register button color */
  --button-login: #C30808;
  --font-register-login: #FFFF00;
  --border-color: #e0e0e0;
  --background-light: #f9f9f9;
}

/* Base styles for the page content */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background: var(--secondary-color); /* Default background color from shared.css */
}

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

.page-resources__section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.page-resources__section:last-of-type {
  border-bottom: none;
}

.page-resources__section-title {
  font-size: 32px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-resources__sub-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 15px;
}

.page-resources__text-block {
  font-size: 16px;
  margin-bottom: 20px;
}

/* Links within content */
.page-resources a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources a:hover {
  color: var(--primary-color-darker);
  text-decoration: underline;
}

/* Hero Section */
.page-resources__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 spacing */
  background: linear-gradient(135deg, var(--primary-color), #308a5e); /* Gradient for visual appeal */
  color: var(--text-light); /* Light text for dark background */
}

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

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 800px; /* Constrain hero image width */
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

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

.page-resources__hero-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
}

.page-resources__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-register); /* Specific color for CTA */
  color: var(--font-register-login); /* Specific color for CTA text */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%; /* Mobile button adaptation */
  box-sizing: border-box; /* Mobile button adaptation */
  white-space: normal; /* Mobile button adaptation */
  word-wrap: break-word; /* Mobile button adaptation */
}

.page-resources__cta-button:hover {
  background: var(--button-register-darker);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Section specific colors */
.page-resources__light-bg {
  background: var(--secondary-color);
  color: var(--text-dark);
}

.page-resources__dark-bg {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-resources__dark-bg .page-resources__section-title,
.page-resources__dark-bg .page-resources__sub-title {
  color: var(--text-light);
}

.page-resources__dark-bg a {
  color: var(--font-register-login); /* Brighter link color on dark background */
}

.page-resources__dark-bg a:hover {
  color: #fff;
}

/* Content Grid for sections with image and text */
.page-resources__content-grid {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-resources__content-grid--reverse {
  flex-direction: row-reverse;
}

.page-resources__image-wrapper {
  flex: 1;
  min-width: 300px; /* Minimum width for image wrapper */
}

.page-resources__image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

.page-resources__text-content {
  flex: 1;
  min-width: 300px; /* Minimum width for text content */
}

/* General Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid;
  cursor: pointer;
  margin-top: 15px;
  max-width: 100%; /* Mobile button adaptation */
  box-sizing: border-box; /* Mobile button adaptation */
  white-space: normal; /* Mobile button adaptation */
  word-wrap: break-word; /* Mobile button adaptation */
}

.page-resources__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
}

.page-resources__btn-primary:hover {
  background: var(--primary-color-darker);
  border-color: var(--primary-color-darker);
  transform: translateY(-1px);
}

.page-resources__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-resources__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-1px);
}

/* FAQ Section */
.page-resources__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

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

.page-resources__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 15px;
  opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Using !important */
  padding: 20px 15px !important; /* 🚨 Using !important */
  opacity: 1;
  background: var(--background-light);
  border-radius: 0 0 5px 5px;
}

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

.page-resources__faq-question:hover {
  background: var(--background-light);
  border-color: #d0d0d0;
}

.page-resources__faq-question:active {
  background: #eeeeee;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click */
  color: var(--text-dark);
}

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

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(180deg); /* Rotate for minus sign visual */
}

/* News Section */
.page-resources__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__news-card {
  background: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
}

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

.page-resources__news-card img {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

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

.page-resources__card-title {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-resources__card-title a {
  color: var(--primary-color);
  text-decoration: none;
}

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

.page-resources__card-excerpt {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
}

.page-resources__card-link {
  display: inline-block;
  font-size: 14px;
  color: var(--primary-color);
  font-weight: bold;
}

.page-resources__button-group {
  text-align: center;
  margin-top: 50px;
}

/* Contact Section */
.page-resources__contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  list-style: none;
  padding: 0;
}

.page-resources__contact-item {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: var(--text-dark);
}

.page-resources__contact-item .page-resources__sub-title {
  font-size: 20px;
  margin-top: 0;
  color: var(--primary-color);
}

.page-resources__contact-item p {
  font-size: 15px;
  margin-bottom: 20px;
  min-height: 60px; /* Ensure consistent height for text */
}