/* General styles for .page-khuyen-mai */
.page-khuyen-mai {
    font-family: Arial, sans-serif;
    color: #333333; /* Default text color for light body background */
    line-height: 1.6;
    background-color: #F5F7FA; /* Page specific background */
}

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

.page-khuyen-mai__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #E53935;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.page-khuyen-mai__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

/* Hero Section */
.page-khuyen-mai__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding as body handles header offset */
    margin-bottom: 40px;
    overflow: hidden;
}

.page-khuyen-mai__hero-image-wrapper {
    width: 100%;
    height: auto;
    max-height: 600px; /* Limit hero image height */
    overflow: hidden;
}

.page-khuyen-mai__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.page-khuyen-mai__hero-content {
    padding: 40px 20px;
    text-align: center;
    background: #ffffff; /* White background for content below image */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: -60px auto 0 auto; /* Overlap slightly with the image for visual effect */
    position: relative;
    z-index: 1;
    border-radius: 10px;
}

.page-khuyen-mai__main-title {
    font-weight: bold;
    color: #E53935;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-size: clamp(2em, 4vw, 3em); 
}

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

/* Buttons */
.page-khuyen-mai__cta-button {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
}

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px rgba(229,57,53,0.3);
}

.page-khuyen-mai__btn-primary:hover {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
    box-shadow: 0 6px 15px rgba(229,57,53,0.4);
}

.page-khuyen-mai__btn-secondary {
    background: #ffffff;
    color: #E53935;
    border: 2px solid #E53935;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-khuyen-mai__btn-secondary:hover {
    background: #f0f0f0;
    color: #FF5A4F;
    border-color: #FF5A4F;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Intro Section */
.page-khuyen-mai__intro-section {
    padding: 60px 0;
    background-color: #F5F7FA;
}

/* Promotions List */
.page-khuyen-mai__promotions-list {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.page-khuyen-mai__promo-card {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-khuyen-mai__promo-card h3 {
    font-size: 1.4em;
    color: #E53935;
    padding: 20px 20px 10px;
    margin: 0;
}

.page-khuyen-mai__promo-card p {
    font-size: 1em;
    color: #333333;
    padding: 0 20px 20px;
    margin: 0;
    flex-grow: 1; /* Make description take available space */
}

.page-khuyen-mai__promo-card .page-khuyen-mai__cta-button {
    margin: 0 20px 20px;
    width: calc(100% - 40px); /* Adjust width for padding */
}

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

.page-khuyen-mai__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.page-khuyen-mai__guide-image {
    flex: 1;
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.page-khuyen-mai__guide-steps {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-khuyen-mai__step-item {
    background: #ffffff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-khuyen-mai__step-item:last-child {
    margin-bottom: 0;
}

.page-khuyen-mai__step-title {
    font-size: 1.3em;
    color: #FF5A4F;
    margin-top: 0;
    margin-bottom: 10px;
}

.page-khuyen-mai__step-item p {
    font-size: 1em;
    color: #333333;
    margin: 0;
}
.page-khuyen-mai__step-item a {
    color: #E53935;
    text-decoration: underline;
}
.page-khuyen-mai__step-item a:hover {
    color: #FF5A4F;
}

/* Terms Section */
.page-khuyen-mai__terms-section {
    padding: 60px 0;
    background-color: #E53935; /* Dark background */
    color: #ffffff; /* Light text */
}

.page-khuyen-mai__terms-section .page-khuyen-mai__section-title {
    color: #ffffff; /* White title on dark background */
}

.page-khuyen-mai__terms-section .page-khuyen-mai__text-block {
    color: #f0f0f0;
}

.page-khuyen-mai__terms-section .page-khuyen-mai__cta-button {
    margin-top: 30px;
}

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

.page-khuyen-mai__faq-list {
    margin-top: 40px;
}

.page-khuyen-mai__faq-item {
    background: #F5F7FA;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    list-style: none; /* Remove default details marker */
}

.page-khuyen-mai__faq-item summary::-webkit-details-marker,
.page-khuyen-mai__faq-item summary::marker {
  display: none;
  content: "";
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-question {
    background-color: #e0e0e0;
    border-bottom: none;
}

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

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

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

.page-khuyen-mai__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    color: #333333;
    background-color: #F5F7FA;
}

/* Final CTA Section */
.page-khuyen-mai__cta-final {
    padding: 80px 0;
    background-color: #E53935; /* Dark background */
    color: #ffffff; /* Light text */
    text-align: center;
}

.page-khuyen-mai__cta-final .page-khuyen-mai__section-title {
    color: #ffffff;
    margin-bottom: 20px;
}

.page-khuyen-mai__cta-final .page-khuyen-mai__text-block {
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-khuyen-mai__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* --- REQUIRED HOMEPAGE MODULE CSS BLOCKS (even if not used in this page's HTML) --- */
/* These styles are included as per strict instructions for CSS completeness */

.page-khuyen-mai__home-content {
    border: 1px solid #FBB00D;
    border-radius: 10px;
    height: 650px;
    overflow-y: auto;
    padding: 20px; /* Added padding for content */
}

.page-khuyen-mai__row-games,
.page-khuyen-mai__row-sport,
.page-khuyen-mai__row-coop {
    background-color: #1A202C;
    padding: 40px 20px;
    max-width: 1330px;
    margin: 0 auto;
}

.page-khuyen-mai__games-title,
.page-khuyen-mai__sport-title,
.page-khuyen-mai__coop-title {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.page-khuyen-mai__slider-wrapper {
    overflow: hidden;
    position: relative;
    margin-top: 20px;
    padding: 10px 0;
}

.page-khuyen-mai__slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    transition: transform 0.5s ease-in-out;
}

.page-khuyen-mai__game-slide {
    flex: 0 0 200px;
    max-width: 200px;
    background: #2D3748;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    text-align: center;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.page-khuyen-mai__game-slide img {
    width: 100%;
     /* Fixed height for game images */
    object-fit: cover;
    border-bottom: 1px solid #4A5568;
}
.page-khuyen-mai__game-slide h4 {
    color: #fff;
    font-size: 1em;
    margin: 10px 5px 0;
    line-height: 1.3;
}
.page-khuyen-mai__game-slide .page-khuyen-mai__btn-play {
    display: block;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px auto 0;
    max-width: calc(100% - 30px);
}

.page-khuyen-mai__slider-prev, .page-khuyen-mai__slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}
.page-khuyen-mai__slider-prev { left: 10px; }
.page-khuyen-mai__slider-next { right: 10px; }


.page-khuyen-mai__banners-top-wrapper {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.page-khuyen-mai__banner-item {
    text-align: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-khuyen-mai__banner-item img {
    
    
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.page-khuyen-mai__blog-masonry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch; /* Ensures cards in the same row have equal height */
    margin-top: 40px;
}

.page-khuyen-mai__blog-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-khuyen-mai__blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.page-khuyen-mai__blog-card img {
    width: 100%;
    height: 200px; /* Fixed height for blog images */
    object-fit: cover;
    display: block;
}

.page-khuyen-mai__blog-card h3 {
    font-size: 1.4em;
    color: #E53935;
    padding: 20px 20px 10px;
    margin: 0;
}

.page-khuyen-mai__blog-card p {
    font-size: 1em;
    color: #333333;
    padding: 0 20px 20px;
    margin: 0;
    flex-grow: 1;
}

.page-khuyen-mai__btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #E53935;
    color: #E53935;
    background: transparent;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin: 0 20px 20px;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto; /* Pushes button to the bottom */
}

.page-khuyen-mai__btn-outline:hover {
    background: #E53935;
    color: #ffffff;
}

.page-khuyen-mai__blog-slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
}

.page-khuyen-mai__blog-slide {
    flex: 0 0 calc(33.333% - 14px); /* Approx 3 items with gap */
    max-width: calc(33.333% - 14px);
    /* Inherits card styles */
}

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

    .page-khuyen-mai__hero-content {
        padding: 30px 15px;
        margin-top: -40px;
    }

    .page-khuyen-mai__main-title {
        font-size: clamp(1.8em, 3.5vw, 2.5em);
    }

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

    .page-khuyen-mai__content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .page-khuyen-mai__guide-image {
        max-width: 80%;
        margin-bottom: 30px;
    }

    .page-khuyen-mai__guide-steps {
        width: 100%;
    }

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

    .page-khuyen-mai__button-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-khuyen-mai__button-group .page-khuyen-mai__cta-button {
        max-width: 300px;
        width: 100%;
    }

    /* Required Homepage Modules for 1024px */
    .page-khuyen-mai__slider-track {
        gap: 12px;
    }
    .page-khuyen-mai__game-slide {
        flex: 0 0 180px;
        max-width: 180px;
    }
    .page-khuyen-mai__banners-top-wrapper {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .page-khuyen-mai__blog-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .page-khuyen-mai__blog-slide {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .page-khuyen-mai {
        font-size: 16px;
        line-height: 1.6;
    }

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

    /* HERO 主图区域 */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Fixed top padding */
        margin-bottom: 20px;
    }
    .page-khuyen-mai__hero-image-wrapper {
        max-height: 300px;
    }
    .page-khuyen-mai__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__hero-content {
        padding: 20px 15px;
        margin: -30px auto 0 auto;
        max-width: calc(100% - 30px);
    }
    .page-khuyen-mai__main-title {
        font-size: clamp(1.5em, 6vw, 2em); /* Adjusted clamp for mobile */
    }
    .page-khuyen-mai__hero-description {
        font-size: 1em;
    }

    /* 通用图片与容器 */
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-khuyen-mai__section,
    .page-khuyen-mai__card,
    .page-khuyen-mai__container,
    .page-khuyen-mai__content-wrapper,
    .page-khuyen-mai__grid-cards,
    .page-khuyen-mai__promo-card,
    .page-khuyen-mai__how-to-claim,
    .page-khuyen-mai__terms-section,
    .page-khuyen-mai__faq-section,
    .page-khuyen-mai__cta-final {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    /* 卡片布局图片要求 */
    .page-khuyen-mai__card-image {
        height: 180px; /* Adjust height for smaller screens */
    }
    .page-khuyen-mai__promo-card h3 {
        font-size: 1.2em;
        padding: 15px 15px 5px;
    }
    .page-khuyen-mai__promo-card p {
        padding: 0 15px 15px;
    }
    .page-khuyen-mai__promo-card .page-khuyen-mai__cta-button {
        margin: 0 15px 15px;
        width: calc(100% - 30px);
    }

    /* How to Claim */
    .page-khuyen-mai__guide-image {
        max-width: 100%;
    }
    .page-khuyen-mai__guide-steps {
        padding-left: 0;
    }
    .page-khuyen-mai__step-item {
        padding: 20px;
    }
    .page-khuyen-mai__step-title {
        font-size: 1.1em;
    }

    /* 按钮与按钮容器 */
    .page-khuyen-mai__cta-button,
    .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;
        padding-right: 15px;
        font-size: 1em; /* Smaller font size for mobile buttons */
    }

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

    /* FAQ */
    .page-khuyen-mai__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-khuyen-mai__faq-answer {
        padding: 10px 20px 15px;
    }
    .page-khuyen-mai__faq-qtext {
        font-size: 1em;
    }
    .page-khuyen-mai__faq-toggle {
        font-size: 1.2em;
    }

    /* --- REQUIRED HOMEPAGE MODULE CSS BLOCKS for 768px --- */
    /* These styles are included as per strict instructions for CSS completeness */

    /* 長文金框區 */
    .page-khuyen-mai__home-content {
        height: auto;
        overflow-y: visible;
        padding: 15px;
    }
    .page-khuyen-mai__home-content h2 {
        font-size: 1.5em;
    }

    /* 遊戲輪播 */
    .page-khuyen-mai__slider-wrapper {
        padding: 0;
    }
    .page-khuyen-mai__slider-track {
        display: flex;
        gap: 10px;
        padding: 0 15px;
    }
    .page-khuyen-mai__game-slide {
        flex: 0 0 160px;
        max-width: 160px;
    }
    .page-khuyen-mai__slider-prev, .page-khuyen-mai__slider-next {
        width: 30px;
        height: 30px;
        font-size: 1.2em;
        left: 5px;
        right: 5px;
    }

    /* 合作品牌六宮格 */
    .page-khuyen-mai__banners-top-wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        padding: 15px;
    }
    .page-khuyen-mai__banner-item img {
        
        
    }

    /* 博客卡片區 */
    .page-khuyen-mai__blog-masonry {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    .page-khuyen-mai__blog-card-link {
        height: auto;
    }
    .page-khuyen-mai__blog-card img {
        
    }
    .page-khuyen-mai__blog-slide {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px;
    }
}