/* style/khuyen-mai.css */

/* Variables and Base Styles */
:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --card-bg: #10233F;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy: #08162B; /* body background from shared.css */
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

.page-khuyen-mai {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Default text color for the page */
    background-color: var(--deep-navy); /* Ensure consistency with body background */
}

.page-khuyen-mai__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}

.page-khuyen-mai__section-title {
    font-size: 2.5em;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.page-khuyen-mai__text-block {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Buttons */
.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* For responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-khuyen-mai__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__btn-secondary {
    background-color: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
}

.page-khuyen-mai__btn-secondary:hover {
    background-color: var(--gold-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--gold-color), 0.3);
}

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

/* Images */
.page-khuyen-mai img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Default for most images */
}

/* 1. Hero Section */
.page-khuyen-mai__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    margin-bottom: 50px;
    background-color: var(--deep-navy); /* Match body background */
}

.page-khuyen-mai__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-khuyen-mai__hero-image {
    width: 100%;
    height: 600px; /* Fixed height for desktop for visual impact */
    object-fit: cover; /* Default cover for desktop */
    border-radius: 10px;
    margin-bottom: 30px;
}

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

.page-khuyen-mai__main-title {
    font-size: clamp(2.5em, 4vw, 3.5em); /* Responsive font size for H1 */
    color: var(--gold-color);
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 1px;
}

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

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

/* 2. Introduction Section */
.page-khuyen-mai__introduction-section {
    margin-bottom: 60px;
    padding: 40px 0;
    background-color: var(--deep-navy);
}

/* 3. Promotions List */
.page-khuyen-mai__promotions-list {
    padding: 60px 0;
    background-color: var(--deep-navy);
}

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

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

.page-khuyen-mai__promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-color);
}

.page-khuyen-mai__promo-image {
    width: 100%;
    height: 250px; /* Consistent image height for cards */
    object-fit: cover;
}

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

.page-khuyen-mai__card-title {
    font-size: 1.5em;
    color: var(--gold-color);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.page-khuyen-mai__card-description {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.page-khuyen-mai__steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.page-khuyen-mai__step-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    text-align: center;
}

.page-khuyen-mai__step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__step-title {
    font-size: 1.6em;
    color: var(--gold-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-khuyen-mai__step-description {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.6;
}

.page-khuyen-mai__step-description a {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-khuyen-mai__step-description a:hover {
    color: var(--gold-color);
}

.page-khuyen-mai__cta-section {
    text-align: center;
    margin-top: 40px;
}

.page-khuyen-mai__cta-text {
    font-size: 1.5em;
    color: var(--gold-color);
    margin-bottom: 25px;
    font-weight: 600;
}

/* 5. Terms and Conditions */
.page-khuyen-mai__terms-conditions {
    padding: 60px 0;
    background-color: var(--deep-navy);
}

.page-khuyen-mai__terms-list {
    list-style: disc;
    padding-left: 30px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.page-khuyen-mai__terms-item {
    font-size: 1em;
    line-height: 1.8;
    margin-bottom: 10px;
}

.page-khuyen-mai__terms-conditions a {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-khuyen-mai__terms-conditions a:hover {
    color: var(--gold-color);
}

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

.page-khuyen-mai__faq-list {
    max-width: 800px;
    margin: 0 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;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--gold-color);
    list-style: none; /* Hide default marker */
    transition: background-color 0.3s ease;
}

.page-khuyen-mai__faq-item summary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

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

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

.page-khuyen-mai__faq-toggle {
    font-size: 1.5em;
    font-weight: 700;
    margin-left: 15px;
    color: var(--secondary-color);
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
    color: var(--gold-color);
}

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

/* --- Responsive Styles --- */

/* Tablet and Mobile */
@media (max-width: 1024px) {
    .page-khuyen-mai__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-khuyen-mai__hero-image {
        height: 450px;
    }

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

    .page-khuyen-mai__hero-description {
        font-size: 1.1em;
    }

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

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

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

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

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

    .page-khuyen-mai__faq-item summary {
        font-size: 1.1em;
        padding: 18px 20px;
    }
    .page-khuyen-mai__faq-answer {
        padding: 0 20px 18px;
    }
}


/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* General styles for mobile */
    .page-khuyen-mai__container {
        padding: 15px;
    }

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

    .page-khuyen-mai p,
    .page-khuyen-mai li {
        font-size: 0.95em;
        line-height: 1.6;
    }

    /* 1. Hero Section Mobile */
    .page-khuyen-mai__hero-section {
        flex-direction: column;
        padding-top: 10px !important; /* Small top padding for mobile */
        margin-bottom: 40px;
    }

    .page-khuyen-mai__hero-image-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }

    .page-khuyen-mai__hero-image {
        height: auto !important; /* Auto height for mobile */
        object-fit: contain !important; /* IMPORTANT: Contain for mobile, no cropping */
        aspect-ratio: unset !important; /* IMPORTANT: Unset aspect ratio */
        max-height: none !important; /* IMPORTANT: No max height */
        border-radius: 0 !important; /* Remove border-radius for full width image */
        margin-bottom: 20px;
    }

    .page-khuyen-mai__hero-content {
        padding: 0 15px;
    }

    .page-khuyen-mai__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em); /* Smaller H1 for mobile */
        margin-bottom: 15px;
        letter-spacing: 0.5px;
    }

    .page-khuyen-mai__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-khuyen-mai__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Buttons 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; /* Ensure padding for full width buttons */
        padding-right: 15px;
    }

    /* 3. Promotions List Mobile */
    .page-khuyen-mai__promotions-list {
        padding: 40px 0;
    }

    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr; /* Single column for cards */
        gap: 25px;
    }

    .page-khuyen-mai__promo-card {
        margin-left: 15px;
        margin-right: 15px;
        box-sizing: border-box;
    }

    .page-khuyen-mai__promo-image {
        height: 180px; /* Slightly smaller image height for mobile cards */
    }

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

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

    .page-khuyen-mai__card-description {
        font-size: 0.95em;
        margin-bottom: 15px;
    }

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

    .page-khuyen-mai__steps-list {
        grid-template-columns: 1fr; /* Single column for steps */
        gap: 25px;
        margin-bottom: 40px;
    }

    .page-khuyen-mai__step-item {
        padding: 25px;
        margin-left: 15px;
        margin-right: 15px;
        box-sizing: border-box;
    }

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

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

    /* 5. Terms and Conditions Mobile */
    .page-khuyen-mai__terms-conditions {
        padding: 40px 0;
    }

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

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

    .page-khuyen-mai__faq-list {
        margin-left: 15px;
        margin-right: 15px;
        box-sizing: border-box;
    }

    .page-khuyen-mai__faq-item summary {
        font-size: 1em;
        padding: 15px 20px;
    }

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

    /* General image and container rules for mobile */
    .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,
    .page-khuyen-mai__promo-card,
    .page-khuyen-mai__step-item,
    .page-khuyen-mai__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding added to individual elements above, ensure no double padding */
    }
}