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

/* Base styles for the page content */
.page-resources {
  color: #ffffff; /* Default text color for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body has background-color: #1a1a1a from shared.css */
}

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
  min-height: 600px;
  overflow: hidden;
  background-color: #017439; /* Primary brand color for hero background */
  color: #ffffff;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-resources__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3; /* Overlay image to blend with background color */
  filter: none; /* Ensure no CSS filter changes image color */
}

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

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

.page-resources__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller 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: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* Specific button colors */
.page-resources__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #ffffff; /* WCAG AA compliant text color for #C30808 background (contrast 4.6:1) */
  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: rgba(255, 255, 255, 0.2);
}

/* General Section Styling */
.page-resources__section {
  padding: 60px 0;
}

.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherits from parent section */
}

.page-resources__section-intro {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: inherit; /* Inherits from parent section */
}

/* Light Background Section (for main content) */
.page-resources__light-bg {
  background-color: #ffffff;
  color: #333333; /* Dark text for light background */
}

/* Dark Background Section (for features / CTA) */
.page-resources__dark-section {
  background-color: #017439; /* Primary brand color */
  color: #ffffff;
}

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

.page-resources__card {
  background-color: #f8f8f8; /* Light background for cards on light section */
  color: #333333; /* Dark text for light card background */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-resources__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  filter: none; /* Ensure no CSS filter changes image color */
  min-width: 200px;
  min-height: 200px;
}

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

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

.page-resources__card-title a:hover {
  color: #005f2e; /* Darker green on hover */
}

.page-resources__card-text {
  font-size: 1em;
  padding: 0 15px 20px 15px;
  flex-grow: 1; /* Allow text to take available space */
}

.page-resources__card-link {
  display: block;
  padding: 10px 15px 20px 15px;
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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


/* Feature Grid (for section 2) */
.page-resources__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__feature-card {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark section */
  color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.page-resources__feature-image {
  width: 100%;
  max-width: 250px; /* Constrain image width */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  filter: none; /* Ensure no CSS filter changes image color */
  min-width: 200px;
  min-height: 200px;
}

.page-resources__feature-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-resources__feature-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* Benefit List (for section 3) */
.page-resources__benefit-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-resources__benefit-item {
  background-color: #f8f8f8;
  color: #333333;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

.page-resources__benefit-text {
  font-size: 1em;
}

/* FAQ Section */
.page-resources__faq-section {
  background-color: #f0f0f0; /* Slightly different light background */
  color: #333333;
}

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

.page-resources__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-resources__faq-item summary {
  list-style: none; /* Remove default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  background-color: #fefefe;
  transition: background-color 0.3s ease;
}

.page-resources__faq-item summary::-webkit-details-marker {
  display: none; /* Hide for Webkit browsers */
}

.page-resources__faq-item summary:hover {
  background-color: #e6f7e6; /* Lighter green on hover */
}

.page-resources__faq-qtext {
  flex-grow: 1;
}

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

.page-resources__faq-item[open] .page-resources__faq-toggle {
  content: "−"; /* Change to minus when open */
}

.page-resources__faq-answer {
  padding: 15px 25px 20px 25px;
  font-size: 1.05em;
  color: #555555;
  border-top: 1px solid #e0e0e0;
}

/* Call to Action Section */
.page-resources__cta-section {
  text-align: center;
  padding: 80px 20px;
  background-color: #017439; /* Primary brand color */
  color: #ffffff;
}

.page-resources__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-resources__cta-description {
  font-size: 1.2em;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-resources__benefit-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@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__card-title {
    font-size: 1.3em;
  }
  .page-resources__feature-title {
    font-size: 1.6em;
  }
  .page-resources__benefit-title {
    font-size: 1.6em;
  }
  .page-resources__cta-title {
    font-size: 2.4em;
  }
}

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

  /* Fixed header offset for mobile, applied to the first content section */
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    min-height: 400px;
  }

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

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

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    padding: 12px 20px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__section {
    padding: 40px 0;
  }

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

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

  .page-resources__section-intro {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

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

  /* Image responsiveness for all images within .page-resources */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure image containers also adapt */
  .page-resources__card,
  .page-resources__feature-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px; /* Adjust padding for mobile cards */
  }

  /* FAQ specific mobile styles */
  .page-resources__faq-item summary {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-resources__faq-answer {
    padding: 10px 20px 15px 20px;
    font-size: 1em;
  }

  .page-resources__cta-title {
    font-size: 2em;
  }
  .page-resources__cta-description {
    font-size: 1em;
  }
}