/* style/promotions.css */
:root {
    --primary-color: #017439;
    --auxiliary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --button-register-bg: #C30808;
    --button-register-text: #FFFF00;
}

.page-promotions {
    color: var(--text-color-dark); /* Default text color for light background */
    background-color: var(--auxiliary-color);
}

.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);
    background: linear-gradient(135deg, var(--primary-color), var(--auxiliary-color));
    overflow: hidden;
}

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

.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 10px 20px rgba(0, 0, 0, 0.2);
}

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    color: var(--text-color-light); /* Text on hero image should be light */
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.page-promotions__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-color-light);
}

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

.page-promotions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-register-bg);
    color: var(--button-register-text);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-promotions__cta-button:hover {
    background: #e02020;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-promotions__section {
    padding: 80px 20px;
    text-align: center;
}

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

.page-promotions__section-title {
    font-size: 2.5em;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-weight: 700;
}

.page-promotions__section-intro {
    font-size: 1.1em;
    line-height: 1.7;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: var(--text-color-dark);
}

.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: var(--auxiliary-color);
    border-radius: 12px;
    box-shadow: 0 8px 20px 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;
    border: 1px solid #e0e0e0;
}

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

.page-promotions__promo-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #e0e0e0;
}

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

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

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

.page-promotions__card-button {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    align-self: flex-start;
    border: none;
}

.page-promotions__card-button:hover {
    background: #005a2e;
}

.page-promotions__welcome-offer {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-promotions__welcome-offer .page-promotions__section-title,
.page-promotions__welcome-offer .page-promotions__section-intro {
    color: var(--text-color-light);
}

.page-promotions__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
    text-align: left;
}

.page-promotions__text-content {
    flex: 1;
}

.page-promotions__text-content p {
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-color-light);
}

.page-promotions__image-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-promotions__image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-promotions__deposit-cashback {
    background-color: var(--auxiliary-color);
}

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

.page-promotions__feature-item {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.page-promotions__feature-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-promotions__feature-item p {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-color-dark);
}

.page-promotions__button-group {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.page-promotions__btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
}

.page-promotions__btn-primary:hover {
    background: #005a2e;
    transform: translateY(-2px);
}

.page-promotions__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    background: var(--auxiliary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.page-promotions__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-2px);
}

.page-promotions__vip-program {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-promotions__vip-program .page-promotions__section-title,
.page-promotions__vip-program .page-promotions__section-intro {
    color: var(--text-color-light);
}

.page-promotions__vip-tiers {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-promotions__vip-tier-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: left;
    flex: 1;
    min-width: 300px;
    max-width: 550px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-promotions__vip-tier-title {
    font-size: 1.6em;
    color: var(--text-color-light);
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-promotions__vip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-promotions__vip-list li {
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    color: var(--text-color-light);
}

.page-promotions__vip-list li::before {
    content: '✅';
    margin-right: 10px;
    font-size: 1.1em;
    line-height: 1;
    flex-shrink: 0;
}

.page-promotions__vip-level {
    font-weight: bold;
    color: var(--button-register-text); /* Highlight VIP levels */
}

.page-promotions__vip-join-text {
    font-size: 1.1em;
    line-height: 1.7;
    max-width: 900px;
    margin: 50px auto 30px auto;
    color: var(--text-color-light);
}

.page-promotions__terms-conditions {
    background-color: var(--auxiliary-color);
}

.page-promotions__terms-details {
    text-align: left;
    margin-top: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.page-promotions__sub-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-promotions__sub-title:first-of-type {
    margin-top: 0;
}

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

.page-promotions__faq-section {
    background-color: #f5f5f5; /* Light background for FAQ */
    color: var(--text-color-dark);
}

.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: 5px;
    overflow: hidden;
}

/* 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 và đủ lớn max-height để đảm bảo mở rộng */
.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;
    text-align: left;
    color: var(--text-color-dark);
}

/* Vấn đề phong cách */
.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;
    text-align: left;
}

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

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

/* Phong cách tiêu đề câu hỏi */
.page-promotions__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
    color: var(--primary-color);
}

/* Biểu tượng 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 biểu tượng chặn sự kiện nhấp */
    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); /* Biểu tượng '+' xoay thành 'x' hoặc bạn có thể đổi thành '-' */
}

.page-promotions__contact-cta {
    margin-top: 50px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__contact-cta p {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: var(--text-color-dark);
}

/* 🚨 Responsive Design for Desktop */
@media (min-width: 769px) {
    .page-promotions__content-wrapper {
        flex-direction: row;
        text-align: left;
    }

    .page-promotions__image-content {
        order: 2;
    }

    .page-promotions__text-content {
        order: 1;
    }
}

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

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

    .page-promotions__hero-description {
        font-size: 1em;
    }

    .page-promotions__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        width: 100% !important; /* Ensure button full width */
        max-width: 300px !important;
        margin-left: auto !important;
        margin-right: auto !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;
    }

    .page-promotions__section-intro {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

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

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

    .page-promotions__card-content {
        padding: 20px;
    }

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

    .page-promotions__card-text {
        font-size: 0.9em;
    }

    .page-promotions__card-button {
        width: 100% !important;
        max-width: 250px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-promotions__content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .page-promotions__image-content {
        order: 1;
    }

    .page-promotions__text-content {
        order: 2;
    }

    .page-promotions__text-content p {
        font-size: 0.95em;
    }

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

    .page-promotions__feature-item {
        padding: 20px;
    }

    .page-promotions__feature-title {
        font-size: 1.2em;
    }

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

    .page-promotions__btn-primary,
    .page-promotions__btn-secondary {
        width: 100% !important;
        max-width: 300px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 25px;
        font-size: 1em;
    }

    .page-promotions__vip-tiers {
        flex-direction: column;
        gap: 20px;
    }

    .page-promotions__vip-tier-card {
        padding: 25px;
    }

    .page-promotions__vip-tier-title {
        font-size: 1.4em;
    }

    .page-promotions__vip-list li {
        font-size: 0.95em;
    }

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

    .page-promotions__sub-title {
        font-size: 1.4em;
    }

    .page-promotions__terms-details p {
        font-size: 0.95em;
    }

    /* Mobile FAQ styles */
    .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;
    }

    .page-promotions__contact-cta {
        padding: 20px;
    }

    .page-promotions__contact-cta p {
        font-size: 1em;
    }

    /* Image responsive force for mobile */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__promo-card,
    .page-promotions__feature-item,
    .page-promotions__vip-tier-card,
    .page-promotions__terms-details,
    .page-promotions__faq-list,
    .page-promotions__contact-cta {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}