/* style/promotions.css */

/* Base styles for the promotions page */
.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background: var(--secondary-color, #FFFFFF); /* Body background from shared.css */
}

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

.page-promotions__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color, #26A9E0);
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
}

.page-promotions__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: #555555;
}

/* 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 content is below fixed header */
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Fading brand color to white */
    color: #ffffff;
}

.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;
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    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%;
}

.page-promotions__main-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFFFFF; /* Ensure high contrast */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-promotions__intro-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0; /* Slightly off-white for readability */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-promotions__cta-button:hover {
    background: #FF9900; /* Slightly brighter orange on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Overview Section */
.page-promotions__overview-section {
    padding: 80px 0;
    background: var(--secondary-color, #FFFFFF); /* Light background */
    color: #333333;
}

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

.page-promotions__category-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
}

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

.page-promotions__category-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
}

.page-promotions__card-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color, #26A9E0);
    margin-bottom: 15px;
    padding: 0 20px;
}

.page-promotions__card-title a {
    color: var(--primary-color, #26A9E0);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-promotions__card-title a:hover {
    color: #1a7bb5; /* Darker primary on hover */
    text-decoration: underline;
}

.page-promotions__category-card p {
    font-size: 16px;
    color: #666666;
    margin-bottom: 25px;
    flex-grow: 1;
    padding: 0 20px;
}

.page-promotions__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: #ffffff;
    color: var(--primary-color, #26A9E0);
    border: 2px solid var(--primary-color, #26A9E0);
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
}

.page-promotions__btn-secondary:hover {
    background: var(--primary-color, #26A9E0);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Featured Promotions Section */
.page-promotions__featured-promotions {
    padding: 80px 0;
    background: var(--primary-color, #26A9E0); /* Dark background */
    color: #ffffff;
}

.page-promotions__featured-promotions .page-promotions__section-title {
    color: #ffffff;
}

.page-promotions__featured-promotions .page-promotions__section-description {
    color: #f0f0f0;
}

.page-promotions__promotion-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

.page-promotions__promotion-item {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white background */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-promotions__promotion-item img {
    width: 40%;
    height: 300px; /* Fixed height for image */
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.page-promotions__promotion-details {
    padding: 30px;
    flex-grow: 1;
}

.page-promotions__promotion-details h3 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-promotions__promotion-details p {
    font-size: 17px;
    color: #f0f0f0;
    margin-bottom: 25px;
}

.page-promotions__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: #EA7C07; /* Login color */
    color: #ffffff;
    border: 2px solid #EA7C07;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
}

.page-promotions__btn-primary:hover {
    background: #FF9900;
    border-color: #FF9900;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-promotions__cta-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
}

.page-promotions__cta-bottom p {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 30px;
    color: #ffffff;
}

.page-promotions__cta-button--dark {
    background: #EA7C07; /* Use login color */
    border-color: #EA7C07;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-promotions__cta-button--dark:hover {
    background: #FF9900;
    border-color: #FF9900;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* How-to-claim Section */
.page-promotions__how-to-claim {
    padding: 80px 0;
    background: var(--secondary-color, #FFFFFF);
    color: #333333;
}

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

.page-promotions__step-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.page-promotions__step-item img {
    width: 100%;
    
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
}

.page-promotions__step-item h3 {
    font-size: 22px;
    color: var(--primary-color, #26A9E0);
    margin-bottom: 10px;
}

.page-promotions__step-item p {
    font-size: 16px;
    color: #666666;
}

/* FAQ Section */
.page-promotions__faq-section {
    padding: 80px 0;
    background: var(--secondary-color, #FFFFFF);
    color: #333333;
}

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

/* 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;
    opacity: 0;
}

/* 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;
    border-top: 1px solid #e0e0e0;
}

/* 问题样式 */
.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    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-item.active .page-promotions__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--primary-color, #26A9E0);
}

.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, #26A9E0);
    pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-promotions__faq-toggle {
    font-size: 28px;
    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: 30px;
    height: 30px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    color: var(--primary-color, #26A9E0);
    transform: rotate(45deg); /* Rotate to form an 'X' or simply change to '-' */
}

.page-promotions__faq-answer p {
    font-size: 16px;
    color: #555555;
    margin: 0;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__hero-image img {
        height: 500px;
    }
    .page-promotions__main-title {
        font-size: 42px;
    }
    .page-promotions__intro-description {
        font-size: 18px;
    }
    .page-promotions__promotion-item {
        flex-direction: column;
    }
    .page-promotions__promotion-item img {
        width: 100%;
        height: 250px;
    }
    .page-promotions__promotion-details {
        padding: 20px;
    }
    .page-promotions__promotion-details h3 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    /* Mobile specific adjustments */
    .page-promotions {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Fixed header spacing for mobile */
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-promotions__hero-image img {
        border-radius: 4px;
        height: 250px; /* Adjust hero image height for mobile */
    }

    .page-promotions__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-promotions__intro-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-promotions__cta-button {
        padding: 12px 30px;
        font-size: 18px;
    }

    .page-promotions__section-title {
        font-size: 28px;
        padding-top: 30px;
    }

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

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

    .page-promotions__category-card img {
        height: 200px;
    }

    .page-promotions__card-title {
        font-size: 20px;
    }

    .page-promotions__promotion-item {
        flex-direction: column;
    }

    .page-promotions__promotion-item img {
        width: 100%;
        height: 200px;
    }

    .page-promotions__promotion-details {
        padding: 20px;
    }

    .page-promotions__promotion-details h3 {
        font-size: 22px;
    }

    .page-promotions__promotion-details p {
        font-size: 15px;
    }

    .page-promotions__btn-primary,
    .page-promotions__btn-secondary {
        width: 100%;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-top: 10px; /* Add some space between stacked buttons */
    }

    .page-promotions__cta-bottom .page-promotions__cta-button {
        width: 100%;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* All images must be responsive and not overflow */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__promotion-item,
    .page-promotions__step-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-promotions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-promotions__faq-question h3 {
        font-size: 15px;
        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;
    }
}