/* style/affiliates.css */
:root {
  --primary-color: #002060; /* Deep Navy Blue */
  --secondary-color: #FFD700; /* Bright Gold */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f9f9f9;
  --background-dark: #001a4d; /* Slightly darker primary for contrast */
}

.page-affiliates {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #ffffff;
}

.page-affiliates h1, .page-affiliates h2, .page-affiliates h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-affiliates h1 {
  font-size: 2.8em;
  text-align: center;
  color: var(--text-light);
}

.page-affiliates h2 {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 30px;
}

.page-affiliates h3 {
  font-size: 1.8em;
  margin-bottom: 10px;
}

.page-affiliates p {
  margin-bottom: 15px;
  font-size: 1.1em;
}

.page-affiliates .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-affiliates section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-affiliates section:nth-of-type(even) {
  background-color: var(--background-light);
}

/* Hero Section */
.page-affiliates .hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--background-dark)); /* Dark gradient background */
  color: var(--text-light);
}

.page-affiliates .hero-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-affiliates .hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-affiliates .hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.page-affiliates .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-affiliates .hero-content p {
  font-size: 1.2em;
  max-width: 800px;
  margin: 20px auto 30px auto;
  color: #e0e0e0;
}

.page-affiliates .cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-affiliates .cta-button:hover {
  background: #ffc400;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Section Why Partner */
.page-affiliates .section-why-partner .reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}

.page-affiliates .section-why-partner .reason-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-affiliates .section-why-partner .reason-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-affiliates .section-why-partner .reason-icon {
  width: 100%; /* Ensure image fills container */
  max-width: 250px; /* Adjust max-width as needed */
  height: auto;
  margin-bottom: 20px;
  object-fit: cover;
  border-radius: 5px;
}

.page-affiliates .section-why-partner .reason-item h3 {
  color: var(--primary-color);
  font-size: 1.5em;
}

/* Section Benefits */
.page-affiliates .section-benefits .benefits-list ul {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

.page-affiliates .section-benefits .benefits-list li {
  background-color: #ffffff;
  padding: 20px;
  border-left: 5px solid var(--secondary-color);
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-size: 1.1em;
  transition: transform 0.2s ease;
}

.page-affiliates .section-benefits .benefits-list li:hover {
  transform: translateX(5px);
}

.page-affiliates .section-benefits .benefits-list li strong {
  color: var(--primary-color);
}

/* Section Commission */
.page-affiliates .section-commission {
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-affiliates .section-commission h2 {
  color: var(--secondary-color);
}

.page-affiliates .section-commission p {
  color: #e0e0e0;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.page-affiliates .commission-table-wrapper {
  overflow-x: auto;
  margin-top: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-affiliates .commission-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Ensure table is wide enough for content */
}

.page-affiliates .commission-table th, .page-affiliates .commission-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.page-affiliates .commission-table thead th {
  background-color: var(--primary-color);
  color: var(--text-light);
  font-weight: bold;
  font-size: 1.1em;
}

.page-affiliates .commission-table tbody td {
  background-color: var(--background-dark);
  color: #f0f0f0;
}

.page-affiliates .commission-table tbody tr:hover td {
  background-color: #002a70; /* Slightly lighter dark for hover */
}

.page-affiliates .commission-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 40px auto 0 auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Section Tools */
.page-affiliates .section-tools .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}

.page-affiliates .section-tools .tool-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-affiliates .section-tools .tool-icon {
  width: 100%; /* Ensure image fills container */
  max-width: 300px; /* Adjust max-width as needed */
  height: auto;
  margin-bottom: 20px;
  object-fit: cover;
  border-radius: 5px;
}

.page-affiliates .section-tools .tool-item h3 {
  color: var(--primary-color);
  font-size: 1.5em;
}

/* Section Registration Process */
.page-affiliates .section-registration-process .registration-steps {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-affiliates .section-registration-process .registration-steps li {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  counter-increment: step-counter;
  position: relative;
}

.page-affiliates .section-registration-process .registration-steps li::before {
  content: "Bước " counter(step-counter);
  display: block;
  font-size: 1.8em;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-affiliates .section-registration-process .registration-steps li h3 {
  color: var(--primary-color);
  font-size: 1.6em;
}

.page-affiliates .section-registration-process .registration-steps li a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: bold;
}

.page-affiliates .section-registration-process .cta-button {
  margin-top: 50px;
  text-align: center;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Section FAQ */
.page-affiliates .section-faq {
  background-color: var(--background-light);
}

.page-affiliates .faq-list {
  margin-top: 40px;
}

.page-affiliates .faq-item {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.page-affiliates .faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-affiliates .faq-question:hover {
  background: #f5f5f5;
}

.page-affiliates .faq-question h3 {
  margin: 0;
  font-size: 1.25em;
  color: var(--primary-color);
}

.page-affiliates .faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  transition: transform 0.3s ease;
}

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

.page-affiliates .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding: 0 20px;
  background: #f9f9f9;
  color: var(--text-dark);
}

.page-affiliates .faq-item.active .faq-answer {
  max-height: 500px; /* Sufficient height to contain content */
  padding: 20px;
}

/* Section Contact */
.page-affiliates .section-contact {
  text-align: center;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-affiliates .section-contact h2 {
  color: var(--secondary-color);
}

.page-affiliates .section-contact p {
  color: #e0e0e0;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

/* Section Player Promo */
.page-affiliates .section-player-promo {
  text-align: center;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 80px 0;
}

.page-affiliates .section-player-promo h2 {
  color: var(--primary-color);
  font-size: 2.5em;
}

.page-affiliates .section-player-promo p {
  color: #001a4d;
  font-size: 1.2em;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.page-affiliates .section-player-promo .cta-promo {
  background: var(--primary-color);
  color: var(--secondary-color);
}

.page-affiliates .section-player-promo .cta-promo:hover {
  background: #003399;
  color: #ffd700;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-affiliates h1 {
    font-size: 2.4em;
  }
  .page-affiliates h2 {
    font-size: 1.8em;
  }
  .page-affiliates h3 {
    font-size: 1.5em;
  }
  .page-affiliates .hero-section {
    padding: 60px 15px;
  }
  .page-affiliates .hero-content p {
    font-size: 1.1em;
  }
  .page-affiliates .cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-affiliates .section-why-partner .reason-grid,
  .page-affiliates .section-tools .tools-grid,
  .page-affiliates .section-registration-process .registration-steps {
    grid-template-columns: 1fr;
  }
  .page-affiliates .section-benefits .benefits-list ul {
    grid-template-columns: 1fr;
  }
  .page-affiliates .commission-table-wrapper {
    min-width: unset;
  }
  .page-affiliates .commission-table {
    min-width: 500px; /* Allow horizontal scroll */
  }
}

@media (max-width: 768px) {
  .page-affiliates h1 {
    font-size: 2em;
  }
  .page-affiliates h2 {
    font-size: 1.6em;
  }
  .page-affiliates h3 {
    font-size: 1.3em;
  }
  .page-affiliates section {
    padding: 40px 0;
  }
  .page-affiliates .hero-image img {
    border-radius: 4px;
  }
  .page-affiliates .faq-question {
    padding: 12px 15px;
  }
  .page-affiliates .faq-question h3 {
    font-size: 1.1em;
  }
  .page-affiliates .faq-toggle {
    font-size: 20px;
  }
  .page-affiliates .faq-answer {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .page-affiliates h1 {
    font-size: 1.8em;
  }
  .page-affiliates h2 {
    font-size: 1.5em;
  }
  .page-affiliates .cta-button {
    width: 100%;
    padding: 10px 20px;
  }
  .page-affiliates .hero-content p {
    font-size: 1em;
  }
  .page-affiliates .section-player-promo h2 {
    font-size: 1.8em;
  }
}