/* style/resources.css */
.page-resources {
  color: #333333; /* Default text color for light background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

/* Hero Section */
.page-resources__hero-section {
  display: flex;
  flex-direction: column-reverse; /* Image on top for mobile, content top for desktop */
  align-items: center;
  text-align: center;
  background-color: #000000; /* Dark background for hero */
  color: #FFFFFF;
  padding: 40px 20px;
  gap: 30px;
  position: relative;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-resources__hero-image {
  width: 100%;
  max-width: 100%; /* Ensure image is responsive */
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-resources__hero-content {
  z-index: 1;
  position: relative;
  max-width: 800px;
}

.page-resources__hero-title {
  font-size: 2.8em;
  margin-bottom: 15px;
  color: #FFFFFF;
  line-height: 1.2;
}

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

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

/* Buttons */
.page-resources__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 1em;
  white-space: nowrap;
}

.page-resources__btn--register {
  background-color: #FFFFFF; /* Custom color for Register */
  color: #000000;
}

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

.page-resources__btn--login {
  background-color: #FCBC45; /* Custom color for Login */
  color: #000000;
}

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

.page-resources__btn--read-more {
  background-color: #000000;
  color: #FFFFFF;
  padding: 10px 20px;
  font-size: 0.9em;
}

.page-resources__btn--read-more:hover {
  background-color: #333333;
  transform: translateY(-2px);
}

.page-resources__btn--primary {
  background-color: #FCBC45;
  color: #000000;
  padding: 15px 30px;
  font-size: 1.1em;
}

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

/* Intro Section */
.page-resources__intro-section {
  padding: 60px 0;
  background-color: #f9f9f9;
  text-align: center;
}

.page-resources__intro-heading {
  font-size: 2.2em;
  color: #000000;
  margin-bottom: 20px;
}

.page-resources__intro-text {
  font-size: 1em;
  max-width: 800px;
  margin: 0 auto;
  color: #555555;
}

/* Articles Section */
.page-resources__articles-section {
  padding: 60px 0;
  background-color: #FFFFFF;
}

.page-resources__articles-heading {
  font-size: 2.2em;
  color: #000000;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-resources__article-card {
  background-color: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  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 8px 25px rgba(0, 0, 0, 0.15);
}

.page-resources__article-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

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

.page-resources__article-title {
  font-size: 1.4em;
  color: #000000;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-resources__article-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.page-resources__article-title a:hover {
  color: #FCBC45;
}

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

.page-resources__article-card .page-resources__btn--read-more {
  align-self: flex-start;
}

/* Call to Action Section */
.page-resources__cta-section {
  background-color: #000000;
  color: #FFFFFF;
  padding: 80px 20px;
  text-align: center;
}

.page-resources__cta-heading {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.page-resources__cta-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #f0f0f0;
}

/* Responsive Design */
@media (min-width: 768px) {
  .page-resources__hero-section {
    flex-direction: row; /* Content on left, image on right for desktop */
    text-align: left;
    padding: 80px 40px;
  }

  .page-resources__hero-content {
    flex: 1;
    padding-right: 40px;
  }

  .page-resources__hero-image {
    flex: 1;
    max-width: 50%; /* Adjust as needed */
    height: auto;
  }

  .page-resources__hero-actions {
    justify-content: flex-start;
  }

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

  .page-resources__intro-heading,
  .page-resources__articles-heading,
  .page-resources__cta-heading {
    font-size: 2.8em;
  }
}

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

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

  .page-resources__intro-heading,
  .page-resources__articles-heading,
  .page-resources__cta-heading {
    font-size: 2em;
  }

  .page-resources__btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }

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

  .page-resources__article-image {
    height: 200px; /* Adjust height for mobile */
  }

  /* Critical: prevent content images from overflowing on mobile */
  .page-resources img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-actions {
    flex-direction: column;
    gap: 10px;
  }
}