/* style/promotions.css */

/* Base styles for the promotions page */
.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #FFFFFF; /* Matches custom color config */
}

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

.page-promotions__section-title {
  font-size: 2.5em;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-promotions__section-title--white {
  color: #FFFFFF;
}

.page-promotions__sub-title {
  font-size: 1.8em;
  color: #017439;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__text-block {
  font-size: 1em;
  margin-bottom: 15px;
  color: #333333;
}

.page-promotions__text-block--white {
  color: #FFFFFF;
}

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust height as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

.page-promotions__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-promotions__hero-content {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
  max-width: 800px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5); /* Overlay for readability */
  border-radius: 10px;
}

.page-promotions__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: #FFFFFF;
}

.page-promotions__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #F0F0F0;
}

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

/* Buttons */
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* For responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

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

.page-promotions__btn-primary:hover {
  background-color: #A00707;
  border-color: #A00707;
}

.page-promotions__btn-secondary {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-promotions__btn-secondary:hover {
  background-color: #005F2F;
  border-color: #005F2F;
}

/* Introduction Section */
.page-promotions__introduction-section {
  padding: 60px 0;
  background-color: #FFFFFF;
  color: #333333;
}

/* Promotion Types Section */
.page-promotions__types-section {
  padding: 60px 0;
  background-color: #017439;
  color: #FFFFFF;
}

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

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

.page-promotions__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-promotions__card-content {
  padding: 25px;
  flex-grow: 1;
}

.page-promotions__card-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-promotions__card-sub-title {
  font-size: 1.2em;
  color: #017439;
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: bold;
}

.page-promotions__card-text {
  font-size: 0.95em;
  margin-bottom: 10px;
}

/* Terms Section */
.page-promotions__terms-section {
  padding: 60px 0;
  background-color: #F8F8F8;
  color: #333333;
}

.page-promotions__terms-list {
  list-style: none;
  padding: 0;
}

.page-promotions__terms-item {
  background-color: #FFFFFF;
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Guide Section */
.page-promotions__guide-section {
  padding: 60px 0;
  background-color: #017439;
  color: #FFFFFF;
}

.page-promotions__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-promotions__step-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

.page-promotions__step-image {
  width: 250px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 5px;
  display: block; /* Ensure it respects max-width: 100% */
}

.page-promotions__step-title {
  font-size: 1.4em;
  color: #FFFFFF;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-promotions__step-description {
  font-size: 0.95em;
  color: #F0F0F0;
}

/* FAQ Section */
.page-promotions__faq-section {
  padding: 60px 0;
  background-color: #FFFFFF;
  color: #333333;
}

.page-promotions__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-promotions__faq-item {
  background-color: #F8F8F8;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #FFFFFF;
  border-bottom: 1px solid #E0E0E0;
  transition: background-color 0.3s ease;
}

.page-promotions__faq-question:hover {
  background-color: #F0F0F0;
}

.page-promotions__faq-title {
  font-size: 1.1em;
  color: #333333;
  margin: 0;
  font-weight: bold;
}

.page-promotions__faq-toggle {
  font-size: 1.5em;
  color: #017439;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  transform: rotate(45deg);
}

.page-promotions__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 1000px !important; /* Ensure it expands fully */
  padding: 15px 25px;
}

/* Conclusion Section */
.page-promotions__conclusion-section {
  padding: 60px 0;
  background-color: #017439;
  color: #FFFFFF;
  text-align: center;
}

.page-promotions__conclusion-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-promotions__conclusion-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Image responsiveness for desktop */
.page-promotions img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

  .page-promotions__hero-section {
    height: 500px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

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

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

  .page-promotions__hero-buttons,
  .page-promotions__conclusion-buttons {
    flex-direction: column;
    gap: 15px;
  }

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

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

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

  .page-promotions__promo-grid,
  .page-promotions__guide-steps {
    grid-template-columns: 1fr;
  }

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

  .page-promotions__card-content,
  .page-promotions__terms-item,
  .page-promotions__step-item,
  .page-promotions__faq-question,
  .page-promotions__faq-answer {
    padding: 15px 20px;
  }

  /* Mobile image responsiveness - MUST HAVE */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure all containers with images/buttons/content are constrained */
  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__hero-section,
  .page-promotions__introduction-section,
  .page-promotions__types-section,
  .page-promotions__terms-section,
  .page-promotions__guide-section,
  .page-promotions__faq-section,
  .page-promotions__conclusion-section,
  .page-promotions__hero-buttons,
  .page-promotions__conclusion-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  /* Specific padding for sections if needed to prevent content touching edges */
  .page-promotions__introduction-section > .page-promotions__container,
  .page-promotions__types-section > .page-promotions__container,
  .page-promotions__terms-section > .page-promotions__container,
  .page-promotions__guide-section > .page-promotions__container,
  .page-promotions__faq-section > .page-promotions__container,
  .page-promotions__conclusion-section > .page-promotions__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

}

/* Color Contrast Fixes (if needed) - applying intelligent choices */
.page-promotions__dark-bg {
  color: #ffffff; /* Deep background with light text */
}

.page-promotions__light-bg {
  color: #333333; /* Light background with dark text */
}

.page-promotions__card {
  background: #ffffff; /* White card background */
  color: #333333; /* Dark text for cards */
  border: 1px solid #e0e0e0;
}

/* Ensure all link text in cards and content areas have sufficient contrast */
.page-promotions__card-content a,
.page-promotions__text-block a {
  color: #017439; /* Brand color for links */
  text-decoration: underline;
}

.page-promotions__card-content a:hover,
.page-promotions__text-block a:hover {
  color: #005F2F;
}

/* Content area images minimum size enforcement */
/* This rule applies to any img within .page-promotions, excluding shared header/footer elements */
.page-promotions img:not(.shared-header img, .shared-footer img) {
  min-width: 200px;
  min-height: 200px;
}

/* Override for images that are specifically decorative and small if any were generated, though none should be */
/* Example: If small icons were mistakenly generated and must be displayed, this would override */
/* This is a safeguard but should not be needed if image generation rules are followed */
/* .page-promotions__icon-small { min-width: unset; min-height: unset; width: 48px; height: 48px; } */

/* No CSS filter for images */
.page-promotions img {
  filter: none; /* Ensure no filter is applied */
}