/* style/promotions.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-text-yellow: #FFFF00;
}

.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--secondary-color); /* Body background is var(--secondary-color) which is white, so default text is dark */
}

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

.page-promotions__text-center {
  text-align: center;
}

.page-promotions__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-promotions__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-promotions__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dark);
}

/* Color Contrast Specifics */
.page-promotions__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-promotions__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-promotions__dark-bg .page-promotions__section-title {
  color: var(--text-light);
}

.page-promotions__dark-bg .page-promotions__section-description {
  color: var(--text-light);
}

.page-promotions__dark-bg p {
  color: var(--text-light);
}

.page-promotions__dark-bg li {
  color: var(--text-light);
}

/* 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); /* Fixed header offset */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 50%, #1a9a5c 100%); /* Adjusted gradient for visual appeal */
  color: var(--text-light);
}

.page-promotions__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.page-promotions__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

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

.page-promotions__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-promotions__intro-description {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-promotions__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--button-register-bg); /* Use specific register color */
  color: var(--button-text-yellow); /* Use specific register font color */
  text-decoration: none;
  border-radius: 8px;
  font-size: 22px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-promotions__cta-button:hover {
  background: #a30606; /* Slightly darker red on hover */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-promotions__cta-button--large {
  padding: 20px 50px;
  font-size: 24px;
}

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

.page-promotions__promo-card {
  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-dark);
}

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

.page-promotions__promo-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block; /* Ensure it behaves as a block element */
}

.page-promotions__promo-card .page-promotions__card-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-promotions__promo-card p {
  font-size: 16px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-promotions__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  width: auto; /* Allow button to size based on content */
}

.page-promotions__btn-primary:hover {
  background: #005f2c;
  transform: translateY(-2px);
}

/* Guide Steps */
.page-promotions__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-promotions__step-item {
  text-align: center;
  padding: 25px;
  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.page-promotions__step-item:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-promotions__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--text-light);
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-promotions__step-item p {
  font-size: 16px;
}

.page-promotions__guide-image {
  margin-top: 40px;
  text-align: center;
}

.page-promotions__guide-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  display: block; /* Ensure it behaves as a block element */
  margin: 0 auto;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-promotions__small-text {
  font-size: 14px;
  text-align: center;
  margin-top: 20px;
  color: #666;
}

/* Terms List */
.page-promotions__terms-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-promotions__terms-list li {
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 5px solid var(--secondary-color);
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-light);
}

.page-promotions__terms-list li strong {
  color: var(--secondary-color);
}

/* Why Choose Grid */
.page-promotions__why-choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-promotions__why-choose-item {
  background-color: var(--secondary-color);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease;
}

.page-promotions__why-choose-item:hover {
  transform: translateY(-5px);
}

.page-promotions__item-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-promotions__why-choose-item p {
  font-size: 16px;
}

/* FAQ Section */
.page-promotions__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ container styles */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ default state - answer hidden */
.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 15px;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important ensure priority, value large enough to accommodate any content */
  padding: 20px 25px !important; /* Adjusted padding for better visual */
  opacity: 1;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 0 5px 5px;
  color: var(--text-dark); /* Ensure dark text on light answer background */
}

/* Question styles */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Adjusted padding */
  background: var(--secondary-color);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark); /* Ensure dark text on light question background */
}

.page-promotions__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-promotions__faq-question:active {
  background: #eeeeee;
}

/* Question title style */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px; /* Slightly larger font */
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click events */
  color: var(--primary-color); /* Use primary color for question title */
}

/* Toggle icon */
.page-promotions__faq-toggle {
  font-size: 28px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Use primary color 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; /* Larger hit area */
  height: 32px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  transform: rotate(180deg); /* Rotate for minus sign effect */
  color: var(--button-register-bg); /* Change color when active */
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .page-promotions__container {
    padding: 15px;
  }

  .page-promotions__section {
    padding: 40px 0;
  }

  .page-promotions__section-title {
    font-size: 28px;
  }

  .page-promotions__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Hero Section Mobile */
  .page-promotions__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-promotions__main-title {
    font-size: 36px;
  }

  .page-promotions__intro-description {
    font-size: 17px;
  }

  .page-promotions__cta-button {
    padding: 15px 30px;
    font-size: 18px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-promotions__cta-button--large {
    padding: 18px 35px;
    font-size: 20px;
  }

  /* Promo Grid Mobile */
  .page-promotions__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-promotions__promo-card {
    padding: 20px;
  }

  .page-promotions__promo-card img {
    height: 200px; /* Adjust height for mobile */
  }

  .page-promotions__promo-card .page-promotions__card-title {
    font-size: 20px;
  }

  .page-promotions__promo-card p {
    font-size: 15px;
  }

  .page-promotions__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Guide Steps Mobile */
  .page-promotions__guide-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-promotions__step-number {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  .page-promotions__step-title {
    font-size: 20px;
  }
  
  .page-promotions__guide-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* Terms List Mobile */
  .page-promotions__terms-list li {
    padding: 12px 15px;
    font-size: 15px;
  }

  /* Why Choose Grid Mobile */
  .page-promotions__why-choose-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-promotions__item-title {
    font-size: 20px;
  }

  /* FAQ Mobile */
  .page-promotions__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-promotions__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px); /* Adjust width for toggle icon */
  }
  
  .page-promotions__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-promotions__faq-answer {
    padding: 0 15px;
  }
  
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px !important;
  }

  /* General image and container responsive styles */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important; /* Ensure minimum size even on mobile */
    min-height: 200px !important;
  }
  
  .page-promotions__section,
  .page-promotions__container,
  .page-promotions__promo-card,
  .page-promotions__guide-steps,
  .page-promotions__why-choose-grid,
  .page-promotions__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure no CSS filters on images */
.page-promotions img {
  filter: none; /* Explicitly disable any potential filters */
}

/* Contrast Fixes - if needed */
.page-promotions__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-promotions__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}