/* style/affiliate-program.css */

/* Base styles for the page content */
.page-affiliate-program {
  color: #ffffff; /* Light text for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body background is handled by shared.css */
}

/* Sections */
.page-affiliate-program__section {
  padding: 80px 20px;
  text-align: center;
}

.page-affiliate-program__dark-bg {
  background-color: #017439; /* Primary brand color for dark sections */
  color: #ffffff;
}

.page-affiliate-program__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Hero Section */
.page-affiliate-program__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  background-color: #0a0a0a; /* Dark background for hero */
  color: #ffffff;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  flex-direction: column; /* Default for mobile, will change for desktop */
}

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

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

.page-affiliate-program__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-affiliate-program__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-affiliate-program__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.3; /* Subtle background image */
}

.page-affiliate-program__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(50%) brightness(0.7); /* Enhance contrast for text */
}

/* General Titles & Text */
.page-affiliate-program__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #ffffff; /* Default for dark body background */
}

.page-affiliate-program__section-intro {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 50px auto;
  color: #f0f0f0;
}

/* Benefits Section */
.page-affiliate-program__section--benefits {
  background-color: #0a0a0a; /* Dark background */
  color: #ffffff;
}

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

.page-affiliate-program__benefit-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter dark card */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: #ffffff;
}

.page-affiliate-program__benefit-card:hover {
  transform: translateY(-5px);
}

.page-affiliate-program__benefit-icon {
  width: 100%; /* Ensure image fills card width */
  max-width: 200px; /* Limit icon size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px; /* Slightly rounded corners for images */
  object-fit: cover;
}

.page-affiliate-program__benefit-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #017439; /* Primary color for titles */
}

.page-affiliate-program__benefit-description {
  font-size: 1em;
  color: #f0f0f0;
}

/* How It Works Section */
.page-affiliate-program__section--how-it-works {
  background-color: #017439; /* Primary brand color */
  color: #ffffff;
}

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

.page-affiliate-program__step-card {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  color: #ffffff;
}

.page-affiliate-program__step-number {
  font-size: 3em;
  font-weight: bold;
  color: #FFFF00; /* Yellow for numbers */
  margin-bottom: 15px;
}

.page-affiliate-program__step-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-affiliate-program__step-description {
  font-size: 1em;
  color: #f0f0f0;
}

.page-affiliate-program__how-it-works-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 40px;
  object-fit: cover;
}

/* Commission Structure Section */
.page-affiliate-program__section--commission-structure {
  background-color: #0a0a0a; /* Dark background */
  color: #ffffff;
}

.page-affiliate-program__commission-table-wrapper {
  overflow-x: auto; /* Enable horizontal scroll for table on small screens */
  margin-top: 40px;
  margin-bottom: 30px;
}

.page-affiliate-program__commission-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  min-width: 600px; /* Ensure table is wide enough */
}

.page-affiliate-program__commission-table th,
.page-affiliate-program__commission-table td {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  color: #ffffff;
}

.page-affiliate-program__commission-table th {
  background-color: #017439; /* Primary color for table headers */
  font-weight: bold;
  color: #ffffff;
}

.page-affiliate-program__commission-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

.page-affiliate-program__commission-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-affiliate-program__commission-note {
  font-size: 0.9em;
  color: #cccccc;
  margin-top: 20px;
}

.page-affiliate-program__commission-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 40px;
  object-fit: cover;
}

/* Marketing Tools Section */
.page-affiliate-program__section--marketing-tools {
  background-color: #017439; /* Primary brand color */
  color: #ffffff;
}

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

.page-affiliate-program__tool-card {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  color: #ffffff;
}

.page-affiliate-program__tool-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #FFFF00; /* Yellow for tool titles */
}

.page-affiliate-program__tool-description {
  font-size: 1em;
  color: #f0f0f0;
}

.page-affiliate-program__marketing-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 40px;
  object-fit: cover;
}

/* FAQ Section */
.page-affiliate-program__section--faq {
  background-color: #0a0a0a; /* Dark background */
  color: #ffffff;
}

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

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

.page-affiliate-program__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.15);
  transition: background-color 0.3s ease;
}

.page-affiliate-program__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.page-affiliate-program__faq-title {
  font-size: 1.2em;
  margin: 0;
  color: #ffffff;
}

.page-affiliate-program__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  color: #FFFF00; /* Yellow toggle icon */
  transition: transform 0.3s ease;
}

.page-affiliate-program__faq-item.active .page-affiliate-program__faq-toggle {
  transform: rotate(45deg); /* Rotate to form an 'x' or '-' */
}

.page-affiliate-program__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 30px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

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

.page-affiliate-program__faq-answer p {
  margin-bottom: 0;
  color: #f0f0f0;
}

/* CTA Section */
.page-affiliate-program__section--cta {
  background-color: #017439; /* Primary brand color */
  color: #ffffff;
  padding: 100px 20px;
}

.page-affiliate-program__cta-content {
  max-width: 800px;
}

.page-affiliate-program__cta-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: #ffffff;
}

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

.page-affiliate-program__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.page-affiliate-program__btn-primary,
.page-affiliate-program__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons are responsive */
  box-sizing: border-box; /* Include padding in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-affiliate-program__btn-primary {
  background-color: #C30808; /* Register/Login red */
  color: #FFFF00; /* Register/Login font yellow */
  border: 2px solid #C30808;
}

.page-affiliate-program__btn-primary:hover {
  background-color: #e02020;
  border-color: #e02020;
}

.page-affiliate-program__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Yellow for secondary button text */
  border: 2px solid #FFFF00;
}

.page-affiliate-program__btn-secondary:hover {
  background-color: #FFFF00;
  color: #017439; /* Dark green text on yellow hover */
}

/* Image specific styles */
.page-affiliate-program img {
  border-radius: 8px; /* Consistent border radius for all content images */
  object-fit: cover;
  /* No filter property to change image color */
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-affiliate-program__hero-section {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    padding-left: 50px;
    padding-right: 50px;
  }

  .page-affiliate-program__hero-content {
    text-align: left;
    max-width: 50%;
  }

  .page-affiliate-program__hero-image-wrapper {
    position: relative;
    width: 45%;
    height: auto;
    opacity: 1;
    filter: none;
  }
  
  .page-affiliate-program__hero-image {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
  }

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

  .page-affiliate-program__hero-cta-buttons {
    justify-content: flex-start;
  }
}


@media (max-width: 768px) {
  /* General mobile adjustments */
  .page-affiliate-program__section {
    padding: 50px 15px;
  }

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

  .page-affiliate-program__hero-section {
    min-height: 500px;
    padding-top: var(--header-offset, 120px) !important;
  }

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

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

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

  /* Image containers */
  .page-affiliate-program__hero-image-wrapper,
  .page-affiliate-program__benefit-card,
  .page-affiliate-program__step-card,
  .page-affiliate-program__tool-card,
  .page-affiliate-program__commission-table-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent overflow */
  }

  /* Buttons responsive */
  .page-affiliate-program__btn-primary,
  .page-affiliate-program__btn-secondary,
  .page-affiliate-program a[class*="button"],
  .page-affiliate-program a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-affiliate-program__hero-cta-buttons,
  .page-affiliate-program__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

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

  .page-affiliate-program__benefit-title,
  .page-affiliate-program__step-title,
  .page-affiliate-program__tool-title {
    font-size: 1.3em;
  }

  .page-affiliate-program__cta-title {
    font-size: 2.2em;
  }

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

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

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

  .page-affiliate-program__commission-table {
    min-width: unset; /* Allow table to shrink */
  }
}