/* style/promotions.css */

/* Base styles for the page content, ensuring light text on dark body background */
.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: var(--dark-bg-1); /* Inherited from shared.css, assumed dark */
}

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

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  background-color: #017439; /* Brand color as background */
  color: #FFFFFF; /* White text for brand color background */
  padding: 100px 0 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-promotions__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3; /* Slightly transparent to allow text to stand out */
}

.page-promotions__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}

.page-promotions__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFF00; /* Yellow for attention */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

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

/* General Section Styling */
.page-promotions__intro-section,
.page-promotions__terms-section,
.page-promotions__tips-section,
.page-promotions__cta-bottom-section {
  background-color: #FFFFFF; /* Light background for content sections */
  color: #333333; /* Dark text for light background */
  padding: 60px 0;
}

.page-promotions__types-section,
.page-promotions__how-to-section,
.page-promotions__faq-section {
  background-color: #017439; /* Brand color background for other sections */
  color: #FFFFFF; /* White text for brand color background */
  padding: 60px 0;
}

.page-promotions__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
  color: #FFFF00; /* Yellow for important titles */
}

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

/* Button Styles */
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box; /* Include padding/border in width */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
}

.page-promotions__btn-primary {
  background-color: #C30808; /* Red for primary action (Register/Login) */
  color: #FFFF00; /* Yellow text for primary button */
  border: 2px solid #C30808;
}

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

.page-promotions__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Yellow text for secondary button */
  border: 2px solid #FFFF00;
}

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

/* Promo Grid */
.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: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark bg */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f0f0f0;
}

.page-promotions__promo-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%; /* Responsive image */
  height: auto; /* Maintain aspect ratio */
  display: block; /* Remove extra space below image */
}

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

.page-promotions__promo-description {
  font-size: 1em;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Steps Grid */
.page-promotions__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-promotions__step-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-promotions__step-card p {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Tips List */
.page-promotions__tips-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

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

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

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

.page-promotions__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #f0f0f0;
}

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.15);
  transition: background-color 0.3s ease;
  color: #FFFF00; /* Yellow for FAQ questions */
}

.page-promotions__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-promotions__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

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

.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to accommodate content */
  padding: 20px;
}

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

/* General Link Styling for content */
.page-promotions a:not([class*="btn"]) {
  color: #FFFF00; /* Yellow for regular links */
  text-decoration: underline;
}

.page-promotions a:not([class*="btn"]):hover {
  color: #ffcc00;
  text-decoration: none;
}

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

@media (max-width: 768px) {
  .page-promotions__hero-section {
    padding: 80px 0 40px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

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

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

  .page-promotions__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to container of buttons */
  }

  .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;
  }
  
  /* Ensure all containers with buttons are responsive */
  .page-promotions__cta-buttons,
  .page-promotions__promo-card,
  .page-promotions__step-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

  .page-promotions__promo-card,
  .page-promotions__step-card {
    padding: 20px;
  }

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

  .page-promotions__promo-title,
  .page-promotions__step-title {
    font-size: 1.3em;
  }

  .page-promotions__tip-title {
    font-size: 1.2em;
  }

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

  .page-promotions__faq-answer {
    padding: 0 15px;
  }
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px !important;
  }

  /* Image responsive enforcement */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  /* All containers with images must be responsive */
  .page-promotions__hero-section,
  .page-promotions__promo-card,
  .page-promotions__step-card,
  .page-promotions__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Specific padding for sections that might not be in a container */
  .page-promotions__intro-section,
  .page-promotions__types-section,
  .page-promotions__terms-section,
  .page-promotions__how-to-section,
  .page-promotions__tips-section,
  .page-promotions__faq-section,
  .page-promotions__cta-bottom-section {
    padding-left: 15px;
    padding-right: 15px;
  }
}

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