:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-dark: #0a0a0a;
  --background-light: #f5f5f5; /* Using a light grey for light sections to ensure contrast on the overall dark body */
  --btn-register: #C30808;
  --btn-login: #C30808;
  --btn-font-color: #FFFF00; /* For register/login buttons specifically */
}

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for the page, as body is dark */
  background-color: var(--background-dark); /* Ensure consistency, though body handles this */
}

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Adjust for fixed header */
  background-color: var(--primary-color); /* Primary color background */
  color: var(--text-light);
  overflow: hidden; /* For image positioning */
  min-height: 500px;
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin-bottom: 30px;
}

.page-resources__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-light);
}

.page-resources__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-resources__btn-primary {
  background-color: var(--btn-register); /* Specific color for register/login type actions */
  color: var(--btn-font-color);
  border: 2px solid var(--btn-register);
}

.page-resources__btn-primary:hover {
  background-color: #a70707; /* Darker version of #C30808 */
  transform: translateY(-2px);
}

.page-resources__btn-secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

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

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

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Semi-transparent background image */
}

/* General Sections */
.page-resources__intro-section,
.page-resources__articles-section,
.page-resources__cta-section {
  padding: 60px 0;
  background-color: var(--background-light); /* Light background for these sections */
  color: var(--text-dark); /* Dark text on light background */
}

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

.page-resources__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit from parent section for contrast */
}

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: inherit; /* Inherit from parent section for contrast */
}

/* Grid Wrapper for resource cards */
.page-resources__grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__grid-item {
  background-color: var(--secondary-color);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
  color: var(--text-dark); /* Dark text on white card */
}

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

.page-resources__grid-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__item-title {
  font-size: 1.5em;
  margin-bottom: 10px;
}

.page-resources__item-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__item-title a:hover {
  color: #005a2e; /* Darker version of #017439 */
}

.page-resources__item-text {
  font-size: 0.95em;
  color: var(--text-dark);
}

/* Video Section */
.page-resources__video-section {
  padding: 60px 0;
  text-align: center;
}

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

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

.page-resources__cta-buttons--center {
  margin-top: 20px;
}

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

.page-resources__article-card {
  background-color: var(--secondary-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: var(--text-dark); /* Dark text on white card */
}

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

.page-resources__article-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

.page-resources__article-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  min-height: 60px; /* Ensure consistent height for titles */
}

.page-resources__article-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__article-title a:hover {
  color: #005a2e; /* Darker version of #017439 */
}

.page-resources__article-excerpt {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 15px;
  min-height: 80px; /* Consistent height for excerpts */
}

.page-resources__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-resources__read-more:hover {
  color: #005a2e; /* Darker version of #017439 */
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 0;
  background-color: var(--primary-color); /* Dark section */
  color: var(--text-light);
}

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

.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;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-light);
  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: var(--text-light);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 20px;
}

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

/* CTA Section */
.page-resources__cta-section {
  text-align: center;
  padding: 80px 0;
}

.page-resources__cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-resources__btn-register {
  background-color: var(--btn-register);
  color: var(--btn-font-color);
  border: 2px solid var(--btn-register);
  font-size: 1.3em;
  padding: 18px 40px;
  margin-top: 30px;
}

.page-resources__btn-register:hover {
  background-color: #a70707; /* Darker version of #C30808 */
  transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 2.8em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure padding-top on mobile */
  }

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

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

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px; /* Constrain button width on small screens */
    margin: 0 auto;
  }

  .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__section-title {
    font-size: 1.8em;
  }

  .page-resources__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-resources__grid-wrapper,
  .page-resources__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources__grid-item,
  .page-resources__article-card {
    padding: 20px;
  }

  .page-resources__grid-image,
  .page-resources__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-resources__video-wrapper {
    margin: 20px auto;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 0 15px; /* Add padding inside container */
  }

  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

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

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

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

  .page-resources__cta-section {
    padding: 60px 15px;
  }

  .page-resources__btn-register {
    font-size: 1.1em;
    padding: 15px 30px;
    margin-top: 20px;
  }
  
  .page-resources__container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 1.8em;
  }
  .page-resources__hero-description {
    font-size: 0.9em;
  }
  .page-resources__section-title {
    font-size: 1.5em;
  }
  .page-resources__item-title {
    font-size: 1.2em;
  }
  .page-resources__article-title {
    font-size: 1.1em;
  }
}