/* style/khuyen-mai.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #017439;
  --btn-register: #C30808;
  --btn-login: #C30808;
  --font-register-login: #FFFF00;
}

.page-khuyen-mai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default for light body bg */
  background-color: var(--bg-light); /* Assuming shared body bg is light */
}

/* --- Hero Section --- */
.page-khuyen-mai__hero-section {
  padding-top: 10px; /* Small top padding as body handles header offset */
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #009944 100%);
  color: var(--text-light);
}

.page-khuyen-mai__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 40px 20px;
  gap: 40px;
}

.page-khuyen-mai__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
}

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

.page-khuyen-mai__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.page-khuyen-mai__hero-image {
  flex: 1 1 40%;
  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.2);
  display: block;
  margin: 0 auto;
}

.page-khuyen-mai__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

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

.page-khuyen-mai__btn-primary {
  background-color: var(--btn-register); /* Custom color for register */
  color: var(--font-register-login); /* Custom color for register font */
  border: 2px solid var(--btn-register);
}

.page-khuyen-mai__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
  transform: translateY(-2px);
}

.page-khuyen-mai__btn-secondary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.page-khuyen-mai__btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* --- General Section Styling --- */
.page-khuyen-mai__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-khuyen-mai__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
  color: var(--primary-color);
}

.page-khuyen-mai__dark-section .page-khuyen-mai__section-title {
  color: var(--secondary-color);
}

.page-khuyen-mai__section-description {
  font-size: 1.05rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-dark);
}

.page-khuyen-mai__dark-section .page-khuyen-mai__section-description {
  color: rgba(255, 255, 255, 0.9);
}

.page-khuyen-mai__dark-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

/* --- Intro Section (Module 1) --- */
.page-khuyen-mai__intro-section {
  padding: 60px 0;
}

.page-khuyen-mai__icon-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.page-khuyen-mai__icon-box {
  flex: 1 1 300px;
  max-width: 350px;
  text-align: center;
  padding: 30px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.page-khuyen-mai__icon-box:hover {
  transform: translateY(-8px);
}

.page-khuyen-mai__icon-box-media {
  width: 200px;
  height: 200px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--secondary-color);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.2);
}

.page-khuyen-mai__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-khuyen-mai__icon-box-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-khuyen-mai__icon-box-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

/* --- Promo Types Section --- */
.page-khuyen-mai__promo-types-section {
  padding: 60px 0;
  background-color: var(--bg-light);
}

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

.page-khuyen-mai__promo-card {
  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-khuyen-mai__promo-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-khuyen-mai__promo-card-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-khuyen-mai__btn-text {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-khuyen-mai__btn-text:hover {
  color: #004d22;
  border-color: #004d22;
}

/* --- Guide Section --- */
.page-khuyen-mai__guide-section {
  padding: 60px 0;
}

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

.page-khuyen-mai__guide-step {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.page-khuyen-mai__guide-step-image {
  width: 100%;
  max-width: 300px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
  display: block;
}

.page-khuyen-mai__guide-step-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-khuyen-mai__guide-step-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* --- Terms Section --- */
.page-khuyen-mai__terms-section {
  padding: 60px 0;
  background-color: var(--bg-light);
}

.page-khuyen-mai__terms-cta {
  text-align: center;
  margin-top: 40px;
}

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

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

.page-khuyen-mai__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.page-khuyen-mai__faq-item[open] {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--secondary-color);
  cursor: pointer;
  list-style: none; /* Hide default marker */
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--font-register-login);
}

.page-khuyen-mai__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

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

/* --- Final CTA Section --- */
.page-khuyen-mai__cta-final-section {
  padding: 60px 0;
  text-align: center;
}

.page-khuyen-mai__final-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* --- General Image Styles --- */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block; /* Ensure images behave as block elements for max-width/height:auto */
}

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

  /* HERO Section */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
  }

  .page-khuyen-mai__hero-container {
    flex-direction: column;
    padding: 30px 15px;
    gap: 30px;
  }

  .page-khuyen-mai__hero-content,
  .page-khuyen-mai__hero-image {
    flex: 1 1 100%;
    min-width: unset;
  }

  .page-khuyen-mai__hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    text-align: center;
  }

  .page-khuyen-mai__hero-description {
    font-size: 1rem;
    text-align: center;
  }

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

  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
  }

  /* Module 1 (Intro Section) */
  .page-khuyen-mai__intro-section,
  .page-khuyen-mai__promo-types-section,
  .page-khuyen-mai__guide-section,
  .page-khuyen-mai__terms-section,
  .page-khuyen-mai__faq-section,
  .page-khuyen-mai__cta-final-section {
    padding: 40px 0;
  }

  .page-khuyen-mai__content-area {
    padding: 30px 15px;
  }

  .page-khuyen-mai__section-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

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

  .page-khuyen-mai__icon-boxes {
    flex-direction: column;
    gap: 20px;
  }

  .page-khuyen-mai__icon-box {
    max-width: 100%;
    padding: 20px;
  }

  .page-khuyen-mai__icon-box-media {
    width: 160px;
    height: 160px;
    margin-bottom: 15px;
    border-width: 3px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
  }

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

  .page-khuyen-mai__icon-box-text {
    font-size: 0.9rem;
  }

  /* Promo Types Section */
  .page-khuyen-mai__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

  .page-khuyen-mai__promo-card-text {
    font-size: 0.85rem;
  }

  /* Guide Section */
  .page-khuyen-mai__guide-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-khuyen-mai__guide-step {
    padding: 20px;
  }

  .page-khuyen-mai__guide-step-image {
    height: 150px;
    margin-bottom: 20px;
  }

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

  .page-khuyen-mai__guide-step-text {
    font-size: 0.9rem;
  }

  /* FAQ Section */
  .page-khuyen-mai__faq-list {
    margin-top: 30px;
  }

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

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

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

  /* Final CTA Section */
  .page-khuyen-mai__final-cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  /* Universal Mobile Image Adaptation */
  .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__icon-box,
  .page-khuyen-mai__promo-card,
  .page-khuyen-mai__guide-step,
  .page-khuyen-mai__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Button Container Mobile Adaptation */
  .page-khuyen-mai__cta-buttons,
  .page-khuyen-mai__button-group,
  .page-khuyen-mai__btn-container,
  .page-khuyen-mai__final-cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    flex-direction: column; /* Ensure vertical stacking for buttons */
    gap: 10px;
  }

  .page-khuyen-mai__btn-text {
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .page-khuyen-mai__hero-container {
    padding: 40px 30px;
    gap: 30px;
  }

  .page-khuyen-mai__hero-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
  }

  .page-khuyen-mai__hero-description {
    font-size: 1.05rem;
  }

  .page-khuyen-mai__content-area {
    padding: 40px 30px;
  }

  .page-khuyen-mai__section-title {
    font-size: clamp(1.7rem, 2.5vw, 2.5rem);
  }

  .page-khuyen-mai__section-description {
    font-size: 1rem;
  }

  .page-khuyen-mai__icon-boxes {
    gap: 25px;
  }

  .page-khuyen-mai__icon-box {
    flex: 1 1 280px;
    max-width: 320px;
  }

  .page-khuyen-mai__icon-box-media {
    width: 180px;
    height: 180px;
  }

  .page-khuyen-mai__promo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .page-khuyen-mai__guide-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .page-khuyen-mai__faq-list {
    max-width: 800px;
  }
}