:root {
  --main-color: #FF8C1A;
  --auxiliary-color: #FFA53A;
  --card-bg-color: #17191F;
  --background-color: #0D0E12;
  --text-main-color: #FFF3E6;
  --border-color: #A84F0C;
  --glow-color: #FFB04D;
  --deep-orange-color: #D96800;
}

.page-khuyen-mai {
  font-family: Arial, sans-serif;
  color: var(--text-main-color); /* #FFF3E6 */
  background-color: var(--background-color); /* #0D0E12 */
}

.page-khuyen-mai__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

/* HERO Section (acting as a banner for inner page) */
.page-khuyen-mai__hero-section {
  padding-top: 10px; /* Assuming shared.css handles body padding-top */
  padding-bottom: 60px;
  background-color: var(--background-color); /* #0D0E12 */
  display: flex;
  flex-direction: column; /* Default column for mobile-first */
  align-items: center;
  text-align: center;
  gap: 30px;
}

.page-khuyen-mai__hero-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.page-khuyen-mai__main-title {
  font-size: 3.2em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main-color); /* #FFF3E6 */
  text-shadow: 0 0 10px rgba(255, 176, 77, 0.4); /* Glow: #FFB04D */
}

.page-khuyen-mai__hero-description {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-main-color); /* #FFF3E6 */
}

.page-khuyen-mai__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
  width: 100%; /* For mobile button wrap */
  max-width: 600px; /* Limit max width for button group */
  margin: 0 auto;
  box-sizing: border-box;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__btn-text {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, var(--auxiliary-color) 0%, var(--deep-orange-color) 100%); /* #FFA53A to #D96800 */
  color: #ffffff; /* Explicit white for contrast */
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(255, 176, 77, 0.4); /* Glow: #FFB04D */
}

.page-khuyen-mai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 176, 77, 0.6);
}

.page-khuyen-mai__btn-secondary {
  background-color: transparent;
  color: var(--main-color); /* #FF8C1A */
  border: 2px solid var(--main-color); /* #FF8C1A */
  box-shadow: 0 0 10px rgba(255, 140, 26, 0.2);
}

.page-khuyen-mai__btn-secondary:hover {
  background-color: var(--main-color);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 140, 26, 0.4);
}

.page-khuyen-mai__btn-text {
  background-color: transparent;
  color: var(--main-color); /* #FF8C1A */
  border: none;
  padding: 8px 15px;
  font-size: 1em;
  font-weight: 600;
  text-align: left;
}

.page-khuyen-mai__btn-text:hover {
  text-decoration: underline;
}

.page-khuyen-mai__hero-image-wrapper {
  margin-top: 30px;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

.page-khuyen-mai__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-main-color); /* #FFF3E6 */
  text-shadow: 0 0 8px rgba(255, 176, 77, 0.3);
}

.page-khuyen-mai__text-block {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text-main-color); /* #FFF3E6 */
  text-align: justify;
}

.page-khuyen-mai__text-block strong {
  color: var(--main-color); /* #FF8C1A */
}

/* Promo List Section */
.page-khuyen-mai__promo-list-section {
  background-color: var(--card-bg-color); /* #17191F */
  padding: 60px 0;
}

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

.page-khuyen-mai__promo-card {
  background-color: var(--background-color); /* #0D0E12 */
  border: 1px solid var(--border-color); /* #A84F0C */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-khuyen-mai__promo-card-image {
  width: 100%;
  height: 200px; /* Fixed height for cards, ensuring min 200px height */
  object-fit: cover;
  display: block;
}

.page-khuyen-mai__promo-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-khuyen-mai__promo-card-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--main-color); /* #FF8C1A */
}

.page-khuyen-mai__promo-card-description {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-main-color); /* #FFF3E6 */
  margin-bottom: 20px;
}

/* Guide Section */
.page-khuyen-mai__guide-section {
  padding: 60px 0;
  background-color: var(--background-color); /* #0D0E12 */
}

.page-khuyen-mai__guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-khuyen-mai__guide-item {
  background-color: var(--card-bg-color); /* #17191F */
  border: 1px solid var(--border-color); /* #A84F0C */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__guide-step-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--main-color); /* #FF8C1A */
}

.page-khuyen-mai__guide-text {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-main-color); /* #FFF3E6 */
}

.page-khuyen-mai__guide-text a {
  color: var(--auxiliary-color); /* #FFA53A */
  text-decoration: none;
}

.page-khuyen-mai__guide-text a:hover {
  text-decoration: underline;
}

.page-khuyen-mai__cta-wrapper {
  text-align: center;
  margin-top: 50px;
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
  padding: 60px 0;
  background-color: var(--card-bg-color); /* #17191F */
}

.page-khuyen-mai__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-khuyen-mai__faq-item {
  background-color: var(--background-color); /* #0D0E12 */
  border: 1px solid var(--border-color); /* #A84F0C */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--text-main-color); /* #FFF3E6 */
  cursor: pointer;
  background-color: var(--card-bg-color); /* #17191F */
  border-bottom: 1px solid var(--border-color); /* #A84F0C */
  list-style: none; /* Hide default marker for details */
}

.page-khuyen-mai__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for details in webkit browsers */
}

.page-khuyen-mai__faq-qtext {
  flex-grow: 1;
  color: var(--text-main-color); /* #FFF3E6 */
}

.page-khuyen-mai__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--main-color); /* #FF8C1A */
  margin-left: 15px;
}

.page-khuyen-mai__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-main-color); /* #FFF3E6 */
  background-color: var(--background-color); /* #0D0E12 */
}

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

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

/* Desktop styles for specific elements not covered by default */
@media (min-width: 769px) {
  .page-khuyen-mai__hero-section {
    flex-direction: row;
    text-align: left;
    gap: 40px;
    padding: 60px 16px;
  }
  .page-khuyen-mai__hero-content-wrapper {
    flex: 1;
    max-width: 50%;
  }
  .page-khuyen-mai__hero-image-wrapper {
    flex: 1;
    margin-top: 0;
    max-width: 50%;
  }
  .page-khuyen-mai__cta-buttons {
    justify-content: flex-start;
  }
}


/* Tablet and Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
  /* General page content adjustments */
  .page-khuyen-mai__container {
    padding: 20px 15px !important;
  }

  /* HERO Section */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Specific override for fixed header */
    padding-bottom: 40px !important;
    text-align: center !important;
    flex-direction: column !important;
  }

  .page-khuyen-mai__main-title {
    font-size: 2em !important;
    margin-bottom: 15px !important;
  }

  .page-khuyen-mai__hero-description {
    font-size: 1em !important;
    margin-bottom: 25px !important;
  }

  .page-khuyen-mai__hero-content-wrapper {
    max-width: 100% !important;
  }

  .page-khuyen-mai__hero-image-wrapper {
    margin-top: 20px !important;
    max-width: 100% !important;
  }

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

  /* Buttons and Button Containers */
  .page-khuyen-mai__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 15px !important; /* Add padding to container */
  }

  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary,
  .page-khuyen-mai__btn-text {
    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;
  }

  /* Section Titles */
  .page-khuyen-mai__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px !important;
  }

  /* Text Blocks */
  .page-khuyen-mai__text-block {
    font-size: 0.95em !important;
    line-height: 1.5 !important;
  }

  /* Promo Grid */
  .page-khuyen-mai__promo-grid {
    grid-template-columns: 1fr !important; /* Single column for cards */
    gap: 20px !important;
  }

  .page-khuyen-mai__promo-card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Override fixed height, let it be auto with max-width: 100% */
  }
  
  .page-khuyen-mai__promo-card-content {
    padding: 20px !important;
  }

  .page-khuyen-mai__promo-card-title {
    font-size: 1.3em !important;
    margin-bottom: 10px !important;
  }

  .page-khuyen-mai__promo-card-description {
    font-size: 0.9em !important;
    margin-bottom: 15px !important;
  }

  /* Guide Section */
  .page-khuyen-mai__guide-list {
    grid-template-columns: 1fr !important; /* Single column for guide items */
    gap: 20px !important;
  }

  .page-khuyen-mai__guide-item {
    padding: 25px !important;
  }

  .page-khuyen-mai__guide-step-title {
    font-size: 1.1em !important;
    margin-bottom: 10px !important;
  }

  .page-khuyen-mai__guide-text {
    font-size: 0.95em !important;
  }

  .page-khuyen-mai__cta-wrapper {
    margin-top: 40px !important;
  }

  /* FAQ Section */
  .page-khuyen-mai__faq-question {
    font-size: 1.05em !important;
    padding: 18px 20px !important;
  }

  .page-khuyen-mai__faq-answer {
    padding: 18px 20px !important;
    font-size: 0.95em !important;
  }

  .page-khuyen-mai__faq-toggle {
    font-size: 1.3em !important;
  }

  /* General image responsive rule */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All content containers should have max-width: 100% and padding */
  .page-khuyen-mai__section,
  .page-khuyen-mai__card,
  .page-khuyen-mai__container,
  .page-khuyen-mai__promo-card,
  .page-khuyen-mai__guide-item,
  .page-khuyen-mai__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  /* Remove padding for elements that are already within a container with padding */
  .page-khuyen-mai__container .page-khuyen-mai__promo-card,
  .page-khuyen-mai__container .page-khuyen-mai__guide-item,
  .page-khuyen-mai__container .page-khuyen-mai__faq-item {
    padding-left: 0px !important;
    padding-right: 0px !important;
  }
}