/* style/faq.css */
.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #f8f8f8; /* Light background for the main content area */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #26A9E0, #4AD8FF); /* Brand color gradient */
    color: #ffffff; /* White text for dark background */
}

.page-faq__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    margin-bottom: 30px;
}

.page-faq__hero-section h1 {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

.page-faq__hero-description {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #f0f0f0;
}

.page-faq__hero-image {
    width: 100%;
    max-width: 900px; /* Adjust max-width for image */
    margin-top: 30px;
}

.page-faq__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    filter: none; /* Ensure no filter */
}

.page-faq__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for CTA */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-faq__cta-button:hover {
    background: #FF9933;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__section {
    padding: 60px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.page-faq__section:last-of-type {
    border-bottom: none;
}

.page-faq__dark-bg {
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff;
}

.page-faq__light-bg {
    background-color: #ffffff; /* White background */
    color: #333333;
}

.page-faq__dark-bg-item .page-faq__faq-question {
    background: #36B9F0; /* Slightly lighter than section bg */
    border-color: #4AD8FF;
    color: #ffffff;
}

.page-faq__dark-bg-item .page-faq__faq-question h3 {
    color: #ffffff;
}

.page-faq__dark-bg-item .page-faq__faq-toggle {
    color: #ffffff;
}

.page-faq__dark-bg-item .page-faq__faq-answer {
    background: #4AD8FF; /* Lighter shade for answer */
    color: #ffffff;
}

.page-faq__container {
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    color: inherit; /* Inherit color from section */
}

.page-faq__faq-list {
    margin-top: 30px;
}

/* FAQ容器样式 */
.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ默认状态 - 答案隐藏 */
.page-faq__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 20px;
    opacity: 0;
    font-size: 1.05em;
    line-height: 1.7;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-faq__faq-item.active .page-faq__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 !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

/* Question style */
.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-faq__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

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

/* Question title style */
.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click events */
}

/* Toggle icon */
.page-faq__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #26A9E0; /* Brand color for toggle */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click events */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e0f2f7; /* Light background for toggle */
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #ffffff;
    background-color: #26A9E0;
    transform: rotate(180deg);
}

.page-faq__image-answer {
    width: 100%;
    height: auto;
    max-width: 600px;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    filter: none; /* Ensure no filter */
}

.page-faq__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: #EA7C07; /* Login color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-faq__btn-primary:hover {
    background: #FF9933;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: transparent;
    color: #26A9E0;
    text-decoration: none;
    border: 2px solid #26A9E0;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-faq__btn-secondary:hover {
    background: #26A9E0;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__inline-button {
    margin-top: 20px;
    margin-right: 15px;
}

.page-faq__button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .page-faq {
        font-size: 15px;
        line-height: 1.5;
        padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
    }

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

    .page-faq__hero-section h1 {
        font-size: 2em;
    }

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

    .page-faq__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-faq__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .page-faq__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px);
        margin-bottom: 5px;
    }

    .page-faq__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
        margin-left: auto; /* Align to right */
    }

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

    /* Images */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-faq__image-answer {
        margin: 15px auto;
    }

    /* Buttons */
    .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__inline-button {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .page-faq__button-group {
        flex-direction: column;
        gap: 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-faq__container {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Ensure no filter on images */
.page-faq img {
    filter: none;
}