/* style/affiliates.css */
.page-affiliates {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: #1a1a1a; /* Inherited from body, ensuring consistency */
}

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

/* Hero Section */
.page-affiliates__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding: 80px 0;
  text-align: center;
  overflow: hidden;
  background-color: #1a1a1a;
  padding-top: var(--header-offset, 120px);
}

.page-affiliates__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #1a1a1a;
}

.page-affiliates__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.page-affiliates__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: #ffffff;
}

.page-affiliates__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #26A9E0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-affiliates__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

/* General Section Styling */
.page-affiliates__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0;
}

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

.page-affiliates__dark-bg {
  background-color: #1a1a1a;
  color: #f0f0f0;
  padding: 80px 0;
}

.page-affiliates__light-bg {
  background-color: #ffffff;
  color: #333333;
  padding: 80px 0;
}

.page-affiliates__light-bg .page-affiliates__section-description {
  color: #555555;
}

/* Buttons */
.page-affiliates__btn-primary,
.page-affiliates__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;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-affiliates__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
  margin: 0 10px;
}

.page-affiliates__btn-primary:hover {
  background-color: #1e87b7;
  border-color: #1e87b7;
}

.page-affiliates__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
  margin: 0 10px;
}

.page-affiliates__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

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

.page-affiliates__feature-card,
.page-affiliates__tool-item,
.page-affiliates__step-card {
  background-color: #1a1a1a; /* For light-bg sections, use dark card */
  color: #f0f0f0;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-affiliates__light-bg .page-affiliates__feature-card,
.page-affiliates__light-bg .page-affiliates__tool-item,
.page-affiliates__light-bg .page-affiliates__step-card {
  background-color: #f9f9f9; /* For light-bg sections, use lighter card */
  color: #333333;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-affiliates__feature-card:hover,
.page-affiliates__tool-item:hover,
.page-affiliates__step-card:hover {
  transform: translateY(-10px);
}

.page-affiliates__feature-icon,
.page-affiliates__tool-image {
  width: 100%;
  height: auto;
  max-width: 200px;
  margin-bottom: 20px;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-affiliates__feature-title,
.page-affiliates__tool-title,
.page-affiliates__step-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #26A9E0;
}

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

.page-affiliates__light-bg .page-affiliates__feature-text,
.page-affiliates__light-bg .page-affiliates__tool-text,
.page-affiliates__light-bg .page-affiliates__step-text {
  color: #666666;
}

/* Commission Table */
.page-affiliates__commission-table {
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-affiliates__table-row {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-affiliates__table-row:last-child {
  border-bottom: none;
}

.page-affiliates__table-header {
  background-color: #26A9E0;
  font-weight: bold;
  color: #ffffff;
}

.page-affiliates__table-cell {
  flex: 1;
  padding: 15px 20px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.page-affiliates__table-cell:last-child {
  border-right: none;
}

.page-affiliates__table-row:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

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

/* Steps Section */
.page-affiliates__step-card {
  background-color: #222222; /* Specific dark background for steps in dark section */
  color: #f0f0f0;
}

.page-affiliates__step-number {
  font-size: 3em;
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 15px;
}

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

/* FAQ Section */
.page-affiliates__faq-list {
  max-width: 800px;
  margin: 40px auto;
}

.page-affiliates__faq-item {
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-affiliates__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: #ffffff;
  color: #333333;
  font-weight: bold;
  border-bottom: 1px solid #eeeeee;
}

.page-affiliates__faq-question:hover {
  background-color: #f0f0f0;
}

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

.page-affiliates__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-affiliates__faq-item.active .page-affiliates__faq-toggle {
  transform: rotate(45deg);
}

.page-affiliates__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #ffffff;
  color: #555555;
}

.page-affiliates__faq-item.active .page-affiliates__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 20px;
}

.page-affiliates__faq-answer p {
  margin: 0;
  color: #555555;
}

/* Contact CTA Section */
.page-affiliates__contact-cta-section {
  text-align: center;
}

.page-affiliates__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

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

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

  .page-affiliates__hero-section {
    min-height: 400px;
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important;
  }

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

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

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

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

  .page-affiliates__dark-bg, .page-affiliates__light-bg {
    padding: 60px 0;
  }

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

  .page-affiliates__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-affiliates__features-grid, .page-affiliates__tools-grid, .page-affiliates__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .page-affiliates__feature-card, .page-affiliates__tool-item, .page-affiliates__step-card {
    padding: 25px;
  }

  .page-affiliates__commission-table {
    margin: 30px auto;
    font-size: 0.9em;
    padding: 0 15px;
  }

  .page-affiliates__table-row {
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .page-affiliates__table-cell {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .page-affiliates__table-header .page-affiliates__table-cell {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .page-affiliates__faq-list {
    margin: 30px auto;
    padding: 0 15px;
  }

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

  .page-affiliates__faq-title {
    font-size: 1.1em;
  }

  .page-affiliates__faq-answer {
    padding: 0 15px;
  }

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

  /* Image responsiveness */
  .page-affiliates img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-affiliates__hero-image-wrapper,
  .page-affiliates__section,
  .page-affiliates__container,
  .page-affiliates__feature-card,
  .page-affiliates__tool-item,
  .page-affiliates__step-card,
  .page-affiliates__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-affiliates__hero-section,
  .page-affiliates__why-us-section,
  .page-affiliates__commission-structure-section,
  .page-affiliates__marketing-tools-section,
  .page-affiliates__how-to-join-section,
  .page-affiliates__faq-section,
  .page-affiliates__contact-cta-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}