/* style/khuyen-mai.css */

/* Base styles for the page */
.page-khuyen-mai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #FFF6D6; /* Main text color on dark background */
    background-color: #0A0A0A; /* Overall background */
}

/* Container for main content width */
.page-khuyen-mai__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Top Section - Hero like area */
.page-khuyen-mai__top-section {
    padding-top: 10px; /* Small top padding as body handles header offset */
    padding-bottom: 40px;
    text-align: center;
    background-color: #0A0A0A; /* Ensure consistent background */
}

.page-khuyen-mai__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: 700;
    color: #F2C14E; /* Brand color for main title */
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 211, 107, 0.4); /* Subtle glow */
}

.page-khuyen-mai__intro-text {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #FFF6D6;
}

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

/* General Button Styles */
.page-khuyen-mai__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 100%; /* Ensure button fits container */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    text-align: center;
}

.page-khuyen-mai__btn--primary {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Custom button gradient */
    color: #111111; /* Dark text for bright button */
    border: none;
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

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

.page-khuyen-mai__btn--secondary {
    background: transparent;
    color: #F2C14E; /* Brand color for text */
    border: 2px solid #F2C14E; /* Brand color for border */
    box-shadow: 0 2px 10px rgba(242, 193, 78, 0.2);
}

.page-khuyen-mai__btn--secondary:hover {
    background: #F2C14E;
    color: #111111;
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-khuyen-mai__btn--small {
    padding: 8px 18px;
    font-size: 0.9rem;
    border-radius: 5px;
}

/* General Section Styles */
.page-khuyen-mai__section {
    padding: 60px 0;
    border-bottom: 1px solid #3A2A12; /* Border from custom colors */
}

.page-khuyen-mai__section:last-of-type {
    border-bottom: none;
}

.page-khuyen-mai__dark-bg {
    background-color: #0A0A0A; /* Explicitly set for sections that might not inherit */
    color: #FFF6D6; /* Ensure text is light on dark */
}

.page-khuyen-mai__section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    color: #FFD36B; /* Auxiliary brand color for section titles */
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.page-khuyen-mai__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #F2C14E, transparent);
    border-radius: 2px;
}

.page-khuyen-mai__text-block {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #FFF6D6;
    text-align: justify;
}

.page-khuyen-mai__text-block a {
    color: #F2C14E; /* Brand color for links */
    text-decoration: none;
    border-bottom: 1px solid #F2C14E;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.page-khuyen-mai__text-block a:hover {
    color: #FFD36B;
    border-color: #FFD36B;
}

/* Images and Figures */
.page-khuyen-mai__figure {
    margin: 30px auto;
    text-align: center;
    max-width: 800px; /* Max width for content images */
}

.page-khuyen-mai__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    margin: 0 auto;
}

.page-khuyen-mai__figcaption {
    font-size: 0.9rem;
    color: #FFD36B;
    margin-top: 10px;
    text-align: center;
}

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

.page-khuyen-mai__promo-card {
    background-color: #111111; /* Card background color */
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #3A2A12; /* Border from custom colors */
    display: flex;
    flex-direction: column;
}

.page-khuyen-mai__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.page-khuyen-mai__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.page-khuyen-mai__card-title {
    font-size: 1.4rem;
    color: #F2C14E;
    margin-bottom: 15px;
    flex-grow: 1; /* Allow title to take available space */
}

.page-khuyen-mai__card-description {
    font-size: 0.95rem;
    color: #FFF6D6;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
}

/* List styles */
.page-khuyen-mai__list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.page-khuyen-mai__list-item {
    background-color: #111111;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 15px;
    border-left: 5px solid #F2C14E;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-khuyen-mai__list-title {
    font-size: 1.3rem;
    color: #FFD36B;
    margin-bottom: 10px;
}

.page-khuyen-mai__list-description {
    font-size: 0.95rem;
    color: #FFF6D6;
}

.page-khuyen-mai__note-text {
    font-size: 0.9rem;
    color: #FFD36B;
    text-align: center;
    margin-top: 30px;
}

/* Guide List (Ordered List) */
.page-khuyen-mai__guide-list {
    list-style: none;
    padding: 0;
    margin: 40px 0;
    counter-reset: guide-step;
}

.page-khuyen-mai__guide-item {
    background-color: #111111;
    border-radius: 10px;
    padding: 25px 30px 25px 70px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #3A2A12;
}

.page-khuyen-mai__guide-item::before {
    counter-increment: guide-step;
    content: counter(guide-step);
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #111111;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.page-khuyen-mai__guide-step-title {
    font-size: 1.3rem;
    color: #F2C14E;
    margin-bottom: 8px;
}

.page-khuyen-mai__guide-step-description {
    font-size: 0.95rem;
    color: #FFF6D6;
}

/* Terms List (Unordered List) */
.page-khuyen-mai__terms-list {
    list-style: disc;
    padding-left: 25px;
    margin: 30px 0;
    color: #FFF6D6;
}

.page-khuyen-mai__terms-item {
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Advantages List (Unordered List) */
.page-khuyen-mai__advantages-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-khuyen-mai__advantages-item {
    background-color: #111111;
    border-radius: 10px;
    padding: 25px;
    border-top: 5px solid #FFD36B;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.page-khuyen-mai__advantages-title {
    font-size: 1.3rem;
    color: #F2C14E;
    margin-bottom: 10px;
}

.page-khuyen-mai__advantages-description {
    font-size: 0.95rem;
    color: #FFF6D6;
}

/* CTA at the bottom of sections */
.page-khuyen-mai__cta-bottom,
.page-khuyen-mai__cta-final {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-khuyen-mai__container {
        padding: 15px;
    }

    .page-khuyen-mai__section {
        padding: 50px 0;
    }

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

    .page-khuyen-mai__section-title {
        font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    }

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

    .page-khuyen-mai__guide-item {
        padding: 20px 25px 20px 60px;
    }

    .page-khuyen-mai__guide-item::before {
        left: 20px;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* 1. Top section title + CTA */
    .page-khuyen-mai__top-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 30px;
    }

    .page-khuyen-mai__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-khuyen-mai__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 10px;
    }

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

    .page-khuyen-mai__top-cta {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-khuyen-mai__btn {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 2. Single column long text container */
    .page-khuyen-mai__section {
        padding: 40px 0;
    }

    .page-khuyen-mai__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 20px;
    }

    .page-khuyen-mai__text-block {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    /* 3. Generic images and figures */
    .page-khuyen-mai__figure {
        margin: 20px auto;
    }

    .page-khuyen-mai__image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-khuyen-mai__figcaption {
        font-size: 0.85rem;
    }
    
    .page-khuyen-mai__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Allow height to adjust */
        box-sizing: border-box !important;
    }

    /* 4. Buttons and button containers */
    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }
    
    .page-khuyen-mai__promo-card {
        padding: 20px;
    }

    .page-khuyen-mai__card-title {
        font-size: 1.2rem;
    }

    .page-khuyen-mai__card-description {
        font-size: 0.9rem;
    }

    .page-khuyen-mai__list-item,
    .page-khuyen-mai__guide-item,
    .page-khuyen-mai__advantages-item {
        padding: 20px; /* Adjust padding for smaller screens */
        padding-left: 60px; /* Keep space for step number */
    }

    .page-khuyen-mai__list-title,
    .page-khuyen-mai__guide-step-title,
    .page-khuyen-mai__advantages-title {
        font-size: 1.1rem;
    }

    .page-khuyen-mai__list-description,
    .page-khuyen-mai__guide-step-description,
    .page-khuyen-mai__advantages-description {
        font-size: 0.9rem;
    }

    .page-khuyen-mai__guide-item::before {
        left: 15px;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .page-khuyen-mai__cta-bottom,
    .page-khuyen-mai__cta-final {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    /* Ensure all containing elements have correct mobile width */
    .page-khuyen-mai__section,
    .page-khuyen-mai__promo-grid,
    .page-khuyen-mai__list,
    .page-khuyen-mai__guide-list,
    .page-khuyen-mai__terms-list,
    .page-khuyen-mai__advantages-list,
    .page-khuyen-mai__cta-bottom,
    .page-khuyen-mai__cta-final {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden; /* Prevent horizontal scroll */
    }
}