.page-khuyen-mai {
  font-family: 'Arial', sans-serif;
  color: #333333;
  line-height: 1.6;
  background-color: #FFFFFF;
}

.page-khuyen-mai__section {
  padding: 40px 0;
  text-align: center;
}

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

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

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

.page-khuyen-mai__section-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 25px;
  color: #017439;
}

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

.page-khuyen-mai__text-block {
  font-size: 17px;
  max-width: 900px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.page-khuyen-mai__text-block--white {
  color: #f0f0f0;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 550px;
  overflow: hidden;
}

.page-khuyen-mai__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.page-khuyen-mai__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  max-width: 900px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Slightly dark overlay for text readability */
  border-radius: 10px;
}

.page-khuyen-mai__main-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-khuyen-mai__intro-text {
  font-size: clamp(18px, 2.5vw, 24px);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__card-button,
.page-khuyen-mai__btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  max-width: 100%;
  word-wrap: break-word;
  text-align: center;
}

.page-khuyen-mai__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

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

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

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

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

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

.page-khuyen-mai__promotion-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-khuyen-mai__promotion-card img {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.page-khuyen-mai__card-title {
  font-size: 22px;
  font-weight: 700;
  color: #017439;
  margin: 20px 20px 10px;
  flex-grow: 0;
}

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

.page-khuyen-mai__card-button {
  background-color: #017439;
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 0 0 12px 12px; /* Rounded only at bottom */
  text-align: center;
  margin-top: auto; /* Push button to bottom */
  display: block;
}

.page-khuyen-mai__card-button:hover {
  background-color: #005c2d;
}

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

.page-khuyen-mai__step-card {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-khuyen-mai__step-title {
  font-size: 24px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
}

.page-khuyen-mai__step-card p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
}

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

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

.page-khuyen-mai__cta-buttons--center {
  margin-top: 30px;
}

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

.page-khuyen-mai__feature-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-khuyen-mai__feature-title {
  font-size: 22px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
}

.page-khuyen-mai__feature-item p {
  font-size: 16px;
  color: #555555;
}

/* Final CTA */
.page-khuyen-mai__cta-final {
  padding: 60px 20px;
}

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

details.page-khuyen-mai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question::-webkit-details-marker {
  display: none;
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question:hover {
  background: #f5f5f5;
}
.page-khuyen-mai__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-khuyen-mai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-khuyen-mai__faq-item .page-khuyen-mai__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}
.page-khuyen-mai__faq-answer p {
  font-size: 15px;
  color: #555555;
}

/* Responsive Styles */

/* HERO main image specific breakpoint for object-fit: contain */
@media (max-width: 849px) {
  .page-khuyen-mai__hero-image img {
    object-fit: contain !important; /* Prevent cropping on smaller screens */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    background-color: #017439; /* Fill background if image aspect ratio doesn't match container */
  }
  .page-khuyen-mai__hero-section {
    min-height: 400px;
    padding-top: 10px;
  }
  .page-khuyen-mai__hero-content {
    padding: 15px;
  }
  .page-khuyen-mai__main-title {
    font-size: clamp(30px, 8vw, 48px);
  }
  .page-khuyen-mai__intro-text {
    font-size: clamp(16px, 3vw, 20px);
  }
}

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

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

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

  .page-khuyen-mai__section-title {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 20px;
  }

  .page-khuyen-mai__text-block {
    font-size: 16px;
    margin-bottom: 15px;
  }

  /* HERO section */
  .page-khuyen-mai__hero-section {
    min-height: 350px;
    padding-top: 10px; /* Small top padding for mobile */
  }
  .page-khuyen-mai__hero-content {
    max-width: 100%;
    padding: 15px;
  }
  .page-khuyen-mai__main-title {
    font-size: clamp(28px, 7vw, 40px);
    margin-bottom: 10px;
  }
  .page-khuyen-mai__intro-text {
    font-size: clamp(15px, 2.5vw, 18px);
    margin-bottom: 20px;
  }
  .page-khuyen-mai__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    width: 100%;
  }

  /* Buttons general */
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary,
  .page-khuyen-mai__card-button,
  .page-khuyen-mai__btn-small {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
    font-size: 16px;
  }

  /* Images general */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-khuyen-mai__promotion-card img {
     /* Adjust card image height for mobile */
  }

  /* Promotions Grid */
  .page-khuyen-mai__promotions-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
  .page-khuyen-mai__promotion-card {
    margin: 0 auto;
    max-width: 100%;
  }
  .page-khuyen-mai__card-title {
    font-size: 20px;
    margin: 15px 15px 8px;
  }
  .page-khuyen-mai__card-description {
    font-size: 14px;
    padding: 0 15px;
  }
  .page-khuyen-mai__card-button {
    border-radius: 0 0 12px 12px;
  }

  /* Steps Grid */
  .page-khuyen-mai__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-khuyen-mai__step-card {
    padding: 25px;
  }
  .page-khuyen-mai__step-title {
    font-size: 20px;
  }
  .page-khuyen-mai__step-card p {
    font-size: 15px;
  }

  /* Terms List */
  .page-khuyen-mai__terms-list {
    font-size: 15px;
    padding-left: 15px;
  }

  /* Feature Grid */
  .page-khuyen-mai__feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-khuyen-mai__feature-item {
    padding: 25px;
  }
  .page-khuyen-mai__feature-title {
    font-size: 20px;
  }
  .page-khuyen-mai__feature-item p {
    font-size: 15px;
  }

  /* Final CTA */
  .page-khuyen-mai__cta-final {
    padding: 40px 15px;
  }

  /* FAQ Section */
  details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question { padding: 15px; }
  .page-khuyen-mai__faq-qtext { font-size: 15px; }
  details.page-khuyen-mai__faq-item .page-khuyen-mai__faq-answer {
    padding: 0 15px 15px;
  }
  .page-khuyen-mai__faq-answer p {
    font-size: 14px;
  }
}