.page-khuyen-mai {
  font-family: Arial, sans-serif;
  color: #333333; /* Default dark text for light body background */
  background-color: var(--secondary-color); /* Assumes --secondary-color is light, like #FFFFFF */
}

.page-khuyen-mai__hero-section {
  display: flex;
  flex-direction: column; /* Enforce image-above-text */
  align-items: center;
  text-align: center;
  padding: 10px 0 40px 0; /* Minimal top padding, rely on body for header offset */
  background: linear-gradient(135deg, #017439, #005a2c); /* Green gradient for hero */
  color: #ffffff;
  overflow: hidden;
}

.page-khuyen-mai__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 20px;
}

.page-khuyen-mai__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Desktop: cover to fill space */
  border-radius: 8px;
}

.page-khuyen-mai__hero-content {
  max-width: 900px;
  padding: 0 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: #FFFF00; /* Yellow for main title */
}

.page-khuyen-mai__description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.page-khuyen-mai__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
  background-color: #C30808; /* Register/Login red */
  color: #FFFF00; /* Register/Login yellow text */
  border: 2px solid #C30808;
}

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

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

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

.page-khuyen-mai__btn-small {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.page-khuyen-mai__section {
  padding: 60px 20px;
}

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

.page-khuyen-mai__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #017439;
}

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

.page-khuyen-mai__text-block {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

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

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

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

.page-khuyen-mai__content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
}

.page-khuyen-mai__content-wrapper--reverse {
  flex-direction: row-reverse;
}

.page-khuyen-mai__image-box {
  flex: 1;
  min-width: 300px;
}

.page-khuyen-mai__text-box {
  flex: 2;
}

.page-khuyen-mai__content-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-khuyen-mai__sub-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #017439;
}

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

.page-khuyen-mai__list {
  list-style-type: decimal;
  padding-left: 25px;
  margin-bottom: 20px;
}

.page-khuyen-mai__list-item {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 10px;
}

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

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

.page-khuyen-mai__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  margin-bottom: 15px;
}

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

.page-khuyen-mai__card-text {
  font-size: 1rem;
  line-height: 1.6;
  padding: 0 15px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-khuyen-mai__card .page-khuyen-mai__btn-primary {
  margin-top: auto;
  align-self: center;
}

.page-khuyen-mai__faq-list {
  margin-top: 30px;
}

.page-khuyen-mai__faq-item {
  background-color: #f9f9f9;
  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.2rem;
  font-weight: 600;
  color: #017439;
  cursor: pointer;
  background-color: #e8f5e9;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-question {
  background-color: #dcedc8;
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  user-select: none;
}

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

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

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

  .page-khuyen-mai__hero-section {
    padding: 10px 0 30px 0 !important;
  }

  .page-khuyen-mai__hero-image-wrapper {
    margin-bottom: 15px;
  }

  .page-khuyen-mai__hero-image {
    object-fit: contain !important; /* Mobile: contain to show full image, prevent cropping */
    aspect-ratio: unset !important;
    max-height: none !important;
  }

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

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

  .page-khuyen-mai__description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-khuyen-mai__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box !important;
  }

  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95rem;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-khuyen-mai__section {
    padding: 40px 15px;
  }

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

  .page-khuyen-mai__section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .page-khuyen-mai__text-block {
    font-size: 1rem;
    line-height: 1.6;
  }

  .page-khuyen-mai__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .page-khuyen-mai__content-wrapper--reverse {
    flex-direction: column;
  }

  .page-khuyen-mai__image-box {
    min-width: unset;
    width: 100%;
  }

  .page-khuyen-mai__content-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-khuyen-mai__sub-title {
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .page-khuyen-mai__list {
    padding-left: 20px;
  }

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

  .page-khuyen-mai__card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

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

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

  /* General image and container responsiveness */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

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