/* style/khuyen-mai.css */
.page-khuyen-mai {
  background-color: #0A0A0A; /* Background color from custom palette */
  color: #FFF6D6; /* Main text color for dark background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, not --header-offset */
  display: flex;
  flex-direction: column; /* Image then text */
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 500px; /* Ensure hero section has some height */
}

.page-khuyen-mai__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 20px; /* Space between image and content */
}

.page-khuyen-mai__hero-content {
  max-width: 900px;
  width: 100%;
  padding: 0 20px 40px;
  box-sizing: border-box;
}

.page-khuyen-mai__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Use clamp for H1 */
  font-weight: 700;
  color: #FFD36B; /* Auxiliary color for highlight */
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(255, 211, 107, 0.5); /* Glow effect */
}

.page-khuyen-mai__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #FFF6D6;
}

.page-khuyen-mai__hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* General Section Styling */
.page-khuyen-mai__section {
  padding: 60px 0;
  border-bottom: 1px solid #3A2A12; /* Border color from custom palette */
}

.page-khuyen-mai__section:last-of-type {
  border-bottom: none;
}

.page-khuyen-mai__container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-khuyen-mai__section-title {
  font-size: 2.5em;
  color: #FFD36B; /* Auxiliary color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 211, 107, 0.4);
}

.page-khuyen-mai__text-block {
  font-size: 1em;
  color: #FFF6D6;
  margin-bottom: 20px;
  text-align: justify;
}

/* Buttons */
.page-khuyen-mai__btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons are responsive */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
  text-align: center;
}

.page-khuyen-mai__btn--primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient from custom palette */
  color: #0A0A0A; /* Dark text for light button */
  border: none;
  box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.page-khuyen-mai__btn--primary:hover {
  background: linear-gradient(180deg, #DDA11D 0%, #FFD86A 100%);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
  transform: translateY(-2px);
}

.page-khuyen-mai__btn--secondary {
  background: #111111; /* Card BG color */
  color: #FFD36B; /* Auxiliary color */
  border: 2px solid #3A2A12; /* Border color */
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.page-khuyen-mai__btn--secondary:hover {
  background: #222222;
  color: #F2C14E; /* Main color */
  border-color: #F2C14E;
  transform: translateY(-2px);
}

/* Promo Card Grid */
.page-khuyen-mai__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-khuyen-mai__promo-card {
  background-color: #111111; /* Card BG color */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-khuyen-mai__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(255, 211, 107, 0.3);
}

.page-khuyen-mai__promo-figure {
  margin: 0;
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-khuyen-mai__promo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.page-khuyen-mai__card-title {
  font-size: 1.5em;
  color: #FFD36B;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-khuyen-mai__card-text {
  font-size: 0.95em;
  color: #FFF6D6;
  margin-bottom: 20px;
  flex-grow: 1;
  text-align: justify;
}

.page-khuyen-mai__card-btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #0A0A0A;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  align-self: flex-start;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-khuyen-mai__card-btn:hover {
  background: linear-gradient(180deg, #DDA11D 0%, #FFD86A 100%);
}

/* Step-by-Step Guide */
.page-khuyen-mai__step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-khuyen-mai__step-card {
  background-color: #111111;
  border: 1px solid #3A2A12;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.page-khuyen-mai__step-card:hover {
  transform: translateY(-5px);
}

.page-khuyen-mai__step-number {
  width: 60px;
  height: 60px;
  background-color: #F2C14E; /* Main color */
  color: #0A0A0A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: 700;
  margin: 0 auto 20px;
  box-shadow: 0 0 15px rgba(242, 193, 78, 0.6);
}

.page-khuyen-mai__step-title {
  font-size: 1.3em;
  color: #FFD36B;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-khuyen-mai__step-text {
  font-size: 0.95em;
  color: #FFF6D6;
}

.page-khuyen-mai__guide-cta {
  text-align: center;
  margin-top: 50px;
}

/* Terms and Conditions */
.page-khuyen-mai__terms-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  color: #FFF6D6;
}

.page-khuyen-mai__terms-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 1em;
}

.page-khuyen-mai__terms-item::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: #F2C14E; /* Main color */
  font-weight: bold;
}

/* FAQ Section */
.page-khuyen-mai__faq-list {
  margin-top: 30px;
}

.page-khuyen-mai__faq-item {
  background-color: #111111;
  border: 1px solid #3A2A12;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: 600;
  color: #FFD36B;
  cursor: pointer;
  background-color: #1a1a1a;
  transition: background-color 0.3s ease;
  list-style: none; /* Remove default marker for details/summary */
}

.page-khuyen-mai__faq-question::-webkit-details-marker {
  display: none;
}

.page-khuyen-mai__faq-question:hover {
  background-color: #222222;
}

.page-khuyen-mai__faq-qtext {
  flex-grow: 1;
}

.page-khuyen-mai__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #F2C14E;
  transition: transform 0.3s ease;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
  transform: rotate(45deg);
}

.page-khuyen-mai__faq-answer {
  padding: 0 25px 20px;
  font-size: 0.95em;
  color: #FFF6D6;
  text-align: justify;
}

/* Bottom CTA */
.page-khuyen-mai__cta-bottom-wrap {
  text-align: center;
}

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

/* Global image and container responsive styles */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsive styles */
@media (max-width: 1024px) {
  .page-khuyen-mai__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }
  .page-khuyen-mai__section-title {
    font-size: 2em;
  }
  .page-khuyen-mai__promo-grid {
    gap: 20px;
  }
  .page-khuyen-mai__step-grid {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* 1. 顶区标题 + 双 CTA */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    min-height: auto;
  }
  .page-khuyen-mai__hero-content {
    padding: 0 15px 30px;
  }
  .page-khuyen-mai__main-title {
    font-size: clamp(1.8em, 8vw, 2.2em) !important; /* Smaller H1 for mobile */
    margin-bottom: 10px;
  }
  .page-khuyen-mai__description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-khuyen-mai__hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  .page-khuyen-mai__btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-khuyen-mai__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. 单栏长文容器 */
  .page-khuyen-mai__section {
    padding: 40px 0;
  }
  .page-khuyen-mai__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px;
  }
  .page-khuyen-mai__text-block {
    font-size: 0.95em;
  }
  .page-khuyen-mai__promo-card {
    margin-bottom: 20px;
  }
  .page-khuyen-mai__promo-figure {
    height: 180px;
  }
  .page-khuyen-mai__card-content {
    padding: 20px;
  }
  .page-khuyen-mai__card-title {
    font-size: 1.3em;
  }
  .page-khuyen-mai__card-text {
    font-size: 0.9em;
  }
  .page-khuyen-mai__card-btn {
    padding: 10px 15px;
    font-size: 0.9em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 3. 通用图片与 figure */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-khuyen-mai__promo-figure,
  .page-khuyen-mai__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 4. 按钮与按钮容器 */
  .page-khuyen-mai__bottom-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-khuyen-mai__bottom-buttons .page-khuyen-mai__btn {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 5. 注册教程与 FAQ 区块 */
  .page-khuyen-mai__step-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-khuyen-mai__step-card {
    padding: 25px;
  }
  .page-khuyen-mai__step-number {
    width: 50px;
    height: 50px;
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-khuyen-mai__step-title {
    font-size: 1.2em;
  }
  .page-khuyen-mai__step-text {
    font-size: 0.9em;
  }
  .page-khuyen-mai__terms-item,
  .page-khuyen-mai__faq-question,
  .page-khuyen-mai__faq-answer p {
    font-size: 0.95em;
  }
  .page-khuyen-mai__faq-question {
    padding: 15px 20px;
  }
  .page-khuyen-mai__faq-toggle {
    font-size: 1.3em;
  }
  .page-khuyen-mai__faq-answer {
    padding: 0 20px 15px;
  }
}