/* style/resources.css */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #ffffff; /* Body background is light */
}

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

.page-resources__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  padding-bottom: 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
  background-color: #017439; /* Primary brand color for hero */
}

.page-resources__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3; /* Subtle overlay */
}

.page-resources__hero-section .page-resources__container {
  position: relative;
  z-index: 1;
}

.page-resources__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
  max-width: 800px;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  border: none;
}

.page-resources__btn-primary {
  background-color: #C30808; /* Register/Login button color */
  color: #FFFF00; /* Register/Login button font color */
}

.page-resources__btn-primary:hover {
  background-color: #a30707;
  transform: translateY(-2px);
}

.page-resources__section-intro,
.page-resources__section,
.page-resources__cta-section {
  padding: 60px 0;
}

.page-resources__section-intro .page-resources__container,
.page-resources__section .page-resources__container,
.page-resources__cta-section .page-resources__container {
  text-align: center;
}

.page-resources__section-title {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #017439; /* Primary brand color for titles */
}

.page-resources__section.page-resources__dark-bg .page-resources__section-title,
.page-resources__cta-section.page-resources__dark-bg .page-resources__section-title {
  color: #ffffff;
}

.page-resources__text-block {
  font-size: 1em;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  color: #333333; /* Dark text for light background */
}

.page-resources__dark-bg .page-resources__text-block {
  color: #f0f0f0; /* Light text for dark background */
}

.page-resources__ordered-list,
.page-resources__unordered-list {
  list-style-position: inside;
  padding-left: 20px;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  color: #333333;
}

.page-resources__dark-bg .page-resources__ordered-list,
.page-resources__dark-bg .page-resources__unordered-list {
  color: #f0f0f0;
}

.page-resources__ordered-list li,
.page-resources__unordered-list li {
  margin-bottom: 10px;
}

.page-resources__image-content {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 30px auto;
  display: block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__subtitle {
  font-size: 1.8em;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #017439;
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-resources__card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease;
  color: #333333; /* Dark text for light card background */
}

.page-resources__card:hover {
  transform: translateY(-5px);
}

.page-resources__card-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  color: #017439;
}

.page-resources__card-title a {
  color: #017439;
  text-decoration: none;
}

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

.page-resources__card-text {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 20px;
}

.page-resources__card-link {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid #017439;
  padding-bottom: 2px;
}

.page-resources__card-link:hover {
  color: #005a2e;
  border-color: #005a2e;
}

.page-resources__video-section .page-resources__container {
  max-width: 1000px;
}

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

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

.page-resources__faq-section {
  background-color: #017439; /* Primary brand color for FAQ section */
  color: #ffffff;
}

.page-resources__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

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

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

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

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

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficient height for content */
  padding: 15px 20px;
}

.page-resources__faq-answer p {
  margin: 0;
  font-size: 0.95em;
}

/* Ensure dark/light background classes are correctly applied */
.page-resources__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-resources__light-bg {
  background-color: #ffffff;
  color: #333333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-bottom: 40px;
  }

  .page-resources__hero-title {
    font-size: 2.2em;
  }

  .page-resources__hero-description {
    font-size: 1em;
  }

  .page-resources__cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-resources__section-title {
    font-size: 1.8em;
  }

  .page-resources__text-block,
  .page-resources__ordered-list,
  .page-resources__unordered-list {
    font-size: 0.95em;
    text-align: left;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__subtitle {
    font-size: 1.5em;
    text-align: left;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__card {
    padding: 20px;
  }

  .page-resources__card-title {
    font-size: 1.2em;
  }

  .page-resources__faq-question {
    font-size: 1em;
    padding: 15px;
  }

  .page-resources__faq-answer {
    padding: 0 15px;
  }

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

  /* Mobile image responsiveness */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-resources__section,
  .page-resources__card,
  .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure hero is below header */
  }

  /* Mobile video responsiveness */
  .page-resources video,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-resources__video-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure video section is below header */
  }

  /* Mobile button responsiveness */
  .page-resources__cta-button,
  .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__cta-buttons,
  .page-resources__button-group,
  .page-resources__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-resources__cta-section .page-resources__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}