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

/* General Styles */
.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 */
}

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

.page-resources__section {
  padding: 60px 0;
  text-align: center;
}

.page-resources__section-title {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #26A9E0; /* Brand color for titles */
  text-transform: uppercase;
  font-weight: bold;
}

.page-resources__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #f0f0f0; /* Slightly off-white for body text on dark background */
}

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

/* Color Contrast Handling */
.page-resources__dark-bg {
  background-color: #1a1a1a; /* A slightly lighter dark for sections */
  color: #ffffff;
}

.page-resources__light-bg {
  background-color: #2e2e2e; /* A slightly darker light for contrast */
  color: #f0f0f0;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  overflow: hidden;
  background-color: #1a1a1a; /* Ensure dark background for hero */
  color: #ffffff;
  padding-bottom: 60px; /* Add some padding at the bottom */
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 20px;
}

.page-resources__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand color */
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-resources__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle background image */
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text break */
  max-width: 100%;
}

.page-resources__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #ffffff;
  border-color: #EA7C07;
}

.page-resources__btn-primary:hover {
  background-color: #d16e06;
  border-color: #d16e06;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border-color: #26A9E0;
}

.page-resources__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Intro Section */
.page-resources__intro-section {
  padding: 60px 0;
}
.page-resources__intro-section .page-resources__section-title {
  color: #26A9E0;
}
.page-resources__intro-section .page-resources__text-block {
  color: #f0f0f0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Types Section (Grid of Cards) */
.page-resources__types-section {
  padding: 60px 0;
}

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

.page-resources__card {
  background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent white on dark background */
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  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;
  justify-content: space-between;
  height: 100%; /* Ensure cards have equal height */
  box-sizing: border-box;
  color: #ffffff;
}

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

.page-resources__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block; /* Ensure no extra space below image */
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-resources__card-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #26A9E0;
  font-weight: bold;
}

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

.page-resources__card-title a:hover {
  color: #ffffff;
}

.page-resources__card-description {
  font-size: 0.95em;
  color: #f0f0f0;
  margin-bottom: 15px;
  flex-grow: 1; /* Allow description to take available space */
}

.page-resources__card-link {
  display: inline-block;
  color: #EA7C07; /* Login color for action links */
  text-decoration: none;
  font-weight: bold;
  margin-top: 10px;
  transition: color 0.3s ease;
}

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

/* Usage Section */
.page-resources__usage-section {
  padding: 60px 0;
}
.page-resources__usage-section .page-resources__section-title {
  color: #26A9E0;
}
.page-resources__usage-section .page-resources__text-block {
  color: #f0f0f0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.page-resources__image-full-width {
  margin-top: 40px;
  text-align: center;
}
.page-resources__image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: block; /* Ensure it behaves as a block element */
  margin-left: auto;
  margin-right: auto;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}


/* Benefits Section */
.page-resources__benefits-section {
  padding: 60px 0;
}

.page-resources__benefits-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-resources__benefits-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.page-resources__benefits-title {
  font-size: 1.4em;
  color: #26A9E0;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-resources__benefits-description {
  font-size: 1em;
  color: #f0f0f0;
}
.page-resources__benefits-description a {
  color: #EA7C07;
  text-decoration: none;
}
.page-resources__benefits-description a:hover {
  text-decoration: underline;
}

/* Expert Advice Section */
.page-resources__expert-advice-section {
  padding: 60px 0;
}
.page-resources__expert-advice-section .page-resources__section-title {
  color: #26A9E0;
}
.page-resources__expert-advice-section .page-resources__text-block {
  color: #f0f0f0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-resources__advice-card {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #ffffff;
}

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

.page-resources__advice-image {
  width: 100%;
  height: 180px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-resources__advice-title {
  font-size: 1.4em;
  color: #26A9E0;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-resources__advice-description {
  font-size: 0.95em;
  color: #f0f0f0;
}
.page-resources__advice-description a {
  color: #EA7C07;
  text-decoration: none;
}
.page-resources__advice-description a:hover {
  text-decoration: underline;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 0;
}

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

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

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.12);
  transition: background-color 0.3s ease;
  color: #ffffff;
}

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

.page-resources__faq-title {
  font-size: 1.2em;
  color: #26A9E0;
  margin: 0;
  font-weight: bold;
}

.page-resources__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  color: #26A9E0;
  transition: transform 0.3s ease;
  line-height: 1;
}

.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-out, padding 0.3s ease-out;
  color: #f0f0f0;
}

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

.page-resources__faq-text {
  font-size: 1em;
  margin: 0;
  padding-bottom: 10px;
  color: #f0f0f0;
}
.page-resources__faq-text a {
  color: #EA7C07;
  text-decoration: none;
}
.page-resources__faq-text a:hover {
  text-decoration: underline;
}

/* CTA Section */
.page-resources__cta-section {
  padding: 80px 0;
}
.page-resources__cta-section .page-resources__section-title {
  color: #26A9E0;
}
.page-resources__cta-section .page-resources__text-block {
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 3em;
  }
  .page-resources__hero-description {
    font-size: 1.2em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
  .page-resources__grid,
  .page-resources__benefits-list,
  .page-resources__advice-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-resources__container {
    padding: 0 15px;
  }

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

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

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

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

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

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

  .page-resources__text-block {
    font-size: 1em;
  }

  .page-resources__card-image,
  .page-resources__advice-image {
    height: 180px;
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .page-resources__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* All images must be responsive */
  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* All containers with images/content must be responsive */
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__image-full-width,
  .page-resources__advice-card,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Add horizontal padding to prevent content touching edges */
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-resources__hero-section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-resources__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__faq-question,
  .page-resources__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__faq-question {
    padding: 15px;
  }

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

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__section-title {
    font-size: 1.5em;
  }
}