/* style/resources.css */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #FFFFFF; /* Assuming shared.css sets a light body background */
}

.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 offset for desktop and mobile */
  background: linear-gradient(135deg, #017439, #005f2c);
  color: #ffffff;
  overflow: hidden;
}

.page-resources__hero-content {
  max-width: 900px;
  z-index: 1;
  margin-bottom: 40px;
}

.page-resources__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFF00; /* Register and Login font color for emphasis */
}

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

.page-resources__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  overflow: hidden;
}

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(50%);
}

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

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

.page-resources__section-title {
  font-size: 2.2em;
  margin-bottom: 40px;
  color: #017439;
  position: relative;
  padding-bottom: 10px;
}

.page-resources__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 80px;
  height: 4px;
  background-color: #017439;
  border-radius: 2px;
}

.page-resources__paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  line-height: 1.7;
  color: #444444;
  text-align: left;
}

.page-resources__inline-link {
  color: #017439;
  text-decoration: underline;
  font-weight: bold;
}

.page-resources__inline-link:hover {
  color: #005f2c;
}

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

.page-resources__card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

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

.page-resources__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-resources__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #017439;
  line-height: 1.3;
}

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

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

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

.page-resources__card-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-top: auto; /* Push button to bottom */
}

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

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

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

.page-resources__btn-secondary:hover {
  background: #f0f0f0;
  color: #005f2c;
  border-color: #005f2c;
}

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

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

.page-resources__cta-button.page-resources__btn-primary:hover {
  background: #a50707;
  border-color: #a50707;
  transform: translateY(-2px);
}

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

.page-resources__cta-button.page-resources__btn-secondary:hover {
  background: #f0f0f0;
  color: #005f2c;
  border-color: #005f2c;
  transform: translateY(-2px);
}

.page-resources__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

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

.page-resources__dark-bg .page-resources__section-title::after {
  background-color: #FFFF00;
}

.page-resources__dark-bg .page-resources__paragraph {
  color: #f0f0f0;
}

.page-resources__dark-bg .page-resources__inline-link {
  color: #FFFF00;
}

.page-resources__dark-bg .page-resources__inline-link:hover {
  color: #f0f0f0;
}

.page-resources__dark-card {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.page-resources__dark-card .page-resources__card-title {
  color: #FFFF00;
}

.page-resources__dark-card .page-resources__card-link {
  color: #FFFF00;
}

.page-resources__dark-card .page-resources__card-link:hover {
  color: #f0f0f0;
}

.page-resources__dark-card .page-resources__card-text {
  color: #f0f0f0;
}

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

.page-resources__call-to-action-text {
  margin-top: 40px;
  font-size: 1.1em;
}

.page-resources__video-section {
  padding: 80px 20px;
  text-align: center;
}

.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  background-color: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-resources__video-link {
  display: block;
  width: 100%;
  height: 100%;
}

.page-resources__video {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.page-resources__video-caption {
  font-style: italic;
  color: #f0f0f0;
  margin-top: 20px;
}

.page-resources__cta-bottom {
  padding: 100px 20px;
}

.page-resources__cta-bottom .page-resources__section-title {
  color: #FFFF00;
}

.page-resources__cta-bottom .page-resources__section-title::after {
  background-color: #FFFF00;
}

.page-resources__cta-bottom .page-resources__paragraph {
  color: #f0f0f0;
}

.page-resources__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.page-resources__faq-section {
  text-align: left;
}

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

.page-resources__faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-resources__faq-item.active {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

.page-resources__faq-question:hover {
  background-color: #f0f0f0;
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
  color: #017439;
}

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

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #ffffff;
  color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Use !important to ensure it expands */
  padding: 15px 25px;
}

.page-resources__faq-answer p {
  margin-bottom: 0;
  text-align: left;
}

/* --- Responsive Design --- */

/* Tablet */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 2.5em;
  }

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

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

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

/* Mobile */
@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }

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

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

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

  .page-resources__section {
    padding: 60px 15px;
  }

  .page-resources__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-resources__paragraph {
    font-size: 1em;
  }

  .page-resources__grid-layout {
    grid-template-columns: 1fr;
  }

  .page-resources__card {
    padding: 20px;
  }

  .page-resources__card-image {
    height: 200px;
  }

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

  .page-resources__cta-button {
    width: 100%;
    max-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 {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Mobile responsive for images */
  .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,
  .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;
  }

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

  .page-resources__video-section {
    padding-top: var(--header-offset, 120px) !important;
  }

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

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

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