/* Base styles */
.page-khuyen-mai {
  font-family: 'Arial', sans-serif;
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Body Background */
  line-height: 1.6;
  padding-bottom: 50px; /* Add some padding at the bottom */
}

/* Ensure all images are responsive by default */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

/* Section spacing */
.page-khuyen-mai section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 15px;
  box-sizing: border-box;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  display: flex;
  flex-direction: column; /* Ensure image is above content initially for desktop */
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-khuyen-mai__hero-image-container {
  width: 100%;
  margin-bottom: 30px; /* Space between image and content */
  box-sizing: border-box;
}

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

.page-khuyen-mai__hero-content {
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

.page-khuyen-mai__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  color: #FFD36B; /* Glow color for emphasis */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-khuyen-mai__intro-text {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #FFF6D6; /* Text Main */
}

.page-khuyen-mai__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container doesn't overflow */
  box-sizing: border-box;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Ensures buttons don't overflow */
  white-space: normal; /* Allows text to wrap */
  word-wrap: break-word; /* Ensures long words break */
  text-align: center;
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111; /* Dark text for bright button */
  border: none;
}

.page-khuyen-mai__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 216, 106, 0.4);
}

.page-khuyen-mai__btn-secondary {
  background: transparent;
  color: #FFD36B; /* Glow color */
  border: 2px solid #FFD36B; /* Glow color border */
}

.page-khuyen-mai__btn-secondary:hover {
  background: #FFD36B;
  color: #111111;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 216, 106, 0.2);
}

/* General Section Titles and Descriptions */
.page-khuyen-mai__section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: #FFD36B; /* Glow color */
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-khuyen-mai__section-description {
  font-size: 1rem;
  color: #FFF6D6; /* Text Main */
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px;
}

/* Promotion Categories Grid */
.page-khuyen-mai__promo-categories {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-khuyen-mai__category-card {
  background: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.page-khuyen-mai__category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(255, 216, 106, 0.15);
}

.page-khuyen-mai__card-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block; /* Ensure it behaves as a block element */
  margin-left: auto;
  margin-right: auto;
  min-width: 200px; /* Minimum size */
  min-height: 150px; /* Minimum size */
}

.page-khuyen-mai__card-title {
  font-size: 1.4rem;
  color: #FFD36B; /* Glow color */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-khuyen-mai__card-text {
  font-size: 0.95rem;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 20px;
  flex-grow: 1;
}

/* How To Claim Section */
.page-khuyen-mai__how-to-claim {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: #0A0A0A; /* Body 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: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.page-khuyen-mai__step-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.page-khuyen-mai__step-title {
  font-size: 1.3rem;
  color: #FFD36B; /* Glow color */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-khuyen-mai__step-text {
  font-size: 0.95rem;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Terms and Conditions */
.page-khuyen-mai__terms-conditions {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-khuyen-mai__terms-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px;
  max-width: 900px;
  text-align: left;
  background: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 12px;
  padding: 30px;
  box-sizing: border-box;
}

.page-khuyen-mai__terms-list li {
  font-size: 1rem;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 15px;
  position: relative;
  padding-left: 25px;
}

.page-khuyen-mai__terms-list li:last-child {
  margin-bottom: 0;
}

.page-khuyen-mai__terms-list li::before {
  content: '✓';
  color: #FFD36B; /* Glow color */
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Responsible Gambling */
.page-khuyen-mai__responsible-gambling {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: #0A0A0A; /* Body Background */
}

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

.page-khuyen-mai__responsible-card {
  background: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

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

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

details.page-khuyen-mai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #3A2A12; /* Border color */
  overflow: hidden;
  background: #111111; /* Card BG */
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #FFD36B; /* Glow color */
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question::-webkit-details-marker {
  display: none;
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question:hover {
  background: rgba(255, 211, 107, 0.1); /* Light hover effect */
}
.page-khuyen-mai__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFD36B; /* Glow color */
}
.page-khuyen-mai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFD36B; /* Glow color */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-khuyen-mai__faq-item .page-khuyen-mai__faq-answer {
  padding: 0 20px 20px;
  background: #0A0A0A; /* Body Background - slightly darker for contrast */
  border-radius: 0 0 5px 5px;
  color: #FFF6D6; /* Text Main */
}
.page-khuyen-mai__faq-answer p {
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-khuyen-mai section {
    padding: 30px 15px;
  }
  .page-khuyen-mai__hero-section {
    padding-top: 10px;
    padding-bottom: 40px;
  }
  .page-khuyen-mai__main-title {
    font-size: 2.8rem;
  }
  .page-khuyen-mai__section-title {
    font-size: 2.2rem;
  }
  .page-khuyen-mai__category-grid,
  .page-khuyen-mai__steps-grid,
  .page-khuyen-mai__responsible-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  /* Top section padding/spacing for mobile */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Specific top padding as per requirement */
    padding-bottom: 30px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* General content area containers */
  .page-khuyen-mai section,
  .page-khuyen-mai__promo-categories,
  .page-khuyen-mai__how-to-claim,
  .page-khuyen-mai__terms-conditions,
  .page-khuyen-mai__responsible-gambling,
  .page-khuyen-mai__faq-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero section specific adjustments */
  .page-khuyen-mai__hero-image-container {
    margin-bottom: 20px;
  }
  .page-khuyen-mai__main-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }
  .page-khuyen-mai__intro-text {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  /* Buttons responsiveness */
  .page-khuyen-mai__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Section titles and descriptions */
  .page-khuyen-mai__section-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }
  .page-khuyen-mai__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  /* Image responsiveness - general */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-khuyen-mai__card-image {
    min-width: unset; /* Remove min-width for mobile to allow smaller scaling */
    min-height: unset; /* Remove min-height for mobile */
  }

  /* Grid layouts to single column */
  .page-khuyen-mai__category-grid,
  .page-khuyen-mai__steps-grid,
  .page-khuyen-mai__responsible-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Cards */
  .page-khuyen-mai__category-card,
  .page-khuyen-mai__step-item,
  .page-khuyen-mai__responsible-card {
    padding: 20px;
  }
  .page-khuyen-mai__card-title,
  .page-khuyen-mai__step-title {
    font-size: 1.2rem;
  }
  .page-khuyen-mai__card-text,
  .page-khuyen-mai__step-text {
    font-size: 0.9rem;
  }

  /* Terms list */
  .page-khuyen-mai__terms-list {
    padding: 20px;
  }
  .page-khuyen-mai__terms-list li {
    font-size: 0.95rem;
    padding-left: 20px;
  }

  /* FAQ */
  details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question {
    padding: 15px;
  }
  .page-khuyen-mai__faq-qtext {
    font-size: 1rem;
  }
  .page-khuyen-mai__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }
  details.page-khuyen-mai__faq-item .page-khuyen-mai__faq-answer {
    padding: 0 15px 15px;
  }
}