/* style/affiliate-program.css */

/* Base styles for the affiliate program page */
.page-affiliate-program {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #1a1a2e; /* Inherited from shared.css, dark background */
}

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

.page-affiliate-program__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-affiliate-program__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

.page-affiliate-program__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.page-affiliate-program__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
  color: #ffffff;
}

.page-affiliate-program__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-affiliate-program__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: grayscale(100%); /* Only grayscale allowed, not color altering filters */
}

/* Section titles and descriptions */
.page-affiliate-program__section-title {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-affiliate-program__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

/* General card styles */
.page-affiliate-program__card {
  background-color: #ffffff;
  color: #333333;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-affiliate-program__dark-card {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-affiliate-program__dark-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-affiliate-program__card-title {
  font-size: 1.5em;
  margin-top: 15px;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-affiliate-program__card-text {
  font-size: 1em;
  line-height: 1.7;
}

/* Why Join Section */
.page-affiliate-program__why-join-section {
  padding: 80px 0;
}

.page-affiliate-program__why-join-section .page-affiliate-program__section-title,
.page-affiliate-program__why-join-section .page-affiliate-program__section-description {
  color: #333333;
}

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

.page-affiliate-program__feature-icon {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
}

/* Partnership Models Section */
.page-affiliate-program__models-section {
  padding: 80px 0;
}

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

/* How to Join Section */
.page-affiliate-program__how-to-join-section {
  padding: 80px 0;
}

.page-affiliate-program__how-to-join-section .page-affiliate-program__section-title,
.page-affiliate-program__how-to-join-section .page-affiliate-program__section-description {
  color: #333333;
}

.page-affiliate-program__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-affiliate-program__step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 300px; /* Ensure cards have similar height */
}

.page-affiliate-program__step-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-affiliate-program__cta-wrapper {
  text-align: center;
  margin-top: 60px;
}

/* Partner Support Section */
.page-affiliate-program__support-section {
  padding: 80px 0;
}

.page-affiliate-program__support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: center;
}

.page-affiliate-program__support-item {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-affiliate-program__support-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-affiliate-program__support-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: bold;
  color: #ffffff;
}

.page-affiliate-program__support-text {
  font-size: 0.95em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-affiliate-program__faq-section {
  padding: 80px 0;
}

.page-affiliate-program__faq-section .page-affiliate-program__section-title,
.page-affiliate-program__faq-section .page-affiliate-program__section-description {
  color: #333333;
}

.page-affiliate-program__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

.page-affiliate-program__faq-item {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  padding: 0;
  overflow: hidden;
  color: #333333;
}

.page-affiliate-program__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  background-color: #f9f9f9;
  color: #333333;
  transition: background-color 0.3s ease;
}

.page-affiliate-program__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-affiliate-program__faq-item summary:hover {
  background-color: #f0f0f0;
}

.page-affiliate-program__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-affiliate-program__faq-item[open] .page-affiliate-program__faq-toggle {
  transform: rotate(45deg);
}

.page-affiliate-program__faq-answer {
  padding: 20px 25px;
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  font-size: 1em;
  line-height: 1.7;
  color: #555555;
}

/* Final CTA Section */
.page-affiliate-program__cta-final-section {
  padding: 80px 0;
  text-align: center;
}

/* Buttons */
.page-affiliate-program__btn-primary {
  display: inline-block;
  background-color: #017439;
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-affiliate-program__btn-primary:hover {
  background-color: #005f2f;
  transform: translateY(-2px);
}

.page-affiliate-program__btn-register {
  background-color: #C30808; /* Specific color for Register */
  color: #FFFF00; /* Specific font color for Register */
}

.page-affiliate-program__btn-register:hover {
  background-color: #a00606;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-affiliate-program__hero-title {
    font-size: 2.5em;
  }
  .page-affiliate-program__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-affiliate-program__hero-section {
    flex-direction: column;
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
  }

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

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

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

  .page-affiliate-program__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-affiliate-program__features-grid,
  .page-affiliate-program__model-grid,
  .page-affiliate-program__steps-grid,
  .page-affiliate-program__support-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-affiliate-program__card,
  .page-affiliate-program__dark-card,
  .page-affiliate-program__support-item {
    padding: 25px 15px;
  }

  .page-affiliate-program__container {
    padding: 0 15px;
  }

  /* Images responsive */
  .page-affiliate-program img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-affiliate-program__hero-image-wrapper,
  .page-affiliate-program__feature-icon,
  .page-affiliate-program__step-icon,
  .page-affiliate-program__support-icon {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Buttons responsive */
  .page-affiliate-program__btn-primary,
  .page-affiliate-program__btn-register {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 15px 10px;
  }

  .page-affiliate-program__cta-wrapper {
    padding: 0 15px;
    box-sizing: border-box;
  }

  .page-affiliate-program__faq-item summary {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-affiliate-program__faq-answer {
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .page-affiliate-program__hero-title {
    font-size: 1.8em;
  }
  .page-affiliate-program__section-title {
    font-size: 1.5em;
  }
  .page-affiliate-program__btn-primary {
    font-size: 1em;
  }
}

/* Ensure content area images are not too small */
.page-affiliate-program__feature-icon,
.page-affiliate-program__step-icon {
  min-width: 200px;
  min-height: 150px; /* Adjust min-height as needed, based on aspect ratio */
  object-fit: cover;
}

.page-affiliate-program__support-icon {
  min-width: 80px; /* Icons can be smaller if purely decorative and not 'content' */
  min-height: 80px;
  object-fit: contain;
}

/* Override specific sizes for support icons if they are small content images */
/* If support icons are meant to be content images, they must meet 200x200. */
/* Assuming these are decorative icons, they can be smaller. However, the instruction states '禁止所有小图标'. */
/* Therefore, I'm setting their min-width/height to 200px in the imageRequirements. */
/* And will adjust the CSS here to allow them to scale down for display if needed. */
/* For display, I'll keep them at 80x80 or 100x100 if they are indeed icons for visual emphasis, but the source image must be large. */
/* Re-reading: '禁止所有小图标' applies to the *source image* size, not necessarily the *displayed size* if scaled down. */
/* But '所有图片的最小尺寸必须至少为 200x200像素' refers to the *source* image. */
/* '内容区图片 CSS 尺寸下限...均不得使显示尺寸小于 200px' applies to img within .page-affiliate-program. */
/* This means the support icons, if they are img tags, must display at >= 200px. */
/* This contradicts the visual intent of a small icon. I will make them larger. */
.page-affiliate-program__support-icon {
  width: 200px; /* Ensure display size is >= 200px */
  height: 200px; /* Ensure display size is >= 200px */
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure card titles and text are readable */
.page-affiliate-program__card-title, .page-affiliate-program__card-text {
    color: #333333; /* Default for light cards */
}
.page-affiliate-program__dark-card .page-affiliate-program__card-title,
.page-affiliate-program__dark-card .page-affiliate-program__card-text {
    color: #ffffff; /* Default for dark cards */
}

/* Ensure general paragraphs and list items in light sections are dark */
.page-affiliate-program__light-bg p, .page-affiliate-program__light-bg li {
    color: #333333;
}

/* Ensure general paragraphs and list items in dark sections are light */
.page-affiliate-program__dark-bg p, .page-affiliate-program__dark-bg li {
    color: #f0f0f0;
}

/* Color contrast fixes for specific elements if needed */
.page-affiliate-program__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

.page-affiliate-program__dark-section .page-affiliate-program__text-contrast-fix {
  color: #ffffff !important;
}