/* style/promotions.css */

/* Variables and Base Styles */
:root {
  --page-promotions-primary-color: #017439;
  --page-promotions-secondary-color: #FFFFFF;
  --page-promotions-text-dark: #333333;
  --page-promotions-text-light: #FFFFFF;
  --page-promotions-button-register: #C30808;
  --page-promotions-button-login: #C30808;
  --page-promotions-button-text: #FFFF00; /* For register/login buttons */
  --page-promotions-background: #FFFFFF; /* Default background for light sections */
  --page-promotions-border-color: #e0e0e0;
}

/* Ensure body background is handled by shared.css or provide a fallback */
.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-promotions-text-dark); /* Default text color for light backgrounds */
  background-color: var(--page-promotions-background); /* Default light background */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 600px;
  background-color: var(--page-promotions-primary-color); /* Fallback/base color */
  color: var(--page-promotions-text-light);
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  overflow: hidden;
}

.page-promotions__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.page-promotions__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* No filter on images */
}

.page-promotions__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-bottom: 30px;
  background-color: rgba(0, 0, 0, 0.5); /* Dark overlay for white text to ensure contrast */
  padding: 30px;
  border-radius: 10px;
}

.page-promotions__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--page-promotions-text-light);
  font-weight: bold;
}

.page-promotions__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: var(--page-promotions-text-light);
}

/* General Section Styles */
.page-promotions__section {
  padding: 80px 20px;
  background-color: var(--page-promotions-background);
  color: var(--page-promotions-text-dark);
}

.page-promotions__section--intro {
  padding-top: 40px; /* Reduce padding for intro after hero */
}

.page-promotions__section--featured-promos {
  background-color: var(--page-promotions-primary-color); /* Dark background */
  color: var(--page-promotions-text-light);
}

.page-promotions__section--cta {
  background-color: var(--page-promotions-primary-color); /* Dark background */
  color: var(--page-promotions-text-light);
  text-align: center;
}

.page-promotions__light-bg {
  background-color: var(--page-promotions-background);
  color: var(--page-promotions-text-dark);
}

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

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

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

.page-promotions__section-title {
  font-size: 2.5em;
  margin-bottom: 40px;
  text-align: center;
  color: var(--page-promotions-primary-color); /* Default for light backgrounds */
  font-weight: bold;
}

.page-promotions__section--featured-promos .page-promotions__section-title,
.page-promotions__section--cta .page-promotions__section-title {
  color: var(--page-promotions-text-light); /* White for dark backgrounds */
}

.page-promotions__section-title--white {
  color: var(--page-promotions-text-light);
}

.page-promotions__sub-title {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 20px;
  color: var(--page-promotions-primary-color);
  font-weight: bold;
}

.page-promotions__section--featured-promos .page-promotions__sub-title {
  color: var(--page-promotions-text-light);
}

.page-promotions__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
  color: var(--page-promotions-text-dark);
}

.page-promotions__text-block--white {
  color: var(--page-promotions-text-light);
}

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

.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: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't overflow */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
}

.page-promotions__btn-primary {
  background-color: var(--page-promotions-button-register); /* Custom color for register/login */
  color: var(--page-promotions-button-text); /* Custom font color */
  border: 2px solid var(--page-promotions-button-register);
}

.page-promotions__btn-primary:hover {
  background-color: #a70707; /* Slightly darker red */
  border-color: #a70707;
}

.page-promotions__btn-secondary {
  background-color: transparent;
  color: var(--page-promotions-text-light); /* White text for hero buttons */
  border: 2px solid var(--page-promotions-text-light);
}

/* Specific styling for secondary button in light sections */
.page-promotions__section--download-guide .page-promotions__btn-secondary,
.page-promotions__section--terms .page-promotions__btn-secondary,
.page-promotions__section--faq .page-promotions__btn-secondary,
.page-promotions__card .page-promotions__btn-secondary {
  color: var(--page-promotions-primary-color);
  border-color: var(--page-promotions-primary-color);
  background-color: transparent;
}

.page-promotions__btn-secondary:hover {
  background-color: var(--page-promotions-primary-color);
  color: var(--page-promotions-text-light);
  border-color: var(--page-promotions-primary-color);
}

.page-promotions__btn-primary--large,
.page-promotions__btn-secondary--large {
  padding: 18px 40px;
  font-size: 1.2em;
}

/* Content Grid for Download Guide */
.page-promotions__content-grid {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-promotions__image-wrapper {
  flex: 1;
  min-width: 300px; /* Ensure image doesn't get too small */
}

.page-promotions__content-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-promotions__text-content {
  flex: 1;
}

/* Lists */
.page-promotions__list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: var(--page-promotions-text-dark);
}

.page-promotions__list--terms {
  list-style-type: decimal;
  margin-left: 25px;
}

.page-promotions__list-item {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.page-promotions__section--featured-promos .page-promotions__list,
.page-promotions__section--featured-promos .page-promotions__list-item {
  color: var(--page-promotions-text-light);
}

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

.page-promotions__card {
  background-color: var(--page-promotions-secondary-color); /* White background for cards */
  color: var(--page-promotions-text-dark);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 480px; /* Ensure consistent card height */
}

.page-promotions__card-image {
  width: 100%;
  height: 200px; /* Fixed height for card images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-promotions__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--page-promotions-primary-color);
  font-weight: bold;
}

.page-promotions__card-text {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1; /* Allows text to take available space */
}

/* FAQ Section */
.page-promotions__faq-list {
  margin-top: 40px;
}

.page-promotions__faq-item {
  background-color: var(--page-promotions-secondary-color);
  border: 1px solid var(--page-promotions-border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--page-promotions-text-dark);
}

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f9f9f9;
  color: var(--page-promotions-primary-color);
}

.page-promotions__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-promotions__faq-question::marker {
  display: none; /* Hide default marker for other browsers */
}

.page-promotions__faq-qtext {
  flex-grow: 1;
}

.page-promotions__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: var(--page-promotions-primary-color);
  transition: transform 0.3s ease;
}

.page-promotions__faq-item[open] .page-promotions__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to cross */
}

.page-promotions__faq-answer {
  padding: 0 25px 20px;
  font-size: 1.1em;
  color: var(--page-promotions-text-dark);
}

/* 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__sub-title {
    font-size: 1.6em;
  }
}

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

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

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

  .page-promotions__cta-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;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-promotions__cta-buttons--large .page-promotions__btn-primary,
  .page-promotions__cta-buttons--large .page-promotions__btn-secondary {
    padding: 15px 25px;
    font-size: 1.1em;
  }

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

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

  .page-promotions__sub-title {
    font-size: 1.4em;
    margin-top: 20px;
    margin-bottom: 15px;
  }

  .page-promotions__text-block {
    font-size: 1em;
  }

  .page-promotions__content-grid {
    flex-direction: column;
    gap: 30px;
  }

  .page-promotions__image-wrapper {
    min-width: unset;
    width: 100%;
  }

  /* Images responsiveness for content area */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure all containers with images/content are responsive */
  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__hero-section,
  .page-promotions__image-wrapper,
  .page-promotions__text-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Specific override for .page-promotions__container which might have 0 padding by default */
  .page-promotions__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-promotions__promo-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-promotions__card {
    min-height: unset; /* Allow cards to adjust height */
    padding: 20px;
  }

  .page-promotions__card-image {
    height: auto; /* Auto height for card images on mobile */
  }

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

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

/* Ensure images do not have filter properties */
.page-promotions img {
  filter: none !important; /* Explicitly remove any potential filter */
}