/* style/khuyen-mai.css */

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

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

/* Top section styles */
.page-khuyen-mai__top-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
    text-align: center;
    background-color: #0A0A0A; /* Ensure background consistency */
}

.page-khuyen-mai__main-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem); /* Responsive H1 font size */
    color: #F2C14E; /* Main color for emphasis */
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-khuyen-mai__description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #FFF6D6; /* Text Main */
}

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

/* Button styles */
.page-khuyen-mai__btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    max-width: 100%; /* Ensure buttons don't overflow */
    box-sizing: border-box; /* Include padding in width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
    color: #ffffff; /* White text for contrast */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4); /* Glow effect */
}

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

.page-khuyen-mai__btn-secondary {
    background-color: transparent;
    color: #F2C14E; /* Main color */
    border: 2px solid #F2C14E; /* Main color border */
}

.page-khuyen-mai__btn-secondary:hover {
    background-color: #F2C14E; /* Main color background on hover */
    color: #ffffff; /* White text on hover */
    transform: translateY(-2px);
}

/* Content section styles */
.page-khuyen-mai__content-section {
    padding: 40px 0;
    background-color: #0A0A0A; /* Background */
}

.page-khuyen-mai__article-wrap {
    max-width: 900px; /* Single column long content width */
    padding: 0 20px;
    margin: 0 auto;
}

.page-khuyen-mai__section-title {
    font-size: 2rem;
    color: #F2C14E; /* Main color */
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 25px;
    line-height: 1.3;
}

.page-khuyen-mai__sub-title {
    font-size: 1.5rem;
    color: #FFD36B; /* Glow color for sub-titles */
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.page-khuyen-mai p {
    margin-bottom: 15px;
    color: #FFF6D6; /* Text Main */
}

.page-khuyen-mai strong {
    color: #F2C14E; /* Main color for strong text */
}

.page-khuyen-mai__list {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: #FFF6D6; /* Text Main */
}

.page-khuyen-mai__list-item {
    margin-bottom: 10px;
}

/* Image styles */
.page-khuyen-mai__figure {
    margin: 30px 0;
    text-align: center;
    background-color: #111111; /* Card BG */
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #3A2A12; /* Border */
}

.page-khuyen-mai__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    margin: 0 auto;
}

.page-khuyen-mai__figcaption {
    font-size: 0.9rem;
    color: #FFD36B; /* Glow color for figcaption */
    margin-top: 10px;
}

/* CTA in content */
.page-khuyen-mai__center-cta,
.page-khuyen-mai__step-cta {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-khuyen-mai__step-cta .page-khuyen-mai__btn {
    min-width: 250px;
}

/* FAQ styles */
.page-khuyen-mai__faq-list {
    margin-top: 30px;
}

.page-khuyen-mai__faq-item {
    background-color: #111111; /* Card BG */
    border: 1px solid #3A2A12; /* Border */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #F2C14E; /* Main color */
    cursor: pointer;
    background-color: #1a1a1a; /* Slightly lighter background for question */
    user-select: none;
}

.page-khuyen-mai__faq-question::-webkit-details-marker {
    display: none;
}
.page-khuyen-mai__faq-question::marker {
    display: none;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
}

.page-khuyen-mai__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    color: #FFF6D6; /* Text Main */
    line-height: 1.7;
}

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

/* Bottom CTA */
.page-khuyen-mai__cta-bottom {
    display: flex;
    flex-direction: row; /* Default to row for wider screens */
    gap: 15px;
    justify-content: center;
    align-items: center; /* Center items */
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px dashed #3A2A12; /* Border */
}


/* --- Responsive Styles (Max-width Breakpoints) --- */

/* @media (max-width: 1024px) for Tablets */
@media (max-width: 1024px) {
    .page-khuyen-mai__main-title {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }

    .page-khuyen-mai__description {
        font-size: 1rem;
        padding: 0 10px;
    }

    .page-khuyen-mai__article-wrap {
        padding: 0 15px;
    }

    .page-khuyen-mai__section-title {
        font-size: 1.8rem;
    }

    .page-khuyen-mai__sub-title {
        font-size: 1.3rem;
    }

    .page-khuyen-mai__btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    .page-khuyen-mai__cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .page-khuyen-mai__cta-buttons .page-khuyen-mai__btn {
        width: 80%; /* Make buttons wider */
        max-width: 350px;
    }

    .page-khuyen-mai__cta-bottom {
        flex-direction: column;
        align-items: center;
    }
    
    .page-khuyen-mai__cta-bottom .page-khuyen-mai__btn {
        width: 80%; /* Make buttons wider */
        max-width: 350px;
    }
}


/* @media (max-width: 768px) for Mobile Phones */
@media (max-width: 768px) {
    /* 1. Top section title + dual CTA */
    .page-khuyen-mai__top-section {
        padding-top: 10px !important; /* Small top padding, body handles header offset */
        padding-bottom: 30px;
    }

    .page-khuyen-mai__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        margin-bottom: 15px;
        padding: 0 10px;
    }

    .page-khuyen-mai__description {
        font-size: 0.95rem;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .page-khuyen-mai__cta-buttons {
        flex-direction: column !important; /* Force column stack */
        gap: 10px;
        padding: 0 15px;
    }

    /* 4. Buttons and button containers */
    .page-khuyen-mai__btn,
    .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: 12px 15px !important;
        font-size: 0.9rem !important;
    }
    
    .page-khuyen-mai__cta-buttons,
    .page-khuyen-mai__button-group,
    .page-khuyen-mai__btn-container,
    .page-khuyen-mai__center-cta,
    .page-khuyen-mai__step-cta,
    .page-khuyen-mai__cta-bottom {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important; /* Prevent horizontal scroll */
        flex-wrap: wrap !important;
        gap: 10px !important;
        flex-direction: column !important; /* Ensure vertical stacking for groups */
    }

    /* 2. Single column long content container */
    .page-khuyen-mai__content-section {
        padding: 30px 0;
    }

    .page-khuyen-mai__article-wrap {
        padding: 0 15px !important;
    }

    .page-khuyen-mai__section-title {
        font-size: 1.6rem !important;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .page-khuyen-mai__sub-title {
        font-size: 1.2rem !important;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .page-khuyen-mai p,
    .page-khuyen-mai__list-item {
        font-size: 0.95rem;
    }

    .page-khuyen-mai__list {
        margin-left: 20px;
    }

    /* 3. General images and figure */
    .page-khuyen-mai img {
        max-width: 100% !important;
        height: auto !important;
        width: 100% !important; /* Force width 100% */
        display: block !important;
    }
    .page-khuyen-mai__figure {
        margin: 20px 0;
        padding: 10px;
    }
    .page-khuyen-mai__figcaption {
        font-size: 0.85rem;
    }

    /* 5. Registration tutorial and FAQ blocks */
    /* FAQ items already responsive with flex and details/summary */
    .page-khuyen-mai__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    .page-khuyen-mai__faq-answer {
        padding: 0 20px 15px 20px;
        font-size: 0.95rem;
    }

    .page-khuyen-mai__cta-bottom {
        padding-top: 20px;
    }
}