/* style/khuyen-mai.css */
.page-khuyen-mai {
  font-family: 'Arial', sans-serif;
  color: #333333;
  background-color: #FFFFFF;
}

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

.page-khuyen-mai__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-khuyen-mai__hero-content {
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
}

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

.page-khuyen-mai__intro-text {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: #555555;
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-khuyen-mai__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow word breaking */
  max-width: 100%;
  box-sizing: border-box;
}

.page-khuyen-mai__btn-primary {
  background-color: #C30808; /* Custom color for register/login type */
  color: #FFFF00; /* Custom font color */
  border: 2px solid #C30808;
}

.page-khuyen-mai__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

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

.page-khuyen-mai__btn-secondary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

.page-khuyen-mai__btn-link {
  color: #017439;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-khuyen-mai__btn-link:hover {
  color: #005a2e;
}

.page-khuyen-mai__btn-center {
  display: block;
  margin: 30px auto 0 auto;
  width: fit-content;
}

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

.page-khuyen-mai__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-khuyen-mai__dark-bg .page-khuyen-mai__section-title,
.page-khuyen-mai__dark-bg .page-khuyen-mai__section-description {
  color: #ffffff;
}

.page-khuyen-mai__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

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

.page-khuyen-mai__dark-bg .page-khuyen-mai__section-title {
  color: #ffffff;
}

.page-khuyen-mai__section-description {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: #555555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.page-khuyen-mai__dark-bg .page-khuyen-mai__section-description {
  color: #f0f0f0;
}

.page-khuyen-mai__card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-khuyen-mai__dark-bg .page-khuyen-mai__card {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.page-khuyen-mai__dark-bg .page-khuyen-mai__card h3 {
  color: #ffffff;
}

.page-khuyen-mai__dark-bg .page-khuyen-mai__card p {
  color: #f0f0f0;
}

.page-khuyen-mai__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.page-khuyen-mai__feature-icon {
  width: 100%;
  height: auto;
  max-width: 250px; /* Recommended size for feature icons */
  margin-bottom: 20px;
  border-radius: 5px;
}

.page-khuyen-mai__feature-title {
  font-size: 1.5rem;
  color: #017439;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-khuyen-mai__feature-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #555555;
}

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

.page-khuyen-mai__promo-card {
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

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

.page-khuyen-mai__promo-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-khuyen-mai__dark-bg .page-khuyen-mai__promo-title {
  color: #ffffff;
}

.page-khuyen-mai__promo-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-khuyen-mai__dark-bg .page-khuyen-mai__promo-text {
  color: #f0f0f0;
}

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

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

.page-khuyen-mai__step-icon {
  width: 100%;
  height: auto;
  max-width: 200px;
  margin-bottom: 20px;
  border-radius: 5px;
}

.page-khuyen-mai__step-title {
  font-size: 1.4rem;
  color: #017439;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-khuyen-mai__step-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 20px;
}

.page-khuyen-mai__terms-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.page-khuyen-mai__terms-item {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.page-khuyen-mai__terms-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.page-khuyen-mai__terms-subtitle {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-khuyen-mai__terms-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #f0f0f0;
}

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

.page-khuyen-mai__faq-item {
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-khuyen-mai__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #017439;
  cursor: pointer;
  outline: none;
  background-color: #e8f5e9; /* Lighter green for summary */
  border-bottom: 1px solid #d4edda;
}

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

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  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: 15px 25px 20px 25px;
  font-size: 1rem;
  line-height: 1.7;
  color: #555555;
  background-color: #ffffff;
}

.page-khuyen-mai__cta-bottom {
  padding: 80px 0;
  text-align: center;
}

/* General image responsiveness for content area */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Desktop specific styles for buttons and containers */
.page-khuyen-mai__cta-buttons,
.page-khuyen-mai__button-group,
.page-khuyen-mai__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media Queries for Tablet and Mobile */
@media (max-width: 1024px) {
  .page-khuyen-mai__hero-content {
    padding: 0 40px;
  }

  .page-khuyen-mai__main-title {
    font-size: 2.8rem;
  }

  .page-khuyen-mai__intro-text {
    font-size: 1.1rem;
  }

  .page-khuyen-mai__section-title {
    font-size: 2.2rem;
  }

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

  .page-khuyen-mai__features-grid,
  .page-khuyen-mai__promo-grid,
  .page-khuyen-mai__steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

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

  .page-khuyen-mai__hero-section {
    flex-direction: column;
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 30px;
  }

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

  .page-khuyen-mai__hero-image {
    object-fit: contain !important; /* Contain for mobile hero */
    aspect-ratio: unset !important;
    max-height: none !important;
  }

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

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

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

  .page-khuyen-mai__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

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

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

  .page-khuyen-mai__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

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

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

  .page-khuyen-mai__feature-icon,
  .page-khuyen-mai__promo-image,
  .page-khuyen-mai__step-icon {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 15px;
  }

  .page-khuyen-mai__feature-title,
  .page-khuyen-mai__promo-title,
  .page-khuyen-mai__step-title {
    font-size: 1.2rem;
  }

  .page-khuyen-mai__feature-text,
  .page-khuyen-mai__promo-text,
  .page-khuyen-mai__step-text {
    font-size: 0.9rem;
  }

  .page-khuyen-mai__terms-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }

  .page-khuyen-mai__terms-subtitle {
    font-size: 1.15rem;
  }

  .page-khuyen-mai__terms-text {
    font-size: 0.95rem;
  }

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

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

  .page-khuyen-mai__cta-bottom {
    padding: 50px 0;
  }

  .page-khuyen-mai__cta-bottom .page-khuyen-mai__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-khuyen-mai__card {
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
}