/* style/affiliates.css */
/* body đã padding-top: var(--header-offset)；trang này không được viết lại biến đó */

/* Phong cách cơ bản và bảng màu */
.page-affiliates {
  font-family: 'Arial', sans-serif;
  color: var(--text-main, #F2FFF6); /* Màu chữ mặc định cho nội dung chính */
  background-color: var(--bg-color, #08160F); /* Màu nền mặc định */
  line-height: 1.6;
}

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

.page-affiliates__section-title {
  font-size: 2.5em;
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-affiliates__section-description {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Phần Hero */
.page-affiliates__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10px; /* Padding trên nhỏ vì body đã xử lý --header-offset */
  padding-bottom: 60px;
  overflow: hidden; /* Đảm bảo không tràn */
}

.page-affiliates__hero-image {
  width: 100%;
  height: auto; /* Duy trì tỷ lệ khung hình */
  display: block;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.page-affiliates__hero-content {
  position: relative;
  z-index: 2;
  margin-top: 40px; /* Khoảng cách giữa ảnh và nội dung */
  padding: 0 20px;
  max-width: 900px;
}

.page-affiliates__main-title {
  font-size: clamp(2em, 5vw, 3.5em); /* Kích thước font chữ phản hồi */
  color: var(--gold-color, #F2C14E); /* Sử dụng màu vàng cho tiêu đề chính */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5); /* Hiệu ứng phát sáng nhẹ */
}

.page-affiliates__description {
  font-size: 1.2em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 30px;
}

.page-affiliates__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Cho phép các nút xuống dòng trên màn hình nhỏ hơn */
}

.page-affiliates__btn-primary,
.page-affiliates__btn-secondary,
.page-affiliates__btn-link {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: normal; /* Cho phép xuống dòng */
  word-wrap: break-word; /* Cho phép từ dài xuống dòng */
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Đảm bảo nút không tràn */
}

.page-affiliates__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

.page-affiliates__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

.page-affiliates__btn-secondary {
  background-color: transparent;
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--border-color, #2E7A4E);
}

.page-affiliates__btn-secondary:hover {
  background-color: var(--deep-green, #0A4B2C);
  border-color: var(--main-color, #11A84E);
  transform: translateY(-2px);
}

.page-affiliates__btn-link {
  background-color: var(--deep-green, #0A4B2C);
  color: var(--gold-color, #F2C14E);
  border: 1px solid var(--border-color, #2E7A4E);
  padding: 10px 20px;
  font-size: 0.9em;
}

.page-affiliates__btn-link:hover {
  background-color: var(--main-color, #11A84E);
  color: #ffffff;
}

/* Phần Tại Sao Nên Hợp Tác */
.page-affiliates__why-us-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

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

.page-affiliates__feature-card {
  background-color: var(--card-bg, #11271B);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--divider-color, #1E3A2A);
}

.page-affiliates__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.page-affiliates__feature-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  border-radius: 50%; /* Làm tròn biểu tượng nếu muốn */
  border: 2px solid var(--main-color, #11A84E);
}

.page-affiliates__card-title {
  font-size: 1.5em;
  color: var(--gold-color, #F2C14E);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-affiliates__card-text {
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
}

/* Phần Cách Thức Hoạt Động */
.page-affiliates__how-it-works-section {
  padding: 60px 0;
  background-color: var(--deep-green, #0A4B2C);
}

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

.page-affiliates__step-card {
  background-color: var(--card-bg, #11271B);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #2E7A4E);
}

.page-affiliates__step-number {
  font-size: 3em;
  color: var(--main-color, #11A84E);
  margin-bottom: 10px;
  font-weight: bold;
}

/* Phần Lợi Ích */
.page-affiliates__benefits-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

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

.page-affiliates__benefit-item {
  background-color: var(--card-bg, #11271B);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--divider-color, #1E3A2A);
}

.page-affiliates__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.page-affiliates__benefit-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--aux-color, #22C768);
}

/* Phần Sản Phẩm */
.page-affiliates__products-section {
  padding: 60px 0;
  background-color: var(--deep-green, #0A4B2C);
}

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

.page-affiliates__product-card {
  background-color: var(--card-bg, #11271B);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid var(--border-color, #2E7A4E);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-affiliates__product-image {
  width: 100%;
  height: 200px; /* Chiều cao cố định để nhất quán */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Phần FAQ */
.page-affiliates__faq-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

.page-affiliates__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
}

.page-affiliates__faq-item {
  background-color: var(--card-bg, #11271B);
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--divider-color, #1E3A2A);
  overflow: hidden; /* Để chuyển tiếp mượt mà */
}

.page-affiliates__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  cursor: pointer;
  background-color: var(--card-bg, #11271B);
  transition: background-color 0.3s ease;
}

.page-affiliates__faq-question:hover {
  background-color: var(--deep-green, #0A4B2C);
}

.page-affiliates__faq-item[open] .page-affiliates__faq-question {
  background-color: var(--deep-green, #0A4B2C);
}

.page-affiliates__faq-toggle {
  font-size: 1.5em;
  color: var(--main-color, #11A84E);
  margin-left: 15px;
  line-height: 1;
}

.page-affiliates__faq-answer {
  padding: 0 25px 18px;
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
  line-height: 1.8;
}

/* Đối với thẻ details, ẩn dấu mặc định */
.page-affiliates__faq-item summary {
  list-style: none;
}

.page-affiliates__faq-item summary::-webkit-details-marker {
  display: none;
}

/* Phần CTA cuối trang */
.page-affiliates__cta-bottom-section {
  padding: 60px 0;
  background-color: var(--deep-green, #0A4B2C);
  text-align: center;
}

/* Phong cách phản hồi */
@media (max-width: 1024px) {
  .page-affiliates__hero-content {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .page-affiliates__section-title {
    font-size: 2em;
  }

  .page-affiliates__description {
    font-size: 1em;
  }

  .page-affiliates__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-affiliates__btn-primary,
  .page-affiliates__btn-secondary,
  .page-affiliates__btn-link {
    width: 100% !important; /* Đảm bảo các nút chiếm toàn bộ chiều rộng */
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
  }

  .page-affiliates__hero-section,
  .page-affiliates__why-us-section,
  .page-affiliates__how-it-works-section,
  .page-affiliates__benefits-section,
  .page-affiliates__products-section,
  .page-affiliates__faq-section,
  .page-affiliates__cta-bottom-section {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .page-affiliates__hero-section {
    padding-top: 10px !important; /* body xử lý --header-offset */
  }

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

  .page-affiliates__feature-icon,
  .page-affiliates__benefit-icon {
    width: 80px;
    height: 80px;
  }

  .page-affiliates__product-image {
    height: 180px; /* Điều chỉnh chiều cao cho màn hình nhỏ hơn */
  }
}

@media (max-width: 480px) {
  .page-affiliates__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
  }

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

  .page-affiliates__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
}