/* style/promotions.css */

/* --- General Page Styles --- */
.page-promotions {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #FFFFFF; /* Explicitly setting for clarity based on default */
  line-height: 1.6;
}

.page-promotions__section {
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 0; /* Remove default margin for sections */
}

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

.page-promotions__section-title {
  font-size: 36px;
  color: #017439; /* Brand primary color for titles */
  margin-bottom: 30px;
  font-weight: bold;
  line-height: 1.2;
}

.page-promotions__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #444444;
}

.page-promotions__link-inline {
  color: #017439;
  text-decoration: underline;
  font-weight: bold;
}

.page-promotions__link-inline:hover {
  color: #005a2d;
  text-decoration: none;
}

/* --- Hero Section --- */
.page-promotions__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, #017439, #ffffff); /* Gradient background with brand color */
  overflow: hidden; /* Prevent image overflow */
}

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

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

.page-promotions__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-promotions__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: #ffffff; /* White text for contrast on darker gradient part */
}

.page-promotions__hero-title {
  font-size: 48px;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-promotions__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-promotions__hero-cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
}

.page-promotions__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 200px;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-promotions__cta-button--register {
  background: #C30808; /* Custom color for register */
  color: #FFFF00; /* Custom font color for register */
  border: 2px solid #C30808;
}

.page-promotions__cta-button--register:hover {
  background: #e00b0b;
  border-color: #e00b0b;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.page-promotions__cta-button--login {
  background: #C30808; /* Custom color for login */
  color: #FFFF00; /* Custom font color for login */
  border: 2px solid #C30808;
}

.page-promotions__cta-button--login:hover {
  background: #e00b0b;
  border-color: #e00b0b;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* Specific CTA button for bottom of page */
.page-promotions__cta-button--secondary {
  background: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-promotions__cta-button--secondary:hover {
  background: #f0f0f0;
  color: #005a2d;
  border-color: #005a2d;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* --- Introduction Section --- */
.page-promotions__introduction {
  background-color: #f8f8f8;
}

.page-promotions__image-content {
  width: 100%;
  height: auto;
  max-width: 800px;
  margin: 30px auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

/* --- Featured Promotions Grid --- */
.page-promotions__featured-promos {
  background-color: #ffffff;
}

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

.page-promotions__promo-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 450px; /* Ensure cards have consistent height */
}

.page-promotions__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-promotions__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent card image display */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

.page-promotions__card-title {
  font-size: 24px;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.3;
}

.page-promotions__card-description {
  font-size: 16px;
  color: #555555;
  margin-bottom: 25px;
  flex-grow: 1; /* Make description take available space */
}

.page-promotions__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%; /* Ensure button responsiveness */
}

.page-promotions__btn-primary:hover {
  background: #005a2d;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* --- How To Claim Section --- */
.page-promotions__how-to-claim {
  background-color: #017439; /* Dark section */
  color: #ffffff; /* Light text for dark background */
}

.page-promotions__how-to-claim .page-promotions__section-title {
  color: #ffffff;
}

.page-promotions__how-to-claim .page-promotions__text-block {
  color: #f0f0f0;
}

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

.page-promotions__step-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.page-promotions__step-number {
  font-size: 48px;
  font-weight: bold;
  color: #FFFF00; /* Custom font color for register/login */
  margin-bottom: 15px;
  display: block;
  line-height: 1;
}

.page-promotions__step-title {
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__step-description {
  font-size: 16px;
  color: #e0e0e0;
}

.page-promotions__cta-bottom {
  margin-top: 50px;
}

/* --- Terms & Conditions Section --- */
.page-promotions__terms-conditions {
  background-color: #f8f8f8;
}

.page-promotions__terms-list {
  list-style: none;
  text-align: left;
  max-width: 800px;
  margin: 30px auto;
  padding: 0;
}

.page-promotions__terms-list li {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 15px;
  font-size: 16px;
  color: #555555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-promotions__terms-list li strong {
  color: #017439;
}

/* --- Why TP88 Promotions Section --- */
.page-promotions__why-tp88 {
  background-color: #ffffff;
}

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

.page-promotions__why-item {
  background: #f0fdf4; /* Light green background */
  border: 1px solid #d4edda;
  border-radius: 10px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 180px;
}

.page-promotions__why-item-title {
  font-size: 20px;
  color: #017439;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-promotions__why-item-description {
  font-size: 15px;
  color: #555555;
}

/* --- FAQ Area --- */
.page-promotions__faq-area {
  background-color: #f8f8f8;
  text-align: left;
}

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

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-promotions__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.3s ease;
  padding: 0 20px;
  opacity: 0;
  background: #ffffff;
  color: #444444;
}

/* FAQ展开状态 - ⚠️ Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* ⚠️ Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important;
  opacity: 1;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
}

/* Vấn đề phong cách */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #017439; /* Primary brand color for question background */
  color: #ffffff; /* White text for contrast */
  border: 1px solid #017439;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  position: relative;
}

.page-promotions__faq-question:hover {
  background: #005a2d;
  border-color: #005a2d;
}

/* Vấn đề tiêu đề phong cách */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
  color: #ffffff; /* Ensure white text */
}

/* Chuyển đổi biểu tượng */
.page-promotions__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFFF00; /* Custom color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: #ffffff; /* White when active */
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* --- Call to Action Section (Bottom) --- */
.page-promotions__call-to-action {
  background-color: #017439; /* Dark section */
  color: #ffffff; /* Light text for dark background */
  padding-bottom: 80px;
}

.page-promotions__call-to-action .page-promotions__section-title {
  color: #ffffff;
}

.page-promotions__call-to-action .page-promotions__text-block {
  color: #f0f0f0;
}

.page-promotions__center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-promotions__hero-title {
    font-size: 42px;
  }
  .page-promotions__hero-description {
    font-size: 18px;
  }
  .page-promotions__section-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-promotions__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific padding top */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-promotions__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-promotions__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-promotions__hero-cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-promotions__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    margin: 0 auto; /* Center buttons when stacked */
  }

  .page-promotions__section {
    padding: 40px 15px;
  }
  .page-promotions__section-title {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .page-promotions__text-block {
    font-size: 16px;
  }

  .page-promotions__promo-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-promotions__promo-card {
    padding: 25px;
    min-height: auto; /* Allow height to adjust */
  }
  .page-promotions__card-image {
    height: 180px;
  }
  .page-promotions__card-title {
    font-size: 20px;
  }
  .page-promotions__card-description {
    font-size: 15px;
  }
  .page-promotions__btn-primary {
    padding: 10px 20px;
    font-size: 15px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .page-promotions__steps-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-promotions__step-item {
    padding: 25px;
  }
  .page-promotions__step-number {
    font-size: 40px;
  }
  .page-promotions__step-title {
    font-size: 20px;
  }
  .page-promotions__step-description {
    font-size: 15px;
  }

  .page-promotions__terms-list li {
    padding: 12px 15px;
    font-size: 15px;
  }

  .page-promotions__why-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-promotions__why-item {
    padding: 20px;
    min-height: auto;
  }
  .page-promotions__why-item-title {
    font-size: 18px;
  }
  .page-promotions__why-item-description {
    font-size: 14px;
  }

  /* FAQ Mobile */
  .page-promotions__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-promotions__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px); /* Adjust for toggle */
  }
  .page-promotions__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px !important;
  }}