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

/* General Styles */
.page-resources {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Matches body background */
}

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

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

.page-resources__section-title--dark {
  color: #333333; /* For light background sections */
}

.page-resources__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__text-center {
  text-align: center;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  margin: 10px;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-resources__btn-primary {
  background-color: #C30808; /* Register/Login button color */
  color: #FFFF00; /* Register/Login font color */
  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 #017439; /* Brand color border */
}

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

/* Hero Section */
.page-resources__hero-section {
  padding: 80px 20px;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, #017439, #005f2e);
  padding-top: var(--header-offset, 120px); /* Adjust for fixed header */
}

.page-resources__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.page-resources__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Video Section */
.page-resources__video-section {
  padding: 60px 20px;
  text-align: center;
  background-color: #1a1a1a;
}

.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 30px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-resources__video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  cursor: pointer; /* Indicate clickable */
}

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

/* Main Content Area */
.page-resources__content-area {
  padding: 60px 20px;
  background-color: #ffffff; /* Light background for contrast */
  color: #333333; /* Dark text for light background */
}

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

.page-resources__card {
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__card-image {
  width: 100%;
  height: 200px; /* Fixed height for cards */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block; /* Ensure it doesn't have extra space below */
}

.page-resources__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #017439; /* Brand color for titles */
}

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

.page-resources__card-title a:hover {
  color: #005f2e;
  text-decoration: underline;
}

.page-resources__card-text {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-resources__card-link {
  display: inline-block;
  background-color: #017439;
  color: #ffffff;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-resources__card-link:hover {
  background-color: #005f2e;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 20px;
  background-color: #017439; /* Brand color background */
  color: #ffffff; /* White text for brand color background */
}

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

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

.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); /* Change + to X-like */
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Use !important to ensure it expands */
  padding: 15px 25px 25px;
}

.page-resources__faq-answer p {
  margin: 0;
  font-size: 1em;
  color: #f0f0f0;
}

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

.page-resources__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap */
}

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

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

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

  .page-resources__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
  }

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

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

  .page-resources__hero-cta {
    flex-direction: column;
    gap: 15px;
  }

  .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 {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

  /* Image and Video Responsiveness */
  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-resources__video,
  .page-resources__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-resources__video-section,
  .page-resources__content-area,
  .page-resources__faq-section,
  .page-resources__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-resources__card-image {
    height: auto; /* Allow image to scale with aspect ratio */
  }

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

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

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

/* Tablet Adaptations */
@media (min-width: 769px) and (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 3em;
  }

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

  .page-resources__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}