.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #1a1a2e; /* Inherited from body, for context */
}

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

.page-resources__hero-section {
  position: relative;
  width: 100%;
  padding: 80px 0;
  text-align: center;
  background: #017439; /* Brand color for hero background */
  color: #ffffff;
  padding-top: calc(var(--header-offset, 120px) + 80px); /* Adjust for fixed header */
  box-sizing: border-box;
}

.page-resources__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__section {
  padding: 60px 0;
  box-sizing: border-box;
}

.page-resources__section-title {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-resources__sub-title {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-resources__text-block p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: #f0f0f0;
}

/* Colors based on body background: #1a1a2e (dark) */
.page-resources__dark-bg {
  background-color: #1a1a2e;
  color: #ffffff;
}

.page-resources__light-bg {
  background-color: #ffffff;
  color: #333333; /* Dark text for light background */
}

/* Ensure contrast for text on light background */
.page-resources__light-bg .page-resources__section-title,
.page-resources__light-bg .page-resources__section-description,
.page-resources__light-bg .page-resources__text-block p,
.page-resources__light-bg .page-resources__sub-title,
.page-resources__light-bg .page-resources__faq-heading,
.page-resources__light-bg .page-resources__faq-answer p,
.page-resources__light-bg .page-resources__cta-text {
  color: #333333; /* Enforce dark text on light background */
}

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

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

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

.page-resources__card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for cards on dark bg */
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.page-resources__light-bg .page-resources__card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

.page-resources__card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
}

.page-resources__light-bg .page-resources__card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.page-resources__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 20px;
}

.page-resources__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  font-weight: bold;
  flex-grow: 1;
}

.page-resources__card-title a {
  color: #ffffff; /* White for card titles on dark bg */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__light-bg .page-resources__card-title a {
  color: #017439; /* Brand color for card titles on light bg */
}

.page-resources__card-title a:hover {
  color: #f0f0f0;
}

.page-resources__light-bg .page-resources__card-title a:hover {
  color: #005f2f;
}

.page-resources__card-text {
  font-size: 0.95em;
  margin-bottom: 20px;
  color: #f0f0f0;
  flex-grow: 1;
}

.page-resources__light-bg .page-resources__card-text {
  color: #555555;
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

.page-resources__btn-primary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-resources__btn-primary:hover {
  background-color: #005f2f;
  border-color: #005f2f;
}

.page-resources__btn-secondary {
  background-color: transparent;
  color: #017439;
  border: 2px solid #017439;
}

.page-resources__light-bg .page-resources__btn-secondary {
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-resources__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

.page-resources__register-btn {
  background-color: #C30808;
  border-color: #C30808;
  color: #FFFF00;
}

.page-resources__register-btn:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-resources__login-btn {
  background-color: transparent;
  border-color: #C30808;
  color: #C30808;
}

.page-resources__login-btn:hover {
  background-color: #C30808;
  color: #FFFF00;
}

.page-resources__image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-resources__image-block {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Video Section */
.page-resources__video-section {
  position: relative;
  width: 100%;
  padding: 60px 0;
  text-align: center;
  background-color: #1a1a2e;
  color: #ffffff;
  box-sizing: border-box;
}

.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 0 auto 30px auto;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  max-width: 1000px; /* Limit video width */
  box-sizing: border-box;
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
  min-width: 200px;
  min-height: 200px;
}

.page-resources__video-caption {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-resources__video-cta {
  margin-top: 20px;
}

/* FAQ Section */
.page-resources__faq-list {
  margin-top: 40px;
}

.page-resources__faq-item {
  background: rgba(255, 255, 255, 0.05); /* Lighter background for FAQ items on dark bg */
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

.page-resources__light-bg .page-resources__faq-item {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

.page-resources__light-bg .page-resources__faq-question {
  color: #333333;
}

.page-resources__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.page-resources__light-bg .page-resources__faq-question:hover {
  background-color: #e8e8e8;
}

.page-resources__faq-heading {
  margin: 0;
  color: inherit;
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-resources__faq-answer p {
  margin-top: 0;
  margin-bottom: 15px;
  padding-top: 10px;
  color: #f0f0f0;
}

.page-resources__light-bg .page-resources__faq-answer p {
  color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficiently large value */
  padding: 15px 25px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(0deg);
}

/* CTA Section */
.page-resources__cta-section {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__light-bg .page-resources__cta-section {
  border-top: 1px solid #e0e0e0;
}

.page-resources__cta-text {
  font-size: 1.1em;
  margin-bottom: 25px;
  color: #f0f0f0;
}

.page-resources__light-bg .page-resources__cta-text {
  color: #333333;
}

.page-resources__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 2.5em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
  .page-resources__grid,
  .page-resources__grid-two-columns {
    grid-template-columns: 1fr;
  }
  .page-resources__grid-reverse-mobile {
    grid-template-columns: 1fr;
    flex-direction: column-reverse; /* For reversing order on mobile */
  }
  .page-resources__image-block {
    order: -1; /* Move image above text on mobile for reverse grid */
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: calc(var(--header-offset, 120px) + 40px);
    padding-bottom: 40px;
  }
  .page-resources__hero-title {
    font-size: 2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__section {
    padding: 40px 0;
  }
  .page-resources__section-title {
    font-size: 1.8em;
  }
  .page-resources__sub-title {
    font-size: 1.5em;
  }
  .page-resources__grid,
  .page-resources__grid-three-columns,
  .page-resources__grid-two-columns {
    grid-template-columns: 1fr;
  }
  .page-resources__button-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources a[class*="button"],
  .page-resources 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-resources__image,
  .page-resources__card-image,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-resources__image-block,
  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper,
  .page-resources__container,
  .page-resources__card,
  .page-resources__cta-section,
  .page-resources__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-resources__faq-question,
  .page-resources__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 1.8em;
  }
  .page-resources__section-title {
    font-size: 1.5em;
  }
  .page-resources__faq-question {
    font-size: 1.1em;
  }
}