/* style/khuyen-mai.css */

/* Variables */
:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --text-main: #1F2D3D;
    --text-dark: #000000;
    --card-bg: #FFFFFF;
    --page-bg: #F4F7FB;
    --border-color: #D6E2FF;
    --btn-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
}

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

/* Ensure content area padding and max-width */
.page-khuyen-mai__content-area {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

/* Section Titles */
.page-khuyen-mai__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-dark); /* Use #000000 for main titles */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-khuyen-mai__section-description {
    font-size: 1.1em;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

.page-khuyen-mai__btn-primary {
    background: var(--btn-gradient); /* Custom button gradient */
    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: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-khuyen-mai__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* HERO Section */
.page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 60px;
    background-color: var(--page-bg); /* Ensure light background for text */
}

.page-khuyen-mai__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center; /* Center items for better layout on smaller desktops */
    padding: 40px 16px;
    gap: 40px;
    box-sizing: border-box;
}

.page-khuyen-mai__hero-content {
    flex: 1 1 45%;
    min-width: 300px;
    color: var(--text-main); /* Text color for light background */
}

.page-khuyen-mai__hero-title {
    font-size: 3.2em; /* Using a larger size for H1 with clamp consideration for mobile */
    font-weight: 800;
    color: var(--text-dark); /* #000000 for H1 */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-khuyen-mai__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-main);
}

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

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

.page-khuyen-mai__hero-side-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Promo List Section */
.page-khuyen-mai__promo-list-section {
    padding: 60px 0;
    background-color: var(--page-bg);
}

.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(--card-bg); /* White background for cards */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.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.4em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

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

.page-khuyen-mai__promo-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    background: var(--btn-gradient);
    color: #ffffff;
    border: none;
    transition: background 0.3s ease;
    max-width: 100%; /* Ensure button adapts to card width */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-khuyen-mai__promo-card-button:hover {
    opacity: 0.9;
}

/* Why Choose Section (Dark Background) */
.page-khuyen-mai__dark-bg {
    background-color: var(--primary-color); /* Primary color as dark background */
    color: #ffffff; /* White text for dark background */
}

.page-khuyen-mai__why-choose-section {
    padding: 80px 0;
}

.page-khuyen-mai__why-choose-section .page-khuyen-mai__section-title {
    color: #ffffff; /* White title on dark background */
}

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

.page-khuyen-mai__why-choose-item {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white background */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
}

.page-khuyen-mai__why-choose-heading {
    font-size: 1.3em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.page-khuyen-mai__why-choose-text {
    font-size: 0.95em;
    color: #ffffff;
}

/* Terms Section */
.page-khuyen-mai__terms-section {
    padding: 60px 0;
    background-color: var(--page-bg);
}

.page-khuyen-mai__terms-list {
    list-style: disc;
    padding-left: 20px;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-khuyen-mai__terms-item {
    font-size: 1em;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-khuyen-mai__terms-cta {
    text-align: center;
    margin-top: 40px;
}

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

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

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

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    background-color: #fcfdff; /* Slightly off-white for summary */
    transition: background-color 0.3s ease;
    list-style: none; /* Hide default marker */
}

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

.page-khuyen-mai__faq-question:hover {
    background-color: #f0f5ff;
}

.page-khuyen-mai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--primary-color);
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
    content: "−";
}

.page-khuyen-mai__faq-answer {
    padding: 0 25px 20px;
    font-size: 0.95em;
    color: var(--text-main);
    line-height: 1.6;
}

.page-khuyen-mai__faq-answer p {
    margin-bottom: 10px;
}
.page-khuyen-mai__faq-answer p:last-child {
    margin-bottom: 0;
}

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

.page-khuyen-mai__cta-bottom-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

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

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

/* Ensure all images are responsive by default */
.page-khuyen-mai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* General container width for mobile to prevent overflow */
.page-khuyen-mai__section,
.page-khuyen-mai__card,
.page-khuyen-mai__container,
.page-khuyen-mai__promo-card-content,
.page-khuyen-mai__why-choose-item {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* --- Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    /* General */
    .page-khuyen-mai {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-khuyen-mai__content-area {
        padding: 20px 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-khuyen-mai__section-title {
        font-size: 2em !important;
        margin-bottom: 15px;
    }
    .page-khuyen-mai__section-description {
        font-size: 1em !important;
        margin-bottom: 30px;
    }

    /* Buttons (General) */
    .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;
    }
    .page-khuyen-mai__hero-cta-buttons,
    .page-khuyen-mai__cta-bottom-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-khuyen-mai__promo-card-button {
        width: 100% !important;
    }

    /* HERO Section */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px !important;
    }
    .page-khuyen-mai__hero-container {
        flex-direction: column;
        padding: 20px 15px;
        gap: 30px;
    }
    .page-khuyen-mai__hero-content {
        flex: 1 1 100%;
        text-align: center;
    }
    .page-khuyen-mai__hero-title {
        font-size: clamp(2em, 8vw, 2.8em) !important;
        margin-bottom: 15px;
    }
    .page-khuyen-mai__hero-description {
        font-size: 1em !important;
        margin-bottom: 25px;
    }
    .page-khuyen-mai__hero-image {
        flex: 1 1 100%;
    }
    .page-khuyen-mai__hero-side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Promo List Section */
    .page-khuyen-mai__promo-list-section {
        padding: 40px 0 !important;
    }
    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .page-khuyen-mai__promo-card-image {
        height: 200px !important;
    }
    .page-khuyen-mai__promo-card-content {
        padding: 20px !important;
    }
    .page-khuyen-mai__promo-card-title {
        font-size: 1.2em !important;
        margin-bottom: 10px !important;
    }
    .page-khuyen-mai__promo-card-description {
        font-size: 0.9em !important;
        margin-bottom: 15px !important;
    }

    /* Why Choose Section */
    .page-khuyen-mai__why-choose-section {
        padding: 50px 0 !important;
    }
    .page-khuyen-mai__why-choose-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .page-khuyen-mai__why-choose-item {
        padding: 20px !important;
    }
    .page-khuyen-mai__why-choose-heading {
        font-size: 1.1em !important;
    }

    /* Terms Section */
    .page-khuyen-mai__terms-section {
        padding: 40px 0 !important;
    }
    .page-khuyen-mai__terms-list {
        padding-left: 15px !important;
        margin-top: 20px !important;
    }
    .page-khuyen-mai__terms-item {
        font-size: 0.95em !important;
    }
    .page-khuyen-mai__terms-cta {
        margin-top: 30px !important;
    }

    /* FAQ Section */
    .page-khuyen-mai__faq-section {
        padding: 40px 0 50px !important;
    }
    .page-khuyen-mai__faq-list {
        margin-top: 20px !important;
    }
    .page-khuyen-mai__faq-question {
        padding: 15px 20px !important;
        font-size: 1em !important;
    }
    .page-khuyen-mai__faq-toggle {
        font-size: 1.3em !important;
    }
    .page-khuyen-mai__faq-answer {
        padding: 0 20px 15px !important;
        font-size: 0.9em !important;
    }

    /* CTA Bottom Section */
    .page-khuyen-mai__cta-bottom-section {
        padding: 50px 0 !important;
    }
    .page-khuyen-mai__cta-bottom-content {
        padding: 0 15px !important;
    }
}