/* style/khuyen-mai.css */

/* Base styles for the page */
.page-khuyen-mai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color, #FFF5E1); /* Default to light text, assuming dark background from shared.css */
    background: var(--background-color, #B71C1C); /* Use brand background color if shared doesn't define */
    padding-bottom: 40px; /* Ensure some space above the footer */
}

/* Hero Section */
.page-khuyen-mai__hero-section {
    position: relative;
    overflow: hidden;
    padding-top: 10px; /* Per instruction, small top padding */
    padding-bottom: 40px;
    display: flex;
    flex-direction: column; /* Ensure image is above content */
    align-items: center;
    text-align: center;
}

.page-khuyen-mai__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

.page-khuyen-mai__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Consistent with wrapper */
}

.page-khuyen-mai__hero-content {
    max-width: 900px;
    padding: 0 20px;
    z-index: 1;
    position: relative;
    color: var(--text-main-color, #FFF5E1); /* Ensure contrast */
}

.page-khuyen-mai__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__hero-description {
    font-size: 1.15rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

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

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button color */
    color: #7A0E0E; /* Deep Red text for contrast on gold button */
    border: 2px solid #F4D34D; /* Gold border */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.page-khuyen-mai__btn-primary:hover {
    background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}

.page-khuyen-mai__btn-secondary {
    background: transparent;
    color: #FFF5E1; /* Main text color */
    border: 2px solid #F2B544; /* Border color */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.page-khuyen-mai__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}

/* General Section Styles */
.page-khuyen-mai__section {
    padding: 60px 0;
    position: relative;
}

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

.page-khuyen-mai__section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: #F4D34D; /* Gold color for section titles */
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.page-khuyen-mai__text-block {
    font-size: 1.05rem;
    margin-bottom: 20px;
    text-align: justify;
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__highlight {
    color: #F4D34D; /* Gold for highlights */
    font-weight: bold;
}

/* Promo Types Section (Cards) */
.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: var(--card-bg-color, #D32F2F); /* Card background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color, #F2B544); /* Border color */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-main-color, #FFF5E1);
}

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

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

.page-khuyen-mai__card-title {
    font-size: 1.4rem;
    font-weight: bold;
    padding: 20px 25px 10px;
    color: #F4D34D; /* Gold for card titles */
}

.page-khuyen-mai__card-description {
    font-size: 1rem;
    padding: 0 25px 15px;
    flex-grow: 1; /* Make description take available space */
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__card-list {
    list-style: none;
    padding: 0 25px 15px;
    margin: 0;
}

.page-khuyen-mai__card-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__card-list li::before {
    content: '✅';
    position: absolute;
    left: 0;
    color: #FFD86A; /* Gold checkmark */
}

.page-khuyen-mai__btn-card {
    margin: 0 25px 25px;
    padding: 12px 20px;
    font-size: 0.95rem;
    width: calc(100% - 50px); /* Adjust width to fit padding */
}

/* Terms & Conditions Section */
.page-khuyen-mai__info-card {
    background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for info cards */
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__info-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #F4D34D; /* Gold for info card titles */
}

.page-khuyen-mai__info-card-text {
    font-size: 1rem;
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__text-small {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.7);
}

/* How To Claim Section */
.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 {
    background: var(--card-bg-color, #D32F2F);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color, #F2B544);
    color: var(--text-main-color, #FFF5E1);
}

.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, #FFD86A 0%, #E6B800 100%);
    color: #7A0E0E; /* Deep Red text on gold circle */
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.page-khuyen-mai__step-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #F4D34D; /* Gold for step titles */
}

.page-khuyen-mai__step-description {
    font-size: 0.95rem;
    color: var(--text-main-color, #FFF5E1);
}

.page-khuyen-mai__cta-wrapper {
    text-align: center;
    margin-top: 50px;
}

.page-khuyen-mai__btn-large {
    padding: 16px 35px;
    font-size: 1.1rem;
}

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

.page-khuyen-mai__faq-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    overflow: hidden; /* For smooth transition of details */
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    color: #F4D34D; /* Gold for FAQ questions */
    position: relative;
    list-style: none; /* Remove default summary marker */
}

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

.page-khuyen-mai__faq-qtext {
    flex-grow: 1;
    text-align: left;
}

.page-khuyen-mai__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
    color: #FFF5E1; /* Light text for toggle */
}

.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;
    font-size: 1rem;
    color: var(--text-main-color, #FFF5E1);
    line-height: 1.7;
}

.page-khuyen-mai__faq-answer p {
    margin-bottom: 10px;
}

/* Call to Action Section (Final) */
.page-khuyen-mai__call-to-action {
    background: var(--deep-red-color, #7A0E0E); /* Deep red background for final CTA */
    padding: 70px 0;
    text-align: center;
    border-top: 2px solid var(--border-color, #F2B544);
}

.page-khuyen-mai__btn-final-cta {
    margin-top: 30px;
}

/* Links within content */
.page-khuyen-mai a {
    color: #F4D34D; /* Gold for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-khuyen-mai a:hover {
    color: #FFD86A; /* Lighter gold on hover */
    text-decoration: underline;
}

/* Image specific styles - for content images */
.page-khuyen-mai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Media Queries for Responsive Design */

/* Tablet and Mobile (max-width: 1024px) - General adjustments */
@media (max-width: 1024px) {
    .page-khuyen-mai__container {
        padding: 0 25px;
    }

    .page-khuyen-mai__hero-image-wrapper {
        max-height: 400px;
    }

    .page-khuyen-mai__hero-image {
        max-height: 400px;
    }

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

    .page-khuyen-mai__hero-description {
        font-size: 1.05rem;
    }

    .page-khuyen-mai__section-title {
        font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    }

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

    .page-khuyen-mai__step-item {
        padding: 25px;
    }

    .page-khuyen-mai__step-number {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    .page-khuyen-mai__faq-question {
        font-size: 1.05rem;
        padding: 18px 20px;
    }
}

/* Mobile (max-width: 768px) - Critical adjustments */
@media (max-width: 768px) {
    /* 1. 顶区标题 + 双 CTA */
    .page-khuyen-mai__hero-section {
        padding-top: 10px !important; /* Per instruction, small top padding */
        padding-bottom: 30px;
    }

    .page-khuyen-mai__hero-image-wrapper {
        max-height: 300px;
        margin-bottom: 20px;
    }

    .page-khuyen-mai__hero-image {
        max-height: 300px;
    }

    .page-khuyen-mai__hero-content {
        padding: 0 15px;
    }

    .page-khuyen-mai__main-title {
        font-size: 2rem; /* Fixed smaller size for mobile H1 */
        margin-bottom: 15px;
    }

    .page-khuyen-mai__hero-description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .page-khuyen-mai__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px; /* Smaller gap */
        width: 100%; /* Ensure container takes full width */
        max-width: 100%;
        padding: 0 15px; /* Add padding to container */
        box-sizing: border-box;
    }

    /* 4. 按钮与按钮容器 */
    .page-khuyen-mai__btn,
    .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: 0.95rem; /* Slightly smaller font for buttons */
    }

    .page-khuyen-mai__cta-wrapper {
        padding: 0 15px; /* Add padding to wrapper for large button */
        box-sizing: border-box;
    }

    /* 2. 单栏长文容器 */
    .page-khuyen-mai__container {
        padding: 0 15px; /* Smaller padding for mobile */
    }

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

    .page-khuyen-mai__section-title {
        font-size: 1.6rem; /* Fixed smaller size for mobile section titles */
        margin-bottom: 30px;
    }

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

    /* Promo Cards */
    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-khuyen-mai__promo-card {
        margin: 0 auto; /* Center cards */
        max-width: 400px; /* Limit card width */
    }

    .page-khuyen-mai__card-image {
        height: 180px; /* Adjust card image height */
    }

    .page-khuyen-mai__card-title {
        font-size: 1.2rem;
        padding: 15px 20px 8px;
    }

    .page-khuyen-mai__card-description {
        font-size: 0.9rem;
        padding: 0 20px 10px;
    }

    .page-khuyen-mai__card-list {
        padding: 0 20px 10px;
    }

    .page-khuyen-mai__card-list li {
        font-size: 0.85rem;
        padding-left: 20px;
    }

    .page-khuyen-mai__btn-card {
        margin: 0 20px 20px;
        width: calc(100% - 40px);
        font-size: 0.9rem;
    }

    /* Terms & Conditions Info Cards */
    .page-khuyen-mai__info-card {
        padding: 20px;
        margin-bottom: 15px;
    }

    .page-khuyen-mai__info-card-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .page-khuyen-mai__info-card-text {
        font-size: 0.9rem;
    }

    /* How To Claim Steps */
    .page-khuyen-mai__steps-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-khuyen-mai__step-item {
        padding: 20px;
    }

    .page-khuyen-mai__step-number {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .page-khuyen-mai__step-title {
        font-size: 1.15rem;
    }

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

    .page-khuyen-mai__btn-large {
        padding: 14px 25px;
        font-size: 1rem;
    }

    /* FAQ Section */
    .page-khuyen-mai__faq-item {
        margin-bottom: 10px;
    }

    .page-khuyen-mai__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .page-khuyen-mai__faq-toggle {
        font-size: 1.5rem;
        margin-left: 10px;
    }

    .page-khuyen-mai__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.9rem;
    }
    
    /* 3. 通用图片与 figure */
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__section,
    .page-khuyen-mai__card,
    .page-khuyen-mai__container,
    .page-khuyen-mai__promo-card,
    .page-khuyen-mai__info-card,
    .page-khuyen-mai__step-item,
    .page-khuyen-mai__faq-item {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px; /* Ensure content is not flush with edges */
      padding-right: 15px;
    }
    .page-khuyen-mai__promo-card,
    .page-khuyen-mai__step-item {
        padding-left: 0;
        padding-right: 0;
    }
    .page-khuyen-mai__promo-card .page-khuyen-mai__card-title,
    .page-khuyen-mai__promo-card .page-khuyen-mai__card-description,
    .page-khuyen-mai__promo-card .page-khuyen-mai__card-list,
    .page-khuyen-mai__promo-card .page-khuyen-mai__btn-card {
        padding-left: 20px;
        padding-right: 20px;
    }
    .page-khuyen-mai__promo-card .page-khuyen-mai__btn-card {
        width: calc(100% - 40px);
    }
}