/* style/promotions.css */
/* body đã padding-top: var(--header-offset)；trang này cấm viết lại biến đó */

/* Màu sắc chính */
:root {
    --fbc8-primary-color: #017439;
    --fbc8-secondary-color: #FFFFFF;
    --fbc8-text-dark: #333333;
    --fbc8-text-light: #ffffff;
    --fbc8-register-btn: #C30808;
    --fbc8-login-btn: #C30808;
    --fbc8-bg-default: #FFFFFF;
    --fbc8-login-register-font: #FFFF00;
}

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--fbc8-text-dark); /* Mặc định chữ tối trên nền sáng */
    background-color: var(--fbc8-bg-default);
}

/* Các phần chung */
.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-promotions__section {
    padding: 60px 0;
    text-align: center;
}

.page-promotions__dark-section {
    background-color: var(--fbc8-primary-color);
    color: var(--fbc8-text-light);
}

.page-promotions__light-bg {
    background-color: var(--fbc8-bg-default);
    color: var(--fbc8-text-dark);
}

.page-promotions__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: inherit; /* Kế thừa màu từ section cha */
    font-weight: bold;
}

.page-promotions__text-block {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px; /* Đảm bảo chiều cao tối thiểu */
    overflow: hidden;
    padding-top: 10px; /* Chỉ một khoảng nhỏ, body đã xử lý header-offset */
    padding-bottom: 60px;
}

.page-promotions__hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 1; /* Hình ảnh ở trên */
}

.page-promotions__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    min-height: 200px; /* Đảm bảo kích thước tối thiểu */
    min-width: 200px; /* Đảm bảo kích thước tối thiểu */
}

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    max-width: 900px;
    margin-top: 30px; /* Khoảng cách giữa ảnh và nội dung */
    order: 2; /* Nội dung ở dưới */
}

.page-promotions__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Sử dụng clamp cho responsive H1 */
    color: var(--fbc8-text-light);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.page-promotions__description {
    font-size: 1.2em;
    color: var(--fbc8-secondary-color);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-promotions__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Đảm bảo nút xuống dòng trên mobile */
}

.page-promotions__btn-primary,
.page-promotions__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Cho phép chữ xuống dòng */
    word-wrap: break-word; /* Cho phép chữ xuống dòng */
    box-sizing: border-box;
    max-width: 100%; /* Đảm bảo nút không tràn */
}

.page-promotions__btn-primary {
    background-color: var(--fbc8-register-btn); /* Màu đỏ đăng ký */
    color: var(--fbc8-login-register-font); /* Màu vàng cho chữ */
    border: 2px solid var(--fbc8-register-btn);
}

.page-promotions__btn-primary:hover {
    background-color: #a60707; /* Darker shade of C30808 */
    border-color: #a60707;
}

.page-promotions__btn-secondary {
    background-color: transparent;
    color: var(--fbc8-secondary-color);
    border: 2px solid var(--fbc8-secondary-color);
}

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

.page-promotions__btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
}

.page-promotions__btn-large {
    padding: 18px 40px;
    font-size: 1.1em;
}

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

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

/* Card Styles */
.page-promotions__card {
    background-color: var(--fbc8-secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--fbc8-text-dark);
}

.page-promotions__dark-section .page-promotions__card {
    background-color: rgba(255, 255, 255, 0.1); /* Nền hơi trong suốt trên nền tối */
    color: var(--fbc8-text-light);
    box-shadow: none;
}

.page-promotions__card-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Đảm bảo kích thước tối thiểu */
    min-height: 200px; /* Đảm bảo kích thước tối thiểu */
    display: block;
}

.page-promotions__card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: inherit;
    font-weight: bold;
}

.page-promotions__card-text {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-promotions__card .page-promotions__btn-primary {
    width: auto;
    margin-top: auto;
}

.page-promotions__card--inverted .page-promotions__btn-secondary {
    background-color: var(--fbc8-secondary-color);
    color: var(--fbc8-primary-color);
    border-color: var(--fbc8-primary-color);
}

.page-promotions__card--inverted .page-promotions__btn-secondary:hover {
    background-color: var(--fbc8-primary-color);
    color: var(--fbc8-secondary-color);
}

/* FAQ Section */
.page-promotions__faq-section {
    padding: 60px 0;
    text-align: center;
}

.page-promotions__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
    text-align: left;
}

.page-promotions__faq-item {
    background-color: var(--fbc8-secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--fbc8-text-dark);
}

.page-promotions__dark-section .page-promotions__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Nền hơi trong suốt trên nền tối */
    border-color: rgba(255, 255, 255, 0.2); /* Viền hơi trong suốt */
    color: var(--fbc8-text-light);
}

.page-promotions__faq-question {
    padding: 20px 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    color: var(--fbc8-text-dark);
}

.page-promotions__dark-section .page-promotions__faq-question {
    background-color: rgba(255, 255, 255, 0.05); /* Nền hơi trong suốt */
    color: var(--fbc8-text-light);
}

.page-promotions__faq-question::marker {
    display: none; /* Ẩn marker mặc định của details/summary */
}

.page-promotions__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-promotions__faq-item[open] .page-promotions__faq-toggle {
    transform: rotate(45deg); /* Xoay dấu cộng thành dấu x */
}

.page-promotions__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    border-top: 1px solid #eee;
    color: var(--fbc8-text-dark);
}

.page-promotions__dark-section .page-promotions__faq-answer {
    border-top-color: rgba(255, 255, 255, 0.1); /* Viền hơi trong suốt */
    color: var(--fbc8-text-light);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-promotions__container {
        padding: 0 15px;
    }

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

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

    .page-promotions__hero-section {
        padding-bottom: 40px;
        min-height: auto;
    }

    .page-promotions__main-title {
        font-size: 2.2em;
    }

    .page-promotions__description {
        font-size: 1em;
    }

    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-promotions__btn-primary,
    .page-promotions__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px !important;
        font-size: 1em !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-promotions__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-promotions__card {
        padding: 20px;
    }

    .page-promotions__card-image {
        max-height: 200px;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-promotions__card-title {
        font-size: 1.2em;
    }

    .page-promotions__text-block {
      font-size: 0.95em;
    }

    /* Mobile image responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__hero-section,
    .page-promotions__hero-image-wrapper,
    .page-promotions__cta-buttons,
    .page-promotions__grid,
    .page-promotions__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    .page-promotions__hero-section {
      padding-top: 10px !important; /* body đã承担 --header-offset，此处禁止 var(--header-offset) */
    }
}