/* 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 body background */
  background-color: #ffffff; /* Explicitly setting for clarity */
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, relying on shared for body padding-top */
  background-color: #017439;
  display: flex;
  flex-direction: column; /* Image on top, text below */
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Ensure no overflow issues */
}

.page-khuyen-mai__hero-image-wrapper {
  width: 100%;
  max-width: 100%; /* Ensure it doesn't overflow */
  overflow: hidden;
  margin-bottom: 20px; /* Space between image and content */
}

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

.page-khuyen-mai__hero-content {
  text-align: center;
  padding: 0 20px 40px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  color: #ffffff; /* White text on dark green background */
}

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

.page-khuyen-mai__intro-text {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

.page-khuyen-mai__cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  box-sizing: border-box;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.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;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
  text-align: center;
  box-sizing: border-box;
  flex-grow: 1;
  max-width: 240px; /* Limit individual button width for desktop */
}

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

.page-khuyen-mai__btn-primary:hover {
  background-color: #005f2c;
  border-color: #005f2c;
}

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

.page-khuyen-mai__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005f2c;
  border-color: #005f2c;
}

/* General Section Styles */
.page-khuyen-mai__section {
  padding: 60px 0;
  text-align: center;
}

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

.page-khuyen-mai__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #017439;
}

.page-khuyen-mai__dark-section .page-khuyen-mai__section-title {
  color: #FFFF00;
}

.page-khuyen-mai__section-description,
.page-khuyen-mai__text-block {
  font-size: 1rem;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  color: #333333;
}

.page-khuyen-mai__dark-section .page-khuyen-mai__section-description,
.page-khuyen-mai__dark-section .page-khuyen-mai__text-block {
  color: #ffffff;
}

/* Dark Background Sections */
.page-khuyen-mai__dark-section {
  background-color: #017439;
  color: #ffffff;
}

/* Light Background Sections */
.page-khuyen-mai__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

.page-khuyen-mai__promo-card,
.page-khuyen-mai__event-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
}

.page-khuyen-mai__promo-card:hover,
.page-khuyen-mai__event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-khuyen-mai__promo-card.page-khuyen-mai__dark-bg,
.page-khuyen-mai__event-card.page-khuyen-mai__dark-bg {
  background-color: #005f2c; /* Slightly darker green for cards in dark sections */
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-khuyen-mai__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #017439;
}

.page-khuyen-mai__promo-card.page-khuyen-mai__dark-bg .page-khuyen-mai__card-title,
.page-khuyen-mai__event-card.page-khuyen-mai__dark-bg .page-khuyen-mai__card-title {
  color: #FFFF00; /* Yellow for titles on dark green cards */
}

.page-khuyen-mai__card-description {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow description to take available space */
  color: #333333;
}

.page-khuyen-mai__promo-card.page-khuyen-mai__dark-bg .page-khuyen-mai__card-description,
.page-khuyen-mai__event-card.page-khuyen-mai__dark-bg .page-khuyen-mai__card-description {
  color: #ffffff;
}

.page-khuyen-mai__btn-small {
  padding: 8px 18px;
  font-size: 0.9rem;
  max-width: fit-content;
  margin-top: auto; /* Push button to bottom of card */
}

.page-khuyen-mai__vip-benefits-list,
.page-khuyen-mai__terms-list {
  list-style: none;
  padding: 0;
  margin: 30px auto 0;
  max-width: 800px;
  text-align: left;
  font-size: 1.05rem;
}

.page-khuyen-mai__vip-benefits-list li,
.page-khuyen-mai__terms-list li {
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
  color: #ffffff;
}

.page-khuyen-mai__vip-benefits-list li::before,
.page-khuyen-mai__terms-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #FFFF00; /* Yellow checkmark */
  font-weight: bold;
}

.page-khuyen-mai__list-highlight {
  color: #FFFF00; /* Yellow highlight for strong text */
}

.page-khuyen-mai__btn-center {
  margin-left: auto;
  margin-right: auto;
  display: block;
}

/* FAQ Section */
.page-khuyen-mai__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-khuyen-mai__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  color: #333333;
}

.page-khuyen-mai__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: #017439;
  position: relative;
  outline: none;
}

.page-khuyen-mai__faq-item summary::-webkit-details-marker,
.page-khuyen-mai__faq-item summary::marker {
  display: none;
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
  content: '−';
}

.page-khuyen-mai__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: #555555;
}

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

.page-khuyen-mai__text-center {
  text-align: center;
}

/* --- Responsive Styles --- */

/* Tablet and Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-khuyen-mai__hero-content {
    padding: 0 15px 30px;
  }

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

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

  .page-khuyen-mai__section {
    padding: 50px 0;
  }

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

  .page-khuyen-mai__container {
    padding: 0 15px;
  }

  .page-khuyen-mai__promo-grid,
  .page-khuyen-mai__event-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .page-khuyen-mai__card-image {
    height: 180px;
  }

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

  .page-khuyen-mai__faq-item summary {
    padding: 18px 20px;
    font-size: 1rem;
  }

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


/* Mobile (max-width: 768px) - MUST INCLUDE ALL MODULES AS PER INSTRUCTIONS */
@media (max-width: 768px) {
  /* General body/text settings for mobile */
  .page-khuyen-mai {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 1. HERO 主图区域 */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
  }

  .page-khuyen-mai__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-khuyen-mai__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-khuyen-mai__hero-content {
    padding: 0 15px 30px;
  }

  .page-khuyen-mai__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 10px;
  }

  .page-khuyen-mai__intro-text {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .page-khuyen-mai__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 5. 按钮与按钮容器 - Specific for mobile */
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary,
  .page-khuyen-mai__btn-small,
  .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;
    padding-right: 15px;
    margin-left: 0 !important; /* Override potential margin-left: auto */
    margin-right: 0 !important; /* Override potential margin-right: auto */
  }

  /* 2. 深色导语区 & other sections */
  .page-khuyen-mai__section {
    padding: 40px 0;
  }

  .page-khuyen-mai__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-khuyen-mai__section-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-khuyen-mai__section-description,
  .page-khuyen-mai__text-block {
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-align: left; /* Ensure text alignment is consistent */
  }
}