/* style/khuyen-mai.css */

/* Base styles for the page content */
.page-khuyen-mai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Explicitly set for contrast check */
}

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

.page-khuyen-mai__center-text {
    text-align: center;
}

.page-khuyen-mai__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand color */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-khuyen-mai__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
    background-color: #f5f5f5; /* Light background for hero */
    padding-top: 10px; /* Small top padding, shared.css handles body padding-top */
    padding-bottom: 60px;
}

.page-khuyen-mai__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    align-items: center;
    gap: 40px;
    padding: 20px 16px;
    box-sizing: border-box;
}

.page-khuyen-mai__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    color: #333333;
}

.page-khuyen-mai__hero-title {
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #017439;
    margin-bottom: 20px;
    font-size: clamp(2.2em, 4vw, 3.5em);
}

.page-khuyen-mai__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #555555;
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Ensure buttons wrap on mobile */
    margin-top: 30px;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__btn-tertiary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    min-width: 180px; /* Minimum width for desktop */
}

.page-khuyen-mai__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-khuyen-mai__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

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

.page-khuyen-mai__btn-secondary:hover {
    background-color: #017439;
    color: #FFFFFF;
}

.page-khuyen-mai__btn-tertiary {
    background-color: #017439;
    color: #FFFFFF;
    border: 2px solid #017439;
    font-size: 1em;
    padding: 10px 20px;
}

.page-khuyen-mai__btn-tertiary:hover {
    background-color: #005a2e;
    border-color: #005a2e;
}

.page-khuyen-mai__hero-image {
    flex: 1 1 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 280px;
}

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

/* Overview Section */
.page-khuyen-mai__overview-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background */
}

.page-khuyen-mai__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-khuyen-mai__dark-bg {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
}
.page-khuyen-mai__dark-bg .page-khuyen-mai__section-title,
.page-khuyen-mai__dark-bg .page-khuyen-mai__section-description,
.page-khuyen-mai__dark-bg .page-khuyen-mai__promo-title a {
    color: #ffffff;
}

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

.page-khuyen-mai__feature-item {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.page-khuyen-mai__icon-box-media {
    width: 200px; /* Fixed width */
    height: 200px; /* Fixed height for circular */
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #017439;
}

.page-khuyen-mai__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the circle */
    display: block;
    border-radius: 50%; /* Ensure image itself is circular */
}

.page-khuyen-mai__feature-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
}

.page-khuyen-mai__feature-text {
    font-size: 1em;
    color: #666666;
}

/* Categories Section */
.page-khuyen-mai__categories-section {
    padding: 60px 0;
}

.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: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    color: #333333;
}

.page-khuyen-mai__promo-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-khuyen-mai__promo-card h3 {
    padding: 15px 20px 0;
    font-size: 1.3em;
    color: #017439;
}
.page-khuyen-mai__promo-card h3 a {
    color: #017439;
    text-decoration: none;
}
.page-khuyen-mai__promo-card h3 a:hover {
    text-decoration: underline;
}

.page-khuyen-mai__promo-text {
    padding: 0 20px 15px;
    font-size: 0.95em;
    color: #666666;
    flex-grow: 1; /* Ensures text fills space */
}

.page-khuyen-mai__promo-card .page-khuyen-mai__btn-tertiary {
    margin: 0 20px 20px;
    align-self: flex-start; /* Align button to start */
}


/* How to Claim Section */
.page-khuyen-mai__how-to-claim-section {
    padding: 60px 0;
}

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

.page-khuyen-mai__step-item {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.page-khuyen-mai__step-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #017439;
    color: #FFFFFF;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
}

.page-khuyen-mai__step-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 10px;
}

.page-khuyen-mai__step-text {
    font-size: 1em;
    color: #666666;
}

.page-khuyen-mai__center-cta {
    text-align: center;
    margin-top: 50px;
}

/* FAQ Section */
.page-khuyen-mai__faq-section {
    padding: 60px 0;
    background-color: #f5f5f5;
}

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

.page-khuyen-mai__faq-item {
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden; /* For smooth transition of details content */
}

.page-khuyen-mai__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    outline: none;
    user-select: none;
    list-style: none; /* Hide default marker */
}

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

.page-khuyen-mai__faq-question {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

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

.page-khuyen-mai__faq-toggle {
    font-size: 1.5em;
    color: #017439;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-khuyen-mai__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-answer {
    max-height: 500px; /* Sufficiently large to show content */
    padding-top: 10px;
}

/* Final CTA Section */
.page-khuyen-mai__cta-section {
    padding: 60px 0;
    text-align: center;
}

/* Color contrast enforcement */
/* If body is light, text is dark (default) */
.page-khuyen-mai__card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}
.page-khuyen-mai__dark-section {
  background: #017439;
  color: #ffffff;
}
.page-khuyen-mai__btn-primary {
  background: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}
.page-khuyen-mai__btn-secondary {
  background: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

/* Responsive Styles for smaller screens */
@media (max-width: 1024px) {
    .page-khuyen-mai__hero-container {
        flex-direction: column;
        text-align: center;
    }
    .page-khuyen-mai__hero-content,
    .page-khuyen-mai__hero-image {
        flex: 1 1 100%;
        min-width: unset;
    }
    .page-khuyen-mai__hero-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-khuyen-mai__cta-buttons {
        justify-content: center;
    }
    .page-khuyen-mai__section-title {
        font-size: 2em;
    }
    .page-khuyen-mai__container {
        padding: 30px 16px;
    }
}

@media (max-width: 768px) {
    /* General content area padding */
    .page-khuyen-mai__container {
        padding: 20px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero Section */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 40px;
    }
    .page-khuyen-mai__hero-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }
    .page-khuyen-mai__hero-description {
        font-size: 1em;
    }
    .page-khuyen-mai__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
    }
    .page-khuyen-mai__btn-primary,
    .page-khuyen-mai__btn-secondary,
    .page-khuyen-mai__btn-tertiary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1em !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    .page-khuyen-mai__hero-image {
        padding: 0 15px;
    }
    .page-khuyen-mai__hero-side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Overview Section */
    .page-khuyen-mai__section-title {
        font-size: 1.8em;
    }
    .page-khuyen-mai__section-description {
        font-size: 0.95em;
    }
    .page-khuyen-mai__features-grid,
    .page-khuyen-mai__promo-grid,
    .page-khuyen-mai__steps-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }
    .page-khuyen-mai__feature-item,
    .page-khuyen-mai__promo-card,
    .page-khuyen-mai__step-item {
        padding: 15px;
    }

    /* Module 1 circular images */
    .page-khuyen-mai__icon-box-media {
        width: 120px; /* Smaller circular image */
        height: 120px;
        border-width: 2px;
    }
    .page-khuyen-mai__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    .page-khuyen-mai__feature-title {
        font-size: 1.2em;
    }
    .page-khuyen-mai__feature-text {
        font-size: 0.9em;
    }

    /* Promo Cards */
    .page-khuyen-mai__promo-image {
        max-width: 100% !important;
        width: 100% !important;
        height: 150px !important; /* Adjust height for mobile */
    }
    .page-khuyen-mai__promo-card h3 {
        font-size: 1.1em;
        padding: 10px 15px 0;
    }
    .page-khuyen-mai__promo-text {
        font-size: 0.85em;
        padding: 0 15px 10px;
    }
    .page-khuyen-mai__promo-card .page-khuyen-mai__btn-tertiary {
        margin: 0 15px 15px;
        width: calc(100% - 30px); /* Adjust for padding */
    }

    /* How to Claim Section */
    .page-khuyen-mai__step-number {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
    }
    .page-khuyen-mai__step-title {
        font-size: 1.3em;
    }
    .page-khuyen-mai__step-text {
        font-size: 0.9em;
    }
    .page-khuyen-mai__center-cta {
        margin-top: 30px;
    }

    /* FAQ Section */
    .page-khuyen-mai__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-khuyen-mai__faq-qtext {
        font-size: 1em;
    }
    .page-khuyen-mai__faq-toggle {
        font-size: 1.3em;
    }
    .page-khuyen-mai__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.9em;
    }
    .page-khuyen-mai__faq-list {
        margin-top: 20px;
    }

    /* Universal image responsive for content area */
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    /* Specific override for circular images to maintain aspect ratio */
    .page-khuyen-mai__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}