/* style/promotions.css */

/* Variables (if any, typically from shared.css or defined here for local use) */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --button-login-color: #EA7C07; /* From custom color rules */
  --bg-color-white: #FFFFFF;
  --text-color-black: #000000;
}

.page-promotions {
  font-family: Arial, sans-serif;
  color: var(--text-color-dark); /* Default text color for light background */
  line-height: 1.6;
  background-color: var(--bg-color-white); /* Assuming default white body background */
}

/* --- Hero Section --- */
.page-promotions__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #a7e0f8 100%); /* Light blue gradient */
  color: var(--text-color-light); /* White text on blue gradient */
  /* 🚨 Fixed Header Spacing: Use var(--header-offset) */
  padding-top: var(--header-offset, 120px);
}

.page-promotions__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-promotions__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-promotions__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  filter: none; /* Ensure no image filters */
}

.page-promotions__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-promotions__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: var(--text-color-light); /* White text */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light); /* White text */
}

.page-promotions__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-login-color); /* Login color for CTA */
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-promotions__cta-button:hover {
  background: #D06F00; /* Darker version of #EA7C07 */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-promotions__light-bg {
  background-color: #f9f9f9; /* Slightly off-white for contrast */
  color: var(--text-color-dark);
}

.page-promotions__container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-promotions__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
}

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

.page-promotions__text-block {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 25px;
  text-align: justify;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

/* --- Promotion Types Section --- */
.page-promotions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-promotions__card {
  background-color: var(--bg-color-white);
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px; /* Ensure cards have similar height */
  color: var(--text-color-dark);
}

.page-promotions__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

.page-promotions__card-description {
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-color-dark);
  margin-bottom: 20px;
}

.page-promotions__card-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.95em;
  font-weight: bold;
  transition: background-color 0.3s ease;
  align-self: flex-start; /* Align button to start */
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box; /* Include padding/border in width */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Break long words */
}

.page-promotions__card-button:hover {
  background: #1D8ABF; /* Darker version of #26A9E0 */
}

/* --- How to Claim Section --- */
.page-promotions__numbered-list {
  list-style-type: decimal;
  padding-left: 30px;
  margin-top: 30px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-promotions__list-item {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 15px;
  color: var(--text-color-dark);
}

.page-promotions__list-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-promotions__list-item a:hover {
  text-decoration: underline;
}

/* --- Terms Section --- */
.page-promotions__bullet-list {
  list-style-type: disc;
  padding-left: 30px;
  margin-top: 30px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-promotions__bullet-list--white .page-promotions__list-item {
  color: var(--text-color-light);
}

.page-promotions__cta-button--white-border {
  background: transparent;
  border: 2px solid var(--text-color-light);
  color: var(--text-color-light);
  box-shadow: none;
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box; /* Include padding/border in width */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Break long words */
}

.page-promotions__cta-button--white-border:hover {
  background: var(--text-color-light);
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-promotions__benefit-item {
  background-color: var(--bg-color-white);
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
  color: var(--text-color-dark);
}

.page-promotions__benefit-item:hover {
  transform: translateY(-5px);
}

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

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

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-promotions__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px; /* Adjusted padding */
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-color-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px !important; /* Adjusted padding */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-color-white);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-promotions__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-promotions__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color); /* Primary color for question text */
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-promotions__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change to X or rotate for minus sign */
}

/* --- Final CTA Section --- */
.page-promotions__cta-final-section {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #007bff 100%); /* A slightly darker blue gradient */
  color: var(--text-color-light);
}

.page-promotions__cta-final-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-promotions__button-group {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
  justify-content: center;
  width: 100%; /* Ensure button group takes full width for wrapping */
}

.page-promotions__cta-button--primary {
  background: var(--button-login-color); /* Login color */
  color: var(--text-color-light);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box; /* Include padding/border in width */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Break long words */
}

.page-promotions__cta-button--primary:hover {
  background: #D06F00; /* Darker version of #EA7C07 */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-promotions__cta-button--secondary {
  background: var(--text-color-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box; /* Include padding/border in width */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Break long words */
}

.page-promotions__cta-button--secondary:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Image Specific Styles --- */
.page-promotions__image-wrapper {
  margin-top: 40px;
  margin-bottom: 20px;
  text-align: center;
}

.page-promotions__image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block; /* Ensure it behaves as a block element */
  margin: 0 auto; /* Center image */
  filter: none; /* Ensure no image filters */
}

/* 🚨 Global Image Styles (must be applied to all images) */
.page-promotions img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: none; /* 🚨 NO CSS filters allowed to change image color */
}

/* 🚨 Content area images CSS dimensions lower bound (for desktop) */
.page-promotions img:not([class*="shared-"]) {
  min-width: 200px;
  min-height: 200px;
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-promotions__hero-title {
    font-size: 2.8em;
  }
  .page-promotions__section-title {
    font-size: 2em;
  }
  .page-promotions__text-block,
  .page-promotions__list-item {
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  .page-promotions__hero-section {
    /* 🚨 Mobile specific padding-top for fixed header */
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-promotions__hero-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  
  .page-promotions__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }
  
  .page-promotions__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    width: 100% !important; /* Mobile button full width */
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

  .page-promotions__card {
    padding: 25px;
    min-height: auto; /* Allow height to adjust on mobile */
  }

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

  /* 🚨 Mobile Content Area Image Adaptation */
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: unset !important; /* Allow images to shrink below 200px for responsive */
    min-height: unset !important; /* Allow images to shrink below 200px for responsive */
  }
  
  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container,
  .page-promotions__faq-list,
  .page-promotions__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden; /* Ensure no horizontal scroll */
  }

  .page-promotions__button-group {
    flex-direction: column;
    gap: 15px;
  }

  /* FAQ Mobile Adaptation */
  .page-promotions__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-promotions__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-promotions__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-promotions__faq-answer {
    padding: 0 15px;
  }
  
  .page-promotions__faq-item.active .page-promotions__faq-answer {
    padding: 15px !important;
  }
}