/* style/resources.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* General styles for the page-resources scope */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

/* Fixed header offset - apply to the first main content section if body padding is not handled by shared.css */
/* Assuming shared.css handles body padding-top, so hero-section padding-top can be 0 or small for design */
.page-resources__hero-section {
  position: relative;
  padding-top: 80px; /* Adjust as needed, considering the shared header offset */
  padding-bottom: 80px;
  background-color: #1a1a1a; /* Match body background for consistency */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 70vh;
  overflow: hidden;
}

.page-resources__hero-content {
  max-width: 600px;
  text-align: left;
  z-index: 1;
  padding: 0 20px;
}

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

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

.page-resources__hero-image-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 50%;
  max-width: 700px;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-resources__hero-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-resources__section {
  padding: 60px 20px;
  background-color: transparent; /* Default to transparent, specific sections can override */
  color: #ffffff; /* Default text color */
}

.page-resources__dark-bg {
  background-color: #1a1a1a; /* Consistent with body background */
  color: #ffffff;
}

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

.page-resources__section-title {
  font-size: 2.5em;
  color: #017439; /* Brand color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-resources__sub-title {
  font-size: 1.8em;
  color: #017439;
  margin-top: 30px;
  margin-bottom: 20px;
}

.page-resources__paragraph {
  font-size: 1.05em;
  margin-bottom: 20px;
  color: #f0f0f0;
  text-align: justify;
}

.page-resources__highlight {
  color: #FFFF00; /* Highlight color for keywords */
  font-weight: bold;
}

.page-resources__link {
  color: #017439;
  text-decoration: underline;
}

.page-resources__link:hover {
  color: #FFFF00;
}

/* Buttons */
.page-resources__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
  justify-content: flex-start; /* Default for hero */
}

.page-resources__cta-buttons--center {
  justify-content: center;
}

.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-tertiary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap; /* Prevent text wrapping initially */
  cursor: pointer;
  border: 2px solid transparent;
}

.page-resources__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border-color: #C30808;
}

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

.page-resources__btn-secondary {
  background-color: transparent;
  color: #017439; /* Brand color for text */
  border-color: #017439;
}

.page-resources__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
  transform: translateY(-2px);
}

.page-resources__btn-tertiary {
  background-color: #017439;
  color: #ffffff;
  border-color: #017439;
}

.page-resources__btn-tertiary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
  transform: translateY(-2px);
}

/* Lists */
.page-resources__step-list,
.page-resources__list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.page-resources__step-list {
  counter-reset: step-counter;
}

.page-resources__step-list .page-resources__list-item {
  counter-increment: step-counter;
  margin-bottom: 15px;
  padding-left: 40px;
  position: relative;
  font-size: 1.05em;
  color: #f0f0f0;
}

.page-resources__step-list .page-resources__list-item::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background-color: #017439;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9em;
}

.page-resources__list .page-resources__list-item {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  font-size: 1.05em;
  color: #f0f0f0;
}

.page-resources__list .page-resources__list-item::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #017439;
  font-size: 1.5em;
  line-height: 1;
}

/* Image containers for content images */
.page-resources__image-container {
  margin-top: 30px;
  text-align: center;
}

.page-resources__content-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

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

.page-resources__game-card {
  background-color: rgba(255, 255, 255, 0.08); /* Light transparent background */
  border-radius: 12px;
  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;
  color: #ffffff;
}

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

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

.page-resources__game-title {
  font-size: 1.5em;
  margin: 15px 15px 10px;
  color: #017439;
  font-weight: bold;
}

.page-resources__game-title a {
  color: #017439;
  text-decoration: none;
}

.page-resources__game-title a:hover {
  color: #FFFF00;
  text-decoration: underline;
}

.page-resources__game-description {
  font-size: 0.95em;
  margin: 0 15px 15px;
  color: #f0f0f0;
  flex-grow: 1;
}

/* FAQ Section */
.page-resources__faq-list {
  margin-top: 30px;
}

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

.page-resources__faq-item details {
  padding: 0;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

/* Hide default details marker */
.page-resources__faq-item summary {
  list-style: none;
}
.page-resources__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #017439;
  margin-left: 15px;
}

.page-resources__faq-item[open] .page-resources__faq-toggle {
  color: #FFFF00;
}

.page-resources__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: #f0f0f0;
  background-color: rgba(255, 255, 255, 0.03);
}

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

/* Responsive design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 2.8em;
  }
  .page-resources__hero-section {
    flex-direction: column;
    text-align: center;
    padding-top: var(--header-offset, 120px); /* Ensure header offset on smaller screens */
  }
  .page-resources__hero-content {
    max-width: 100%;
    text-align: center;
  }
  .page-resources__hero-image-wrapper {
    width: 80%;
    margin-top: 40px;
  }
  .page-resources__cta-buttons {
    justify-content: center;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
  .page-resources__sub-title {
    font-size: 1.5em;
  }
}

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-resources__hero-title {
    font-size: 2.2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__hero-image-wrapper {
    width: 90%;
  }

  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__container {
    padding: 0 10px;
  }
  .page-resources__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-resources__paragraph,
  .page-resources__list-item,
  .page-resources__game-description,
  .page-resources__faq-answer {
    font-size: 0.95em;
  }
  .page-resources__game-title {
    font-size: 1.3em;
  }

  /* Mobile image responsiveness - CRITICAL */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important; /* Ensure width takes full container */
    height: auto !important;
    display: block !important;
  }
  .page-resources__image-container,
  .page-resources__game-card,
  .page-resources__hero-image-wrapper,
  .page-resources__section,
  .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent overflow from children */
  }
  /* Ensure content area images are not too small on mobile */
  .page-resources__content-image,
  .page-resources__game-image {
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* Mobile button responsiveness - CRITICAL */
  .page-resources__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding: 0 10px; /* Add some padding to button container */
  }
  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources__btn-tertiary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important; /* Allow text wrapping */
    word-wrap: break-word !important;
    padding: 12px 15px !important; /* Adjust padding for smaller screens */
  }

  /* FAQ mobile adjustments */
  .page-resources__faq-question {
    padding: 15px 20px;
    font-size: 1.05em;
  }
  .page-resources__faq-answer {
    padding: 10px 20px 15px;
  }
}

/* Ensure no content area image is smaller than 200px (desktop) */
.page-resources__content-area img,
.page-resources__game-image,
.page-resources__hero-image {
  min-width: 200px;
  min-height: 200px;
}