/* style/promotions.css */

/* Biến CSS */
:root {
  --primary-color: #FFD700; /* Vàng kim */
  --secondary-color: #8B0000; /* Đỏ sẫm */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #121212;
  --background-light: #f8f8f8;
  --card-background-dark: rgba(255, 255, 255, 0.1);
  --border-color: #333;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Reset cơ bản và font */
.page-promotions {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Body background is dark, so use light text */
  background-color: var(--background-dark);
  padding-top: 120px; /* Adjust for fixed header */
}

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

.page-promotions__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-promotions__description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

/* Hero Section */
.page-promotions__hero-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--secondary-color), var(--background-dark));
  color: var(--text-light);
}

.page-promotions__main-title {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px var(--shadow-color);
}

.page-promotions__hero-section .page-promotions__description {
  color: var(--text-light);
}

.page-promotions__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-promotions__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-promotions__btn-primary {
  background: var(--primary-color);
  color: var(--background-dark);
  border: 2px solid var(--primary-color);
}

.page-promotions__btn-primary:hover {
  background: darken(var(--primary-color), 10%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-promotions__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-promotions__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--background-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Current Promotions Section */
.page-promotions__current-promotions {
  padding: 80px 0;
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-promotions__current-promotions .page-promotions__section-title {
  color: var(--secondary-color);
}

.page-promotions__current-promotions .page-promotions__description {
  color: var(--text-dark);
}

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

.page-promotions__promotion-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-promotions__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-promotions__card-title {
  font-size: 24px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__card-text {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-promotions__card-button {
  display: inline-block;
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 6px;
  text-align: center;
  margin-top: auto; /* Push button to bottom */
}

/* How To Claim Section */
.page-promotions__how-to-claim {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-promotions__how-to-claim .page-promotions__section-title {
  color: var(--primary-color);
}

.page-promotions__how-to-claim .page-promotions__description {
  color: var(--text-light);
}

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

.page-promotions__step-item {
  background: var(--card-background-dark);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-promotions__step-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
}

.page-promotions__step-icon {
  width: 60px;
  height: 60px;
  line-height: 60px;
  background: var(--primary-color);
  color: var(--background-dark);
  border-radius: 50%;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-promotions__step-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-promotions__step-text {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-promotions__step-button {
  padding: 10px 25px;
  font-size: 16px;
  width: auto;
  margin-top: auto;
}

/* Terms and Conditions Section */
.page-promotions__terms-and-conditions {
  padding: 80px 0;
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-promotions__terms-and-conditions .page-promotions__section-title {
  color: var(--secondary-color);
}

.page-promotions__terms-and-conditions .page-promotions__description {
  color: var(--text-dark);
}

.page-promotions__terms-list {
  list-style: disc inside;
  font-size: 16px;
  color: var(--text-dark);
  max-width: 800px;
  margin: 0 auto 40px auto;
  padding-left: 20px;
}

.page-promotions__terms-list li {
  margin-bottom: 10px;
}

.page-promotions__read-more-button {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 30px;
}

/* FAQ Section */
.page-promotions__faq-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-promotions__faq-section .page-promotions__section-title {
  color: var(--primary-color);
}

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

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

/* 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.4s ease;
  padding: 0 25px;
  opacity: 0;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!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 25px !important;
  opacity: 1;
  background: var(--background-light);
  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: 20px 25px;
  background: var(--card-background-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-promotions__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
}

.page-promotions__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

/* 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;
  color: var(--primary-color);
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
}

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

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: var(--text-light);
  transform: rotate(45deg); /* Thêm hiệu ứng xoay cho dấu trừ */
}

/* Join Us CTA Section */
.page-promotions__join-us-cta {
  padding: 80px 0;
  text-align: center;
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-promotions__join-us-cta .page-promotions__section-title {
  color: var(--secondary-color);
}

.page-promotions__join-us-cta .page-promotions__description {
  color: var(--text-dark);
}

.page-promotions__main-cta-button {
  padding: 18px 45px;
  font-size: 20px;
  margin-top: 40px;
}

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

@media (max-width: 768px) {
  .page-promotions {
    padding-top: 100px !important; /* Mobile adjust for fixed header */
    font-size: 16px;
    line-height: 1.6;
  }
  .page-promotions__container {
    padding: 0 15px;
  }
  .page-promotions__main-title {
    font-size: 36px;
  }
  .page-promotions__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-promotions__description {
    font-size: 15px;
    margin-bottom: 40px;
  }
  .page-promotions__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-promotions__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 25px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-promotions__promotions-grid {
    grid-template-columns: 1fr;
  }
  .page-promotions__promotion-card {
    margin-bottom: 20px;
  }
  .page-promotions__promotion-image {
    height: 180px;
  }
  .page-promotions__card-title {
    font-size: 20px;
  }
  .page-promotions__card-text {
    font-size: 15px;
  }
  .page-promotions__steps-grid {
    grid-template-columns: 1fr;
  }
  .page-promotions__step-item {
    padding: 25px;
    margin-bottom: 20px;
  }
  .page-promotions__step-icon {
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 28px;
  }
  .page-promotions__step-title {
    font-size: 20px;
  }
  .page-promotions__step-text {
    font-size: 15px;
  }
  .page-promotions__terms-list {
    font-size: 15px;
    padding-left: 15px;
  }
  .page-promotions__faq-question {
    padding: 15px 20px;
  }
  .page-promotions__faq-question h3 {
    font-size: 16px;
  }
  .page-promotions__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px 20px !important;
  }
  .page-promotions__main-cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px 30px;
    font-size: 18px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  /* Tất cả hình ảnh phải thích ứng với màn hình di động */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__promotion-card,
  .page-promotions__step-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-promotions__main-title {
    font-size: 30px;
  }
  .page-promotions__section-title {
    font-size: 24px;
  }
  .page-promotions__cta-button {
    padding: 12px 20px;
    font-size: 15px;
  }
  .page-promotions__card-title {
    font-size: 18px;
  }
  .page-promotions__step-title {
    font-size: 18px;
  }
  .page-promotions__faq-question h3 {
    font-size: 15px;
  }
  .page-promotions__main-cta-button {
    padding: 14px 25px;
    font-size: 16px;
  }
}