/* style/promotions.css */

:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-color: #FFFFFF;
  --black-color-custom: #000000; /* Used for body background */
  --text-on-dark-bg: #FFFFFF;
  --text-on-light-bg: #333333;
  --card-bg-light: #F8F8F8;
  --border-color: #e0e0e0;
}

.page-promotions {
  color: var(--text-on-dark-bg); /* Default text color for the main page content on dark body background */
  background-color: var(--black-color-custom); /* Assuming body background is dark via shared.css */
}

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body padding-top handled by shared.css */
  text-align: center;
  overflow: hidden;
  color: var(--text-on-dark-bg);
  background: var(--primary-color); /* Use primary color as a base */
}

.page-promotions__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-promotions__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px; /* Limit height for hero image */
}

.page-promotions__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-top: 40px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Slightly darker overlay for text readability */
  border-radius: 8px;
}

.page-promotions__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.page-promotions__description {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-on-dark-bg);
}

.page-promotions__btn-primary,
.page-promotions__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin: 10px;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-promotions__btn-primary {
  background: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--primary-color);
}

.page-promotions__btn-primary:hover {
  background: darken(var(--primary-color), 10%);
  border-color: darken(var(--primary-color), 10%);
}

.page-promotions__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

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

.page-promotions__intro-section,
.page-promotions__how-to-join,
.page-promotions__faq-section {
  padding: 80px 0;
  color: var(--text-on-light-bg);
  background: var(--background-color);
}

.page-promotions__featured-promos,
.page-promotions__terms-conditions,
.page-promotions__cta-section {
  padding: 80px 0;
  color: var(--text-on-dark-bg);
  background: var(--primary-color);
}

.page-promotions__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherit color from section */
}

.page-promotions__text-block {
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  color: inherit;
}

.page-promotions__content-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 40px auto 0 auto;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Featured Promotions Grid */
.page-promotions__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-promotions__promo-card {
  background: var(--card-bg-light);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-on-light-bg);
}

.page-promotions__promo-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum size */
}

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

.page-promotions__card-description {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* How to Join Steps */
.page-promotions__steps-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 50px;
  justify-content: center;
}

.page-promotions__step-item {
  background: var(--card-bg-light);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  flex: 1 1 calc(33% - 60px);
  min-width: 280px;
  color: var(--text-on-light-bg);
}

.page-promotions__step-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* Terms & Conditions */
.page-promotions__terms-list {
  list-style: disc;
  padding-left: 20px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-on-dark-bg);
}

.page-promotions__term-item {
  margin-bottom: 10px;
}

/* FAQ Section */
.page-promotions__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

.page-promotions__faq-item {
  background: var(--card-bg-light);
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow: hidden;
  color: var(--text-on-light-bg);
}

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary-color);
  background-color: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
}

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

.page-promotions__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  width: 24px;
  text-align: center;
}

.page-promotions__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-promotions__faq-item[open] .page-promotions__faq-answer {
  max-height: 500px; /* Adjust as needed for content */
  padding-top: 15px;
}

.page-promotions__faq-item[open] .page-promotions__faq-question {
  border-bottom: none;
}

/* CTA Section */
.page-promotions__cta-section .page-promotions__section-title,
.page-promotions__cta-section .page-promotions__description {
  margin-bottom: 30px;
}

.page-promotions__cta-section .page-promotions__btn-primary,
.page-promotions__cta-section .page-promotions__btn-secondary {
  margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-promotions__hero-content {
    margin-top: 20px;
  }
  .page-promotions__promo-card, .page-promotions__step-item {
    flex: 1 1 calc(50% - 30px);
  }
}

@media (max-width: 768px) {
  .page-promotions__hero-section,
  .page-promotions__intro-section,
  .page-promotions__featured-promos,
  .page-promotions__how-to-join,
  .page-promotions__terms-conditions,
  .page-promotions__faq-section,
  .page-promotions__cta-section {
    padding: 40px 0;
  }

  .page-promotions__container {
    padding: 0 15px;
  }

  .page-promotions__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .page-promotions__description,
  .page-promotions__text-block,
  .page-promotions__card-description,
  .page-promotions__terms-list,
  .page-promotions__faq-answer p {
    font-size: 1rem;
  }

  .page-promotions__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 30px;
  }

  .page-promotions__hero-image,
  .page-promotions__content-image,
  .page-promotions__promo-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-height: 200px !important; /* Ensure min height */
    object-fit: cover !important;
  }

  .page-promotions__hero-image-wrapper,
  .page-promotions__container,
  .page-promotions__promo-card,
  .page-promotions__step-item,
  .page-promotions__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-promotions__btn-primary,
  .page-promotions__btn-secondary,
  .page-promotions a[class*="button"],
  .page-promotions a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 10px 0 !important;
  }

  .page-promotions__cta-section .page-promotions__btn-primary,
  .page-promotions__cta-section .page-promotions__btn-secondary {
    width: calc(100% - 30px) !important; /* Account for container padding */
  }

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

  .page-promotions__promo-card,
  .page-promotions__step-item {
    padding: 20px;
    margin: 0 auto;
  }

  .page-promotions__hero-section {
    padding-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-promotions__main-title {
    font-size: clamp(1.6rem, 9vw, 2.2rem);
  }
  .page-promotions__btn-primary,
  .page-promotions__btn-secondary {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  .page-promotions__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
}