/* style/promotions.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-login: #EA7C07;
    --background-color: #FFFFFF;
    --black-color: #000000;
}

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background body */
    background-color: var(--background-color); /* Matches body background from shared.css */
}

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

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

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

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

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

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

.page-promotions a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* 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;
    padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
    background: linear-gradient(135deg, var(--primary-color) 0%, #4facfe 100%); /* Example gradient with primary color */
    overflow: hidden; /* Prevent image overflow */
}

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

.page-promotions__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.page-promotions__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Ensure buttons wrap on small screens */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-promotions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-promotions__btn-primary {
    background: var(--button-login); /* Specific color for login/register type CTA */
    color: var(--text-light);
    border: 2px solid var(--button-login);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-promotions__btn-primary:hover {
    background: #d86b00;
    border-color: #d86b00;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-promotions__btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-promotions__btn-secondary:hover {
    background: #e0e0e0;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Introduction Section */
.page-promotions__introduction {
    background-color: var(--background-color);
    color: var(--text-dark);
}

/* Featured Promotions Section */
.page-promotions__featured-promos {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.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: var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-dark); /* Ensure dark text on light card background */
}

.page-promotions__promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.page-promotions__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-promotions__promo-card h3 {
    font-size: 22px;
    margin: 20px 20px 10px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-promotions__card-title {
    font-size: 22px;
    margin: 20px 20px 10px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-promotions__card-description {
    font-size: 16px;
    padding: 0 20px 20px;
    margin-bottom: 15px;
}

.page-promotions__card-button {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    text-align: center;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 6px;
    box-sizing: border-box;
}

/* How to Claim Section */
.page-promotions__how-to-claim {
    background-color: #f9f9f9;
    color: var(--text-dark);
}

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

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

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

.page-promotions__step-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

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

.page-promotions__step-description {
    font-size: 16px;
    color: var(--text-dark);
}

.page-promotions__image-fullwidth {
    margin-top: 50px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-promotions__image-fullwidth img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Terms and Conditions Section */
.page-promotions__terms {
    background-color: var(--background-color);
    color: var(--text-dark);
}

.page-promotions__terms-list {
    list-style: disc;
    padding-left: 30px;
    margin-top: 20px;
    font-size: 17px;
}

.page-promotions__terms-list li {
    margin-bottom: 10px;
}

/* FAQ Section */
.page-promotions__faq {
    background-color: #f0f8ff; /* Lighter background for contrast */
    color: var(--text-dark);
}

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

/* 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.3s ease;
  padding: 0 20px;
  opacity: 0;
  background: var(--secondary-color); /* Light background for answer */
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px !important;
  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(--secondary-color);
  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: 18px;
  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: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  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: 32px;
  height: 32px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: #333; /* Darker color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect, or just change text to '-' */
}

/* Final CTA Section */
.page-promotions__cta-final {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 80px 0;
}

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

.page-promotions__cta-final .page-promotions__text-block {
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-promotions__buttons-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Ensure buttons wrap on small screens */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: 42px;
    }
    .page-promotions__hero-description {
        font-size: 18px;
    }
    .page-promotions__section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .page-promotions {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-promotions__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-promotions__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-promotions__hero-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-promotions__cta-button,
    .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-left: 15px;
        padding-right: 15px;
    }
    .page-promotions__cta-buttons,
    .page-promotions__button-group,
    .page-promotions__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-promotions__section {
        padding: 40px 0;
    }
    .page-promotions__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-promotions__text-block {
        font-size: 15px;
    }
    .page-promotions__promo-grid {
        grid-template-columns: 1fr;
    }
    .page-promotions__step-item {
        padding: 25px;
    }
    .page-promotions__step-title {
        font-size: 20px;
    }
    .page-promotions__step-description {
        font-size: 15px;
    }
    .page-promotions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-promotions__faq-question h3 {
        font-size: 16px;
        width: calc(100% - 40px);
    }
    .page-promotions__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    .page-promotions__faq-answer {
        padding: 0 15px;
    }
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px !important;
    }
    .page-promotions__image-fullwidth {
        margin-top: 30px;
    }
    .page-promotions img { /* Global image responsiveness */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-promotions__main-title {
        font-size: 28px;
    }
    .page-promotions__section-title {
        font-size: 24px;
    }
    .page-promotions__hero-buttons {
        gap: 10px;
    }
    .page-promotions__cta-button {
        padding: 12px 20px;
        font-size: 16px;
    }
    .page-promotions__promo-card h3, .page-promotions__step-title {
        font-size: 18px;
    }
    .page-promotions__step-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}