/* style/resources.css */

/* Base styles for the resources page */
.page-resources {
  background-color: var(--dark-bg-1); /* Inherit from shared.css, typically dark */
  color: #ffffff; /* Default text color for dark background */
  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 {
  padding: 80px 0;
  text-align: center;
  position: relative;
  padding-top: calc(var(--header-offset, 120px) + 80px); /* Adjust for hero content and header offset */
  background-color: #017439; /* Brand color as background */
  color: #ffffff;
}

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

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

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

/* Section Titles and Descriptions */
.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff; /* Default for dark sections */
}

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #f0f0f0; /* Default for dark sections */
}

/* Buttons */
.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;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure responsiveness */
}

.page-resources__btn-primary {
  background-color: #C30808; /* Red for primary action */
  color: #FFFF00; /* Yellow text for contrast */
  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;
}

.page-resources__btn-large {
  padding: 18px 40px;
  font-size: 1.1em;
}

/* Video Section */
.page-resources__video-section {
  padding: 60px 0;
  background-color: var(--dark-bg-1);
}

.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 0 auto 30px auto;
  background-color: #000; /* Fallback background */
  border-radius: 10px;
  max-width: 900px; /* Max width for video container */
}

.page-resources__video-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.page-resources__video-caption {
  text-align: center;
  font-style: italic;
  color: #f0f0f0;
  margin-top: 15px;
}

/* Guide Section */
.page-resources__guide-section {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text for light background */
}

.page-resources__guide-section .page-resources__section-title,
.page-resources__guide-section .page-resources__section-description {
  color: #333333;
}

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

.page-resources__guide-card {
  background-color: #f8f8f8;
  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;
  height: 100%;
}

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

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

.page-resources__guide-card-title {
  font-size: 1.5em;
  margin: 20px 20px 10px 20px;
  color: #017439; /* Brand color for titles */
}

.page-resources__guide-card-title a {
  text-decoration: none;
  color: #017439;
  transition: color 0.3s ease;
}

.page-resources__guide-card-title a:hover {
  color: #005f2b;
}

.page-resources__guide-card-text {
  margin: 0 20px 20px 20px;
  color: #555555;
  flex-grow: 1; /* Pushes button to bottom */
}

.page-resources__card-button {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 20px 20px 20px;
  background-color: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  align-self: flex-start; /* Align button to start */
}

.page-resources__card-button:hover {
  background-color: #005f2b;
}

/* Game Overview Section */
.page-resources__game-overview-section {
  padding: 60px 0;
  background-color: var(--dark-bg-2, #1a1a1a); /* Slightly different dark background */
}

.page-resources__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__game-card {
  background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent white on dark bg */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-resources__game-card-title {
  font-size: 1.4em;
  margin: 15px 15px 10px 15px;
  color: #ffffff;
}

.page-resources__game-card-title a {
  text-decoration: none;
  color: #ffffff;
  transition: color 0.3s ease;
}

.page-resources__game-card-title a:hover {
  color: #FFFF00; /* Yellow hover for titles */
}

.page-resources__game-card-text {
  margin: 0 15px 15px 15px;
  color: #cccccc;
  flex-grow: 1;
}

/* Policy Section */
.page-resources__policy-section {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

.page-resources__policy-section .page-resources__section-title,
.page-resources__policy-section .page-resources__section-description {
  color: #333333;
}

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

.page-resources__policy-card {
  background-color: #f8f8f8;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-resources__policy-card-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: #017439;
}

.page-resources__policy-card-title a {
  text-decoration: none;
  color: #017439;
  transition: color 0.3s ease;
}

.page-resources__policy-card-title a:hover {
  color: #005f2b;
}

.page-resources__policy-card-text {
  color: #555555;
  flex-grow: 1;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 0;
  background-color: #017439; /* Brand color as background */
  color: #ffffff;
}

.page-resources__faq-section .page-resources__section-title,
.page-resources__faq-section .page-resources__section-description {
  color: #ffffff;
}

.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;
  transition: background-color 0.3s ease;
}

.page-resources__faq-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  color: #ffffff;
}

.page-resources__faq-title {
  margin: 0;
  font-size: 1.1em; /* Ensure title size within question */
}

.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: #f0f0f0;
}

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

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

.page-resources__cta-support {
  text-align: center;
  margin-top: 30px;
  font-size: 1.1em;
}

.page-resources__text-link {
  color: #FFFF00; /* Yellow for links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-resources__text-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Call to Action Section */
.page-resources__cta-section {
  padding: 60px 0;
  text-align: center;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

.page-resources__cta-section .page-resources__section-title,
.page-resources__cta-section .page-resources__section-description {
  color: #333333;
}

/* Utility classes for colors */
.page-resources__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-resources__light-bg {
  background-color: #ffffff;
  color: #333333;
}

/* Responsive Design */
@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-top: calc(var(--header-offset, 120px) + 60px);
    padding-bottom: 60px;
  }

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

  .page-resources__hero-description {
    font-size: 1em;
    padding: 0 10px;
  }

  .page-resources__section-title {
    font-size: 1.8em;
    padding: 0 10px;
  }

  .page-resources__section-description {
    font-size: 0.95em;
    padding: 0 10px;
  }

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
  }

  .page-resources__container {
    padding: 0 15px;
  }

  .page-resources__video-section,
  .page-resources__guide-section,
  .page-resources__game-overview-section,
  .page-resources__policy-section,
  .page-resources__faq-section,
  .page-resources__cta-section {
    padding: 40px 0;
  }

  /* Images responsive */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !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;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-resources__video-section {
    padding-top: var(--header-offset, 120px) !important; /* Re-apply header offset for video section in mobile */
  }

  /* Ensure card images are responsive */
  .page-resources__guide-image,
  .page-resources__game-image {
    height: auto; /* Allow height to adjust */
  }

  .page-resources__guide-card,
  .page-resources__game-card,
  .page-resources__policy-card {
    margin-bottom: 20px;
  }

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

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

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

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 1.8em;
  }
  .page-resources__section-title {
    font-size: 1.5em;
  }
  .page-resources__hero-section {
    padding-top: calc(var(--header-offset, 120px) + 40px);
    padding-bottom: 40px;
  }
}