.page-khuyen-mai {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #f5f5f5); /* Fallback to light gray if var not set */
}

.page-khuyen-mai__dark-bg {
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff; /* White text for dark background */
}

.page-khuyen-mai__light-bg {
    background-color: #ffffff; /* White background */
    color: #333333; /* Dark text for light background */
}

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

/* Hero Section */
.page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding as per rules */
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 550px; /* Ensure hero section has enough height */
}

.page-khuyen-mai__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-khuyen-mai__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-khuyen-mai__hero-content {
    position: relative;
    z-index: 1;
    padding: 100px 20px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    height: 100%; /* Occupy full height of hero section */
    box-sizing: border-box;
}

.page-khuyen-mai__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Using clamp for H1 */
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
    max-width: 90%;
}

.page-khuyen-mai__hero-description {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 700px;
}

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

/* Buttons */
.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%; /* Important for mobile responsiveness */
    box-sizing: border-box; /* Important for mobile responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

.page-khuyen-mai__btn-primary {
    background-color: #EA7C07; /* Login color */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

.page-khuyen-mai__btn-primary:hover {
    background-color: #d16b06;
    border-color: #d16b06;
}

.page-khuyen-mai__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-khuyen-mai__btn-secondary:hover {
    background-color: #ffffff;
    color: #26A9E0;
}

.page-khuyen-mai__btn-large {
    padding: 18px 35px;
    font-size: 1.1rem;
}

/* Section Titles */
.page-khuyen-mai__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: inherit; /* Inherit from section for contrast */
}

.page-khuyen-mai__sub-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 20px;
    color: inherit;
}

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

/* Feature Grid */
.page-khuyen-mai__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-khuyen-mai__feature-item {
    text-align: center;
    padding: 25px;
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-khuyen-mai__feature-icon {
    width: 100%; /* Ensure images are responsive */
    height: auto;
    max-width: 150px; /* Max width for feature icons */
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-khuyen-mai__feature-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #26A9E0; /* Brand color for titles */
}

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

/* Promotion Categories Grid */
.page-khuyen-mai__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-khuyen-mai__category-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    color: #333333;
}

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

.page-khuyen-mai__card-title {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 15px 20px 10px;
    color: #26A9E0;
}

.page-khuyen-mai__card-title a {
    color: inherit;
    text-decoration: none;
}

.page-khuyen-mai__card-title a:hover {
    text-decoration: underline;
}

.page-khuyen-mai__card-description {
    font-size: 0.95rem;
    padding: 0 20px 20px;
    flex-grow: 1;
}

.page-khuyen-mai__category-card .page-khuyen-mai__btn-primary {
    margin: 0 20px 20px;
    width: auto;
    align-self: flex-start;
}

/* How to Claim Steps */
.page-khuyen-mai__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-khuyen-mai__step-item {
    text-align: center;
    padding: 30px;
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.page-khuyen-mai__step-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #26A9E0;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(38, 169, 224, 0.4);
}

.page-khuyen-mai__step-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #26A9E0;
}

.page-khuyen-mai__step-description {
    font-size: 1rem;
    color: #555555;
}

.page-khuyen-mai__step-description a {
    color: #EA7C07; /* Login color for links */
    text-decoration: none;
    font-weight: 600;
}

.page-khuyen-mai__step-description a:hover {
    text-decoration: underline;
}

/* Terms & FAQ */
.page-khuyen-mai__terms-content {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.page-khuyen-mai__terms-content .page-khuyen-mai__btn-secondary {
    margin-top: 20px;
}

.page-khuyen-mai__faq-list {
    margin-top: 30px;
}

.page-khuyen-mai__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    list-style: none; /* Hide default details marker */
}

.page-khuyen-mai__faq-question::-webkit-details-marker {
    display: none; /* Hide default details marker for webkit browsers */
}

.page-khuyen-mai__faq-qtext {
    flex-grow: 1;
    text-align: left;
}

.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: 15px 25px 20px;
    font-size: 1rem;
    color: #f0f0f0;
    text-align: left;
}

.page-khuyen-mai__faq-answer a {
    color: #EA7C07;
    text-decoration: none;
    font-weight: 600;
}

.page-khuyen-mai__faq-answer a:hover {
    text-decoration: underline;
}

/* Final CTA */
.page-khuyen-mai__final-cta {
    text-align: center;
    padding: 60px 20px;
}

.page-khuyen-mai__final-cta .page-khuyen-mai__text-block {
    margin-bottom: 30px;
}

/* General images */
.page-khuyen-mai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    .page-khuyen-mai__hero-content {
        padding: 80px 20px;
    }
    .page-khuyen-mai__main-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    .page-khuyen-mai__hero-description {
        font-size: 1.1rem;
    }
    .page-khuyen-mai__section-title {
        font-size: 1.8rem;
    }
    .page-khuyen-mai__sub-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-khuyen-mai__container {
        padding: 30px 15px;
    }
    .page-khuyen-mai__hero-section {
        min-height: 450px; /* Adjust hero section height for mobile */
    }
    .page-khuyen-mai__hero-content {
        padding: 60px 15px;
        min-height: 300px;
    }
    .page-khuyen-mai__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important; /* Ensure H1 font size is not too big */
        margin-bottom: 15px;
    }
    .page-khuyen-mai__hero-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    .page-khuyen-mai__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-khuyen-mai__btn-primary,
    .page-khuyen-mai__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-khuyen-mai__section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    .page-khuyen-mai__sub-title {
        font-size: 1.3rem;
    }
    .page-khuyen-mai__text-block {
        font-size: 1rem;
        text-align: left; /* Align text left on mobile for readability */
    }

    /* Images and containers */
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__overview-section .page-khuyen-mai__container,
    .page-khuyen-mai__promotion-categories .page-khuyen-mai__container,
    .page-khuyen-mai__how-to-claim .page-khuyen-mai__container,
    .page-khuyen-mai__terms-faq .page-khuyen-mai__container,
    .page-khuyen-mai__final-cta .page-khuyen-mai__container,
    .page-khuyen-mai__feature-item,
    .page-khuyen-mai__category-card,
    .page-khuyen-mai__step-item,
    .page-khuyen-mai__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Specific mobile adjustments for grids */
    .page-khuyen-mai__feature-grid,
    .page-khuyen-mai__category-grid,
    .page-khuyen-mai__steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-khuyen-mai__card-image {
        height: 180px; /* Adjust card image height for mobile */
    }

    /* FAQ text alignment */
    .page-khuyen-mai__faq-answer,
    .page-khuyen-mai__faq-question {
        text-align: left;
    }
}