/* style/khuyen-mai.css */

:root {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy: #08162B;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

/* Base styles for the page content, assuming body has --deep-navy background */
.page-khuyen-mai {
  color: var(--text-main); /* Light text for dark body background */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  padding-bottom: 60px; /* Ensure space above footer */
}

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

.page-khuyen-mai__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--gold-color);
  line-height: 1.2;
}

.page-khuyen-mai__section-title--light {
  color: var(--text-main);
}

.page-khuyen-mai__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
  color: var(--text-secondary);
}

.page-khuyen-mai__text-block--light {
  color: var(--text-main);
}

.page-khuyen-mai a {
  color: var(--secondary-color);
  text-decoration: none;
}

.page-khuyen-mai a:hover {
  text-decoration: underline;
  color: var(--glow-color);
}

.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* CTA Button Styles */
.page-khuyen-mai__cta-button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-khuyen-mai__btn-primary {
  background: var(--button-gradient);
  color: var(--text-main);
  border: 2px solid var(--secondary-color);
}

.page-khuyen-mai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(var(--secondary-color), 0.4);
}

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

.page-khuyen-mai__btn-secondary:hover {
  background: var(--gold-color);
  color: var(--deep-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(var(--gold-color), 0.4);
}

/* Hero Section */
.page-khuyen-mai__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 60px;
  background-color: var(--primary-color);
  position: relative;
  overflow: hidden;
}

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

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

.page-khuyen-mai__hero-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Using clamp for H1 */
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--gold-color);
  line-height: 1.2;
  max-width: 600px;
}

.page-khuyen-mai__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-secondary);
  max-width: 600px;
}

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

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

/* Intro Section */
.page-khuyen-mai__intro-section {
  padding: 60px 0;
  background-color: var(--deep-navy);
}

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

.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(--primary-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-khuyen-mai__promo-card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--gold-color);
  line-height: 1.3;
}

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

.page-khuyen-mai__promo-card-title a:hover {
  color: var(--glow-color);
  text-decoration: underline;
}

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

.page-khuyen-mai__promo-card .page-khuyen-mai__cta-button {
  margin-top: auto; /* Push button to the bottom */
}

/* How To Claim Section */
.page-khuyen-mai__how-to-claim-section {
  padding: 60px 0;
  background-color: var(--deep-navy);
}

.page-khuyen-mai__how-to-claim-content {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap-reverse;
}

.page-khuyen-mai__how-to-claim-steps {
  flex: 1 1 50%;
  min-width: 300px;
}

.page-khuyen-mai__step-list {
  list-style: none;
  padding: 0;
}

.page-khuyen-mai__step-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__step-item h3 {
  font-size: 1.3em;
  color: var(--gold-color);
  margin-top: 0;
  margin-bottom: 10px;
}

.page-khuyen-mai__step-item p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.page-khuyen-mai__how-to-claim-image {
  flex: 1 1 40%;
  min-width: 300px;
  text-align: center;
}

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

.page-khuyen-mai__terms-list {
  list-style: disc;
  margin-left: 20px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.page-khuyen-mai__terms-item {
  margin-bottom: 10px;
  font-size: 1em;
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
  padding: 60px 0;
  background-color: var(--deep-navy);
}

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

.page-khuyen-mai__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text-main);
  position: relative;
  list-style: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

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

.page-khuyen-mai__faq-question:hover {
  background-color: rgba(var(--secondary-color), 0.1);
}

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

.page-khuyen-mai__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
  color: var(--gold-color);
}

.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: 1em;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA Section */
.page-khuyen-mai__cta-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  text-align: center;
}

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

.page-khuyen-mai__cta-section .page-khuyen-mai__section-title {
  margin-bottom: 25px;
  color: var(--gold-color);
}

.page-khuyen-mai__cta-section .page-khuyen-mai__text-block {
  margin-bottom: 40px;
  font-size: 1.15em;
  color: var(--text-secondary);
}

.page-khuyen-mai__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* ------------------------------------ */
/* Responsive Styles */
/* ------------------------------------ */

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

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

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

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

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

  .page-khuyen-mai__hero-title {
    font-size: 2.2em; /* Smaller H1 for mobile */
    margin-bottom: 15px;
  }

  .page-khuyen-mai__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-khuyen-mai__hero-image {
    order: -1; /* Image above text on mobile */
  }

  /* General Section Title and Text */
  .page-khuyen-mai__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-khuyen-mai__text-block {
    font-size: 1em;
  }

  /* Promo Types Section */
  .page-khuyen-mai__promo-types-section {
    padding: 40px 0;
  }

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

  .page-khuyen-mai__promo-card-image {
    height: 180px; /* Slightly smaller fixed height for mobile cards */
  }

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

  .page-khuyen-mai__promo-card-description {
    font-size: 0.9em;
  }

  /* How To Claim Section */
  .page-khuyen-mai__how-to-claim-section {
    padding: 40px 0;
  }

  .page-khuyen-mai__how-to-claim-content {
    flex-direction: column;
    gap: 30px;
  }

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

  .page-khuyen-mai__step-item h3 {
    font-size: 1.1em;
  }

  /* Terms Section */
  .page-khuyen-mai__terms-section {
    padding: 40px 0;
  }

  .page-khuyen-mai__terms-list {
    margin-left: 15px;
  }

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

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

  .page-khuyen-mai__faq-answer {
    padding: 0 20px 15px;
  }

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

  .page-khuyen-mai__cta-section .page-khuyen-mai__text-block {
    font-size: 1em;
    margin-bottom: 30px;
  }

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

  /* Universal Image Responsive */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Universal Button Responsive */
  .page-khuyen-mai__cta-button,
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary,
  .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; /* Ensure padding for full-width buttons */
    padding-right: 15px !important;
  }

  .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: 15px !important; /* Adjust gap for mobile */
  }
}

/* Tablet (max-width: 1024px) - Adjustments for larger tablets */
@media (max-width: 1024px) {
  .page-khuyen-mai__hero-container {
    gap: 30px;
    padding-left: 30px;
    padding-right: 30px;
  }

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

  .page-khuyen-mai__hero-title {
    font-size: 3em;
  }

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

  .page-khuyen-mai__how-to-claim-content {
    gap: 30px;
  }
}