/* Base styles for the Khuyến Mãi page */
.page-khuyen-mai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main, #333333); /* Default text color, adjust based on body bg */
  background-color: var(--page-bg, #F5F7FA); /* Default page background */
}

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

/* Color Contrast Fixes based on body background */
.page-khuyen-mai__dark-section {
  background: #E53935; /* Main brand color for dark sections */
  color: #ffffff; /* White text for dark backgrounds */
}

.page-khuyen-mai__light-text {
  color: #ffffff; /* Explicitly light text */
}

.page-khuyen-mai__light-bg {
  background: #ffffff; /* White background for light sections/cards */
  color: #333333; /* Dark text for light backgrounds */
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.page-khuyen-mai__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Adjust as needed */
  overflow: hidden;
}

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

.page-khuyen-mai__hero-content {
  position: relative; /* Ensure content is above image but not overlapping */
  z-index: 1;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -100px; /* Pull up to overlap image slightly for visual effect, but text is below image in DOM */
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-khuyen-mai__hero-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* General Section Styles */
.page-khuyen-mai__section {
  padding: 60px 0;
  margin-bottom: 30px;
}

.page-khuyen-mai__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-main, #333333);
}

.page-khuyen-mai__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  text-align: justify;
}

/* CTA Buttons */
.page-khuyen-mai__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-khuyen-mai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

.page-khuyen-mai__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.page-khuyen-mai__btn-outline {
  background: transparent;
  color: #E53935;
  border: 2px solid #E53935;
  padding: 10px 20px;
  font-size: 1rem;
}

.page-khuyen-mai__btn-outline:hover {
  background: #E53935;
  color: #ffffff;
}

/* Promotion Types Grid */
.page-khuyen-mai__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-khuyen-mai__card {
  background: var(--card-bg, #FFFFFF);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-color, #E0E0E0);
  color: #333333; /* Dark text for light card background */
}

.page-khuyen-mai__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-khuyen-mai__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #E53935;
}

.page-khuyen-mai__card-description {
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.page-khuyen-mai__step-item {
  background: var(--card-bg, #FFFFFF);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  border: 1px solid var(--border-color, #E0E0E0);
  color: #333333;
}

.page-khuyen-mai__step-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #E53935;
}

.page-khuyen-mai__step-item p {
  font-size: 0.95rem;
}

.page-khuyen-mai__step-item a {
  color: #E53935;
  text-decoration: underline;
}

/* Featured Promotions */
.page-khuyen-mai__featured-promos {
  background: #E53935;
  color: #ffffff;
}

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

.page-khuyen-mai__promo-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-khuyen-mai__promo-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-khuyen-mai__promo-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: #333333;
}

.page-khuyen-mai__promo-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #E53935;
}

.page-khuyen-mai__promo-card-description {
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.page-khuyen-mai__faq-item {
  background: var(--card-bg, #FFFFFF);
  border: 1px solid var(--border-color, #E0E0E0);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none; /* Hide default marker */
  color: #E53935;
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
  transform: rotate(45deg);
}

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

.page-khuyen-mai__faq-answer p {
  margin-bottom: 10px;
}

.page-khuyen-mai__faq-answer a {
  color: #E53935;
  text-decoration: underline;
}

/* Bottom CTA */
.page-khuyen-mai__cta-bottom {
  background: #FF5A4F;
  color: #ffffff;
  text-align: center;
}

.page-khuyen-mai__cta-container {
  padding: 50px 20px;
}

/* All images responsive base */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

  .page-khuyen-mai__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* HERO Section */
  .page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding */
    margin-bottom: 20px;
  }

  .page-khuyen-mai__hero-content {
    padding: 30px 15px;
    margin-top: -80px;
  }

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

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

  /* CTA Buttons */
  .page-khuyen-mai__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  /* General Section Styles */
  .page-khuyen-mai__section {
    padding: 40px 0;
    margin-bottom: 20px;
  }

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

  .page-khuyen-mai__text-block {
    font-size: 0.95rem;
  }

  /* Promotion Types Grid */
  .page-khuyen-mai__grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

  /* How to Claim Steps */
  .page-khuyen-mai__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  /* Featured Promotions */
  .page-khuyen-mai__promo-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-khuyen-mai__promo-card-image {
    height: 200px;
  }

  .page-khuyen-mai__promo-card-title {
    font-size: 1.2rem;
  }

  /* FAQ Section */
  .page-khuyen-mai__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

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

  /* All images responsive */
  .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-image-wrapper,
  .page-khuyen-mai__promo-card,
  .page-khuyen-mai__step-item,
  .page-khuyen-mai__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }
}