/* style/promotions.css */

/* Biến CSS cục bộ cho trang ưu đãi */
:root {
    --page-promotions-primary-color: #1A202C;
    --page-promotions-secondary-color: #FFD700;
    --page-promotions-text-light: #ffffff;
    --page-promotions-text-dark: #333333;
    --page-promotions-bg-light: #f8f9fa;
    --page-promotions-bg-dark: #1A202C;
    --page-promotions-card-bg: #ffffff;
    --page-promotions-border-color: #e0e0e0;
}

/* Đảm bảo nội dung không bị che bởi header cố định */
.page-promotions {
    padding-top: 80px; /* Default for desktop, adjusted in media query */
    color: var(--page-promotions-text-light); /* Body background is dark, so text should be light */
}

/* 移动端响应式设计 for fixed header padding */
@media (max-width: 768px) {
    .page-promotions {
        padding-top: 60px;
    }
}

/* HERO Banner Section */
.page-promotions__hero-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--page-promotions-bg-dark);
    color: var(--page-promotions-text-light);
    text-align: center;
    gap: 40px;
}

.page-promotions__hero-content {
    max-width: 900px;
}

.page-promotions__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--page-promotions-secondary-color);
    font-weight: 700;
}

.page-promotions__hero-description {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
}

.page-promotions__hero-image-wrapper {
    width: 100%;
    max-width: 900px;
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* General Section Styles */
.page-promotions__section {
    padding: 60px 20px;
    background: var(--page-promotions-bg-light);
    color: var(--page-promotions-text-dark);
}

.page-promotions__section--highlight {
    background: var(--page-promotions-bg-light);
    color: var(--page-promotions-text-dark);
}

.page-promotions__dark-section {
    background: var(--page-promotions-bg-dark);
    color: var(--page-promotions-text-light);
}

.page-promotions__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: var(--page-promotions-primary-color);
    font-weight: 700;
}

.page-promotions__dark-section .page-promotions__section-title {
    color: var(--page-promotions-secondary-color);
}

.page-promotions__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Grid Layout for Cards */
.page-promotions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

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

/* Card Styles */
.page-promotions__card {
    background: var(--page-promotions-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
    border: 1px solid var(--page-promotions-border-color);
    color: var(--page-promotions-text-dark);
}

.page-promotions__dark-section .page-promotions__card {
    background: rgba(255, 255, 255, 0.08);
    color: var(--page-promotions-text-light);
    border-color: rgba(255, 255, 255, 0.15);
}

.page-promotions__dark-section .page-promotions__card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-promotions__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-promotions__card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
}

.page-promotions__card-title {
    font-size: 1.6em;
    font-weight: 600;
    margin: 0 20px 10px 20px;
    line-height: 1.3;
    color: var(--page-promotions-primary-color);
}

.page-promotions__dark-section .page-promotions__card-title {
    color: var(--page-promotions-secondary-color);
}

.page-promotions__card-text {
    font-size: 1em;
    line-height: 1.6;
    margin: 0 20px 25px 20px;
    flex-grow: 1;
}

.page-promotions__card .page-promotions__btn-secondary,
.page-promotions__card .page-promotions__btn-primary {
    margin: 0 20px 0 20px;
    align-self: flex-start;
    width: calc(100% - 40px);
    text-align: center;
    padding: 12px 20px;
    font-size: 1em;
}

/* CTA Box */
.page-promotions__cta-box {
    background: var(--page-promotions-secondary-color);
    color: var(--page-promotions-primary-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-top: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-promotions__cta-text {
    font-size: 1.3em;
    margin-bottom: 25px;
    font-weight: 600;
    line-height: 1.5;
}

/* Event List Styles */
.page-promotions__event-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 30px;
}

.page-promotions__event-item {
    display: flex;
    background: var(--page-promotions-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--page-promotions-border-color);
}

.page-promotions__event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-promotions__event-image {
    width: 350px;
    height: 250px;
    object-fit: cover;
    flex-shrink: 0;
}

.page-promotions__event-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.page-promotions__event-title {
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--page-promotions-primary-color);
}

.page-promotions__event-description {
    font-size: 1.05em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.page-promotions__btn-link {
    display: inline-block;
    color: var(--page-promotions-primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    padding: 8px 0;
    position: relative;
    align-self: flex-start;
}

.page-promotions__btn-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--page-promotions-primary-color);
    transition: width 0.3s ease;
}

.page-promotions__btn-link:hover::after {
    width: 100%;
}

.page-promotions__dark-section .page-promotions__btn-link {
    color: var(--page-promotions-secondary-color);
}

.page-promotions__dark-section .page-promotions__btn-link::after {
    background-color: var(--page-promotions-secondary-color);
}

/* Steps Grid */
.page-promotions__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-promotions__step-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background-color 0.3s ease;
}

.page-promotions__step-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

.page-promotions__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--page-promotions-secondary-color);
    color: var(--page-promotions-primary-color);
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-promotions__step-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--page-promotions-secondary-color);
}

.page-promotions__step-text {
    font-size: 1em;
    line-height: 1.6;
    color: var(--page-promotions-text-light);
}

.page-promotions__note-text {
    font-size: 1.05em;
    line-height: 1.6;
    margin-top: 40px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 5px solid var(--page-promotions-secondary-color);
    border-radius: 8px;
}

.page-promotions__btn-primary--center {
    display: block;
    margin: 40px auto 0 auto;
    width: fit-content;
}

/* FAQ Section */
.page-promotions__faq-section {
    background: var(--page-promotions-bg-light);
    color: var(--page-promotions-text-dark);
}

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

/* FAQ容器样式 */
.page-promotions__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--page-promotions-border-color);
    background: var(--page-promotions-card-bg);
}

/* FAQ默认状态 - 答案隐藏 */
.page-promotions__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    font-size: 1em;
    line-height: 1.6;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
    padding: 20px 25px !important;
    opacity: 1;
    background: #f0f0f0;
    border-radius: 0 0 8px 8px;
    color: var(--page-promotions-text-dark);
}

/* Vấn đề phong cách */
.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--page-promotions-card-bg);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-promotions__faq-question:hover {
    background: #f5f5f5;
}

.page-promotions__faq-question:active {
    background: #eeeeee;
}

/* Tiêu đề vấn đề phong cách */
.page-promotions__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
    color: var(--page-promotions-primary-color);
}

/* Biểu tượng chuyển đổi */
.page-promotions__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--page-promotions-primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Ngăn biểu tượng chặn sự kiện nhấp */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    transform: rotate(45deg);
    color: var(--page-promotions-secondary-color);
}

/* Final CTA Section */
.page-promotions__cta-final {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--page-promotions-primary-color), #0d0d0d);
    color: var(--page-promotions-text-light);
}

.page-promotions__cta-final .page-promotions__section-title {
    color: var(--page-promotions-secondary-color);
    margin-bottom: 30px;
}

.page-promotions__cta-final .page-promotions__section-description {
    color: var(--page-promotions-text-light);
    max-width: 900px;
    margin-bottom: 40px;
}

.page-promotions__btn-primary--large {
    padding: 18px 40px;
    font-size: 1.2em;
    margin: 10px;
    min-width: 250px;
}

.page-promotions__btn-secondary--large {
    padding: 18px 40px;
    font-size: 1.2em;
    margin: 10px;
    min-width: 250px;
    background: transparent;
    border: 2px solid var(--page-promotions-secondary-color);
    color: var(--page-promotions-secondary-color);
}

.page-promotions__btn-secondary--large:hover {
    background: var(--page-promotions-secondary-color);
    color: var(--page-promotions-primary-color);
}

/* Global Button Styles (ensure contrast) */
.page-promotions__btn-primary {
    display: inline-block;
    background: var(--page-promotions-secondary-color);
    color: var(--page-promotions-primary-color);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-promotions__btn-primary:hover {
    background: #e6c200;
    transform: translateY(-3px);
}

.page-promotions__btn-secondary {
    display: inline-block;
    background: var(--page-promotions-primary-color);
    color: var(--page-promotions-secondary-color);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
    border: 2px solid var(--page-promotions-secondary-color);
    cursor: pointer;
}

.page-promotions__btn-secondary:hover {
    background: var(--page-promotions-secondary-color);
    color: var(--page-promotions-primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__hero-banner {
        flex-direction: column;
        text-align: center;
    }

    .page-promotions__hero-image-wrapper {
        margin-top: 40px;
    }

    .page-promotions__hero-title {
        font-size: 2.5em;
    }

    .page-promotions__section-title {
        font-size: 2em;
    }

    .page-promotions__event-item {
        flex-direction: column;
    }

    .page-promotions__event-image {
        width: 100%;
        height: 200px;
    }

    .page-promotions__card-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-promotions {
        padding-top: 70px !important; /* Ensure content is below fixed header */
    }

    .page-promotions__hero-banner {
        padding: 40px 15px;
    }

    .page-promotions__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-promotions__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-promotions__section {
        padding: 40px 15px;
    }

    .page-promotions__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-promotions__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .page-promotions__grid,
    .page-promotions__grid--column,
    .page-promotions__steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-promotions__card-image {
        height: 160px;
    }

    .page-promotions__card-title {
        font-size: 1.4em;
        margin: 0 15px 8px 15px;
    }

    .page-promotions__card-text {
        font-size: 0.95em;
        margin: 0 15px 20px 15px;
    }

    .page-promotions__card .page-promotions__btn-secondary,
    .page-promotions__card .page-promotions__btn-primary {
        margin: 0 15px 0 15px;
        width: calc(100% - 30px);
    }

    .page-promotions__cta-box {
        padding: 25px;
    }

    .page-promotions__cta-text {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .page-promotions__event-content {
        padding: 20px;
    }

    .page-promotions__event-title {
        font-size: 1.5em;
    }

    .page-promotions__event-description {
        font-size: 0.95em;
    }

    .page-promotions__step-card {
        padding: 25px;
    }

    .page-promotions__step-number {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
    }

    .page-promotions__step-title {
        font-size: 1.3em;
    }

    .page-promotions__step-text {
        font-size: 0.95em;
    }

    .page-promotions__note-text {
        font-size: 0.95em;
        padding: 15px;
    }

    .page-promotions__faq-question {
        padding: 15px 20px;
    }

    .page-promotions__faq-question h3 {
        font-size: 1em;
    }

    .page-promotions__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }

    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px 20px !important;
    }

    .page-promotions__cta-final {
        padding: 60px 15px;
    }

    .page-promotions__btn-primary--large,
    .page-promotions__btn-secondary--large {
        padding: 15px 25px;
        font-size: 1.1em;
        min-width: unset;
        width: 100%;
        margin: 8px 0;
    }

    /* 强制图片适配移动端 */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__hero-banner,
    .page-promotions__cta-box,
    .page-promotions__event-item,
    .page-promotions__step-card,
    .page-promotions__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}