.page-affiliates {
  color: #f0f0f0; /* Default text color for the page, assuming a dark background or dark sections */
  background-color: #1A202C; /* Main brand color for the overall page background */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
  line-height: 1.6;
}

.page-affiliates__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
  background-color: #1A202C;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.page-affiliates__hero-content {
  z-index: 2;
  max-width: 900px;
}

.page-affiliates__hero-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #FFD700;
  line-height: 1.2;
}

.page-affiliates__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 800px;
  opacity: 0.9;
}

.page-affiliates__hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-affiliates__button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.page-affiliates__button--primary {
  background-color: #FFD700;
  color: #1A202C;
  border: 2px solid #FFD700;
}

.page-affiliates__button--primary:hover {
  background-color: #e5c100;
  border-color: #e5c100;
}

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

.page-affiliates__button--secondary:hover {
  background-color: #FFD700;
  color: #1A202C;
}

.page-affiliates__button--small {
  padding: 10px 20px;
  font-size: 1em;
}

.page-affiliates__button--large {
  padding: 18px 35px;
  font-size: 1.2em;
}

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

.page-affiliates__hero-image, .page-affiliates__cta-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: brightness(0.7); /* Slightly darken for text readability, not changing color */
}

.page-affiliates__section-title {
  font-size: 2.8em;
  font-weight: 700;
  color: #FFD700;
  text-align: center;
  margin-bottom: 25px;
}

.page-affiliates__section-intro {
  font-size: 1.2em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
  color: #f0f0f0;
}

.page-affiliates__why-partner-section,
.page-affiliates__how-it-works-section,
.page-affiliates__commission-section,
.page-affiliates__marketing-tools-section,
.page-affiliates__faq-section,
.page-affiliates__cta-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #1A202C;
  color: #ffffff;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-affiliates__why-partner-section {
  margin-top: -80px;
  position: relative;
  z-index: 3;
}

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

.page-affiliates__feature-card,
.page-affiliates__step-card,
.page-affiliates__tool-card {
  background-color: #2a3341; /* Darker shade of primary */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  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;
  align-items: center;
  justify-content: space-between;
}

.page-affiliates__feature-card:hover,
.page-affiliates__step-card:hover,
.page-affiliates__tool-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.page-affiliates__feature-icon {
  width: 200px; /* Minimum size 200px */
  height: 150px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-affiliates__feature-title,
.page-affiliates__step-title,
.page-affiliates__tool-title {
  font-size: 1.8em;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-affiliates__feature-description,
.page-affiliates__step-description,
.page-affiliates__tool-description {
  font-size: 1.05em;
  color: #cccccc;
}

.page-affiliates__step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #FFD700;
  color: #1A202C;
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 25px;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

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

.page-affiliates__commission-tier {
  background-color: #2a3341;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-affiliates__tier-title {
  font-size: 1.8em;
  color: #FFD700;
  margin-bottom: 10px;
}

.page-affiliates__tier-description {
  font-size: 1.1em;
  color: #cccccc;
}

.page-affiliates__commission-image-wrapper, .page-affiliates__marketing-image-wrapper {
  grid-column: 1 / -1;
  margin-top: 40px;
  text-align: center;
}

.page-affiliates__commission-image, .page-affiliates__marketing-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  width: 600px;
  height: 450px;
  object-fit: cover;
}

.page-affiliates__disclaimer {
  font-size: 0.9em;
  color: #aaaaaa;
  text-align: center;
  margin-top: 20px;
}

.page-affiliates__faq-container {
  margin-top: 40px;
}

.page-affiliates__faq-item {
  background-color: #2a3341;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-affiliates__faq-question {
  font-size: 1.5em;
  color: #FFD700;
  margin-bottom: 10px;
  cursor: pointer;
  position: relative;
  padding-right: 30px;
}

.page-affiliates__faq-answer {
  font-size: 1.05em;
  color: #cccccc;
  margin-top: 15px;
  display: none; /* Hidden by default, toggled by JS */
}

.page-affiliates__faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  color: #FFD700;
  transition: transform 0.3s ease;
}

.page-affiliates__faq-question.active::after {
  content: '-';
  transform: translateY(-50%) rotate(180deg);
}

.page-affiliates__cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 100px 20px;
}

.page-affiliates__cta-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  z-index: 2;
  position: relative;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-affiliates__hero-title {
    font-size: 2.8em;
  }
  .page-affiliates__section-title {
    font-size: 2.4em;
  }
  .page-affiliates__hero-image-wrapper, .page-affiliates__cta-image-wrapper {
    opacity: 0.15;
  }
}

@media (max-width: 768px) {
  .page-affiliates__hero-section,
  .page-affiliates__why-partner-section,
  .page-affiliates__how-it-works-section,
  .page-affiliates__commission-section,
  .page-affiliates__marketing-tools-section,
  .page-affiliates__faq-section,
  .page-affiliates__cta-section {
    padding: 60px 15px;
    margin-bottom: 30px;
  }
  .page-affiliates__hero-title {
    font-size: 2.2em;
  }
  .page-affiliates__hero-description {
    font-size: 1.1em;
  }
  .page-affiliates__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-affiliates__button {
    width: 100%;
    max-width: 300px;
  }
  .page-affiliates__section-title {
    font-size: 2em;
  }
  .page-affiliates__section-intro {
    font-size: 1em;
    margin-bottom: 40px;
  }
  .page-affiliates__features-grid,
  .page-affiliates__steps-grid,
  .page-affiliates__tools-grid,
  .page-affiliates__commission-details {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-affiliates__feature-icon {
    width: 200px; /* Enforce min width */
    height: 150px;
  }
  .page-affiliates__commission-image,
  .page-affiliates__marketing-image {
    max-width: 100%;
    height: auto;
    width: 100%; /* Ensure mobile images don't overflow */
  }
  .page-affiliates__feature-title,
  .page-affiliates__step-title,
  .page-affiliates__tool-title,
  .page-affiliates__tier-title {
    font-size: 1.5em;
  }
  .page-affiliates__faq-question {
    font-size: 1.3em;
  }
  /* Ensure all images within .page-affiliates are responsive and do not overflow */
  .page-affiliates img {
    max-width: 100%;
    height: auto;
  }
}