/* style/promotions.css */

/* Base Styles for Page Content */
.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Explicitly set for clarity, matches default body */
}

/* Header offset for sticky header */
.page-promotions__hero-section {
  padding-top: var(--header-offset, 120px); /* Apply header offset to the first section */
}

/* Sections */
.page-promotions__section-title {
  font-size: 2.5em;
  color: #017439; /* Brand primary color for titles */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.page-promotions__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: #017439;
  margin: 15px auto 0;
  border-radius: 2px;
}

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

.page-promotions__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

/* Color Contrast Enforcement */
.page-promotions__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

.page-promotions__dark-section {
  background-color: #017439; /* Brand primary color */
  color: #FFFFFF; /* White text for contrast */
  padding: 60px 0;
}

.page-promotions__dark-section .page-promotions__section-title,
.page-promotions__dark-section .page-promotions__section-title::after {
  color: #FFFFFF;
}
.page-promotions__dark-section .page-promotions__section-title::after {
    background-color: #FFFFFF;
}

/* Buttons */
.page-promotions__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.page-promotions__cta-buttons--center {
    justify-content: center;
}

.page-promotions__btn-primary,
.page-promotions__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  max-width: 100%; /* Important for mobile responsiveness */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-promotions__btn-primary {
  background-color: #C30808; /* Custom red for register/login */
  color: #FFFF00; /* Custom yellow for font */
  border: 2px solid #C30808;
}

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

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

.page-promotions__btn-secondary:hover {
  background-color: #017439;
  color: #FFFFFF;
}

/* Hero Section */
.page-promotions__hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 600px;
  padding: 60px 0;
  overflow: hidden;
}

.page-promotions__hero-content {
  flex: 1;
  padding: 0 40px;
  text-align: left;
}

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

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

.page-promotions__hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 40px;
}

.page-promotions__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

/* Intro Section */
.page-promotions__intro-section {
  padding: 80px 0;
}

/* Featured Promotions Grid */
.page-promotions__featured-promos {
  padding: 80px 0;
}

.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: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-promotions__promo-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-promotions__card-title {
  font-size: 1.6em;
  color: #017439;
  margin: 0 20px 15px;
}
.page-promotions__card-title a {
  text-decoration: none;
  color: inherit;
}
.page-promotions__card-title a:hover {
  text-decoration: underline;
}

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

/* How to Join Section */
.page-promotions__how-to-join {
  padding: 80px 0;
}

.page-promotions__step-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
  margin-top: 40px;
}

.page-promotions__step-item {
  background-color: #f9f9f9;
  border-left: 5px solid #017439;
  padding: 25px 30px;
  margin-bottom: 20px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-promotions__step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #017439;
  color: #FFFFFF;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-promotions__step-title {
  font-size: 1.8em;
  color: #017439;
  margin-top: 0;
  margin-bottom: 10px;
  padding-left: 30px; /* Make space for the step number */
}

.page-promotions__step-description {
  font-size: 1.1em;
  color: #555555;
  padding-left: 30px;
}
.page-promotions__step-description a {
  color: #017439;
  text-decoration: underline;
}
.page-promotions__step-description a:hover {
  color: #005f2e;
}

/* Terms Section */
.page-promotions__terms-section {
  padding: 80px 0;
}

.page-promotions__terms-list {
  list-style: disc;
  padding-left: 40px;
  color: #FFFFFF;
  font-size: 1.1em;
  margin-top: 30px;
}

.page-promotions__terms-item {
  margin-bottom: 15px;
}
.page-promotions__terms-item strong {
  color: #FFFF00; /* Custom yellow for emphasis */
}

/* Why Choose Section */
.page-promotions__why-choose {
  padding: 80px 0;
}

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

.page-promotions__feature-item {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.page-promotions__feature-title {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 15px;
}

.page-promotions__feature-description {
  font-size: 1em;
  color: #555555;
}

/* FAQ Section */
.page-promotions__faq-section {
  padding: 80px 0;
}

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

.page-promotions__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}
.page-promotions__faq-item.active .page-promotions__faq-question {
  border-bottom: none; /* Remove border when active */
}

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

.page-promotions__faq-title {
  font-size: 1.2em;
  color: #017439;
  margin: 0;
}

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

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  transform: rotate(45deg); /* For '-' symbol, or just change text */
}

.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; /* Sufficiently large value */
  padding: 20px 25px;
}

.page-promotions__faq-answer p {
  margin: 0;
  color: #555555;
  font-size: 1em;
}

/* Bottom CTA Section */
.page-promotions__cta-bottom {
  padding: 80px 0;
  text-align: center;
}

.page-promotions__cta-container {
  max-width: 900px;
}

.page-promotions__cta-title {
  font-size: 2.8em;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-promotions__cta-description {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-bottom: 40px;
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-promotions__hero-title {
    font-size: 3em;
  }
  .page-promotions__hero-description {
    font-size: 1.2em;
  }
  .page-promotions__section-title {
    font-size: 2em;
  }
  .page-promotions__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  /* Ensure main content area respects header offset on mobile */
  .page-promotions__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    flex-direction: column-reverse; /* Image first, then text */
    text-align: center;
  }
  .page-promotions__hero-content {
    padding: 20px;
    text-align: center;
  }
  .page-promotions__hero-image-wrapper {
    padding: 20px;
  }
  .page-promotions__hero-title {
    font-size: 2.5em;
  }
  .page-promotions__hero-description {
    font-size: 1.1em;
  }

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

  .page-promotions__section-title {
    font-size: 1.8em;
  }
  .page-promotions__cta-title {
    font-size: 1.8em;
  }

  .page-promotions__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to container */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-promotions__btn-primary,
  .page-promotions__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  /* Images responsive adaptation */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/content need to be constrained */
  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__hero-section,
  .page-promotions__promo-card,
  .page-promotions__how-to-join,
  .page-promotions__terms-section,
  .page-promotions__why-choose,
  .page-promotions__faq-section,
  .page-promotions__cta-bottom,
  .page-promotions__hero-image-wrapper,
  .page-promotions__promo-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-promotions__promo-image {
      height: auto !important; /* Allow image height to adjust */
  }

  .page-promotions__step-item {
    padding: 20px 20px 20px 45px;
  }
  .page-promotions__step-item::before {
    left: 5px;
    top: 15px;
    transform: none;
  }
  .page-promotions__step-title, .page-promotions__step-description {
    padding-left: 0;
  }
  
  .page-promotions__terms-list {
    padding-left: 20px;
  }
  
  .page-promotions__faq-question {
    padding: 15px 20px;
  }
  .page-promotions__faq-answer {
    padding: 0 20px;
  }
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .page-promotions__hero-title {
    font-size: 2em;
  }
  .page-promotions__hero-description {
    font-size: 1em;
  }
  .page-promotions__section-title {
    font-size: 1.5em;
  }
  .page-promotions__cta-title {
    font-size: 1.6em;
  }
  .page-promotions__faq-title {
    font-size: 1.1em;
  }
}