/* Base styles for the Khuyến Mãi page */
.page-khuyen-mai {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background: var(--background-color, #B71C1C); /* Custom background color */
  color: #FFF5E1; /* Custom text color for dark background */
}

.page-khuyen-mai__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 50px;
  text-align: center;
  overflow: hidden;
  background: #7A0E0E; /* Deep Red background for hero */
}

.page-khuyen-mai__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

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

.page-khuyen-mai__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text */
  border-radius: 10px;
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFD86A; /* Gold color for title */
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-khuyen-mai__description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: #FFF5E1;
}

/* General Section Styles */
.page-khuyen-mai__section {
  padding: 50px 0;
  text-align: center;
}

.page-khuyen-mai__section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #FFD86A; /* Gold color for section titles */
}

.page-khuyen-mai__text-block {
  font-size: 1.05rem;
  margin-bottom: 20px;
  color: #FFF5E1;
}

/* Intro Section */
.page-khuyen-mai__intro {
  background: #B71C1C;
}

/* Promo Grid Section */
.page-khuyen-mai__promo-grid {
  background: #C91F17;
}

.page-khuyen-mai__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.page-khuyen-mai__promo-card {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #FFF5E1;
}

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

.page-khuyen-mai__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 20px 20px 10px;
  color: #FFD86A; /* Gold for card titles */
}

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

.page-khuyen-mai__card-button {
  display: inline-block;
  padding: 12px 25px;
  margin: 0 20px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  max-width: calc(100% - 40px); /* Adjust for padding */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* How to Claim Section */
.page-khuyen-mai__how-to-claim {
  background: #B71C1C;
}

.page-khuyen-mai__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 30px;
  text-align: left;
}

.page-khuyen-mai__steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-khuyen-mai__step-item {
  position: relative;
  padding-left: 60px;
}

.page-khuyen-mai__step-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: #FFD86A; /* Gold */
  color: #7A0E0E; /* Deep Red */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.page-khuyen-mai__step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFD86A;
  margin-bottom: 5px;
}

.page-khuyen-mai__step-item p {
  font-size: 1rem;
  color: #FFF5E1;
}

.page-khuyen-mai__step-item a {
  color: #F4D34D; /* Gold for links */
  text-decoration: underline;
}

.page-khuyen-mai__step-item a:hover {
  color: #FFCC66; /* Glow for hover */
}

.page-khuyen-mai__guide-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-khuyen-mai__guide-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  min-height: 200px;
}

.page-khuyen-mai__note {
  margin-top: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-left: 5px solid #FFD86A;
  border-radius: 5px;
  text-align: left;
}

.page-khuyen-mai__note p {
  color: #FFF5E1;
  font-size: 1rem;
  margin: 0;
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
  background: #7A0E0E; /* Deep Red background */
}

details.page-khuyen-mai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #F2B544; /* Border color */
  overflow: hidden;
  background: #D32F2F; /* Card BG */
  color: #FFF5E1;
}
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: #C91F17; /* Main color on hover */
}
.page-khuyen-mai__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFF5E1;
}
.page-khuyen-mai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFD86A; /* Gold for toggle icon */
  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: #C91F17; /* Main color for answer background */
  border-radius: 0 0 5px 5px;
}

/* CTA Section */
.page-khuyen-mai__cta-section {
  background: #B71C1C;
  padding-bottom: 80px;
}

.page-khuyen-mai__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-khuyen-mai__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
  color: #7A0E0E; /* Deep Red for text on gold button */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}

.page-khuyen-mai__btn-secondary {
  background: #D32F2F; /* Card BG */
  color: #FFF5E1; /* Text Main */
  border: 2px solid #F2B544; /* Border color */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-khuyen-mai__hero-image-wrapper {
    max-height: 400px;
  }
  .page-khuyen-mai__main-title {
    font-size: clamp(2.2rem, 4.5vw, 3rem);
  }
  .page-khuyen-mai__description {
    font-size: 1.05rem;
  }
  .page-khuyen-mai__section-title {
    font-size: 2rem;
  }
  .page-khuyen-mai__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  .page-khuyen-mai__steps, .page-khuyen-mai__guide-image-wrapper {
    width: 100%;
  }
  .page-khuyen-mai__promo-card {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  /* 1. Top text / Hero section padding */
  .page-khuyen-mai__hero-section {
    padding-top: 10px;
    padding-bottom: 30px;
  }

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

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

  .page-khuyen-mai__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem); /* Adjusted for better mobile fit */
    margin-bottom: 10px;
  }

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

  /* 2. Landing page two-column modules (Promo Grid, How-to-Claim) */
  .page-khuyen-mai__grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-khuyen-mai__content-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .page-khuyen-mai__steps {
    gap: 20px;
  }

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

  .page-khuyen-mai__step-number {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }

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

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

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

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

  .page-khuyen-mai__promo-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

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

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

  .page-khuyen-mai__card-description {
    font-size: 0.9rem;
  }

  .page-khuyen-mai__card-button {
    max-width: 100% !important;
    width: calc(100% - 40px) !important;
    padding: 10px 15px;
    font-size: 0.95rem;
  }

  /* 3. General images and containers */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-khuyen-mai__container,
  .page-khuyen-mai__section,
  .page-khuyen-mai__content-wrapper,
  .page-khuyen-mai__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* FAQ specific mobile styles */
  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; }

  /* 4. Buttons */
  .page-khuyen-mai__button-group {
    flex-direction: column;
    gap: 15px;
  }

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