/* style/promotions.css */

/* Variables */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-dark: #0a0a0a; /* Body background from shared.css */
  --btn-login-color: #EA7C07;
}

/* Base styles for the page content, ensuring contrast with body background */
.page-promotions {
  color: var(--text-light); /* Light text for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--bg-dark); /* Ensure background is consistent if main content has its own */
}

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

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

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

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

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  text-align: center;
  overflow: hidden;
}

.page-promotions__hero-image-wrapper {
  width: 100%;
  max-height: 700px; /* Limit height for aesthetic */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-promotions__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-promotions__hero-content {
  position: relative; /* Ensure content is above image if any overlap */
  z-index: 10;
  max-width: 900px;
  padding: 20px;
  margin-top: -100px; /* Pull content slightly up over the bottom of the image for visual flow, without actual overlap */
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent background for readability */
  border-radius: 8px;
}

.page-promotions__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive H1 font size */
}

.page-promotions__intro-description {
  font-size: 1.15rem;
  color: var(--secondary-color);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Section Titles */
.page-promotions__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-promotions__section-description {
  font-size: 1.1rem;
  color: var(--text-light);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

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

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

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

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

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

/* Content Wrapper with Image and Text */
.page-promotions__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}

.page-promotions__content-wrapper--reverse {
  flex-direction: row-reverse;
}

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

.page-promotions__image-block {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-promotions__image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
  display: block;
}

.page-promotions__sub-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-promotions p,
.page-promotions li {
  color: var(--text-light);
  margin-bottom: 10px;
}

.page-promotions strong {
  color: var(--primary-color);
}

/* Promo Types Grid */
.page-promotions__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-promotions__promo-card {
  background: rgba(255, 255, 255, 0.08); /* Light transparent background for cards */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: var(--text-light);
  min-width: 200px; /* Ensure card is not too small */
}

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

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

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

.page-promotions__card-text {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Guide and Condition Lists */
.page-promotions__guide-list,
.page-promotions__condition-list,
.page-promotions__tips-list {
  list-style-type: none;
  padding-left: 0;
}

.page-promotions__guide-list li,
.page-promotions__condition-list li,
.page-promotions__tips-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-promotions__guide-list li::before {
  content: counter(list-item) ".";
  counter-increment: list-item;
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.page-promotions__condition-list li::before,
.page-promotions__tips-list li::before {
  content: "\2022"; /* Bullet point */
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

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

.page-promotions__faq-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.page-promotions__faq-item summary {
  list-style: none;
  padding: 20px 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  position: relative;
}

.page-promotions__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-promotions__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-promotions__faq-item[open] .page-promotions__faq-toggle {
  transform: rotate(45deg);
}

.page-promotions__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--text-light);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 10px;
}

.page-promotions__faq-answer p {
  margin-top: 0;
}

/* Bottom CTA Section */
.page-promotions__cta-bottom-section {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-promotions__cta-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4); /* Darken image for text readability */
  min-width: 200px;
  min-height: 200px;
  display: block;
}

.page-promotions__cta-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-promotions__content-wrapper {
    flex-direction: column;
  }

  .page-promotions__content-wrapper--reverse {
    flex-direction: column; /* Ensure reverse also stacks */
  }

  .page-promotions__hero-content {
    margin-top: -50px; /* Adjust for smaller screens */
  }

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

@media (max-width: 768px) {
  .page-promotions__hero-section {
    padding-bottom: 40px;
  }

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

  .page-promotions__intro-description {
    font-size: 1rem;
  }

  .page-promotions__section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .page-promotions__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  .page-promotions__btn-primary,
  .page-promotions__btn-secondary {
    padding: 12px 25px;
    font-size: 1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-bottom: 10px;
  }

  .page-promotions__hero-content .page-promotions__btn-primary {
    margin: 0 auto;
  }

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

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

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

  .page-promotions__card-title {
    font-size: 1.2rem;
  }

  .page-promotions__faq-item summary {
    font-size: 1rem;
    padding: 15px 20px;
  }

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

  /* Mobile 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__hero-image-wrapper,
  .page-promotions__image-block,
  .page-promotions__cta-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Adjust padding for sections on mobile to prevent overflow */
  .page-promotions__section-padding {
    padding: 40px 0 !important;
  }

  .page-promotions__hero-section,
  .page-promotions__cta-bottom-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-promotions__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-promotions__cta-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-promotions__text-block, .page-promotions__image-block {
    padding: 0;
  }

  .page-promotions__hero-section {
    padding-top: 10px !important; /* body handles --header-offset, this is for visual spacing */
  }
}