:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-button-color: #C30808;
  --login-button-color: #C30808;
  --button-text-color: #FFFF00;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-color-light: #ffffff;
  --background-color-dark: #017439;
}

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light body background */
  background-color: var(--background-color-light);
}

.page-resources__section {
  padding: 60px 20px;
  text-align: center;
}

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

.page-resources__section-title {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: bold;
}

.page-resources__text-block {
  font-size: 18px;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* 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); /* Ensures content is not hidden by fixed header */
  color: var(--text-color-light);
  background: var(--background-color-dark);
}

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

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

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

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

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

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--register-button-color);
  color: var(--button-text-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-resources__cta-button:hover {
  background: darken(var(--register-button-color), 10%); /* Placeholder for darken */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__cta-button--secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-resources__cta-button--secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
}

/* General Intro Section */
.page-resources__general-intro .page-resources__section-title {
  color: var(--primary-color);
}

/* Resource Categories Section */
.page-resources__resource-categories .page-resources__section-title {
  color: var(--primary-color);
}

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

.page-resources__card {
  background: var(--background-color-light);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--text-color-dark);
  display: flex;
  flex-direction: column;
}

.page-resources__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

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

.page-resources__card-title {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--primary-color);
  font-weight: 600;
}

.page-resources__card-description {
  font-size: 16px;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 3px;
}

.page-resources__read-more:hover {
  color: darken(var(--primary-color), 10%); /* Placeholder for darken */
}

/* News Updates Section */
.page-resources__news-updates {
  background: var(--background-color-dark);
  color: var(--text-color-light);
}

.page-resources__news-updates .page-resources__section-title {
  color: var(--text-color-light);
}

.page-resources__news-updates .page-resources__text-block {
  color: var(--text-color-light);
}

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

.page-resources__news-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  padding-bottom: 20px;
}

.page-resources__news-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-resources__news-title {
  font-size: 22px;
  color: var(--text-color-light);
  margin: 0 20px 10px;
  font-weight: 600;
}

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

.page-resources__news-title a:hover {
  color: var(--button-text-color);
}

.page-resources__news-meta {
  font-size: 14px;
  color: #ccc;
  margin: 0 20px 10px;
}

.page-resources__news-excerpt {
  font-size: 16px;
  color: #e0e0e0;
  margin: 0 20px;
}

.page-resources__button-group {
  margin-top: 40px;
}

/* FAQ Section */
.page-resources__faq-section .page-resources__section-title {
  color: var(--primary-color);
}

.page-resources__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-resources__faq-item.active .page-resources__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.page-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

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

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

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change to minus sign visually */
}

.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.3s ease;
  padding: 0 25px;
  opacity: 0;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px 25px !important;
  opacity: 1;
  background: #f9f9f9;
}

.page-resources__faq-answer p {
  margin: 0;
  font-size: 16px;
  color: #555;
}

/* Contact CTA Section */
.page-resources__contact-cta {
  background: var(--background-color-dark);
  color: var(--text-color-light);
  padding-bottom: 80px;
}

.page-resources__contact-cta .page-resources__section-title {
  color: var(--text-color-light);
}

.page-resources__contact-cta .page-resources__text-block {
  color: var(--text-color-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__section-title {
    font-size: 30px;
  }
  .page-resources__hero-description, .page-resources__text-block {
    font-size: 17px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__news-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
  }
  .page-resources__hero-title {
    font-size: 32px;
  }
  .page-resources__hero-description {
    font-size: 16px;
  }
  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: auto;
    margin-right: auto;
  }
  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__section-title {
    font-size: 26px;
  }
  .page-resources__text-block {
    font-size: 16px;
  }

  /* Images responsive */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-resources__card-image {
    height: 200px;
  }
  .page-resources__news-image {
    height: 180px;
  }
  .page-resources__card-grid, .page-resources__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__card, .page-resources__news-item {
    margin-left: 0;
    margin-right: 0;
  }

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

  /* Button group for mobile */
  .page-resources__button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .page-resources__button-group .page-resources__cta-button {
    margin-top: 0;
  }
}