/* style/khuyen-mai.css */
.page-khuyen-mai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #F5F7FA; /* Matches body background from shared.css */
}

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

/* Hero Section */
.page-khuyen-mai__hero-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: #F5F7FA; /* Match body background */
}

.page-khuyen-mai__hero-content-wrapper {
  flex: 1 1 50%;
  padding: 20px;
  box-sizing: border-box;
  text-align: left;
}

.page-khuyen-mai__hero-image-wrapper {
  flex: 1 1 40%;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.page-khuyen-mai__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.2rem, 4vw, 3rem); /* Use clamp for H1 */
  font-weight: bold;
  color: #E53935; /* Main brand color for title */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-khuyen-mai__intro-text {
  font-size: 1.1rem;
  color: #333333;
  margin-bottom: 30px;
}

.page-khuyen-mai__cta-group {
  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;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal;
  word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-khuyen-mai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

.page-khuyen-mai__btn-secondary:hover {
  background-color: #E53935;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Promo Grid Section */
.page-khuyen-mai__promo-grid-section {
  padding: 60px 0;
  background-color: #F5F7FA; /* Light background */
  color: #333333;
}

.page-khuyen-mai__section-title {
  font-size: 2.5rem;
  color: #E53935;
  text-align: center;
  margin-bottom: 20px;
}

.page-khuyen-mai__section-description {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #333333;
}

.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: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #333333;
}

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

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

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

.page-khuyen-mai__promo-card-title {
  font-size: 1.5rem;
  color: #E53935;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-khuyen-mai__promo-card-text {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-khuyen-mai__promo-card-button {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  transition: background 0.3s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-khuyen-mai__promo-card-button:hover {
  opacity: 0.9;
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
  padding: 60px 0;
  background-color: #E53935; /* Dark background */
  color: #ffffff; /* White text for dark background */
}

.page-khuyen-mai__faq-section .page-khuyen-mai__section-title {
  color: #ffffff;
  margin-bottom: 40px;
}

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

.page-khuyen-mai__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

.page-khuyen-mai__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15rem;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  outline: none;
  color: #ffffff;
  position: relative;
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  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: 0 25px 20px;
  font-size: 1rem;
  line-height: 1.7;
  color: #f0f0f0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-khuyen-mai__hero-content-wrapper,
  .page-khuyen-mai__hero-image-wrapper {
    flex: 1 1 100%;
    text-align: center;
  }
  .page-khuyen-mai__hero-content-wrapper {
    order: 2; /* Move content below image on smaller screens */
  }
  .page-khuyen-mai__hero-image-wrapper {
    order: 1;
  }
  .page-khuyen-mai__main-title,
  .page-khuyen-mai__intro-text {
    text-align: center;
  }
  .page-khuyen-mai__cta-group {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }
  .page-khuyen-mai__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .page-khuyen-mai__intro-text {
    font-size: 1rem;
  }
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 0.95rem;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-khuyen-mai__cta-group {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-khuyen-mai__container {
    padding: 15px;
  }
  .page-khuyen-mai__section-title {
    font-size: 2rem;
  }
  .page-khuyen-mai__section-description {
    font-size: 0.95rem;
  }
  .page-khuyen-mai__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-khuyen-mai__promo-card-image {
    height: 200px; /* Adjust height for mobile */
  }
  .page-khuyen-mai__promo-card-title {
    font-size: 1.3rem;
  }
  .page-khuyen-mai__promo-card-text {
    font-size: 0.9rem;
  }
  .page-khuyen-mai__promo-card-button {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.9rem;
    padding: 10px 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-khuyen-mai__faq-item summary {
    padding: 15px 20px;
    font-size: 1rem;
  }
  .page-khuyen-mai__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95rem;
  }
  /* General image and container rules for mobile */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-khuyen-mai__promo-grid-section,
  .page-khuyen-mai__faq-section {
    padding: 40px 0;
  }
  .page-khuyen-mai__container,
  .page-khuyen-mai__hero-content-wrapper,
  .page-khuyen-mai__hero-image-wrapper,
  .page-khuyen-mai__promo-card,
  .page-khuyen-mai__faq-list,
  .page-khuyen-mai__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-khuyen-mai__hero-section .page-khuyen-mai__hero-content-wrapper {
    padding-left: 15px;
    padding-right: 15px;
  }
}