/* style/khuyen-mai.css */

:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --background-page: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
}

.page-khuyen-mai {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Default text color for the page */
  background-color: var(--background-page); /* Page background from custom colors */
}

/* HERO Section */
.page-khuyen-mai__hero-section {
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  padding-bottom: 60px;
  background-color: var(--card-bg); /* Use white for hero background */
}

.page-khuyen-mai__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-khuyen-mai__hero-content {
  flex: 1;
  min-width: 300px;
  color: var(--text-main);
}

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

.page-khuyen-mai__hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-main);
}

.page-khuyen-mai__hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 400px;
}

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

/* CTA Buttons Group */
.page-khuyen-mai__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.page-khuyen-mai__cta-buttons--center {
  justify-content: center;
  margin-top: 30px;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(var(--primary-color), 0.3);
}

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

.page-khuyen-mai__btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(var(--primary-color), 0.1);
}

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

.page-khuyen-mai__btn-link {
  background: none;
  color: var(--primary-color);
  border: none;
  padding: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.page-khuyen-mai__btn-link:hover {
  text-decoration: underline;
}

/* General Content Area */
.page-khuyen-mai__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-khuyen-mai__content-area--center {
  text-align: center;
}

.page-khuyen-mai__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text-black);
  text-align: center;
  margin-bottom: 20px;
}

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

/* Intro Section with Icon Boxes */
.page-khuyen-mai__intro-section {
  padding-bottom: 60px;
  background-color: var(--background-page);
}

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

.page-khuyen-mai__icon-box {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-khuyen-mai__icon-box-media {
  width: 120px;
  height: 120px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--secondary-color);
  box-shadow: 0 0 0 8px rgba(var(--secondary-color), 0.2);
}

.page-khuyen-mai__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* Ensure image is round */
  display: block;
}

.page-khuyen-mai__icon-box-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-black);
}

.page-khuyen-mai__icon-box-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-main);
}

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

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

.page-khuyen-mai__promo-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

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

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

.page-khuyen-mai__promo-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-khuyen-mai__promo-card-title a {
  color: var(--text-black);
  text-decoration: none;
}

.page-khuyen-mai__promo-card-title a:hover {
  color: var(--primary-color);
}

.page-khuyen-mai__promo-card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-main);
}

/* Guide Section */
.page-khuyen-mai__guide-section {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--background-page);
}

.page-khuyen-mai__guide-grid {
  display: flex;
  gap: 50px;
  align-items: center;
  margin-top: 40px;
}

.page-khuyen-mai__guide-steps {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-khuyen-mai__guide-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.page-khuyen-mai__step-number {
  flex-shrink: 0;
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.page-khuyen-mai__step-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-black);
}

.page-khuyen-mai__step-description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-main);
}

.page-khuyen-mai__guide-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 400px;
}

.page-khuyen-mai__guide-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--card-bg);
}

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

.page-khuyen-mai__faq-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.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(--text-black);
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-question {
  background-color: var(--primary-color);
  color: #ffffff;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-question .page-khuyen-mai__faq-toggle {
  color: #ffffff;
}

.page-khuyen-mai__faq-question:hover {
  background-color: #e0e7f7; /* Lighter hover for better contrast */
}

.page-khuyen-mai__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 300;
  color: var(--primary-color);
  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: 20px 25px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  background-color: #ffffff;
}

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

/* Bottom CTA Section */
.page-khuyen-mai__cta-bottom-section {
  padding-top: 60px;
  padding-bottom: 80px;
  background: var(--primary-color);
  color: #ffffff;
  text-align: center;
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__section-title,
.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__section-description {
  color: #ffffff;
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border-color: #ffffff;
}

.page-khuyen-mai__cta-bottom-section .page-khuyen-mai__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* General Image Styling */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-khuyen-mai__hero-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .page-khuyen-mai__hero-content {
    min-width: unset;
  }

  .page-khuyen-mai__hero-image {
    min-width: unset;
  }

  .page-khuyen-mai__cta-buttons {
    justify-content: center;
  }

  .page-khuyen-mai__guide-grid {
    flex-direction: column-reverse; /* Image above steps on smaller screens */
    gap: 40px;
  }

  .page-khuyen-mai__guide-image {
    min-width: unset;
  }
}

@media (max-width: 768px) {
  /* HERO Section */
  .page-khuyen-mai__hero-section {
    padding-top: 10px !important; /* Ensure minimal top padding */
    padding-bottom: 40px;
  }

  .page-khuyen-mai__hero-container,
  .page-khuyen-mai__content-area {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  /* CTA Buttons */
  .page-khuyen-mai__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px;
  }

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

  /* Section Titles & Descriptions */
  .page-khuyen-mai__section-title {
    font-size: 1.8rem;
  }

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

  /* Intro Section Icon Boxes */
  .page-khuyen-mai__icon-boxes {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-khuyen-mai__icon-box-media {
    width: 100px;
    height: 100px;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 0 0 6px rgba(var(--secondary-color), 0.2);
  }

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

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

  .page-khuyen-mai__promo-card-image {
    height: 180px; /* Adjust height for mobile */
  }

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

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

  /* Guide Section */
  .page-khuyen-mai__guide-grid {
    gap: 30px;
  }

  .page-khuyen-mai__guide-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .page-khuyen-mai__step-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .page-khuyen-mai__step-title {
    font-size: 1.1rem;
  }

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

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

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

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

  .page-khuyen-mai__hero-side-image,
  .page-khuyen-mai__promo-card-image,
  .page-khuyen-mai__guide-img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Exception for round images, keep aspect ratio */
  .page-khuyen-mai__icon-box-media {
    width: 100px !important;
    height: 100px !important;
    aspect-ratio: 1 / 1 !important;
    border: 3px solid var(--secondary-color) !important;
    box-shadow: 0 0 0 6px rgba(var(--secondary-color), 0.2) !important;
  }

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

}