/* style/promotions.css */

/* Base styles for the page-promotions scope */
.page-promotions {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: var(--bg-color, #FFFFFF); /* Body background is light, so text should be dark */
  line-height: 1.6;
}

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

/* Hero Section */
.page-promotions__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  background-color: #26A9E0; /* Primary color background for hero */
  color: #FFFFFF; /* White text for primary color background */
  text-align: center;
  overflow: hidden;
}

.page-promotions__hero-image-wrapper {
  margin-bottom: 20px; /* Space between image and content */
}

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

.page-promotions__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-promotions__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #FFFFFF;
}

.page-promotions__intro-text {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #FFFFFF;
}

.page-promotions__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%;
  max-width: 600px; /* Limit width for CTA buttons */
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

/* Buttons */
.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, 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;
  word-wrap: break-word;
  text-align: center;
}

.page-promotions__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}

.page-promotions__btn-primary:hover {
  background-color: #C76A06; /* Example of darkening */
  border-color: #C76A06;
}

.page-promotions__btn-secondary {
  background-color: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.page-promotions__btn-secondary:hover {
  background-color: #FFFFFF;
  color: #26A9E0;
}

.page-promotions__cta-center {
    text-align: center;
    margin-top: 40px;
}

/* Section common styles */
.page-promotions__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0; /* Primary color for titles on light background */
}

.page-promotions__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-promotions__section-title--light {
  color: #FFFFFF; /* White for titles on dark background */
}

.page-promotions__section-description--light {
  color: #f0f0f0; /* Light grey for descriptions on dark background */
}

.page-promotions__light-bg {
  background-color: #FFFFFF;
  color: #333333;
  padding: 60px 0;
}

.page-promotions__dark-section {
  background-color: #26A9E0; /* Primary color for dark sections */
  color: #FFFFFF;
  padding: 60px 0;
}

/* Overview Section */
.page-promotions__overview-section .page-promotions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-promotions__card {
  background-color: #f8f8f8;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #333333; /* Dark text for light card background */
}

.page-promotions__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-promotions__card-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #26A9E0; /* Primary color for card titles */
}

/* Featured Promos Section */
.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.15); /* Slightly transparent white on dark background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  color: #FFFFFF;
}

.page-promotions__promo-image {
  width: 100%;
  height: 250px; /* Fixed height for promo images */
  object-fit: cover;
  display: block;
}

.page-promotions__promo-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-promotions__promo-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.page-promotions__promo-description {
  font-size: 1em;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-promotions__promo-card .page-promotions__btn-primary {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 0.9em;
}

/* How to Claim Section */
.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: #f8f8f8;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: #333333;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-promotions__step-number {
  background-color: #26A9E0;
  color: #FFFFFF;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.page-promotions__step-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #26A9E0;
}

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

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

.page-promotions__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #26A9E0;
  border-bottom: 1px solid #e0e0e0; /* Separator for summary */
}

.page-promotions__faq-item summary::-webkit-details-marker {
  display: none; /* Hide for Webkit browsers */
}

.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-promotions__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #EA7C07; /* Login color for toggle */
}

.page-promotions__faq-item[open] .page-promotions__faq-toggle {
  content: "−"; /* Change to minus when open */
}

.page-promotions__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  line-height: 1.6;
  color: #555555;
  background-color: #ffffff; /* Lighter background for answer */
}


/* --- Responsive Styles --- */

/* Tablet and Mobile (max-width: 1024px) - General adjustments */
@media (max-width: 1024px) {
  .page-promotions__container {
    padding: 0 15px;
  }

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

  .page-promotions__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-promotions__light-bg,
  .page-promotions__dark-section {
    padding: 40px 0;
  }

  .page-promotions__main-title {
    font-size: clamp(2em, 5vw, 2.8em);
  }

  .page-promotions__intro-text {
    font-size: 1em;
  }

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

  .page-promotions__btn-primary,
  .page-promotions__btn-secondary {
    padding: 12px 25px;
    font-size: 0.95em;
  }

  .page-promotions__overview-section .page-promotions__grid,
  .page-promotions__promo-grid,
  .page-promotions__steps-grid {
    gap: 20px;
  }

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

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


/* Mobile (max-width: 768px) - Mandatory sections */
@media (max-width: 768px) {
  /* 1. HERO 主图区域 */
  .page-promotions__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 30px;
  }

  .page-promotions__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em); /* Adjust H1 size for smaller screens */
    margin-bottom: 10px;
  }

  .page-promotions__intro-text {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

  /* 2. 产品展示图区域 (Featured Promos) */
  .page-promotions__promo-grid {
    grid-template-columns: 1fr !important; /* Single column for mobile */
    gap: 20px;
  }

  .page-promotions__promo-image {
    height: 200px; /* Slightly smaller height for mobile images */
  }

  .page-promotions__promo-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left: 0; */ /* Handled by container padding */
    /* padding-right: 0; */ /* Handled by container padding */
  }

  /* 3. 通用图片与容器 */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-promotions__container,
  .page-promotions__overview-section,
  .page-promotions__featured-promos,
  .page-promotions__how-to-claim,
  .page-promotions__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  /* 4. 按钮与按钮容器 */
  .page-promotions__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !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;
    padding: 12px 15px !important; /* Adjust padding for full-width buttons */
    font-size: 1em !important;
  }

  /* 5. 其他内容模块 (Overview, How-to-Claim, FAQ) */
  .page-promotions__overview-section .page-promotions__grid,
  .page-promotions__steps-grid {
    grid-template-columns: 1fr !important; /* Single column for cards */
    gap: 20px;
  }

  .page-promotions__card,
  .page-promotions__step-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px;
  }

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

  .page-promotions__faq-list {
    margin-top: 20px;
  }

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

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

/* Ensure content area images and containers don't cause overflow */
.page-promotions__content-area,
.page-promotions__text-block,
.page-promotions__card,
.page-promotions__section,
.page-promotions__box {
  color: #333333; /* Default text color for light background */
  background: #ffffff; /* Default white background */
}

/* Deep dive into contrast for dark sections */
.page-promotions__dark-section {
  background: #26A9E0;
  color: #ffffff; /* Forced white text */
}

.page-promotions__dark-section .page-promotions__card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent card on dark bg */
  color: #ffffff;
}

.page-promotions__dark-section .page-promotions__card-title {
  color: #ffffff; /* White title on semi-transparent card */
}

/* Contrast fix for buttons on specific backgrounds if needed */
.page-promotions__btn-primary {
  background: #EA7C07;
  color: #ffffff;
  border: 2px solid transparent;
}

.page-promotions__btn-secondary {
  background: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

/* Emergency contrast fix classes */
.page-promotions__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-promotions__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

/* Global image style to prevent filter */
.page-promotions img {
  filter: none !important; /* Ensure no CSS filter changes image color */
}