.page-resources {
  color: #ffffff; /* Body background is dark, so text should be 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;
}

.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: calc(var(--header-offset, 120px) + 80px); /* Ensure spacing below header */
  min-height: 600px;
  background-color: #000; /* Dark background from shared */
  color: #ffffff;
  overflow: hidden;
}

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

.page-resources__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #ffffff;
  font-weight: bold;
  line-height: 1.2;
}

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

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

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

.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-resources__intro-section {
  padding: 80px 0;
  background-color: #f8f8f8; /* Light background for contrast */
  color: #333333;
}

.page-resources__intro-image {
  display: block;
  margin: 40px auto 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__game-guides-section {
  padding: 80px 0;
  background-color: #000; /* Dark background */
  color: #ffffff;
}

.page-resources__articles-section {
  padding: 80px 0;
  background-color: #f8f8f8; /* Light background */
  color: #333333;
}

.page-resources__grid {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

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

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

.page-resources__card {
  background-color: #1a1a1a; /* Darker card background for dark section */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  color: #ffffff; /* Light text on dark card */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__articles-section .page-resources__card {
  background-color: #ffffff; /* White card background for light section */
  color: #333333; /* Dark text on white card */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.page-resources__card-title {
  font-size: 1.5em;
  margin: 0 20px 15px 20px;
  font-weight: bold;
}

.page-resources__card-title a {
  color: #017439; /* Brand primary color for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
  color: #00a04a;
}

.page-resources__articles-section .page-resources__card-title a {
  color: #017439;
}

.page-resources__articles-section .page-resources__card-title a:hover {
  color: #00a04a;
}

.page-resources__card-text {
  font-size: 1em;
  margin: 0 20px 20px 20px;
  flex-grow: 1;
}

.page-resources__video-section {
  padding: 80px 0;
  background-color: #000;
  color: #ffffff;
  text-align: center;
}

.page-resources__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 900px;
  margin: 40px auto;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  cursor: pointer;
}

.page-resources__video-description {
  margin-top: 20px;
  font-size: 1.1em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__faq-section {
  padding: 80px 0;
  background-color: #f8f8f8;
  color: #333333;
}

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

.page-resources__faq-item {
  background-color: #ffffff;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  color: #333333;
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
}

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

.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 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
}

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

.page-resources__faq-answer p {
  margin-bottom: 15px;
  line-height: 1.7;
}

.page-resources__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

.page-resources__cta-section {
  padding: 80px 0;
  background-color: #017439; /* Brand primary color background */
  color: #ffffff;
  text-align: center;
}

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

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

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

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

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

.page-resources__btn-secondary:hover {
  background-color: #ffffff;
  color: #017439;
}

/* Specific styling for buttons in light sections */
.page-resources__light-bg .page-resources__btn-primary {
  background-color: #017439;
  color: #ffffff;
  border-color: #017439;
}

.page-resources__light-bg .page-resources__btn-primary:hover {
  background-color: #00a04a;
  border-color: #00a04a;
}

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

.page-resources__light-bg .page-resources__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

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

/* Desktop (default) */
@media (min-width: 1025px) {
  .page-resources__hero-section {
    flex-direction: row;
    text-align: left;
    justify-content: space-around;
    padding-left: 5%;
    padding-right: 5%;
  }

  .page-resources__hero-content {
    max-width: 50%;
  }

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

  .page-resources__hero-image-wrapper {
    width: 50%;
    position: relative;
    height: auto;
    min-height: 400px;
    opacity: 1;
  }

  .page-resources__hero-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain; /* Adjust to contain or cover as needed */
    opacity: 1;
  }
}

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

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

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

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

  .page-resources__grid--3-cols {
    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: 60px 15px;
    padding-top: calc(var(--header-offset, 120px) + 40px);
    min-height: auto;
  }

  .page-resources__hero-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-resources__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-resources__hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100%;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-resources__hero-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 30px;
  }

  .page-resources__hero-image {
    position: relative;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    opacity: 0.3;
    transform: none;
  }

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

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

  .page-resources__intro-section,
  .page-resources__game-guides-section,
  .page-resources__articles-section,
  .page-resources__video-section,
  .page-resources__faq-section,
  .page-resources__cta-section {
    padding: 40px 0;
  }

  .page-resources__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  .page-resources__card-title {
    font-size: 1.3em;
    margin: 0 15px 10px 15px;
  }

  .page-resources__card-text {
    font-size: 0.9em;
    margin: 0 15px 15px 15px;
  }

  .page-resources__video-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
  }

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

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

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

  /* Image responsive */
  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Video responsive */
  .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;
    overflow: hidden !important;
  }

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

  /* Button responsive */
  .page-resources__cta-button,
  .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;
    flex-direction: column;
  }
}

/* Color Contrast Adjustments */
.page-resources__dark-bg {
  background: #000; /* Body background is black */
  color: #ffffff; /* Light text */
}

.page-resources__light-bg {
  background: #f8f8f8;
  color: #333333; /* Dark text */
}

/* Card text in dark sections should be light */
.page-resources__game-guides-section .page-resources__card,
.page-resources__video-section .page-resources__card {
  color: #ffffff;
}

/* Ensure brand color for links in dark background sections maintains contrast */
.page-resources__game-guides-section .page-resources__card-title a {
  color: #FFFF00; /* Yellow for better contrast on dark green/black */
}

.page-resources__game-guides-section .page-resources__card-title a:hover {
  color: #FFD700;
}

.page-resources__video-section .page-resources__btn-primary {
  background-color: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-resources__video-section .page-resources__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

/* Ensure primary CTA button (register) uses custom colors */
.page-resources__hero-buttons .page-resources__btn-primary,
.page-resources__cta-buttons .page-resources__btn-primary {
  background-color: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-resources__hero-buttons .page-resources__btn-primary:hover,
.page-resources__cta-buttons .page-resources__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}