/* style/khuyen-mai.css */

/* Variables and Base Styles */
:root {
    --e28bet-primary: #E53935;
    --e28bet-secondary: #FF5A4F;
    --e28bet-text-main: #333333;
    --e28bet-card-bg: #FFFFFF;
    --e28bet-background: #F5F7FA;
    --e28bet-border: #E0E0E0;
    --e28bet-gradient-button: linear-gradient(180deg, var(--e28bet-secondary) 0%, var(--e28bet-primary) 100%);
    --header-offset: 120px; /* Default, will be overridden by shared.css if present */
}

.page-khuyen-mai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--e28bet-text-main);
    background-color: var(--e28bet-background);
}

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

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

.page-khuyen-mai__text-block {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Color Contrast Specifics */
.page-khuyen-mai__light-bg {
    background-color: var(--e28bet-background);
    color: var(--e28bet-text-main);
    padding: 60px 0;
}

.page-khuyen-mai__dark-bg {
    background-color: var(--e28bet-primary); /* Primary brand color as background */
    color: #ffffff; /* White text for contrast */
    padding: 60px 0;
}

.page-khuyen-mai__dark-bg .page-khuyen-mai__section-title {
    color: #ffffff; /* White title for contrast */
}

/* Buttons */
.page-khuyen-mai__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-khuyen-mai__btn--primary {
    background: var(--e28bet-gradient-button);
    color: #ffffff;
    border: none;
}

.page-khuyen-mai__btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-khuyen-mai__btn--secondary {
    background-color: var(--e28bet-card-bg);
    color: var(--e28bet-primary);
    border: 2px solid var(--e28bet-primary);
}

.page-khuyen-mai__btn--secondary:hover {
    background-color: var(--e28bet-primary);
    color: #ffffff;
}

.page-khuyen-mai__btn--small {
    padding: 8px 15px;
    font-size: 0.9rem;
    border-radius: 5px;
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container takes full width */
    box-sizing: border-box; /* Include padding/border in width */
    overflow: hidden; /* Prevent overflow */
}

/* Images */
.page-khuyen-mai img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below images */
    filter: none; /* Ensure no CSS filters are applied */
}

/* Hero Section */
.page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    background-color: var(--e28bet-primary); /* Background for text area */
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.page-khuyen-mai__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

.page-khuyen-mai__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover; /* Ensure image covers area, might crop */
    min-height: 300px; /* Minimum height for hero image */
}

.page-khuyen-mai__hero-content {
    max-width: 900px;
    padding: 0 20px 60px;
    z-index: 1; /* Ensure content is above any potential background elements */
}

.page-khuyen-mai__hero-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive H1 font size */
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.page-khuyen-mai__hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

/* Overview Section */
.page-khuyen-mai__overview-section .page-khuyen-mai__image-content {
    margin: 40px auto 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Promo Grid (New Member, Deposit, Cashback) */
.page-khuyen-mai__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-khuyen-mai__promo-card {
    background-color: var(--e28bet-card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
    color: var(--e28bet-text-main); /* Ensure text color for light card */
}

.page-khuyen-mai__promo-card:hover {
    transform: translateY(-5px);
}

.page-khuyen-mai__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-khuyen-mai__card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--e28bet-primary);
    margin-bottom: 15px;
}

.page-khuyen-mai__card-description {
    font-size: 1rem;
    color: #555555;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* VIP Section */
.page-khuyen-mai__vip-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-khuyen-mai__feature-item {
    background-color: var(--e28bet-card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    color: var(--e28bet-text-main);
}

.page-khuyen-mai__feature-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

.page-khuyen-mai__feature-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--e28bet-primary);
    margin-bottom: 10px;
}

.page-khuyen-mai__feature-description {
    font-size: 0.95rem;
    color: #555555;
}

/* Terms & Conditions Section */
.page-khuyen-mai__terms-list {
    list-style: disc inside;
    max-width: 800px;
    margin: 30px auto;
    text-align: left;
    padding-left: 20px;
}

.page-khuyen-mai__terms-list li {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #f0f0f0; /* Light text for dark background */
}

/* FAQ Section */
.page-khuyen-mai__faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.page-khuyen-mai__faq-item {
    background-color: var(--e28bet-card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    color: var(--e28bet-text-main);
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--e28bet-primary);
    cursor: pointer;
    list-style: none; /* For <summary> tag */
}

.page-khuyen-mai__faq-item summary::-webkit-details-marker,
.page-khuyen-mai__faq-item summary::marker {
    display: none; /* Hide default marker for <summary> */
}

.page-khuyen-mai__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
    transform: rotate(45deg);
}

.page-khuyen-mai__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: #555555;
}

.page-khuyen-mai__faq-answer p {
    margin: 0;
}

/* Final CTA Section */
.page-khuyen-mai__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--e28bet-primary);
    color: #ffffff;
}

.page-khuyen-mai__cta-content {
    max-width: 800px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-khuyen-mai__hero-title {
        font-size: 3rem;
    }
    .page-khuyen-mai__section-title {
        font-size: 2rem;
    }
    .page-khuyen-mai__text-block {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* General content padding */
    .page-khuyen-mai__container {
        padding: 15px;
    }

    /* Hero Section */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Ensure small padding, not header-offset */
    }
    .page-khuyen-mai__hero-image-wrapper {
        margin-bottom: 20px;
    }
    .page-khuyen-mai__hero-image {
        object-fit: contain !important; /* Mobile hero image should contain, not crop */
        max-height: 300px !important; /* Limit height on mobile */
        min-height: unset !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__hero-content {
        padding: 0 15px 40px;
    }
    .page-khuyen-mai__hero-title {
        font-size: 2rem !important; /* Smaller H1 for mobile */
        margin-bottom: 15px;
    }
    .page-khuyen-mai__hero-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    .page-khuyen-mai__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-khuyen-mai__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 !important;
        padding-right: 15px !important;
    }

    /* Section Titles */
    .page-khuyen-mai__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    /* Text Blocks */
    .page-khuyen-mai__text-block {
        font-size: 0.95rem;
        text-align: left;
    }

    /* Promo Grid */
    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-khuyen-mai__promo-card {
        padding: 20px;
    }
    .page-khuyen-mai__card-image {
        height: 180px; /* Adjust card image height */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__card-title {
        font-size: 1.3rem;
    }
    .page-khuyen-mai__card-description {
        font-size: 0.9rem;
    }

    /* VIP Features */
    .page-khuyen-mai__vip-features {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-khuyen-mai__feature-icon {
        max-width: 100% !important;
        width: 80px !important;
        height: 80px !important;
    }

    /* Terms List */
    .page-khuyen-mai__terms-list {
        padding-left: 0;
        text-align: left;
    }
    .page-khuyen-mai__terms-list li {
        font-size: 0.95rem;
    }

    /* FAQ Section */
    .page-khuyen-mai__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }
    .page-khuyen-mai__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95rem;
    }

    /* General Image and Container adaptation */
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__section,
    .page-khuyen-mai__card,
    .page-khuyen-mai__container,
    .page-khuyen-mai__hero-section,
    .page-khuyen-mai__overview-section,
    .page-khuyen-mai__new-member-section,
    .page-khuyen-mai__deposit-section,
    .page-khuyen-mai__cashback-section,
    .page-khuyen-mai__vip-section,
    .page-khuyen-mai__terms-section,
    .page-khuyen-mai__faq-section,
    .page-khuyen-mai__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    /* Ensure no horizontal scroll */
    body {
        overflow-x: hidden;
    }
}