/* Base styles for the Khuyến Mãi page */
.page-khuyen-mai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #f4f4f4 */
    background-color: #f4f4f4; /* Inherit from body or explicitly set for safety */
}

/* Custom Colors */
.page-khuyen-mai__dark-bg {
    background-color: #B71C1C; /* Background color */
    color: #FFF5E1; /* Text Main color */
}

.page-khuyen-mai__light-bg {
    background-color: #ffffff; /* Default light background */
    color: #333333; /* Default dark text */
}

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
    color: #333333; /* Dark text for light button */
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-khuyen-mai__btn-primary:hover {
    background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
}

.page-khuyen-mai__btn-secondary {
    background-color: transparent;
    color: #B71C1C; /* Deep Red for contrast on light background */
    border: 2px solid #B71C1C; /* Deep Red for border */
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-khuyen-mai__btn-secondary:hover {
    background-color: #B71C1C;
    color: #FFF5E1;
}

.page-khuyen-mai__btn-small {
    padding: 8px 18px;
    font-size: 0.9em;
}

.page-khuyen-mai__btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
}

.page-khuyen-mai__card {
    background-color: #D32F2F; /* Card BG color */
    color: #FFF5E1; /* Text Main color */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.page-khuyen-mai__promo-card {
    background-color: #D32F2F; /* Card BG color */
    color: #FFF5E1; /* Text Main color */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

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

.page-khuyen-mai__promo-card-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    color: #FFD86A; /* Gold for titles on dark background */
}

.page-khuyen-mai__promo-card-text {
    font-size: 1em;
    margin-bottom: 20px;
    color: #FFF5E1;
}

/* General images and containers for mobile to prevent overflow */
.page-khuyen-mai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* General Layout */
.page-khuyen-mai__content-area {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
}

.page-khuyen-mai__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #C91F17; /* Main color */
}

.page-khuyen-mai__section-title--light {
    color: #FFF5E1; /* Text Main color for dark backgrounds */
}

.page-khuyen-mai__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #333333;
}

.page-khuyen-mai__section-description--light {
    color: #FFF5E1;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: #f4f4f4; /* Match body background */
}

.page-khuyen-mai__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 20px 16px;
}

.page-khuyen-mai__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
}

.page-khuyen-mai__hero-title {
    font-size: clamp(2.2em, 3.5vw, 3.5em); /* Responsive font size */
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 20px;
    color: #C91F17; /* Main color */
}

.page-khuyen-mai__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #333333;
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.page-khuyen-mai__hero-image {
    flex: 1 1 40%;
    text-align: center;
}

.page-khuyen-mai__hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Intro Section (Module 1 - Feature Grid) */
.page-khuyen-mai__intro-section {
    padding: 60px 0;
}

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

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

.page-khuyen-mai__icon-box-media {
    width: 240px; /* Fixed width */
    height: 240px; /* Fixed height for square */
    aspect-ratio: 1 / 1; /* Ensure perfect square */
    margin: 0 auto 20px;
    border-radius: 50%; /* Make it round */
    overflow: hidden;
    border: 5px solid #E53935; /* Auxiliary color border */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.page-khuyen-mai__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, crop if necessary */
    display: block;
    border-radius: 50%; /* Ensure image is also round */
}

.page-khuyen-mai__feature-title {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #C91F17; /* Main color */
}

.page-khuyen-mai__feature-text {
    font-size: 1em;
    color: #555555;
}

/* Promo List Section */
.page-khuyen-mai__promo-list-section {
    padding: 60px 0;
}

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

/* Guide Section */
.page-khuyen-mai__guide-section {
    padding: 60px 0;
}

.page-khuyen-mai__guide-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-khuyen-mai__guide-item {
    background-color: #ffffff;
    border-left: 5px solid #E53935; /* Auxiliary color */
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-khuyen-mai__guide-step-title {
    font-size: 1.4em;
    color: #C91F17; /* Main color */
    margin-top: 0;
    margin-bottom: 10px;
}

.page-khuyen-mai__guide-item p {
    color: #555555;
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
    padding: 60px 0;
}

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

.page-khuyen-mai__faq-item {
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-khuyen-mai__faq-item summary {
    list-style: none; /* Remove default marker */
}

.page-khuyen-mai__faq-item summary::-webkit-details-marker {
    display: none; /* Hide for Webkit browsers */
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #C91F17; /* Main color */
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-question {
    border-bottom: 1px solid #ddd;
}

.page-khuyen-mai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #E53935; /* Auxiliary color */
    transition: transform 0.3s ease;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
    transform: rotate(45deg); /* Rotate to form an 'X' or similar */
}

.page-khuyen-mai__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    color: #555555;
    background-color: #ffffff;
}

/* CTA Bottom Section */
.page-khuyen-mai__cta-bottom-section {
    padding: 80px 0;
    text-align: center;
}

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

.page-khuyen-mai__cta-bottom-content .page-khuyen-mai__btn-large {
    margin-top: 30px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-khuyen-mai__hero-container {
        flex-direction: column;
        text-align: center;
    }

    .page-khuyen-mai__hero-content,
    .page-khuyen-mai__hero-image {
        flex: 1 1 100%;
        min-width: unset;
    }

    .page-khuyen-mai__hero-title {
        font-size: clamp(2em, 5vw, 3em);
    }

    .page-khuyen-mai__cta-buttons {
        justify-content: center;
    }

    .page-khuyen-mai__feature-grid,
    .page-khuyen-mai__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    /* HERO Section */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 40px;
    }

    .page-khuyen-mai__hero-container {
        padding: 15px;
        gap: 20px;
    }

    .page-khuyen-mai__hero-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        text-align: center;
    }

    .page-khuyen-mai__hero-description {
        font-size: 1em;
        text-align: center;
    }

    .page-khuyen-mai__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%; /* Ensure container takes full width */
    }

    /* Buttons general for mobile */
    .page-khuyen-mai__btn-primary,
    .page-khuyen-mai__btn-secondary,
    .page-khuyen-mai a[class*="button"],
    .page-khuyen-mai a[class*="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;
    }

    /* Button containers for mobile */
    .page-khuyen-mai__cta-buttons,
    .page-khuyen-mai__button-group,
    .page-khuyen-mai__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-khuyen-mai__cta-buttons {
        display: flex;
        flex-direction: column;
    }


    /* Module 1 - Feature Grid (Three columns with round images) */
    .page-khuyen-mai__intro-section {
        padding: 40px 0;
    }
    .page-khuyen-mai__feature-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .page-khuyen-mai__icon-box-media {
        width: 200px; /* Still square */
        height: 200px; /* Still square */
        border-width: 3px; /* Slightly thinner border */
    }
    .page-khuyen-mai__feature-title {
        font-size: 1.4em;
    }
    .page-khuyen-mai__feature-text {
        font-size: 0.95em;
    }

    /* Promo List Section (Card layout) */
    .page-khuyen-mai__promo-list-section {
        padding: 40px 0;
    }
    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .page-khuyen-mai__promo-card-image {
        height: 200px; /* Adjust height for mobile */
    }
    .page-khuyen-mai__promo-card-content {
        padding: 20px;
    }
    .page-khuyen-mai__promo-card-title {
        font-size: 1.3em;
    }
    .page-khuyen-mai__promo-card-text {
        font-size: 0.95em;
    }

    /* Guide Section (Numbered list) */
    .page-khuyen-mai__guide-section {
        padding: 40px 0;
    }
    .page-khuyen-mai__guide-list {
        margin-top: 20px;
    }
    .page-khuyen-mai__guide-item {
        padding: 20px;
        margin-bottom: 15px;
    }
    .page-khuyen-mai__guide-step-title {
        font-size: 1.3em;
    }
    .page-khuyen-mai__guide-item p {
        font-size: 0.95em;
    }

    /* FAQ Section (Accordion) */
    .page-khuyen-mai__faq-section {
        padding: 40px 0;
    }
    .page-khuyen-mai__faq-list {
        margin-top: 20px;
    }
    .page-khuyen-mai__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }
    .page-khuyen-mai__faq-answer {
        padding: 10px 20px 15px;
        font-size: 0.95em;
    }

    /* CTA Bottom Section */
    .page-khuyen-mai__cta-bottom-section {
        padding: 60px 0;
    }
    .page-khuyen-mai__cta-bottom-content {
        padding: 0 15px;
    }
    .page-khuyen-mai__cta-bottom-content .page-khuyen-mai__btn-large {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

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

    /* Containers for mobile to prevent overflow */
    .page-khuyen-mai__content-area,
    .page-khuyen-mai__section,
    .page-khuyen-mai__card,
    .page-khuyen-mai__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Section titles for mobile */
    .page-khuyen-mai__section-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-khuyen-mai__section-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
}