:root {
    --haybet-primary: #E53935;
    --haybet-secondary: #FF5A4F;
    --haybet-text-main: #333333;
    --haybet-card-bg: #FFFFFF;
    --haybet-background: #F5F7FA;
    --haybet-border: #E0E0E0;
    --header-offset: 122px; /* Placeholder, will be overridden by shared.css or fallback */
}

.page-khuyen-mai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--haybet-text-main); /* Default text color for light background */
    background-color: var(--haybet-background); /* Body background */
}

/* --- Hero Section --- */
.page-khuyen-mai__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, assuming body handles header offset */
    margin-bottom: 40px;
    text-align: center;
    overflow: hidden;
}

.page-khuyen-mai__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.page-khuyen-mai__hero-content {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 0 20px;
}

.page-khuyen-mai__main-title {
    font-size: 2.8em;
    font-weight: bold;
    color: var(--haybet-primary);
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-khuyen-mai__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--haybet-text-main);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-khuyen-mai__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    max-width: 100%; /* Ensure button adapts */
    box-sizing: border-box; /* Include padding/border in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, var(--haybet-secondary) 0%, var(--haybet-primary) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.page-khuyen-mai__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.6);
}

.page-khuyen-mai__btn-secondary {
    background: var(--haybet-card-bg);
    color: var(--haybet-primary);
    border: 2px solid var(--haybet-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-khuyen-mai__btn-secondary:hover {
    background: var(--haybet-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

/* --- Content Wrapper --- */
.page-khuyen-mai__content-wrapper {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- General Section Styling --- */
.page-khuyen-mai__section {
    background: var(--haybet-card-bg);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-khuyen-mai__section-title {
    font-size: 2.2em;
    color: var(--haybet-primary);
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
}

.page-khuyen-mai__text-block {
    font-size: 1.05em;
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--haybet-text-main);
}

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

.page-khuyen-mai__promo-card {
    background: var(--haybet-card-bg);
    border: 1px solid var(--haybet-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-khuyen-mai__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.page-khuyen-mai__promo-card-title {
    font-size: 1.4em;
    color: var(--haybet-primary);
    padding: 15px 20px 10px;
    font-weight: bold;
}

.page-khuyen-mai__promo-card-description {
    font-size: 0.95em;
    color: var(--haybet-text-main);
    padding: 0 20px 15px;
    flex-grow: 1;
}

.page-khuyen-mai__btn-small {
    font-size: 0.9em;
    padding: 10px 20px;
    margin: 0 20px 20px;
    align-self: flex-start; /* Align button to start */
}

/* --- Dark Section (Điều Kiện & Điều Khoản) --- */
.page-khuyen-mai__dark-section {
    background: var(--haybet-primary);
    color: #ffffff; /* White text for dark background */
}

.page-khuyen-mai__dark-section .page-khuyen-mai__section-title,
.page-khuyen-mai__dark-section .page-khuyen-mai__text-block {
    color: #ffffff;
}

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

.page-khuyen-mai__info-card {
    background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for contrast */
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-khuyen-mai__info-card-title {
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-khuyen-mai__info-card-text {
    font-size: 0.95em;
    color: #f0f0f0;
    line-height: 1.6;
}

/* --- Steps List (Cách Tham Gia) --- */
.page-khuyen-mai__steps-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.page-khuyen-mai__step-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    background: var(--haybet-card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--haybet-border);
}

.page-khuyen-mai__step-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(180deg, var(--haybet-secondary) 0%, var(--haybet-primary) 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
}

.page-khuyen-mai__step-content {
    flex-grow: 1;
}

.page-khuyen-mai__step-title {
    font-size: 1.5em;
    color: var(--haybet-primary);
    margin-bottom: 10px;
    font-weight: bold;
}

.page-khuyen-mai__step-description {
    font-size: 1em;
    color: var(--haybet-text-main);
    margin-bottom: 15px;
}

/* --- Benefits List --- */
.page-khuyen-mai__benefits-list {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.page-khuyen-mai__benefits-list li {
    background: var(--haybet-card-bg);
    border: 1px solid var(--haybet-border);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    font-size: 1.05em;
    color: var(--haybet-text-main);
    display: flex;
    align-items: flex-start;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.page-khuyen-mai__benefits-list li strong {
    color: var(--haybet-primary);
    margin-right: 8px;
    flex-shrink: 0;
}

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

/* --- FAQ Section --- */
.page-khuyen-mai__faq-section {
    background: var(--haybet-card-bg);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.page-khuyen-mai__faq-item {
    background: var(--haybet-card-bg);
    border: 1px solid var(--haybet-border);
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.page-khuyen-mai__faq-question {
    font-size: 1.2em;
    color: var(--haybet-primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.page-khuyen-mai__faq-answer {
    font-size: 1em;
    color: var(--haybet-text-main);
    line-height: 1.6;
}

/* --- Conclusion Section --- */
.page-khuyen-mai__conclusion-section {
    text-align: center;
    padding-bottom: 60px;
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-khuyen-mai__main-title {
        font-size: 2.5em;
    }

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

    .page-khuyen-mai__promo-card-title {
        font-size: 1.3em;
    }

    .page-khuyen-mai__info-card-title {
        font-size: 1.2em;
    }

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

    .page-khuyen-mai__content-wrapper {
        padding: 0 15px;
    }

    .page-khuyen-mai__section {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    /* 1. Top section title + dual CTA */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile */
        margin-bottom: 20px;
    }

    .page-khuyen-mai__main-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .page-khuyen-mai__intro-text {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-khuyen-mai__cta-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 4. Buttons and button containers */
    .page-khuyen-mai__btn,
    .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;
        padding-right: 15px;
    }
    
    .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;
    }

    /* 2. Single column long text container */
    .page-khuyen-mai__content-wrapper {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    .page-khuyen-mai__section {
        padding: 25px 15px !important;
        margin-bottom: 20px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-khuyen-mai__section-title {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .page-khuyen-mai__text-block {
        font-size: 0.95em;
    }

    /* Promo Grid */
    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-khuyen-mai__promo-card-image {
        height: 180px;
    }

    .page-khuyen-mai__promo-card-title {
        font-size: 1.2em;
        padding: 10px 15px;
    }

    .page-khuyen-mai__promo-card-description {
        font-size: 0.9em;
        padding: 0 15px 10px;
    }

    .page-khuyen-mai__btn-small {
        margin: 0 15px 15px;
        width: calc(100% - 30px);
        max-width: none;
    }

    /* Info Grid */
    .page-khuyen-mai__info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-khuyen-mai__info-card {
        padding: 20px;
    }

    .page-khuyen-mai__info-card-title {
        font-size: 1.1em;
    }

    /* Steps List */
    .page-khuyen-mai__step-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 15px;
        gap: 15px;
    }

    .page-khuyen-mai__step-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }

    .page-khuyen-mai__step-title {
        font-size: 1.3em;
    }

    .page-khuyen-mai__step-description {
        font-size: 0.95em;
    }

    /* Benefits List */
    .page-khuyen-mai__benefits-list li {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .page-khuyen-mai__benefits-list li strong {
        margin-bottom: 5px;
    }

    .page-khuyen-mai__benefits-list li::before {
        margin-right: 5px;
        align-self: flex-start;
    }

    /* 3. Universal images and figure */
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-khuyen-mai__hero-image {
        max-height: 300px;
        object-fit: cover;
    }

    .page-khuyen-mai__wp-caption {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 5. Registration tutorial and FAQ blocks */
    .page-khuyen-mai__faq-item {
        padding: 15px;
    }

    .page-khuyen-mai__faq-question {
        font-size: 1.1em;
    }

    .page-khuyen-mai__faq-answer {
        font-size: 0.9em;
    }

    .page-khuyen-mai__conclusion-section {
        padding-bottom: 40px;
    }
}