/* style/khuyen-mai.css */

/* Custom CSS Variables for Color Palette */
:root {
    --main-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient-start: #2AD16F;
    --button-gradient-end: #13994A;
    --card-bg: #11271B;
    --background-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
    /* RGB for shadows/opacity */
    --main-color-rgb: 17, 168, 78;
    --glow-color-rgb: 87, 227, 141;
}

/* Base Styles */
.page-khuyen-mai {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--background-color);
}

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

/* Hero Section */
.page-khuyen-mai__hero-section {
    padding-top: 10px; /* Small top padding as per rule */
    padding-bottom: 80px;
    background-color: var(--background-color);
}

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

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

.page-khuyen-mai__hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-khuyen-mai__hero-description {
    font-size: 1.125rem; /* 18px */
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

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

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: var(--text-main);
    border: none;
    box-shadow: 0 4px 15px rgba(var(--main-color-rgb), 0.4);
}

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

.page-khuyen-mai__btn-secondary {
    background-color: transparent;
    color: var(--glow-color); /* Using glow color for secondary button text */
    border: 2px solid var(--border-color);
}

.page-khuyen-mai__btn-secondary:hover {
    background-color: rgba(var(--main-color-rgb), 0.1);
    transform: translateY(-2px);
}

.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;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: block; /* Ensure it behaves as a block element */
}

/* Section Titles */
.page-khuyen-mai__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem); /* Responsive H2 font size */
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-main);
    line-height: 1.3;
}

.page-khuyen-mai__section-description {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: var(--text-secondary);
}

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

.page-khuyen-mai__promo-cards {
    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 5px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    border: 1px solid var(--divider-color);
}

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

.page-khuyen-mai__card-media {
    width: 100%;
    height: 220px; /* Fixed height for consistent card image appearance */
    overflow: hidden;
}

.page-khuyen-mai__card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.page-khuyen-mai__promo-card:hover .page-khuyen-mai__card-media img {
    transform: scale(1.05);
}

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

.page-khuyen-mai__card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-khuyen-mai__card-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-khuyen-mai__card-button {
    margin-top: auto; /* Push button to bottom */
    width: 100%;
}

/* How To Claim Section */
.page-khuyen-mai__how-to-claim-section {
    padding: 80px 0;
    background-color: var(--background-color);
}

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

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

.page-khuyen-mai__step-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--glow-color) 0%, var(--deep-green) 100%);
    color: var(--text-main);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(var(--glow-color-rgb), 0.5);
}

.page-khuyen-mai__step-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.page-khuyen-mai__step-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

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

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

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

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

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--deep-green); /* Slightly different background for question */
    color: var(--text-main);
    list-style: none; /* Hide default marker for details */
}

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

.page-khuyen-mai__faq-qtext {
    flex-grow: 1;
    color: var(--text-main);
}

.page-khuyen-mai__faq-toggle {
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
    margin-left: 15px;
    color: var(--glow-color);
}

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

.page-khuyen-mai__faq-answer p {
    margin: 0;
    color: var(--text-secondary);
}

/* Responsive Styles for 1024px */
@media (max-width: 1024px) {
    .page-khuyen-mai__hero-title {
        font-size: 2.8rem;
    }
    .page-khuyen-mai__section-title {
        font-size: 2.2rem;
    }
    .page-khuyen-mai__hero-container {
        flex-direction: column-reverse; /* Image above content on smaller screens */
        text-align: center;
    }
    .page-khuyen-mai__hero-content {
        text-align: center;
    }
    .page-khuyen-mai__cta-buttons {
        justify-content: center;
    }
}

/* Responsive Styles for 768px (Mobile) - MUST BE COMPLETE */
@media (max-width: 768px) {
    /* HERO Section */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Fixed header spacing, small top padding */
        padding-bottom: 60px;
    }
    .page-khuyen-mai__hero-container {
        padding: 30px 15px;
        gap: 30px;
    }
    .page-khuyen-mai__hero-title {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    .page-khuyen-mai__hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    .page-khuyen-mai__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        padding: 0 15px;
    }
    .page-khuyen-mai__btn-primary,
    .page-khuyen-mai__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-khuyen-mai__hero-image {
        min-width: unset;
        order: -1; /* Image always above content on mobile */
    }
    .page-khuyen-mai__hero-side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Promo Grid Section */
    .page-khuyen-mai__promo-grid-section {
        padding: 40px 0;
    }
    .page-khuyen-mai__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-khuyen-mai__section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    .page-khuyen-mai__section-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    .page-khuyen-mai__promo-cards {
        grid-template-columns: 1fr; /* Single column for cards */
        gap: 20px;
    }
    .page-khuyen-mai__promo-card {
        padding-bottom: 0;
    }
    .page-khuyen-mai__card-media {
        height: 180px; /* Adjust card image height */
    }
    .page-khuyen-mai__card-media img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__card-content {
        padding: 20px;
    }
    .page-khuyen-mai__card-title {
        font-size: 1.2rem;
    }
    .page-khuyen-mai__card-text {
        font-size: 0.9rem;
    }

    /* How To Claim Section */
    .page-khuyen-mai__how-to-claim-section {
        padding: 60px 0;
    }
    .page-khuyen-mai__steps {
        grid-template-columns: 1fr; /* Single column for steps */
        gap: 20px;
        margin-top: 30px;
    }
    .page-khuyen-mai__step-item {
        padding: 25px;
    }
    .page-khuyen-mai__step-number {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    .page-khuyen-mai__step-title {
        font-size: 1.1rem;
    }
    .page-khuyen-mai__step-description {
        font-size: 0.9rem;
    }
    .page-khuyen-mai__cta-buttons--center {
        margin-top: 40px;
    }

    /* FAQ Section */
    .page-khuyen-mai__faq-section {
        padding: 60px 0;
    }
    .page-khuyen-mai__faq-list {
        margin-top: 30px;
    }
    .page-khuyen-mai__faq-item {
        margin-bottom: 10px;
    }
    .page-khuyen-mai__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    .page-khuyen-mai__faq-toggle {
        font-size: 1.5rem;
    }
    .page-khuyen-mai__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.9rem;
    }

    /* General image and container responsiveness */
    .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;
    }
}