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

/* General styles for the page content wrapper */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark background */
  background-color: var(--dark-bg-1); /* Inherit from shared.css, assuming dark */
}

/* Container for consistent padding and max-width */
.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  padding: 80px 0;
  text-align: center;
  background-color: #017439; /* Brand color as background */
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  display: flex;
  align-items: center;
  min-height: 60vh; /* Ensure it's tall enough */
}

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

.page-resources__description {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* For mobile responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
}

.page-resources__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

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

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

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

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

.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px; /* Max width for video */
  margin: 40px auto 0 auto;
  background-color: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  cursor: pointer; /* Indicate it's clickable */
}

.page-resources__video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

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

.page-resources__section-title {
  font-size: 2.5em;
  color: #017439; /* Brand color for titles on light background */
  margin-bottom: 20px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.page-resources__section-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 40px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-resources__content-area p {
  margin-bottom: 15px;
  color: #333333; /* Ensure text is dark on light background */
}

.page-resources__list {
  list-style: disc inside;
  margin-bottom: 20px;
  padding-left: 20px;
}

.page-resources__list li {
  margin-bottom: 10px;
  color: #333333;
}

.page-resources__image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 30px auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

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

.page-resources__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  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.1em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  background-color: #f0f0f0;
  transition: background-color 0.3s ease;
}

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

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #017439;
}

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

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

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

.page-resources__faq-answer .page-resources__btn-primary {
  margin-top: 10px;
  margin-bottom: 15px;
}

/* Bottom CTA buttons */
.page-resources__cta-buttons--bottom {
  margin-top: 60px;
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 3em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
  .page-resources__sub-title {
    font-size: 1.6em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

  .page-resources__main-title {
    font-size: 2.5em;
  }

  .page-resources__description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to prevent buttons from touching edges */
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__video-section,
  .page-resources__content-area {
    padding: 40px 0;
  }
  
  .page-resources__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

  .page-resources__sub-title {
    font-size: 1.4em;
  }

  /* Images, videos, and their containers responsiveness for mobile */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: unset !important; /* Remove min-width constraint for mobile */
    min-height: unset !important; /* Remove min-height constraint for mobile */
  }

  .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__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

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

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

  .page-resources__cta-buttons--bottom {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .page-resources__main-title {
    font-size: 2em;
  }
  .page-resources__section-title {
    font-size: 1.6em;
  }
}

/* Color contrast enforcement (assuming --dark-bg-1 is dark) */
.page-resources__dark-bg {
  color: #ffffff; /* Dark background, light text */
}

.page-resources__light-bg {
  color: #333333; /* Light background, dark text */
}

/* Ensure text in content area is readable */
.page-resources__content-area p,
.page-resources__content-area li {
  color: #333333;
}

/* Ensure titles on light background are readable */
.page-resources__text-contrast-fix {
  color: #017439; /* Brand color for titles on light background, good contrast */
}

/* FAQ question text color */
.page-resources__faq-question {
  color: #017439;
}