/* style/affiliate.css */

/* Base styles for the affiliate page */
.page-affiliate {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #FFFFFF; /* Matches body background */
}

/* Fixed header spacing - apply to the first content section if shared.css doesn't apply to body */
/* Assuming shared.css handles padding-top for body, so hero section should not double it. */
/* If shared.css does NOT handle body padding-top, uncomment the following: */
/* .page-affiliate__hero-section { */
/*   padding-top: var(--header-offset, 120px); */
/* } */

/* Sections */
.page-affiliate__section-title {
  font-size: 2.5em;
  color: #017439; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

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

/* Hero Section */
.page-affiliate__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding: 80px 20px;
  text-align: center;
  overflow: hidden; /* Ensure image doesn't overflow */
  background-color: #017439; /* Dark background for hero */
  color: #ffffff; /* White text for dark background */
}

.page-affiliate__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-bottom: 40px;
}

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

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

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

.page-affiliate__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

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

.page-affiliate__cta-buttons--center {
  margin-top: 40px;
}

.page-affiliate__btn-primary,
.page-affiliate__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;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-affiliate__btn-primary {
  background-color: #C30808; /* Custom red for primary action (register/login) */
  color: #FFFF00; /* Custom yellow for text on primary button */
  border: 2px solid #C30808;
}

.page-affiliate__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
  color: #ffffff;
}

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

.page-affiliate__btn-secondary:hover {
  background-color: #ffffff;
  color: #017439;
}

/* Video Section */
.page-affiliate__video-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
  text-align: center;
}

.page-affiliate__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px; /* Max width for video */
  margin: 0 auto;
  background-color: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.page-affiliate__video {
  width: 100%;
  height: auto;
  display: block;
}

.page-affiliate__video-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
  background: rgba(0,0,0,0); /* Transparent overlay */
}

/* Why Choose Section */
.page-affiliate__why-choose-section {
  padding: 80px 20px;
  background-color: #ffffff;
}

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

.page-affiliate__benefit-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
  color: #333333; /* Dark text for light card background */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-affiliate__benefit-card:hover {
  transform: translateY(-10px);
}

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

.page-affiliate__card-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-affiliate__card-text {
  font-size: 1em;
  color: #555555;
  text-align: left;
}

/* How to Join Section */
.page-affiliate__how-to-join-section {
  padding: 80px 20px;
  background-color: #017439; /* Brand color for background */
  color: #ffffff; /* White text for dark background */
}

.page-affiliate__how-to-join-section .page-affiliate__section-title {
  color: #ffffff;
}

.page-affiliate__how-to-join-section .page-affiliate__section-description {
  color: #f0f0f0;
}

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

.page-affiliate__step-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on brand color */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-affiliate__step-icon {
  width: 60px;
  height: 60px;
  background-color: #C30808; /* Red accent for steps */
  color: #FFFF00; /* Yellow text for accent */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 20px;
}

/* FAQ Section */
.page-affiliate__faq-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
}

.page-affiliate__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
}

.page-affiliate__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-affiliate__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  background-color: #ffffff;
  transition: background-color 0.3s ease;
}

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

.page-affiliate__faq-question h3 {
  margin: 0;
  color: inherit;
  font-size: 1em; /* Reset h3 font size */
}

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

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

.page-affiliate__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
}

.page-affiliate__faq-item.active .page-affiliate__faq-answer {
  max-height: 1000px !important; /* Ensure it expands sufficiently */
  padding: 15px 25px 20px 25px;
}

.page-affiliate__faq-answer p {
  margin-top: 0;
  margin-bottom: 0;
}

/* Contact Section */
.page-affiliate__contact-section {
  padding: 80px 20px;
  background-color: #017439;
  color: #ffffff;
  text-align: center;
}

.page-affiliate__contact-section .page-affiliate__section-title {
  color: #ffffff;
}

.page-affiliate__contact-section .page-affiliate__section-description {
  color: #f0f0f0;
}

.page-affiliate__contact-info {
  margin-top: 30px;
  font-size: 1.1em;
}

.page-affiliate__contact-info p {
  margin-bottom: 10px;
}

.page-affiliate__contact-info a {
  color: #FFFF00; /* Yellow for links in dark section */
  text-decoration: underline;
}

.page-affiliate__contact-info a:hover {
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-affiliate__hero-title {
    font-size: 2.8em;
  }
  .page-affiliate__hero-description {
    font-size: 1.2em;
  }
  .page-affiliate__section-title {
    font-size: 2em;
  }
}