.page-resources {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-dark: #1a1a1a; /* Body background from shared.css */
  --background-light: #f8f9fa;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-text-color: #FFFF00;

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

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  padding: 100px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--primary-color); /* Using primary color as background for dark section */
  color: var(--text-color-light);
  overflow: hidden;
  /* shared.css is assumed to set body padding-top, so hero does not need it again by default */
  /* If shared.css does NOT set body padding-top, then add: padding-top: var(--header-offset, 120px); */
  padding-top: 0; /* Assuming shared.css handles body padding-top */
}

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

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

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Subtle overlay to ensure text contrast */
}

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

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

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

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

.page-resources__btn-primary {
  background-color: var(--button-register-bg); /* Use specific register color */
  color: var(--button-text-color); /* Use specific register/login font color */
  border: 2px solid var(--button-register-bg);
}

.page-resources__btn-primary:hover {
  background-color: #a30707; /* Darken for hover */
  border-color: #a30707;
}

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

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

.page-resources__btn-primary--large,
.page-resources__btn-secondary--large {
  padding: 18px 35px;
  font-size: 1.1em;
}

/* General Section Styles */
.page-resources__overview-section,
.page-resources__articles-section,
.page-resources__cta-section {
  padding: 80px 0;
  background-color: var(--background-light); /* Light background */
  color: var(--text-color-dark);
}

.page-resources__video-section,
.page-resources__faq-section {
  padding: 80px 0;
  background-color: var(--primary-color); /* Dark background (brand color) */
  color: var(--text-color-light);
}

.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-color-dark);
}

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

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
}

.page-resources__section-description--white {
  color: rgba(255, 255, 255, 0.9);
}

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

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

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

.page-resources__feature-icon {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

.page-resources__feature-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--primary-color);
}

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

.page-resources__feature-title a:hover {
  color: #005a2e; /* Darken primary for hover */
  text-decoration: underline;
}

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

/* Video Section */
.page-resources__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: 10px;
  margin: 0 auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-resources__video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.page-resources__video-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
}

/* Article Grid */
.page-resources__article-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); /* White card background */
  color: var(--text-color-dark);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-resources__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-resources__article-card h3 {
  font-size: 1.3em;
  margin: 20px 20px 10px 20px;
  color: var(--primary-color);
}

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

.page-resources__article-card h3 a:hover {
  color: #005a2e; /* Darken primary for hover */
  text-decoration: underline;
}

.page-resources__article-excerpt {
  font-size: 0.95em;
  color: var(--text-color-dark);
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__read-more {
  display: block;
  text-align: right;
  padding: 15px 20px;
  background-color: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-resources__read-more:hover {
  background-color: #005a2e; /* Darken primary for hover */
}

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

.page-resources__faq-item {
  background-color: var(--secondary-color); /* White background for FAQ item */
  color: var(--text-color-dark);
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-bottom: 1px solid #eee;
  list-style: none; /* For details/summary */
}

.page-resources__faq-item[open] .page-resources__faq-question {
  border-bottom: none;
}

.page-resources__faq-question::-webkit-details-marker {
  display: none;
}

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

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

.page-resources__faq-answer {
  padding: 15px 20px 20px 20px;
  font-size: 1em;
  color: var(--text-color-dark);
  line-height: 1.6;
}

.page-resources__faq-answer p {
  margin: 0;
}

/* CTA Section specific */
.page-resources__cta-content {
  text-align: center;
}

/* 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: 80px 0;
  }

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

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

  .page-resources__cta-buttons {
    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__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__overview-section,
  .page-resources__articles-section,
  .page-resources__cta-section,
  .page-resources__video-section,
  .page-resources__faq-section {
    padding: 50px 0;
  }

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

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

  .page-resources__feature-grid,
  .page-resources__article-grid {
    grid-template-columns: 1fr;
  }

  .page-resources__feature-card,
  .page-resources__article-card {
    margin-left: 15px;
    margin-right: 15px;
  }

  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure content containers are responsive */
  .page-resources__section,
  .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Adjust hero padding for mobile if shared doesn't handle body padding-top */
  .page-resources__hero-section {
    /* If shared.css does NOT set body padding-top, uncomment the line below */
    /* padding-top: var(--header-offset, 120px) !important; */
  }

  .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;
  }
}

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

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

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    padding: 12px 20px;
    font-size: 0.9em;
  }
}