/* style/promotions.css */

/* Base styles for the page content */
.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text on light background */
    background-color: #FFFFFF; /* Body background */
}

/* Sections padding and alignment */
.page-promotions__section {
    padding: 60px 20px;
    text-align: center;
}

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

.page-promotions__section-title {
    font-size: 36px;
    color: #017439; /* Primary brand color for titles */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-promotions__section-description {
    font-size: 18px;
    margin-bottom: 40px;
    color: #555555;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* 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); /* Fixed header spacing */
    background: linear-gradient(135deg, #017439, #33A852); /* Gradient with primary color */
    color: #ffffff;
    overflow: hidden; /* Ensure no overflow from image */
}

.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;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

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

.page-promotions__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: #FFFFFF;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-promotions__intro-text {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-promotions__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Specific Button Colors */
.page-promotions__btn-register {
    background: #C30808; /* Register button color */
    color: #FFFF00; /* Register button font color */
}

.page-promotions__btn-login {
    background: #C30808; /* Login button color */
    color: #FFFF00; /* Login button font color */
}

.page-promotions__btn-primary {
    background: #017439; /* Primary brand color */
    color: #ffffff;
}

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

.page-promotions__btn-secondary:hover {
    background: #f0f0f0;
    color: #017439;
}

/* Feature List */
.page-promotions__feature-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 40px auto;
    max-width: 800px;
    text-align: left;
}

.page-promotions__feature-item {
    background: #f9f9f9;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 17px;
    color: #444444;
}

.page-promotions__feature-item::before {
    content: '✅';
    margin-right: 10px;
    font-size: 20px;
    line-height: 1;
}

/* Card Grid */
.page-promotions__card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-promotions__card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

.page-promotions__card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-promotions__card-title {
    font-size: 24px;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-promotions__card-text {
    font-size: 16px;
    color: #555555;
    margin-bottom: 0;
}

/* VIP Section Specific */
.page-promotions__vip-benefits {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center;
}

.page-promotions__vip-benefits .page-promotions__feature-list {
    flex: 1;
    min-width: 300px;
    margin-bottom: 0;
}

.page-promotions__vip-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px; /* Limit image size */
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.page-promotions__vip-benefits .page-promotions__feature-item {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.page-promotions__vip-benefits .page-promotions__feature-item::before {
    content: '⭐';
}

/* Terms and Conditions List */
.page-promotions__terms-list {
    list-style: decimal;
    padding-left: 25px;
    margin: 0 auto 40px auto;
    max-width: 900px;
    text-align: left;
    font-size: 16px;
    color: #444444;
}

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

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

/* FAQ容器样式 */
.page-promotions__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background: #fcfcfc;
    box-shadow: 0 2px 8px 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 15px;
    opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    border-top: 1px solid #e0e0e0;
}

/* Vấn đề FAQ */
.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    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;
}

/* Tiêu đề vấn đề FAQ */
.page-promotions__faq-question-text {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
}

/* Icon chuyển đổi */
.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; /* Ngăn chặn icon chặn sự kiện click */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    color: #017439; /* Màu chính khi hoạt động */
    transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}

/* CTA Bottom Section */
.page-promotions__cta-bottom-section {
    background: #017439;
    color: #ffffff;
    padding: 80px 20px;
}

.page-promotions__cta-bottom-section .page-promotions__section-title {
    color: #ffffff;
}

.page-promotions__cta-bottom-section .page-promotions__section-description {
    color: #f0f0f0;
}

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

.page-promotions__cta-bottom-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-promotions__cta-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: 40px;
    }
    .page-promotions__section-title {
        font-size: 30px;
    }
    .page-promotions__intro-text,
    .page-promotions__section-description {
        font-size: 17px;
    }
    .page-promotions__vip-benefits {
        flex-direction: column;
        gap: 20px;
    }
    .page-promotions__vip-image {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header spacing */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-promotions__intro-text {
        font-size: 16px;
    }

    .page-promotions__section {
        padding: 40px 15px;
    }

    .page-promotions__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }

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

    .page-promotions__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 8px 0 !important; /* Stack buttons vertically */
    }

    .page-promotions__cta-bottom-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        padding: 0 15px; /* Add padding to button group */
    }

    /* Images responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__card-grid,
    .page-promotions__button-group,
    .page-promotions__cta-bottom-section,
    .page-promotions__vip-benefits {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .page-promotions__card-image {
        height: 200px; /* Adjust card image height for mobile */
    }

    /* FAQ mobile */
    .page-promotions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-promotions__faq-question-text {
        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;
    }

    .page-promotions__vip-benefits .page-promotions__feature-list {
        padding-left: 0;
    }
    .page-promotions__feature-item {
        font-size: 15px;
    }
    .page-promotions__terms-list {
        padding-left: 20px;
        font-size: 15px;
    }
}

/* Ensure no filter on images */
.page-promotions img {
    filter: none;
}

/* Dark/Light Background Contrast */
.page-promotions__dark-bg {
    background: #017439;
    color: #ffffff;
}
.page-promotions__dark-bg .page-promotions__section-title {
    color: #ffffff;
}
.page-promotions__dark-bg .page-promotions__section-description {
    color: #f0f0f0;
}
.page-promotions__light-bg {
    background: #ffffff;
    color: #333333;
}
.page-promotions__light-bg .page-promotions__section-title {
    color: #017439;
}
.page-promotions__light-bg .page-promotions__section-description {
    color: #555555;
}

/* Ensure content area image sizes are not too small */
.page-promotions img:not(.shared-header img):not(.shared-footer img) {
    min-width: 200px;
    min-height: 200px;
}
.page-promotions__card-image {
    min-width: unset; /* Allow card images to scale down within card, but card itself is min 300px wide */
    min-height: unset;
}