/* style/khuyen-mai.css */

/* --- Base Styles --- */
.page-khuyen-mai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main */
  background-color: #B71C1C; /* Background */
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
}

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

.page-khuyen-mai__section {
  padding: 40px 0;
  margin-bottom: 20px;
}

.page-khuyen-mai__section-title {
  font-size: 2.5em;
  color: #FFF5E1; /* Text Main */
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
  line-height: 1.2;
}

.page-khuyen-mai__section-title--small {
  font-size: 2em;
}

.page-khuyen-mai__text-block {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 20px auto;
  color: #FFF5E1; /* Text Main */
}

/* --- Hero Section --- */
.page-khuyen-mai__hero-section {
  position: relative;
  overflow: hidden;
  padding-bottom: 40px; /* Space below content */
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  justify-content: center;
  min-height: 600px; /* Ensure sufficient height */
}

.page-khuyen-mai__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit image height */
  overflow: hidden;
  margin-bottom: 30px; /* Space between image and content */
}

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

.page-khuyen-mai__hero-content {
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
  position: relative; /* Ensure content is in normal flow */
  z-index: 1; /* Ensure content is above any potential background layers */
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
  color: #FFF5E1; /* Text Main */
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-khuyen-mai__subtitle {
  font-size: 1.2em;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-khuyen-mai__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit button group width */
  margin: 0 auto;
}

.page-khuyen-mai__btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons are responsive */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to wrap */
  text-align: center;
}

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

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

.page-khuyen-mai__btn--secondary {
  background-color: transparent;
  color: #FFD86A; /* Gold */
  border: 2px solid #FFD86A; /* Gold */
  box-shadow: 0 0 10px rgba(244, 211, 77, 0.5); /* Lighter glow */
}

.page-khuyen-mai__btn--secondary:hover {
  background-color: rgba(255, 216, 106, 0.1);
  box-shadow: 0 0 15px rgba(244, 211, 77, 0.7);
  transform: translateY(-2px);
}

.page-khuyen-mai__btn--link {
  background-color: transparent;
  color: #FFD86A; /* Gold */
  border: 1px solid #FFD86A;
  padding: 8px 15px;
  font-size: 0.95em;
  border-radius: 5px;
}

.page-khuyen-mai__btn--link:hover {
  background-color: rgba(255, 216, 106, 0.1);
}

.page-khuyen-mai__btn--small {
  padding: 8px 15px;
  font-size: 0.9em;
  border-radius: 5px;
  border: none;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  color: #7A0E0E; /* Deep Red */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__btn--small:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  transform: translateY(-1px);
}

/* --- General Image and Figure Styles --- */
.page-khuyen-mai__figure {
  margin: 30px auto;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

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

.page-khuyen-mai__figcaption {
  font-size: 0.9em;
  color: #F2B544; /* Border color for figcaption */
  margin-top: 10px;
  text-align: center;
}

.page-khuyen-mai__figure--card {
  margin: 15px auto;
}

.page-khuyen-mai__image--card {
  width: 100%;
  height: 200px; /* Fixed height for consistency in cards */
  object-fit: cover;
  border-radius: 8px;
}

.page-khuyen-mai__figure--center {
  max-width: 800px;
}

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

.page-khuyen-mai__promo-card {
  background-color: #D32F2F; /* Card BG */
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #7A0E0E; /* Deep Red border */
}

.page-khuyen-mai__card-title {
  font-size: 1.5em;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-khuyen-mai__card-text {
  font-size: 1em;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 15px;
  flex-grow: 1; /* Allow text to grow */
}

.page-khuyen-mai__card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
}

.page-khuyen-mai__card-list li {
  color: #FFF5E1; /* Text Main */
  margin-bottom: 5px;
  padding-left: 20px;
  position: relative;
}

.page-khuyen-mai__card-list li::before {
  content: '✔';
  color: #FFD86A; /* Gold checkmark */
  position: absolute;
  left: 0;
}

/* --- Guide Section --- */
.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: #D32F2F; /* Card BG */
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid #7A0E0E; /* Deep Red border */
}

.page-khuyen-mai__step-number {
  font-size: 3em;
  color: #FFD86A; /* Gold */
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__step-title {
  font-size: 1.4em;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-khuyen-mai__step-text {
  font-size: 0.95em;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 20px;
}

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

.page-khuyen-mai__advantage-item {
  background-color: #D32F2F; /* Card BG */
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid #7A0E0E; /* Deep Red border */
}

.page-khuyen-mai__advantage-title {
  font-size: 1.4em;
  color: #FFD86A; /* Gold */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-khuyen-mai__advantage-text {
  font-size: 0.95em;
  color: #FFF5E1; /* Text Main */
}

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

.page-khuyen-mai__faq-item {
  background-color: #D32F2F; /* Card BG */
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid #7A0E0E; /* Deep Red border */
}

.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #FFF5E1; /* Text Main */
  cursor: pointer;
  list-style: none; /* For <summary> tag */
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5em;
  color: #FFD86A; /* Gold */
  transition: transform 0.3s ease;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' when open */
}

.page-khuyen-mai__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #FFF5E1; /* Text Main */
}

.page-khuyen-mai__faq-answer p {
  margin: 0;
  color: #FFF5E1; /* Text Main */
}

/* --- Bottom CTA Section --- */
.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__container {
  background-color: #D32F2F; /* Card BG */
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 2px solid #F2B544; /* Border */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-khuyen-mai__container {
    padding: 0 15px;
  }

  .page-khuyen-mai__section-title {
    font-size: 2em;
  }

  .page-khuyen-mai__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }

  .page-khuyen-mai__subtitle {
    font-size: 1.1em;
  }

  .page-khuyen-mai__promo-card-grid,
  .page-khuyen-mai__steps-grid,
  .page-khuyen-mai__advantage-grid {
    gap: 25px;
  }

  .page-khuyen-mai__promo-card,
  .page-khuyen-mai__step-item,
  .page-khuyen-mai__advantage-item {
    padding: 20px;
  }

  .page-khuyen-mai__card-title,
  .page-khuyen-mai__step-title,
  .page-khuyen-mai__advantage-title {
    font-size: 1.3em;
  }

  .page-khuyen-mai__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
}

@media (max-width: 768px) {
  /* 1. Top section title + CTAs */
  .page-khuyen-mai {
    padding-top: 10px !important; /* Small top padding for mobile */
  }

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

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

  .page-khuyen-mai__hero-section {
    min-height: auto;
    padding-bottom: 20px;
  }

  .page-khuyen-mai__hero-image-wrapper {
    margin-bottom: 20px;
    max-height: 400px; /* Adjust hero image height for mobile */
  }

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

  .page-khuyen-mai__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em) !important; /* Smaller H1 for mobile */
    margin-bottom: 10px;
  }

  .page-khuyen-mai__subtitle {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-khuyen-mai__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 2. Single column long text containers */
  .page-khuyen-mai__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-khuyen-mai__text-block {
    font-size: 1em;
    text-align: left; /* Align text left for better readability on mobile */
    margin-bottom: 15px;
  }

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

  .page-khuyen-mai__figure {
    margin: 20px auto;
  }

  .page-khuyen-mai__figcaption {
    font-size: 0.85em;
  }

  .page-khuyen-mai__promo-card-grid,
  .page-khuyen-mai__steps-grid,
  .page-khuyen-mai__advantage-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-khuyen-mai__image--card {
    height: 180px; /* Slightly smaller card images for mobile */
  }

  /* 4. Buttons and button containers */
  .page-khuyen-mai__btn,
  .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 !important;
    padding-right: 15px !important;
  }

  /* Ensure button containers also adapt */
  .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 !important;
    padding-right: 15px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  /* 5. FAQ Section (if present) */
  .page-khuyen-mai__faq-list {
    margin-top: 30px;
  }

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

  .page-khuyen-mai__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

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

  .page-khuyen-mai__cta-bottom-section .page-khuyen-mai__container {
    padding: 30px 20px;
  }
}