/* Base styles for the Khuyến Mãi page */
.page-khuyen-mai {
  font-family: 'Arial', sans-serif;
  background-color: #0D0E12; /* Background color from custom palette */
  color: #FFF3E6; /* Text Main from custom palette for general text */
  line-height: 1.6;
}

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

.page-khuyen-mai__section-title {
  font-size: clamp(28px, 4vw, 40px);
  color: #FFF3E6;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  line-height: 1.2;
}

.page-khuyen-mai__text-block {
  font-size: 17px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: #FFF3E6;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff; /* White text for contrast */
  border: none;
  box-shadow: 0 4px 15px rgba(255, 140, 26, 0.4);
}

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

.page-khuyen-mai__btn-secondary {
  background: #17191F; /* Card BG */
  color: #FFA53A; /* Auxiliary color */
  border: 2px solid #A84F0C; /* Border color */
}

.page-khuyen-mai__btn-secondary:hover {
  background: #2a2d34;
  color: #FFB04D;
  border-color: #FFB04D;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: #0D0E12;
}

.page-khuyen-mai__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height on desktop */
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
}

.page-khuyen-mai__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  max-height: 600px; /* Ensure image doesn't overflow */
  border-radius: 10px;
}

.page-khuyen-mai__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.page-khuyen-mai__main-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: #FFF3E6;
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.page-khuyen-mai__intro-text {
  font-size: clamp(18px, 2vw, 22px);
  color: #FFF3E6;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Promotions Overview Section */
.page-khuyen-mai__promotions-overview {
  padding: 60px 0;
  background-color: #0D0E12;
}

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

.page-khuyen-mai__feature-item {
  background-color: #17191F; /* Card BG */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  border: 1px solid #A84F0C;
}

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

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

/* Promotion Categories Section */
.page-khuyen-mai__promotion-categories {
  padding: 60px 0;
  background-color: #17191F; /* Card BG for this section background */
}

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

.page-khuyen-mai__card {
  background-color: #0D0E12; /* Background from custom palette */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  border: 1px solid #A84F0C;
  display: flex;
  flex-direction: column;
  color: #FFF3E6;
}

.page-khuyen-mai__card-image {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
}

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

.page-khuyen-mai__card-title {
  font-size: 22px;
  color: #FFA53A;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-khuyen-mai__card-description {
  font-size: 16px;
  color: #FFF3E6;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* How to Claim Section */
.page-khuyen-mai__how-to-claim {
  padding: 60px 0;
  background-color: #0D0E12;
}

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

.page-khuyen-mai__step-item {
  background-color: #17191F;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  border: 1px solid #A84F0C;
}

.page-khuyen-mai__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(255, 140, 26, 0.4);
}

.page-khuyen-mai__step-title {
  font-size: 22px;
  color: #FFA53A;
  margin-bottom: 10px;
  font-weight: 700;
}

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

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

/* Terms and Conditions Section */
.page-khuyen-mai__terms-conditions {
  padding: 60px 0;
  background-color: #17191F;
}

.page-khuyen-mai__terms-list {
  list-style: disc;
  max-width: 900px;
  margin: 30px auto;
  padding-left: 25px;
  color: #FFF3E6;
}

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

.page-khuyen-mai__terms-list li a {
  color: #FFA53A;
  text-decoration: underline;
}

.page-khuyen-mai__terms-list li a:hover {
  color: #FFB04D;
}

/* Why Choose rg88 Section */
.page-khuyen-mai__why-choose-rg88 {
  padding: 60px 0;
  background-color: #0D0E12;
}

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

.page-khuyen-mai__benefit-item {
  background-color: #17191F;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  border: 1px solid #A84F0C;
}

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

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

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

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

details.page-khuyen-mai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #A84F0C; /* Border color */
  overflow: hidden;
  background: #0D0E12; /* Background from custom palette */
}

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: #FFF3E6;
}

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: #2a2d34;
}

.page-khuyen-mai__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFA53A;
}

.page-khuyen-mai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFF3E6;
  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: #17191F; /* Card BG */
  border-radius: 0 0 5px 5px;
  color: #FFF3E6;
  font-size: 16px;
}

/* --- Responsive Styles --- */
/* Mobile specific styles */
@media (max-width: 1024px) {
  .page-khuyen-mai__container {
    padding: 20px 30px;
  }
}

@media (max-width: 768px) {
  .page-khuyen-mai__container {
    padding: 20px 15px;
  }

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

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

  /* Hero Section Mobile */
  .page-khuyen-mai__hero-section {
    padding-top: 10px;
    padding-bottom: 40px;
  }

  .page-khuyen-mai__hero-image-wrapper {
    max-height: 300px;
    margin-bottom: 20px;
  }

  .page-khuyen-mai__hero-image {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    max-height: 300px !important;
    width: 100% !important;
    height: auto !important;
  }

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

  .page-khuyen-mai__main-title {
    font-size: clamp(28px, 7vw, 42px);
    margin-bottom: 15px;
  }

  .page-khuyen-mai__intro-text {
    font-size: clamp(16px, 3vw, 18px);
    margin-bottom: 25px;
  }

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

  /* Overview Section Mobile */
  .page-khuyen-mai__promotions-overview {
    padding: 40px 0;
  }

  .page-khuyen-mai__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-khuyen-mai__feature-item {
    padding: 20px;
  }

  .page-khuyen-mai__feature-title {
    font-size: 20px;
  }

  .page-khuyen-mai__feature-item p {
    font-size: 15px;
  }

  /* Promotion Categories Section Mobile */
  .page-khuyen-mai__promotion-categories {
    padding: 40px 0;
  }

  .page-khuyen-mai__cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

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

  .page-khuyen-mai__card-content {
    padding: 20px;
  }

  .page-khuyen-mai__card-title {
    font-size: 20px;
  }

  .page-khuyen-mai__card-description {
    font-size: 15px;
  }

  /* How to Claim Section Mobile */
  .page-khuyen-mai__how-to-claim {
    padding: 40px 0;
  }

  .page-khuyen-mai__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-khuyen-mai__step-item {
    padding: 20px;
  }

  .page-khuyen-mai__step-number {
    width: 50px;
    height: 50px;
    font-size: 24px;
    margin-bottom: 15px;
  }

  .page-khuyen-mai__step-title {
    font-size: 20px;
  }

  .page-khuyen-mai__step-item p {
    font-size: 15px;
  }

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

  /* Terms and Conditions Section Mobile */
  .page-khuyen-mai__terms-conditions {
    padding: 40px 0;
  }

  .page-khuyen-mai__terms-list {
    margin: 20px auto;
    padding-left: 20px;
  }

  .page-khuyen-mai__terms-list li {
    font-size: 15px;
  }

  /* Why Choose rg88 Section Mobile */
  .page-khuyen-mai__why-choose-rg88 {
    padding: 40px 0;
  }

  .page-khuyen-mai__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-khuyen-mai__benefit-item {
    padding: 20px;
  }

  .page-khuyen-mai__benefit-title {
    font-size: 20px;
  }

  .page-khuyen-mai__benefit-item p {
    font-size: 15px;
  }

  /* FAQ Section Mobile */
  .page-khuyen-mai__faq-section {
    padding: 40px 0;
  }

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

  details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question { padding: 15px; }
  .page-khuyen-mai__faq-qtext { font-size: 16px; }
  .page-khuyen-mai__faq-toggle { font-size: 20px; width: 24px; }
  details.page-khuyen-mai__faq-item .page-khuyen-mai__faq-answer { padding: 0 15px 15px; }

  /* General image responsiveness for content area */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  /* For elements that might cause horizontal scroll */
  .page-khuyen-mai {
    overflow-x: hidden;
  }
  .page-khuyen-mai__promotions-overview .page-khuyen-mai__container {
    overflow-x: hidden;
  }
  .page-khuyen-mai__promotion-categories .page-khuyen-mai__container {
    overflow-x: hidden;
  }
  .page-khuyen-mai__how-to-claim .page-khuyen-mai__container {
    overflow-x: hidden;
  }
  .page-khuyen-mai__why-choose-rg88 .page-khuyen-mai__container {
    overflow-x: hidden;
  }
}