/* style/promotions.css */

/* Base styles for the page content, ensuring contrast with body background */
.page-promotions {
  font-family: Arial, sans-serif;
  color: #333333; /* Dark text for light body background */
  background-color: #ffffff; /* Explicitly set for clarity, though body is white */
  line-height: 1.6;
  padding-bottom: 80px; /* Space for footer */
}

/* Header offset for fixed header */
.page-promotions__hero-section {
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  background-color: #017439; /* Brand color as background */
  color: #ffffff; /* White text for dark background */
  padding: 80px 20px;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-promotions__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: center;
  margin-right: 40px; /* Space from image */
}

.page-promotions__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.page-promotions__hero-actions {
  display: flex;
  gap: 20px;
  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;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  text-align: center;
}

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

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

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

.page-promotions__btn-secondary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.page-promotions__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.2; /* Subtle background image */
}

.page-promotions__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.page-promotions__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #017439; /* Brand color for titles */
}

.page-promotions__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

/* Featured Promotions Grid */
.page-promotions__featured-promos {
  background-color: #f9f9f9;
}

.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 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-promotions__promo-card-title {
  font-size: 1.6em;
  color: #017439;
  margin-bottom: 15px;
  flex-grow: 1; /* Pushes button to bottom */
}

.page-promotions__promo-card-text {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-promotions__btn-link {
  display: inline-flex;
  align-items: center;
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Aligns button to bottom */
}

.page-promotions__btn-link:hover {
  color: #005f2e;
}

.page-promotions__icon-arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-promotions__btn-link:hover .page-promotions__icon-arrow {
  transform: translateX(5px);
}

/* How to Join Section */
.page-promotions__how-to-join {
  background-color: #ffffff;
}

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

.page-promotions__step-item {
  background-color: #f0f8f0; /* Light green background */
  border-left: 5px solid #017439;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.page-promotions__step-text {
  font-size: 1em;
  color: #444444;
  margin-bottom: 20px;
}

.page-promotions__btn-text-link {
  display: inline-block;
  color: #C30808; /* Login/Register color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-promotions__btn-text-link:hover {
  color: #a00606;
  text-decoration: underline;
}

/* Terms and Conditions Section (Dark Background) */
.page-promotions__terms-conditions {
  background-color: #017439; /* Brand color dark background */
  color: #ffffff; /* White text */
}

.page-promotions__terms-conditions .page-promotions__section-title {
  color: #ffffff;
}

.page-promotions__terms-conditions .page-promotions__section-description {
  color: #f0f0f0;
}

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

.page-promotions__terms-item {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.page-promotions__terms-title {
  font-size: 1.5em;
  color: #ffffff;
  margin-bottom: 15px;
}

.page-promotions__terms-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* Why Choose Section */
.page-promotions__why-choose {
  background-color: #ffffff;
}

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

.page-promotions__reason-card {
  background-color: #f0f8f0; /* Light green */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  height: 100%;
}

.page-promotions__reason-card:hover {
  transform: translateY(-5px);
}

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

.page-promotions__reason-text {
  font-size: 1em;
  color: #555555;
}

/* FAQ Section */
.page-promotions__faq {
  background-color: #f9f9f9;
}

.page-promotions__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

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

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #f0f8f0; /* Light green background for question */
  transition: background-color 0.3s ease;
}

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

.page-promotions__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  color: #017439;
  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;
  color: #555555;
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px 25px 25px; /* Adjust padding for active state */
}

.page-promotions__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.6;
}

/* Call to Action Section */
.page-promotions__call-to-action {
  background-color: #017439;
  color: #ffffff;
  padding: 80px 20px;
}

.page-promotions__call-to-action .page-promotions__section-title {
  color: #ffffff;
}

.page-promotions__call-to-action .page-promotions__section-description {
  color: #f0f0f0;
  margin-bottom: 50px;
}

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-promotions__hero-title {
    font-size: 3em;
  }
  .page-promotions__hero-content {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .page-promotions__hero-section {
    flex-direction: column;
    text-align: center;
    min-height: auto;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

  .page-promotions__hero-content {
    margin-bottom: 40px;
    margin-right: 0;
  }

  .page-promotions__hero-title {
    font-size: 2.5em;
  }

  .page-promotions__hero-description {
    font-size: 1em;
  }

  .page-promotions__hero-actions {
    flex-direction: column;
    gap: 15px;
  }

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

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

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

  .page-promotions__promo-grid,
  .page-promotions__step-list,
  .page-promotions__terms-list,
  .page-promotions__reason-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-promotions__promo-card-image {
    height: 180px;
  }

  .page-promotions__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

  .page-promotions__faq-answer {
    padding: 0 20px;
  }

  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 10px 20px 20px 20px;
  }

  .page-promotions__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

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

  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__promo-card,
  .page-promotions__step-item,
  .page-promotions__terms-item,
  .page-promotions__reason-card,
  .page-promotions__faq-item,
  .page-promotions__cta-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  /* Specific padding for sections that might not have it */
  .page-promotions__featured-promos .page-promotions__container,
  .page-promotions__how-to-join .page-promotions__container,
  .page-promotions__terms-conditions .page-promotions__container,
  .page-promotions__why-choose .page-promotions__container,
  .page-promotions__faq .page-promotions__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Ensure no filter on images */
.page-promotions img {
  filter: none;
}

/* Content area images CSS dimensions lower bound */
.page-promotions img {
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

/* Override for images within cards to ensure they are large enough */
.page-promotions__promo-card-image {
  min-width: 200px;
  min-height: 200px;
}

/* Ensure all links within content area are clearly visible */
.page-promotions a:not(.page-promotions__btn-primary):not(.page-promotions__btn-secondary):not(.page-promotions__btn-link):not(.page-promotions__btn-text-link) {
  color: #017439; /* Brand color for links */
  text-decoration: underline;
}

.page-promotions a:not(.page-promotions__btn-primary):not(.page-promotions__btn-secondary):not(.page-promotions__btn-link):not(.page-promotions__btn-text-link):hover {
  color: #005f2e;
}

/* Ensure all text has sufficient contrast */
.page-promotions__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

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

.page-promotions__dark-bg .page-promotions__section-description,
.page-promotions__dark-bg .page-promotions__terms-text {
  color: #f0f0f0;
}