/* 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, #1F2D3D); /* Using custom color for main text */
  background-color: var(--background-color, #F4F7FB); /* Using custom color for background */
}

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

/* Hero Section */
.page-khuyen-mai__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 60px;
  background-color: #F4F7FB; /* Matching the overall light background */
}

.page-khuyen-mai__hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-khuyen-mai__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
  color: var(--text-main, #1F2D3D);
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Using clamp for H1 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--custom-color-1776249996415, #000000); /* Using specific custom color for H1 */
}

.page-khuyen-mai__intro-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.page-khuyen-mai__hero-image {
  flex: 1 1 45%;
  min-width: 300px;
  text-align: center;
}

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

/* CTA Buttons */
.page-khuyen-mai__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Custom button color */
  color: #ffffff;
  border: none;
}

.page-khuyen-mai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(47, 107, 255, 0.3);
}

.page-khuyen-mai__btn-secondary {
  background-color: transparent;
  color: #2F6BFF; /* Primary color for text */
  border: 2px solid #2F6BFF;
}

.page-khuyen-mai__btn-secondary:hover {
  background-color: #2F6BFF;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(47, 107, 255, 0.2);
}

.page-khuyen-mai__btn-tertiary {
  background-color: #F4F7FB; /* Light background */
  color: #2F6BFF; /* Primary color for text */
  border: 1px solid #D6E2FF; /* Border color */
  padding: 10px 20px;
  font-size: 0.95rem;
}

.page-khuyen-mai__btn-tertiary:hover {
  background-color: #E0E7F5;
  color: #2F6BFF;
}

/* Section common styles */
.page-khuyen-mai__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--custom-color-1776249996415, #000000);
}

.page-khuyen-mai__section-description {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: var(--text-main, #1F2D3D);
}

/* Promo Grid Section */
.page-khuyen-mai__promo-grid-section {
  padding: 60px 0;
  background-color: var(--card-bg, #FFFFFF); /* White background for this section */
}

.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(--card-bg, #FFFFFF);
  border: 1px solid var(--border-color, #D6E2FF);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-khuyen-mai__promo-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-khuyen-mai__promo-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 20px 20px 10px;
  color: var(--custom-color-1776249996415, #000000);
}

.page-khuyen-mai__promo-card-title a {
  text-decoration: none;
  color: inherit;
}

.page-khuyen-mai__promo-card-title a:hover {
  color: #2F6BFF; /* Primary color on hover */
}

.page-khuyen-mai__promo-card-text {
  font-size: 1rem;
  color: var(--text-main, #1F2D3D);
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow text to grow and push button to bottom */
}

.page-khuyen-mai__promo-card .page-khuyen-mai__btn-tertiary {
  margin: 0 20px 20px;
  align-self: flex-start; /* Align button to start within flex column */
}

/* How-to Claim Section */
.page-khuyen-mai__how-to-claim-section {
  padding: 60px 0;
  background-color: var(--background-color, #F4F7FB); /* Light background */
}

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

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

.page-khuyen-mai__step-icon {
  width: 60px;
  height: 60px;
  line-height: 60px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 20px;
  box-shadow: 0 5px 15px rgba(47, 107, 255, 0.3);
}

.page-khuyen-mai__step-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--custom-color-1776249996415, #000000);
}

.page-khuyen-mai__step-text {
  font-size: 1rem;
  color: var(--text-main, #1F2D3D);
}

.page-khuyen-mai__step-text a {
  color: #2F6BFF;
  text-decoration: none;
}

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

/* FAQ Section */
.page-khuyen-mai__faq-section {
  padding: 60px 0;
  background-color: var(--card-bg, #FFFFFF); /* White background for this section */
}

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

.page-khuyen-mai__faq-item {
  border: 1px solid var(--border-color, #D6E2FF);
  border-radius: 8px;
  margin-bottom: 15px;
  background-color: var(--card-bg, #FFFFFF);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  overflow: hidden; /* For smooth animation */
}

.page-khuyen-mai__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--custom-color-1776249996415, #000000);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

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

.page-khuyen-mai__faq-qtext {
  flex-grow: 1;
}

.page-khuyen-mai__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: #2F6BFF;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-khuyen-mai__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: var(--text-main, #1F2D3D);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-answer {
  max-height: 2000px; /* Large enough to accommodate content */
  padding-top: 10px;
}

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

.page-khuyen-mai__faq-answer a {
  color: #2F6BFF;
  text-decoration: none;
}

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

/* Call to Action Bottom Section */
.page-khuyen-mai__cta-bottom-section {
  padding: 80px 0;
  background-color: #2F6BFF; /* Primary color background */
  text-align: center;
  color: #ffffff;
}

.page-khuyen-mai__cta-content {
  max-width: 900px;
}

.page-khuyen-mai__cta-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-khuyen-mai__cta-text {
  font-size: 1.1rem;
  margin-bottom: 40px;
  color: #ffffff;
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__cta-buttons {
  justify-content: center;
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__btn-primary {
  background: #ffffff; /* White background for primary button */
  color: #2F6BFF; /* Primary color for text */
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__btn-primary:hover {
  background: #f0f0f0;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__btn-secondary:hover {
  background: #ffffff;
  color: #2F6BFF;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Universal image and container responsive rules */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-khuyen-mai__section,
.page-khuyen-mai__card,
.page-khuyen-mai__container,
.page-khuyen-mai__promo-grid,
.page-khuyen-mai__steps-grid,
.page-khuyen-mai__faq-list {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Prevent overflow from children */
}

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

  /* HERO Section - Checklist Item 1 */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Small top padding, no var(--header-offset) */
    padding-bottom: 40px !important;
  }
  
  .page-khuyen-mai__hero-container {
    flex-direction: column-reverse; /* Image block above text block */
    gap: 30px;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }

  .page-khuyen-mai__hero-content {
    text-align: center;
    min-width: unset;
  }

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

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

  .page-khuyen-mai__hero-image {
    min-width: unset;
  }

  .page-khuyen-mai__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    padding: 0 15px !important; /* Add padding to container */
  }

  /* Buttons - Checklist Item 6 */
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary,
  .page-khuyen-mai__btn-tertiary,
  .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;
  }

  .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;
  }

  /* Promo Grid Section (Content Module) - Checklist Item 4 */
  .page-khuyen-mai__promo-grid-section {
    padding: 40px 0 !important;
  }

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

  .page-khuyen-mai__section-description {
    font-size: 1rem !important;
    margin-bottom: 30px !important;
    padding: 0 15px;
  }

  .page-khuyen-mai__promo-image {
    height: 180px !important; /* Adjust height for smaller screens */
  }

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

  .page-khuyen-mai__promo-card-text {
    font-size: 0.95rem !important;
  }

  /* How-to Claim Section (Content Module) - Checklist Item 4 */
  .page-khuyen-mai__how-to-claim-section {
    padding: 40px 0 !important;
  }

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

  .page-khuyen-mai__step-icon {
    width: 50px !important;
    height: 50px !important;
    line-height: 50px !important;
    font-size: 1.5rem !important;
  }

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

  /* FAQ Section (Content Module) - Checklist Item 4 */
  .page-khuyen-mai__faq-section {
    padding: 40px 0 !important;
  }

  .page-khuyen-mai__faq-item summary {
    font-size: 1rem !important;
    padding: 15px 20px !important;
  }

  .page-khuyen-mai__faq-toggle {
    font-size: 1.5rem !important;
  }

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

  /* Call to Action Bottom Section (Content Module) */
  .page-khuyen-mai__cta-bottom-section {
    padding: 50px 0 !important;
  }

  .page-khuyen-mai__cta-title {
    font-size: 1.8rem !important;
    margin-bottom: 15px !important;
  }

  .page-khuyen-mai__cta-text {
    font-size: 1rem !important;
    margin-bottom: 30px !important;
    padding: 0 15px;
  }

  /* Universal Images - Checklist Item 5 */
  .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__promo-grid,
  .page-khuyen-mai__steps-grid,
  .page-khuyen-mai__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}