/* Base styles for the Khuyen Mai page */
.page-khuyen-mai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
}

.page-khuyen-mai__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-khuyen-mai__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

/* Hero Section */
.page-khuyen-mai__hero-section {
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.page-khuyen-mai__hero-image-container {
  width: 100%;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden;
}

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

.page-khuyen-mai__hero-content {
  position: relative; /* Ensure content is not absolutely positioned over image */
  z-index: 2;
  max-width: 800px;
  padding: 20px;
  margin-top: 20px;
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff;
}

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

/* Section Titles */
.page-khuyen-mai__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  color: inherit;
}

/* Text Blocks */
.page-khuyen-mai__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  text-align: justify;
}

/* Buttons */
.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
  background-color: #EA7C07;
  color: #ffffff;
  border: 2px solid transparent;
}

.page-khuyen-mai__btn-primary:hover {
  background-color: #d16b00;
  transform: translateY(-2px);
}

.page-khuyen-mai__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-khuyen-mai__btn-secondary:hover {
  background-color: #e0f2f7;
  transform: translateY(-2px);
}

/* Grid Layout for Promotion Cards */
.page-khuyen-mai__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.page-khuyen-mai__card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 20px;
}

.page-khuyen-mai__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-khuyen-mai__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0 20px;
  color: #26A9E0;
}

.page-khuyen-mai__card-description {
  font-size: 0.95rem;
  color: #555555;
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-khuyen-mai__card .page-khuyen-mai__btn-primary {
  margin: 0 20px;
  text-align: center;
}

/* Steps Grid */
.page-khuyen-mai__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
  text-align: center;
}

.page-khuyen-mai__step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-khuyen-mai__step-image {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 20px;
  object-fit: cover;
}

.page-khuyen-mai__step-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #26A9E0;
}

/* Terms List */
.page-khuyen-mai__terms-list {
  list-style: disc inside;
  text-align: left;
  margin: 20px auto 30px auto;
  max-width: 800px;
  font-size: 1rem;
  color: #f0f0f0;
}

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

.page-khuyen-mai__terms-list a {
  color: #EA7C07;
  text-decoration: underline;
}

/* FAQ Section */
.page-khuyen-mai__faq-list {
  max-width: 800px;
  margin: 40px auto;
}

.page-khuyen-mai__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

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

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-question {
  border-bottom: 1px solid #d0d0d0;
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5rem;
  margin-left: 15px;
  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: 15px 25px;
  font-size: 1rem;
  color: #555555;
}

.page-khuyen-mai__faq-answer p {
  margin-bottom: 0;
}

/* CTA Section */
.page-khuyen-mai__cta-section {
  padding: 60px 20px;
  text-align: center;
}

.page-khuyen-mai__cta-content {
  max-width: 900px;
}

.page-khuyen-mai__cta-content .page-khuyen-mai__section-title {
  color: #ffffff;
}

.page-khuyen-mai__cta-content .page-khuyen-mai__description {
  color: #f0f0f0;
  margin-bottom: 40px;
}

/* General image styling for content area */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-khuyen-mai__container {
    padding: 15px;
  }

  .page-khuyen-mai__hero-image-container {
    max-height: 400px;
  }

  .page-khuyen-mai__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .page-khuyen-mai__description {
    font-size: 1rem;
  }

  .page-khuyen-mai__section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
  }

  .page-khuyen-mai__card-title {
    font-size: 1.2rem;
  }

  .page-khuyen-mai__step-title {
    font-size: 1.3rem;
  }

  .page-khuyen-mai__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }

  .page-khuyen-mai__faq-answer {
    padding: 12px 20px;
  }
}

@media (max-width: 768px) {
  .page-khuyen-mai {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-khuyen-mai__container,
  .page-khuyen-mai__grid-layout,
  .page-khuyen-mai__steps-grid,
  .page-khuyen-mai__faq-list,
  .page-khuyen-mai__cta-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* HERO 主图区域 */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Fixed small top padding */
    padding-bottom: 20px !important;
  }

  .page-khuyen-mai__hero-image-container {
    max-height: 250px;
  }

  .page-khuyen-mai__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-top: 15px;
  }

  .page-khuyen-mai__description {
    font-size: 0.95rem;
  }

  /* 游戏轮播 (Not directly present on this page, but as a mandatory rule) */
  /* .page-khuyen-mai__slider-track { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; } */
  /* .page-khuyen-mai__game-slide { flex: 0 0 160px; max-width: 160px; } */

  /* 合作品牌六宫格 (Not directly present on this page, but as a mandatory rule) */
  /* .page-khuyen-mai__banners-top-wrapper { grid-template-columns: repeat(3, 1fr); } */

  /* 博客卡片区 (Not directly present on this page, but as a mandatory rule) */
  /* .page-khuyen-mai__blog-masonry { grid-template-columns: 1fr; } */
  /* .page-khuyen-mai__blog-slider-track { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; } */
  /* .page-khuyen-mai__blog-slide { flex: 0 0 100%; max-width: 100%; } */

  /* 通用图片与容器 */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-khuyen-mai__card-image,
  .page-khuyen-mai__step-image {
    height: auto !important;
  }

  /* 按钮与按钮容器 */
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary,
  .page-khuyen-mai a[class*="button"],
  .page-khuyen-mai a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .page-khuyen-mai__cta-buttons,
  .page-khuyen-mai__button-group,
  .page-khuyen-mai__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px; /* Space between stacked buttons */
  }

  .page-khuyen-mai__card .page-khuyen-mai__btn-primary {
    margin-left: 15px !important;
    margin-right: 15px !important;
  }

  .page-khuyen-mai__faq-question {
    font-size: 0.95rem;
    padding: 12px 18px;
  }

  .page-khuyen-mai__faq-answer {
    padding: 10px 18px;
  }

  .page-khuyen-mai__terms-list {
    font-size: 0.95rem;
    padding-left: 15px;
    padding-right: 15px;
  }
}