.page-resources {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-button-color: #FCBC45;
  --register-button-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --card-bg-color: #FFFFFF;
  --button-text-dark: #000000;
  --button-text-light: #FFFFFF;

  /* Ensure content starts below the fixed header */
  padding-top: var(--header-offset, 120px);
  background-color: var(--secondary-color); /* Explicitly white background for main content area */
  color: var(--text-color-dark);
}

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

.page-resources__hero-section {
  position: relative;
  overflow: hidden;
  color: var(--text-color-light);
  background-color: var(--primary-color); /* Dark background for hero */
}

.page-resources__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6); /* Slightly dim the image for text readability */
}

.page-resources__hero-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px; /* Ensure hero section has a minimum height */
}

.page-resources__hero-content {
  position: absolute;
  text-align: center;
  max-width: 900px;
  padding: 20px;
  z-index: 1;
}

.page-resources__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
}

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

.page-resources__hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-resources__hero-button {
  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;
}

.page-resources__hero-button--register {
  background-color: var(--register-button-color);
  color: var(--button-text-dark);
  border: 2px solid var(--register-button-color);
}

.page-resources__hero-button--register:hover {
  background-color: transparent;
  color: var(--register-button-color);
}

.page-resources__hero-button--login {
  background-color: var(--login-button-color);
  color: var(--button-text-light);
  border: 2px solid var(--login-button-color);
}

.page-resources__hero-button--login:hover {
  background-color: transparent;
  color: var(--login-button-color);
}

.page-resources__featured-articles,
.page-resources__comprehensive-guides,
.page-resources__cta-section {
  padding: 60px 0;
}

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

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  line-height: 1.6;
  color: var(--text-color-dark);
}

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

.page-resources__article-card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-resources__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-resources__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__card-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-resources__card-title a:hover {
  color: var(--login-button-color);
}

.page-resources__card-abstract {
  font-size: 0.95em;
  line-height: 1.6;
  color: var(--text-color-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__card-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--login-button-color);
  color: var(--button-text-light);
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9em;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-resources__card-button:hover {
  background-color: darken(var(--login-button-color), 10%); /* Placeholder for CSS darken function */
}

.page-resources__comprehensive-guides {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-resources__comprehensive-guides .page-resources__section-title,
.page-resources__comprehensive-guides .page-resources__section-description {
  color: var(--text-color-light);
}

.page-resources__guide-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

.page-resources__guide-text {
  flex: 2;
}

.page-resources__guide-subtitle {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--login-button-color);
}

.page-resources__guide-text p {
  font-size: 1em;
  line-height: 1.7;
  margin-bottom: 15px;
  color: var(--text-color-light);
}

.page-resources__guide-image {
  flex: 1;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  min-width: 200px; /* Ensure image is not too small */
}

.page-resources__cta-section {
  background-color: var(--login-button-color);
  color: var(--text-color-light);
  text-align: center;
}

.page-resources__cta-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: var(--text-color-light);
}

.page-resources__cta-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
  color: var(--text-color-light);
}

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

.page-resources__cta-button {
  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;
}

.page-resources__cta-button--register {
  background-color: var(--register-button-color);
  color: var(--button-text-dark);
  border: 2px solid var(--register-button-color);
}

.page-resources__cta-button--register:hover {
  background-color: transparent;
  color: var(--register-button-color);
}

.page-resources__cta-button--login {
  background-color: var(--primary-color);
  color: var(--button-text-light);
  border: 2px solid var(--primary-color);
}

.page-resources__cta-button--login:hover {
  background-color: transparent;
  color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-resources__hero-title {
    font-size: 2.8em;
  }
  .page-resources__section-title {
    font-size: 2.2em;
  }
  .page-resources__cta-title {
    font-size: 2.5em;
  }
  .page-resources__guide-content {
    flex-direction: column;
    align-items: center;
  }
  .page-resources__guide-image {
    margin-top: 40px;
    width: 80%;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: var(--header-offset, 80px); /* Adjust for mobile header height */
  }
  .page-resources__hero-title {
    font-size: 2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__hero-button {
    width: 80%;
    max-width: 300px;
  }
  .page-resources__section-title {
    font-size: 1.8em;
  }
  .page-resources__section-description {
    font-size: 0.9em;
  }
  .page-resources__article-grid {
    grid-template-columns: 1fr;
  }
  .page-resources__card-title {
    font-size: 1.4em;
  }
  .page-resources__card-abstract {
    font-size: 0.85em;
  }
  .page-resources__guide-subtitle {
    font-size: 1.5em;
  }
  .page-resources__guide-text p {
    font-size: 0.9em;
  }
  .page-resources__guide-image {
    width: 100%;
    max-width: 400px; /* Constrain mobile image width */
  }
  .page-resources__cta-title {
    font-size: 2em;
  }
  .page-resources__cta-description {
    font-size: 1em;
  }
  .page-resources__cta-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__cta-button {
    width: 80%;
    max-width: 300px;
  }
  /* Ensure all content area images are responsive and do not overflow */
  .page-resources img {
    max-width: 100%;
    height: auto;
  }
  .page-resources__card-image, .page-resources__guide-image {
    min-width: 200px;
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 1.8em;
  }
  .page-resources__hero-description {
    font-size: 0.9em;
  }
  .page-resources__hero-button {
    padding: 12px 25px;
    font-size: 1em;
  }
  .page-resources__section-title {
    font-size: 1.6em;
  }
  .page-resources__cta-title {
    font-size: 1.8em;
  }
}