/* style/promotions.css */
/* 
 * BEM Naming Convention: page-promotions__element-name
 * All styles scoped within .page-promotions
 * No global selectors, no descendant selectors (e.g., .page-promotions .element)
 * 
 * Color Scheme:
 * Primary: #017439 (green)
 * Auxiliary: #FFFFFF (white)
 * Register/Login buttons: #C30808 (red)
 * Register/Login font: #FFFF00 (yellow)
 * Background: #FFFFFF
 */

.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #ffffff); /* Fallback to white if var not set */
}

/* --- 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, #e0ffe0, #f0fff0); /* Lighter gradient for hero bg */
  color: #333333;
}

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

.page-promotions__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-promotions__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

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

.page-promotions__hero-content h1 {
  font-size: 3.2em;
  color: var(--primary-color, #017439);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-promotions__intro-text {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

.page-promotions__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
}

.page-promotions__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 300px; /* Limit individual button width on desktop */
}

.page-promotions__btn-register {
  background: #C30808; /* Custom Register color */
  color: #FFFF00; /* Custom Register/Login font color */
  border: 2px solid transparent;
}

.page-promotions__btn-register:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-promotions__btn-download {
  background: var(--primary-color, #017439);
  color: #FFFFFF;
  border: 2px solid transparent;
}

.page-promotions__btn-download:hover {
  background: #005a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- General Section Styles --- */
.page-promotions__section {
  padding: 80px 20px;
  text-align: center;
}

.page-promotions__section--types {
  background-color: #f9f9f9;
}

.page-promotions__section--how-to-claim {
  background-color: var(--primary-color, #017439);
  color: #ffffff; /* White text on primary background */
}

.page-promotions__section--terms {
  background-color: #ffffff;
}

.page-promotions__section--faq {
  background-color: #f9f9f9;
}

.page-promotions__section--cta-bottom {
  background-color: var(--primary-color, #017439);
  color: #ffffff;
}

.page-promotions__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.page-promotions__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--primary-color, #017439); /* Default for light backgrounds */
}

.page-promotions__section--how-to-claim .page-promotions__section-title,
.page-promotions__section--cta-bottom .page-promotions__section-title {
  color: #ffffff; /* White title on dark background */
}

.page-promotions__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #666666; /* Default for light backgrounds */
}

.page-promotions__section--how-to-claim .page-promotions__section-description,
.page-promotions__section--cta-bottom .page-promotions__section-description {
  color: #e0e0e0; /* Lighter description on dark background */
}

.page-promotions__section-description a {
  color: #017439; /* Link color */
  text-decoration: underline;
}

.page-promotions__section--how-to-claim .page-promotions__section-description a,
.page-promotions__section--cta-bottom .page-promotions__section-description a {
  color: #FFFF00; /* Yellow link on dark background */
}

/* --- Promotions Grid --- */
.page-promotions__promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-promotions__promotion-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-promotions__promotion-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-promotions__card-title {
  font-size: 1.4em;
  color: var(--primary-color, #017439);
  margin: 20px 20px 10px;
  flex-grow: 0;
}

.page-promotions__card-title a {
  color: var(--primary-color, #017439);
  text-decoration: none;
}

.page-promotions__card-title a:hover {
  text-decoration: underline;
}

.page-promotions__card-text {
  font-size: 0.95em;
  color: #555555;
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow text to take available space */
}

.page-promotions__card-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color, #017439);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1em;
  font-weight: bold;
  margin: 0 20px 20px;
  transition: background-color 0.3s ease;
  align-self: flex-start; /* Align button to start of card */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: calc(100% - 40px); /* Adjust max-width for padding */
}

.page-promotions__card-button:hover {
  background: #005a2e;
}

/* --- How To Claim Steps --- */
.page-promotions__claim-steps {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  text-align: left;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-promotions__claim-step-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-promotions__claim-step-item h3 {
  font-size: 1.5em;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 15px;
}

.page-promotions__claim-step-item p {
  color: #e0e0e0;
  font-size: 1em;
}

.page-promotions__claim-step-item p a {
  color: #FFFF00; /* Yellow link on dark background */
  text-decoration: underline;
}

.page-promotions__cta-center {
  margin-top: 50px;
}

.page-promotions__cta-center .page-promotions__cta-button {
  background: #C30808; /* Custom Register color */
  color: #FFFF00; /* Custom Register/Login font color */
}

.page-promotions__cta-center .page-promotions__cta-button:hover {
  background: #a30606;
}

/* --- Terms and Conditions --- */
.page-promotions__terms-list {
  list-style: disc;
  text-align: left;
  max-width: 900px;
  margin: 40px auto;
  padding-left: 20px;
  color: #555555;
}

.page-promotions__terms-list li {
  margin-bottom: 10px;
  font-size: 1em;
}

.page-promotions__terms-note {
  font-style: italic;
  color: #777777;
  margin-top: 30px;
}

.page-promotions__terms-note a {
  color: var(--primary-color, #017439);
  text-decoration: underline;
}

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

.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.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;
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* Ensure it expands sufficiently */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f0fff0; /* Lighter background for answer */
  border-radius: 0 0 5px 5px;
  color: #444444;
}

.page-promotions__faq-answer p a {
  color: var(--primary-color, #017439);
  text-decoration: underline;
}

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

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

.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--primary-color, #017439);
}

.page-promotions__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Plus sign rotates to form an X, or just change to minus */
}

/* --- Bottom CTA Section --- */
.page-promotions__cta-bottom-content {
  padding-top: 50px;
  padding-bottom: 50px;
}

.page-promotions__cta-bottom-content .page-promotions__cta-buttons {
  margin-top: 40px;
}

.page-promotions__btn-login {
  background: #C30808; /* Custom Login color */
  color: #FFFF00; /* Custom Register/Login font color */
  border: 2px solid transparent;
}

.page-promotions__btn-login:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-promotions__hero-content h1 {
    font-size: 2.8em;
  }
  .page-promotions__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-promotions {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-promotions__hero-image img {
    border-radius: 4px;
  }

  .page-promotions__hero-content h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

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

  .page-promotions__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    width: 100%;
    padding: 0 15px; /* Add padding to container */
  }
  
  .page-promotions__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 16px;
  }

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

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

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

  .page-promotions__promotions-grid {
    grid-template-columns: 1fr; /* Single column for cards */
    gap: 20px;
  }

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

  .page-promotions__card-title {
    font-size: 1.2em;
    margin: 15px;
  }

  .page-promotions__card-text {
    padding: 0 15px;
  }

  .page-promotions__card-button {
    margin: 0 15px 15px;
    max-width: calc(100% - 30px) !important;
    width: calc(100% - 30px) !important;
  }

  .page-promotions__claim-steps {
    grid-template-columns: 1fr; /* Single column for steps */
    gap: 20px;
  }

  .page-promotions__claim-step-item {
    padding: 20px;
  }

  .page-promotions__claim-step-item h3 {
    font-size: 1.3em;
  }

  .page-promotions__terms-list {
    margin: 30px auto;
    padding-left: 15px;
  }

  .page-promotions__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-promotions__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-promotions__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-promotions__faq-answer {
    padding: 0 15px;
  }
  
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px !important;
  }

  .page-promotions__cta-bottom-content {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  /* Force all images to be responsive and not overflow */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-promotions__container,
  .page-promotions__hero-container,
  .page-promotions__promotions-grid,
  .page-promotions__claim-steps,
  .page-promotions__faq-list,
  .page-promotions__cta-bottom-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}