/* style/promotions.css */

/* Base styles for the promotions page */
.page-promotions {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #f8f8f8; /* Light background for the page content */
}

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  background: linear-gradient(135deg, #CC0000 0%, #FFD700 100%); /* Brand colors for gradient */
  color: #ffffff; /* White text for dark background */
  overflow: hidden; /* Prevent image overflow */
}

.page-promotions__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any background effects */
}

.page-promotions__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 12px; /* Match container border-radius */
}

.page-promotions__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-promotions__main-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}

.page-promotions__description {
  font-size: 1.3em;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #f0f0f0;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-promotions__section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-promotions__section-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 50px;
  color: #CC0000; /* Main brand color for titles */
  position: relative;
  display: inline-block;
}

.page-promotions__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background-color: #FFD700; /* Accent color */
  border-radius: 3px;
}

.page-promotions__text-block {
  font-size: 1.1em;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto 30px;
  color: #333333;
}

/* Grid Layout for Cards */
.page-promotions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Card Styles */
.page-promotions__card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 450px; /* Ensure consistent card height */
}

.page-promotions__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.page-promotions__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistent image display */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
  display: block;
}

.page-promotions__card-title {
  font-size: 1.6em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #CC0000;
  line-height: 1.3;
}

.page-promotions__card-text {
  font-size: 1em;
  line-height: 1.7;
  color: #555555;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Buttons */
.page-promotions__cta-button,
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  border: none; /* Remove default button border */
}

.page-promotions__cta-button {
  background: #FFD700; /* Gold accent for primary CTA */
  color: #333333; /* Dark text for gold background */
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
  margin-top: 30px;
}

.page-promotions__cta-button:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
}

.page-promotions__btn-primary {
  background: #CC0000; /* Main brand color */
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(204, 0, 0, 0.3);
  margin-top: auto; /* Push button to bottom of card */
}

.page-promotions__btn-primary:hover {
  background: #a30000;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(204, 0, 0, 0.4);
}

.page-promotions__btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid #FFD700; /* Gold border for secondary button */
  margin-top: 30px;
}

.page-promotions__btn-secondary:hover {
  background: #FFD700;
  color: #333333;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

/* Dark Background Section */
.page-promotions__dark-bg {
  background: #CC0000;
  color: #ffffff;
}

.page-promotions__dark-bg .page-promotions__section-title {
  color: #ffffff;
}

.page-promotions__dark-bg .page-promotions__section-title::after {
  background-color: #FFD700;
}

.page-promotions__dark-bg .page-promotions__text-block {
  color: #f0f0f0;
}

/* Image full width for referral section */
.page-promotions__image-full-width {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto 40px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* List styles */
.page-promotions__list {
  list-style: none;
  padding: 0;
  margin: 30px auto 40px;
  max-width: 800px;
  text-align: left;
}

.page-promotions__list li {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
  color: #333333;
}

.page-promotions__list li::before {
  content: '✓';
  color: #CC0000;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

/* Referral Section specific content wrapper */
.page-promotions__referral-section .page-promotions__content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* FAQ Section Styles */
.page-promotions__faq-section {
  background-color: #f0f0f0;
  padding-top: 80px;
  padding-bottom: 80px;
}

.page-promotions__faq-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* 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;
  background: #ffffff;
  color: #555555;
  font-size: 1em;
  line-height: 1.7;
}

/* FAQ展开状态 - 🚨 Sử dụng !important và max-height đủ lớn để đảm bảo nó 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: #ffffff;
  border-top: 1px solid #e0e0e0;
}

/* Question styles */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #CC0000; /* Use brand color for question background */
  color: #ffffff; /* White text for question */
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.page-promotions__faq-item.active .page-promotions__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #a30000; /* Slightly darker on active */
}

.page-promotions__faq-question:hover {
  background: #a30000; /* Darker on hover */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Question title style */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: #ffffff; /* White text */
}

/* Toggle icon */
.page-promotions__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold accent for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Rotate for minus sign effect */
  background: rgba(255, 255, 255, 0.2);
}

/* Call to Action Register Section */
.page-promotions__cta-register {
  background-color: #f8f8f8; /* Light background */
  padding: 100px 20px;
}

.page-promotions__cta-register .page-promotions__section-title {
  color: #CC0000;
}

.page-promotions__cta-register .page-promotions__section-title::after {
  background-color: #FFD700;
}

.page-promotions__cta-register .page-promotions__text-block {
  color: #333333;
}


/* Responsive Design */
@media (max-width: 992px) {
  .page-promotions__main-title {
    font-size: 2.5em;
  }
  .page-promotions__description {
    font-size: 1.1em;
  }
  .page-promotions__section-title {
    font-size: 2em;
  }
  .page-promotions__card {
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  .page-promotions__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

  .page-promotions__section {
    padding: 60px 15px;
  }

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

  .page-promotions__text-block {
    font-size: 0.95em;
  }

  .page-promotions__grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-promotions__card {
    padding: 25px;
    min-height: auto; /* Allow height to adjust on mobile */
  }

  .page-promotions__card-image {
    height: 180px;
  }

  .page-promotions__card-title {
    font-size: 1.4em;
  }

  .page-promotions__card-text {
    font-size: 0.9em;
  }

  .page-promotions__btn-primary,
  .page-promotions__btn-secondary {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

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

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

  /* Mobile image and container overflow prevention */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__hero-section,
  .page-promotions__hero-container,
  .page-promotions__hero-image,
  .page-promotions__hero-content,
  .page-promotions__content-wrapper,
  .page-promotions__faq-container,
  .page-promotions__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px; /* Add padding to prevent content touching edges */
    padding-right: 15px;
  }

  /* Adjust padding for elements that might have default padding */
  .page-promotions__hero-section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-promotions__hero-container,
  .page-promotions__hero-image,
  .page-promotions__hero-content {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Ensure content area images do not shrink below 200px (desktop) */
.page-promotions__section img:not(.page-promotions__faq-toggle) {
  min-width: 200px;
  min-height: 200px;
}