/* Base styles for the Khuyến Mãi page */
.page-khuyen-mai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF1E8; /* Text Main color */
  background: #140C0C; /* Background color */
}

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

/* Hero Section */
.page-khuyen-mai__hero-section {
  display: flex;
  flex-direction: column; /* Default to column for mobile first, then row for desktop */
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  padding-bottom: 40px;
  background: linear-gradient(180deg, #7E0D0D 0%, #140C0C 100%); /* Deep Red to Background */
  border-bottom: 2px solid #6A1E1E; /* Border color */
}

.page-khuyen-mai__hero-content {
  max-width: 800px;
  margin-bottom: 30px;
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em); /* Responsive font size */
  color: #FFF1E8; /* Text Main color */
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-khuyen-mai__hero-description {
  font-size: 1.1em;
  color: #FFF1E8; /* Text Main color */
  margin-bottom: 30px;
}

.page-khuyen-mai__hero-image {
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
  border-radius: 10px;
}

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

/* General Section Styling */
.page-khuyen-mai__section {
  padding: 60px 0;
  border-bottom: 1px solid #6A1E1E; /* Border color */
}

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

.page-khuyen-mai__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em); /* Responsive font size */
  color: #FFF1E8; /* Text Main color */
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-khuyen-mai__text-block {
  font-size: 1.05em;
  color: #FFF1E8; /* Text Main color */
  margin-bottom: 20px;
  text-align: justify;
}

.page-khuyen-mai__image-full-width {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 1000px; /* Limiting max width for better presentation */
}

/* CTA Buttons Styling */
.page-khuyen-mai__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  max-width: 100%; /* Ensure buttons don't overflow */
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button gradient */
  color: #FFF1E8; /* Text Main color */
  border: 2px solid transparent;
}

.page-khuyen-mai__btn-primary:hover {
  background: linear-gradient(180deg, #D86A14 0%, #FFB04A 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.page-khuyen-mai__btn-secondary {
  background: #2A1212; /* Card BG color */
  color: #FFF1E8; /* Text Main color */
  border: 2px solid #6A1E1E; /* Border color */
}

.page-khuyen-mai__btn-secondary:hover {
  background: #6A1E1E; /* Border color */
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.page-khuyen-mai__btn-white-text {
  color: #FFF1E8 !important; /* Ensure white text on dark background */
}

.page-khuyen-mai__btn-large {
  padding: 18px 35px;
  font-size: 1.2em;
}

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

.page-khuyen-mai__card {
  background: #2A1212; /* Card BG color */
  border: 1px solid #6A1E1E; /* Border color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #FFF1E8; /* Text Main color */
}

.page-khuyen-mai__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-khuyen-mai__card-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #F3C54D; /* Gold color */
  padding: 15px 20px 10px;
  margin: 0;
}

.page-khuyen-mai__card-description {
  font-size: 0.95em;
  color: #FFF1E8; /* Text Main color */
  padding: 0 20px 15px;
  flex-grow: 1; /* Make description take available space */
}

.page-khuyen-mai__card-button {
  margin: 0 20px 20px;
  align-self: flex-start; /* Align button to start */
}

/* How-to-Claim Section */
.page-khuyen-mai__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}

.page-khuyen-mai__step-item {
  background: #2A1212; /* Card BG color */
  border: 1px solid #6A1E1E; /* Border color */
  border-radius: 10px;
  padding: 30px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #FFF1E8; /* Text Main color */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-khuyen-mai__step-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button gradient */
  color: #FFF1E8; /* Text Main color */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__step-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #F3C54D; /* Gold color */
  margin-bottom: 15px;
}

.page-khuyen-mai__step-description {
  font-size: 1em;
  color: #FFF1E8; /* Text Main color */
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Terms & Conditions Section */
.page-khuyen-mai__dark-section {
  background: #140C0C; /* Background color */
  color: #FFF1E8; /* Text Main color */
}

.page-khuyen-mai__terms-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-khuyen-mai__terms-list li {
  background: #2A1212; /* Card BG color */
  border: 1px solid #6A1E1E; /* Border color */
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  font-size: 1em;
  color: #FFF1E8; /* Text Main color */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__terms-list li strong {
  color: #F3C54D; /* Gold color */
  font-weight: 700;
}

/* FAQ Section */
details.page-khuyen-mai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #6A1E1E; /* Border color */
  overflow: hidden;
  background: #2A1212; /* Card BG color */
}
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;
  color: #FFF1E8; /* Text Main color */
}
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: #6A1E1E; /* Border color */
}
.page-khuyen-mai__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F3C54D; /* Gold color */
}
.page-khuyen-mai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFF1E8; /* Text Main color */
  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: #140C0C; /* Background color */
  border-radius: 0 0 5px 5px;
  color: #FFF1E8; /* Text Main color */
}
.page-khuyen-mai__faq-answer p {
    margin-bottom: 0;
}

/* Final CTA Section */
.page-khuyen-mai__final-cta-section {
  text-align: center;
  background: linear-gradient(180deg, #7E0D0D 0%, #140C0C 100%); /* Deep Red to Background */
  padding: 80px 0;
}

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

.page-khuyen-mai__cta-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.page-khuyen-mai__text-contrast-fix {
  color: #FFF1E8 !important; /* Ensure text is visible on dark gradient */
}

/* Responsive Design */
/* Desktop layout (>= 769px) */
@media (min-width: 769px) {
  .page-khuyen-mai__hero-section {
    flex-direction: row;
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 20px; /* Slightly more padding on desktop */
  }

  .page-khuyen-mai__hero-content {
    flex: 1;
    margin-right: 40px;
    margin-bottom: 0;
  }

  .page-khuyen-mai__hero-image {
    flex: 1;
    max-width: 600px; /* Adjust max-width for hero image on desktop */
  }
  
  .page-khuyen-mai__cta-buttons {
    justify-content: flex-start;
  }
}

/* Tablet and Mobile adjustments (max-width: 768px) */
@media (max-width: 768px) {
  .page-khuyen-mai__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* HERO Section */
  .page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column;
    text-align: center;
  }
  .page-khuyen-mai__hero-content {
    margin-bottom: 20px;
    margin-right: 0;
  }
  .page-khuyen-mai__main-title {
    font-size: 2em; /* Smaller font for mobile H1 */
  }
  .page-khuyen-mai__hero-description {
    font-size: 1em;
  }
  .page-khuyen-mai__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-khuyen-mai__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* Ensure image is contained, not cropped */
    aspect-ratio: unset !important; /* Remove aspect ratio if set */
  }

  /* General Sections */
  .page-khuyen-mai__section {
    padding: 40px 0;
  }
  .page-khuyen-mai__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-khuyen-mai__text-block {
    font-size: 0.95em;
    text-align: left;
  }
  
  /* Images in content */
  .page-khuyen-mai__image-full-width,
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  
  /* Buttons and Button Containers */
  .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;
    padding-right: 15px;
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px; /* Spacing between stacked buttons */
  }
  .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;
    padding-right: 15px;
  }

  /* Promo Cards Grid */
  .page-khuyen-mai__promo-cards-grid {
    grid-template-columns: 1fr; /* Single column for cards */
    gap: 20px;
  }
  .page-khuyen-mai__card img {
     /* Slightly smaller card images on mobile */
  }
  .page-khuyen-mai__card-title {
    font-size: 1.2em;
  }
  .page-khuyen-mai__card-description {
    font-size: 0.9em;
  }
  .page-khuyen-mai__card-button {
    margin-left: auto; /* Center button in card */
    margin-right: auto;
  }

  /* How-to Steps Grid */
  .page-khuyen-mai__steps-grid {
    grid-template-columns: 1fr; /* Single column for steps */
    gap: 20px;
  }
  .page-khuyen-mai__step-title {
    font-size: 1.2em;
  }
  .page-khuyen-mai__step-description {
    font-size: 0.95em;
  }

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

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

  /* Final CTA Section */
  .page-khuyen-mai__final-cta-section {
    padding: 50px 0;
  }
  .page-khuyen-mai__cta-image {
    margin-bottom: 20px;
  }
  .page-khuyen-mai__section-title.page-khuyen-mai__text-contrast-fix {
    font-size: 1.8em;
  }
}

/* Specific rule for mobile hero image object-fit:contain - for screens smaller than 849px */
@media (max-width: 849px) {
  .page-khuyen-mai__hero-image img {
    object-fit: contain !important; /* Ensure image is contained, not cropped */
    aspect-ratio: unset !important; /* Remove aspect ratio if set */
  }
}

/* Ensure no horizontal scroll for content areas */
.page-khuyen-mai__section,
.page-khuyen-mai__container,
.page-khuyen-mai__promo-cards-grid,
.page-khuyen-mai__steps-grid,
.page-khuyen-mai__terms-list,
.page-khuyen-mai__faq-section {
  overflow-x: hidden;
}

/* Additional contrast fix for text on specific backgrounds */
.page-khuyen-mai p,
.page-khuyen-mai li,
.page-khuyen-mai__hero-description {
    color: #FFF1E8; /* Text Main color */
}

/* Headings colors */
.page-khuyen-mai h1, .page-khuyen-mai h2 {
    color: #FFF1E8; /* Text Main color */
}

.page-khuyen-mai h3 {
    color: #F3C54D; /* Gold color */
}

.page-khuyen-mai strong {
    color: #F3C54D; /* Gold color for strong text */
}

/* Ensure all text colors are explicitly set for contrast */
.page-khuyen-mai__text-block,
.page-khuyen-mai__card-description,
.page-khuyen-mai__step-description,
.page-khuyen-mai__faq-answer p {
    color: #FFF1E8;
}