/* style/promotions.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-on-dark: #ffffff;
  --text-on-light: #333333;
  --background-dark: #000000;
  --background-light-card: rgba(255, 255, 255, 0.1);
  --border-color: #e0e0e0;
}

.page-promotions {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-on-dark); /* Body background is dark (#000), so text should be light */
  background-color: var(--background-dark);
  padding-top: 10px; /* Adjust for fixed header */
}

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

.page-promotions__hero-section {
  position: relative;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('[GALLERY:hero:bet 789,khuyen mai,banner chinh,nen toi]') center center / cover no-repeat;
  padding: 80px 20px 60px;
  text-align: center;
  color: var(--text-on-dark);
  padding-top: 120px; /* Adjust for fixed header */
}

.page-promotions__hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-promotions__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}

.page-promotions__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-promotions__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.page-promotions__cta-button--primary {
  background: var(--secondary-color);
  color: var(--text-on-light);
  border: 2px solid var(--secondary-color);
}

.page-promotions__cta-button--primary:hover {
  background: darken(var(--secondary-color), 10%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-promotions__cta-button--secondary {
  background: transparent;
  color: var(--text-on-dark);
  border: 2px solid var(--text-on-dark);
}

.page-promotions__cta-button--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-promotions__cta-button--small {
  padding: 10px 25px;
  font-size: 0.95em;
  border-radius: 6px;
  background: var(--primary-color);
  color: var(--text-on-dark);
  border: none;
}

.page-promotions__cta-button--small:hover {
  background: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-promotions__section-title {
  font-size: 2.5em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 25px;
  font-weight: bold;
  line-height: 1.3;
}

.page-promotions__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: var(--text-on-dark);
}

.page-promotions__section-description--note {
  font-size: 0.95em;
  color: #cccccc;
  margin-top: 30px;
}

.page-promotions__section-description--center {
  text-align: center;
  margin-bottom: 30px;
}

.page-promotions__cta-buttons--center {
  margin-top: 30px;
  text-align: center;
}

.page-promotions__featured-promotions {
  background-color: var(--background-dark);
  padding: 60px 0;
}

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

.page-promotions__promo-card {
  background: var(--background-light-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-promotions__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.page-promotions__promo-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-promotions__promo-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-promotions__promo-card-title {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__promo-card-text {
  font-size: 1em;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-promotions__how-to-claim-section {
  background-color: #0d0d0d;
  padding: 80px 0;
}

.page-promotions__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.page-promotions__step-item {
  text-align: center;
  background: var(--background-light-card);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.page-promotions__step-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.page-promotions__step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-promotions__step-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: none; /* Ensure no CSS filter changes image color */
}

.page-promotions__step-title {
  font-size: 1.4em;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__step-text {
  font-size: 1em;
  color: #e0e0e0;
  flex-grow: 1;
}

.page-promotions__why-choose-us-section {
  background-color: var(--background-dark);
  padding: 80px 0;
}

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

.page-promotions__advantage-card {
  background: var(--background-light-card);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-promotions__advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.page-promotions__advantage-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 25px;
  object-fit: contain;
  filter: none; /* Ensure no CSS filter changes image color */
}

.page-promotions__advantage-title {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__advantage-text {
  font-size: 1em;
  color: #e0e0e0;
  flex-grow: 1;
}

.page-promotions__faq-section {
  background-color: #0d0d0d;
  padding: 80px 0;
}

.page-promotions__faq-list {
  margin-top: 40px;
}

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--background-light-card);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* FAQ默认状态 - 答案隐藏 */
.page-promotions__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  color: #e0e0e0;
  font-size: 1em;
}

/* FAQ展开状态 - 🚨 Sử dụng !important và đủ lớn max-height để đảm bảo mở rộng */
.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(0, 0, 0, 0.3); /* Slightly darker background for expanded answer */
  border-radius: 0 0 8px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Vấn đề FAQ */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(0, 123, 255, 0.1); /* Light blue tint for question */
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-on-dark);
}

.page-promotions__faq-item.active .page-promotions__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.page-promotions__faq-question:hover {
  background: rgba(0, 123, 255, 0.2);
  border-color: var(--secondary-color);
}

.page-promotions__faq-question:active {
  background: rgba(0, 123, 255, 0.3);
}

/* Tiêu đề câu hỏi */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn h3 chặn sự kiện click */
  color: var(--text-on-dark);
}

/* Biểu tượng chuyển đổi */
.page-promotions__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect, or just change text to '-' */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-promotions__main-title {
    font-size: 2.8em;
  }
  .page-promotions__section-title {
    font-size: 2em;
  }
  .page-promotions__hero-section {
    padding-top: 100px;
  }
}

@media (max-width: 768px) {
  .page-promotions {
    padding-top: 10px !important; /* Mobile: Adjust for fixed header */
    font-size: 15px;
  }

  .page-promotions__container {
    padding: 30px 15px;
  }

  .page-promotions__hero-section {
    padding: 60px 15px 40px;
    padding-top: 100px; /* Mobile: Adjust for fixed header */
  }

  .page-promotions__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-promotions__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-promotions__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-promotions__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-promotions__section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-promotions__section-description {
    font-size: 0.95em;
    margin-bottom: 40px;
  }

  .page-promotions__promotions-grid,
  .page-promotions__steps-grid,
  .page-promotions__advantages-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-promotions__promo-card-image {
    height: 180px;
  }

  .page-promotions__promo-card-title {
    font-size: 1.3em;
  }

  .page-promotions__promo-card-text {
    font-size: 0.95em;
  }

  .page-promotions__step-item,
  .page-promotions__advantage-card {
    padding: 25px;
  }

  .page-promotions__step-icon,
  .page-promotions__advantage-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }

  .page-promotions__step-icon img {
    width: 40px;
    height: 40px;
  }

  .page-promotions__step-title,
  .page-promotions__advantage-title {
    font-size: 1.2em;
  }

  .page-promotions__step-text,
  .page-promotions__advantage-text {
    font-size: 0.95em;
  }

  .page-promotions__faq-question {
    padding: 15px 20px;
  }

  .page-promotions__faq-question h3 {
    font-size: 1em;
  }

  .page-promotions__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px 20px !important;
  }

  /* Image responsive for all images */
  .page-promotions img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-promotions__promo-card,
  .page-promotions__step-item,
  .page-promotions__advantage-card,
  .page-promotions__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-promotions__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-promotions__hero-section,
  .page-promotions__featured-promotions,
  .page-promotions__how-to-claim-section,
  .page-promotions__why-choose-us-section,
  .page-promotions__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
}

/* Darken function for SCSS-like behavior */
@function darken($color, $percentage) {
  @return mix(black, $color, $percentage);
}