/* style/faq.css */

/* Biến màu sắc */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-dark: #0a0a0a; /* Từ shared.css body background */
    --background-light: #ffffff;
    --login-color: #EA7C07;
}

.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Mặc định chữ sáng trên nền tối của body */
    background-color: var(--background-dark); /* Kế thừa từ body */
}

/* Fixed Header Offset - ensure main content starts below fixed header */
.page-faq {
    padding-top: var(--header-offset, 120px); /* Desktop/Mobile offset handled by shared.css variable */
}

.page-faq__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.page-faq__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.page-faq__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4); /* Làm mờ ảnh để chữ nổi bật */
}

.page-faq__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.2;
}

.page-faq__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: var(--text-light);
}

.page-faq__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.page-faq__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-faq__section-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-faq__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-faq__section-subtitle {
    font-size: 1.1em;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto;
}

.page-faq__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-faq__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-faq__faq-item.active {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: #f0f0f0;
}

.page-faq__faq-question h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--text-dark);
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(0deg); /*  to "-" animation */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-dark);
    background-color: #ffffff;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 1000px !important; /* Đủ lớn để chứa mọi nội dung */
    padding: 15px 25px 25px;
}

.page-faq__faq-answer p {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.page-faq__faq-answer p:last-child {
    margin-bottom: 0;
}

.page-faq__link-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.page-faq__link-button:hover {
    background-color: #1e87b7;
}

.page-faq__image-content {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-faq__video-section {
    padding: 80px 20px;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-faq__video-container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-faq__video-title {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-faq__video-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: var(--text-light);
}

.page-faq__video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.page-faq__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    cursor: pointer;
}

.page-faq__video-cta {
    margin-top: 20px;
}

.page-faq__cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-faq__cta-content {
    max-width: 800px;
    margin-bottom: 40px;
}

.page-faq__cta-title {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.page-faq__cta-description {
    font-size: 1.1em;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.page-faq__cta-image-wrapper {
    max-width: 800px;
    width: 100%;
}

.page-faq__cta-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Nút chung */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.page-faq__btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.page-faq__btn-primary:hover {
    background-color: #1e87b7;
    border-color: #1e87b7;
}

.page-faq__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-faq__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}


/* Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: 2.4em;
    }

    .page-faq__hero-description {
        font-size: 1.1em;
    }

    .page-faq__section-title,
    .page-faq__video-title,
    .page-faq__cta-title {
        font-size: 2em;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-faq__hero-section {
        padding: 60px 15px;
    }

    .page-faq__hero-title {
        font-size: 1.8em;
    }

    .page-faq__hero-description {
        font-size: 1em;
    }

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

    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq a[class*="button"],
    .page-faq 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;
    }

    .page-faq__hero-buttons,
    .page-faq__button-group,
    .page-faq__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-faq__content-area {
        padding: 40px 15px;
    }

    .page-faq__section-title,
    .page-faq__video-title,
    .page-faq__cta-title {
        font-size: 1.8em;
    }

    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

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

    .page-faq__faq-answer {
        padding: 0 20px;
    }

    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px 20px 20px;
    }

    .page-faq__image-content {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__cta-section,
    .page-faq__video-section,
    .page-faq__video-container,
    .page-faq__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-faq__video-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure video section is below header on mobile */
        padding-left: 0;
        padding-right: 0;
    }

    .page-faq video,
    .page-faq__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-faq__video-wrapper {
        padding-bottom: 56.25% !important; /* Maintain aspect ratio */
        margin-left: auto;
        margin-right: auto;
        width: calc(100% - 30px) !important; /* Account for padding */
    }

    .page-faq__cta-content {
        margin-bottom: 30px;
    }

    .page-faq__cta-section {
        padding: 60px 15px;
    }
}

/* Global Image/Video/Button Responsive Rules (redundant but for strict compliance) */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-faq video,
.page-faq__video {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

.page-faq__video-wrapper,
.page-faq__video-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-faq__cta-button,
.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq a[class*="button"],
.page-faq a[class*="btn"] {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__cta-buttons,
.page-faq__button-group,
.page-faq__btn-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* No filter allowed for images */
.page-faq img {
    filter: none; /* Ensure no CSS filter changes image color */
}