/* style/promotions.css */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --accent-red: #C30808;
  --accent-yellow: #FFFF00;
  --border-color: #e0e0e0;
}

.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--secondary-color);
}

/* 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-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-promotions__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.page-promotions__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  filter: none; /* Ensure no filter changes image color */
}

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

.page-promotions__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--accent-yellow);
  line-height: 1.2;
  font-weight: bold;
}

.page-promotions__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  color: var(--text-light);
}

/* General Sections */
.page-promotions__section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-promotions__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: bold;
  line-height: 1.3;
}

.page-promotions__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dark);
}

.page-promotions__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-promotions__dark-section .page-promotions__section-title {
  color: var(--accent-yellow);
}

.page-promotions__dark-section .page-promotions__section-description {
  color: var(--text-light);
}

/* Cards */
.page-promotions__card {
  background-color: var(--secondary-color);
  color: var(--text-dark);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-promotions__card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  filter: none; /* Ensure no filter changes image color */
}

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

.page-promotions__card p {
  font-size: 1em;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* Buttons */
.page-promotions__cta-button,
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-promotions__btn-primary {
  background: var(--accent-red); /* Đăng ký, Đăng nhập */
  color: var(--accent-yellow);
  border-color: var(--accent-red);
}

.page-promotions__btn-primary:hover {
  background: darken(var(--accent-red), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-promotions__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.page-promotions__button-group .page-promotions__cta-button {
  margin-top: 0;
}

/* Why Choose Section */
.page-promotions__why-choose .page-promotions__section-title {
  color: var(--primary-color);
}

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

.page-promotions__feature-item .page-promotions__card img {
  height: 200px;
}

.page-promotions__feature-item .page-promotions__feature-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* Promotion Types Section */
.page-promotions__promotion-category {
  margin-bottom: 60px;
}

.page-promotions__category-title {
  font-size: 2em;
  color: var(--accent-yellow);
  margin-bottom: 30px;
  text-align: center;
  font-weight: bold;
}

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

/* How To Claim Section */
.page-promotions__how-to-claim .page-promotions__section-title {
  color: var(--primary-color);
}

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

.page-promotions__step-item .page-promotions__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
}

.page-promotions__step-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--text-light);
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 20px;
}

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

.page-promotions__important-notes {
  margin-top: 60px;
  padding: 40px;
  background-color: #f9f9f9;
  border: 1px dashed var(--primary-color);
}

.page-promotions__important-notes .page-promotions__card-title {
  color: var(--accent-red);
}

.page-promotions__important-notes ul {
  list-style: disc inside;
  text-align: left;
  padding-left: 0;
  margin-top: 20px;
}

.page-promotions__important-notes li {
  margin-bottom: 10px;
  color: var(--text-dark);
}

.page-promotions__important-notes li a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Terms Section */
.page-promotions__terms .page-promotions__section-title {
  color: var(--accent-yellow);
}

.page-promotions__terms-content {
  background-color: var(--secondary-color);
  padding: 40px;
  border-radius: 10px;
  text-align: left;
}

.page-promotions__terms-content h3 {
  color: var(--primary-color);
  font-size: 1.4em;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__terms-content p {
  margin-bottom: 15px;
  color: var(--text-dark);
}

.page-promotions__terms-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

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

.page-promotions__faq-list {
  margin-top: 40px;
  text-align: left;
}

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: var(--secondary-color);
  box-shadow: 0 2px 8px 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.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.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 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-promotions__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-promotions__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--primary-color);
}

/* 切换图标 */
.page-promotions__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change to X or rotate for active state */
}

/* Call to Action Section */
.page-promotions__call-to-action {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 80px 20px;
}

.page-promotions__call-to-action .page-promotions__section-title {
  color: var(--accent-yellow);
}

.page-promotions__call-to-action .page-promotions__section-description {
  color: var(--text-light);
}


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

  .page-promotions__section-title {
    font-size: 2em;
  }

  .page-promotions__card img {
    height: 200px;
  }

  .page-promotions__promotion-category {
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .page-promotions__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-promotions__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-promotions__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-promotions__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    margin-top: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-promotions__section {
    padding: 50px 15px;
  }

  .page-promotions__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-promotions__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-promotions__feature-grid, .page-promotions__grid, .page-promotions__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-promotions__card {
    padding: 20px;
  }

  .page-promotions__card img {
    max-width: 100% !important;
    width: 100% !important;
    
    object-fit: cover;
    filter: none; /* Ensure no filter changes image color */
  }

  .page-promotions__category-title {
    font-size: 1.6em;
    margin-bottom: 20px;
  }

  .page-promotions__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-promotions__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-promotions__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-promotions__faq-answer {
    padding: 0 15px;
  }
  
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px !important;
  }

  .page-promotions__button-group {
    flex-direction: column;
    gap: 15px;
  }
  
  .page-promotions__button-group .page-promotions__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    filter: none; /* Ensure no filter changes image color */
  }
  
  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__hero-container,
  .page-promotions__button-group,
  .page-promotions__important-notes,
  .page-promotions__terms-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-promotions__hero-image {
    margin-left: 0;
    margin-right: 0;
  }
  .page-promotions__hero-content {
    padding-left: 0;
    padding-right: 0;
  }
  .page-promotions__terms-content, .page-promotions__important-notes {
    padding: 25px 15px;
  }
}

@media (max-width: 480px) {
  .page-promotions__main-title {
    font-size: 1.8em;
  }

  .page-promotions__section-title {
    font-size: 1.6em;
  }

  .page-promotions__cta-button {
    font-size: 0.95em;
    padding: 10px 20px;
  }

  .page-promotions__card-title {
    font-size: 1.2em;
  }

  .page-promotions__step-number {
    width: 50px;
    height: 50px;
    font-size: 1.8em;
  }

  .page-promotions__faq-question h3 {
    font-size: 0.95em;
  }
}