/* style/khuyen-mai.css */

/* Base styles for the page content */
.page-khuyen-mai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #333333); /* Default text color */
    background-color: var(--background-color, #F5F7FA); /* From shared, fallback to #F5F7FA */
}

.page-khuyen-mai__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.page-khuyen-mai__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--text-main, #333333);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-khuyen-mai__section-description {
    font-size: 18px;
    color: var(--text-main, #333333);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding, assuming body has padding-top from shared */
    padding-bottom: 40px;
    background-color: var(--card-bg, #FFFFFF); /* Light background for hero */
}

.page-khuyen-mai__hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 40px 16px;
}

.page-khuyen-mai__hero-content {
    flex: 1 1 45%;
    min-width: 300px;
    color: var(--text-main, #333333);
}

.page-khuyen-mai__main-title {
    font-weight: bold;
    color: var(--text-main, #333333); /* Use text-main for contrast */
    margin-bottom: 20px;
    line-height: 1.2;
    /* No fixed font-size, rely on weight/line-height */
}

.page-khuyen-mai__intro-text {
    font-size: 18px;
    color: var(--text-main, #333333);
    margin-bottom: 30px;
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

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

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

.page-khuyen-mai__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.page-khuyen-mai__hero-image {
    flex: 1 1 45%;
    min-width: 300px;
    text-align: center;
}

.page-khuyen-mai__hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Promo Categories Section */
.page-khuyen-mai__promo-categories {
    padding: 60px 0;
    background-color: var(--background-color, #F5F7FA);
}

.page-khuyen-mai__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.page-khuyen-mai__category-card {
    background: var(--card-bg, #FFFFFF);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    color: var(--text-main, #333333);
}

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

.page-khuyen-mai__icon-box-media {
    width: 120px; /* Size of the circular container */
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(229, 57, 53, 0.1); /* Light tint of main color */
}

.page-khuyen-mai__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    /* Ensure actual image content is at least 200x200px, even if container is smaller */
    min-width: 200px; 
    min-height: 200px;
}

.page-khuyen-mai__card-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main, #333333);
}

.page-khuyen-mai__card-title a {
    color: var(--text-main, #333333);
    text-decoration: none;
}

.page-khuyen-mai__card-title a:hover {
    color: #E53935;
}

.page-khuyen-mai__card-text {
    font-size: 16px;
    color: var(--text-main, #333333);
}

/* Featured Promos Section */
.page-khuyen-mai__featured-promos {
    padding: 60px 0;
    background-color: #E53935; /* Dark background */
    color: #ffffff; /* Light text for contrast */
}

.page-khuyen-mai__featured-promos .page-khuyen-mai__section-title,
.page-khuyen-mai__featured-promos .page-khuyen-mai__section-description {
    color: #ffffff;
}

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

.page-khuyen-mai__promo-card {
    background: var(--card-bg, #FFFFFF);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    color: var(--text-main, #333333);
}

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

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

.page-khuyen-mai__promo-content {
    padding: 25px;
}

.page-khuyen-mai__promo-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main, #333333);
}

.page-khuyen-mai__promo-title a {
    color: var(--text-main, #333333);
    text-decoration: none;
}

.page-khuyen-mai__promo-title a:hover {
    color: #E53935;
}

.page-khuyen-mai__promo-text {
    font-size: 15px;
    color: var(--text-main, #333333);
    margin-bottom: 20px;
}

/* How to Claim Section */
.page-khuyen-mai__how-to-claim {
    padding: 60px 0;
    background-color: var(--background-color, #F5F7FA);
}

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

.page-khuyen-mai__step-item {
    text-align: center;
    padding: 20px;
    background: var(--card-bg, #FFFFFF);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    color: var(--text-main, #333333);
}

.page-khuyen-mai__step-icon {
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background: #E53935;
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.page-khuyen-mai__step-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main, #333333);
}

.page-khuyen-mai__step-text {
    font-size: 15px;
    color: var(--text-main, #333333);
}

.page-khuyen-mai__center-cta {
    text-align: center;
}

/* Terms Summary Section */
.page-khuyen-mai__terms-summary {
    padding: 60px 0;
    background-color: var(--card-bg, #FFFFFF);
}

.page-khuyen-mai__terms-list {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 30px;
    color: var(--text-main, #333333);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-khuyen-mai__terms-list li {
    margin-bottom: 10px;
    font-size: 16px;
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
    padding: 60px 0;
    background-color: var(--background-color, #F5F7FA);
}

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

.page-khuyen-mai__faq-item {
    background: var(--card-bg, #FFFFFF);
    border: 1px solid var(--border, #E0E0E0);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-main, #333333);
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    background-color: #f8f8f8;
    color: var(--text-main, #333333);
    list-style: none; /* For details/summary */
}

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

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

.page-khuyen-mai__faq-toggle {
    font-size: 24px;
    line-height: 1;
    margin-left: 15px;
    color: #E53935;
}

.page-khuyen-mai__faq-answer {
    padding: 0 25px 18px;
    font-size: 16px;
    color: var(--text-main, #333333);
}

/* Bottom CTA Section */
.page-khuyen-mai__cta-bottom {
    padding: 60px 0;
    background-color: #E53935; /* Dark background */
    color: #ffffff; /* Light text for contrast */
    text-align: center;
}

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

.page-khuyen-mai__cta-bottom .page-khuyen-mai__section-title,
.page-khuyen-mai__cta-bottom .page-khuyen-mai__section-description {
    color: #ffffff;
    margin-bottom: 20px;
}

.page-khuyen-mai__cta-bottom .page-khuyen-mai__section-description {
    max-width: 700px;
}

.page-khuyen-mai__cta-bottom .page-khuyen-mai__cta-buttons {
    justify-content: center;
    margin-top: 20px;
}

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

.page-khuyen-mai__section,
.page-khuyen-mai__card,
.page-khuyen-mai__container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
}

/* --- Responsive Styles (Mobile) --- */
@media (max-width: 768px) {
    .page-khuyen-mai__section-title {
        font-size: 28px;
        margin-bottom: 15px;
        padding: 0 10px;
    }

    .page-khuyen-mai__section-description {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    /* HERO Section */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile, override if needed */
        padding-bottom: 30px;
    }
    
    .page-khuyen-mai__hero-container {
        flex-direction: column;
        padding: 20px 15px;
    }

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

    .page-khuyen-mai__main-title {
        font-size: clamp(24px, 7vw, 32px);
        text-align: center;
    }

    .page-khuyen-mai__intro-text {
        font-size: 16px;
        text-align: center;
    }

    .page-khuyen-mai__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 0 15px; /* Add padding to container */
    }

    /* Buttons */
    .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 */
    .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 !important;
        padding-right: 15px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .page-khuyen-mai__cta-buttons {
        display: flex;
        flex-direction: column; /* Stack buttons vertically */
    }

    /* Promo Categories Section */
    .page-khuyen-mai__promo-categories {
        padding: 40px 0;
    }

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

    .page-khuyen-mai__category-card {
        padding: 25px 15px;
    }

    .page-khuyen-mai__icon-box-media {
        width: 100px; /* Adjust size for mobile, still square */
        height: 100px;
        margin-bottom: 15px;
    }
    .page-khuyen-mai__icon-box-media img {
        min-width: 200px; /* Still ensure actual image is large */
        min-height: 200px;
        height: 100% !important; /* Keep height 100% of parent square container */
        object-fit: cover !important;
    }

    .page-khuyen-mai__card-title {
        font-size: 20px;
    }

    /* Featured Promos Section */
    .page-khuyen-mai__featured-promos {
        padding: 40px 0;
    }

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

    .page-khuyen-mai__promo-card img {
         /* Adjust height for mobile */
    }

    .page-khuyen-mai__promo-content {
        padding: 20px 15px;
    }

    /* How to Claim Section */
    .page-khuyen-mai__how-to-claim {
        padding: 40px 0;
    }

    .page-khuyen-mai__steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    /* Terms Summary Section */
    .page-khuyen-mai__terms-summary {
        padding: 40px 0;
    }

    .page-khuyen-mai__terms-list {
        padding-left: 20px;
        margin-bottom: 20px;
    }

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

    .page-khuyen-mai__faq-question {
        padding: 15px 20px;
        font-size: 16px;
    }

    .page-khuyen-mai__faq-answer {
        padding: 0 20px 15px;
        font-size: 15px;
    }

    /* Bottom CTA Section */
    .page-khuyen-mai__cta-bottom {
        padding: 40px 0;
    }

    .page-khuyen-mai__cta-bottom .page-khuyen-mai__section-title {
        font-size: 26px;
    }

    /* General images and containers */
    .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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}