.page-faq {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #ffffff; /* Explicitly set for clarity */
}

.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* 淡蓝色配色方案 */
    overflow: hidden;
}

.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-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.page-faq__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white background for text */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-faq__main-title {
    font-size: 3em;
    color: #26A9E0;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 700;
}

.page-faq__intro-text {
    font-size: 1.2em;
    color: #333333;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding doesn't increase total width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
}

.page-faq__btn-primary {
    background: #26A9E0; /* 主色调 */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
    background: #1e87c0; /* Darker shade of primary */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
    margin-left: 15px; /* Spacing between buttons */
}

.page-faq__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-faq__content-area {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-faq__section-title {
    font-size: 2.5em;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.page-faq__category-section {
    margin-bottom: 50px;
}

.page-faq__category-title {
    font-size: 2em;
    color: #000000;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    font-weight: 600;
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.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 15px;
    opacity: 0;
    color: #333333;
}

.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 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    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;
}

.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn h3 chặn sự kiện click */
    color: #333333;
}

.page-faq__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    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 click */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #26A9E0; /* Thay đổi màu sang màu chủ đạo khi active */
    transform: rotate(45deg); /* Ví dụ: xoay để tạo dấu 'x' hoặc '-' */
}

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

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.page-faq__faq-answer li {
    margin-bottom: 5px;
}

.page-faq__image-inline {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
}

.page-faq__cta-section {
    background: #26A9E0; /* 主色调 */
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
    margin-top: 50px;
}

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

.page-faq__cta-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
    color: #ffffff;
}

.page-faq__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-faq__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Cho phép các nút xuống dòng trên màn hình nhỏ hơn */
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .page-faq__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-faq__intro-text {
        font-size: 1em;
    }

    .page-faq__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        width: 100% !important; /* Buộc toàn bộ chiều rộng trên di động */
        max-width: 100% !important;
        margin-left: 0 !important; /* Xóa margin-left cho nút phụ */
        margin-bottom: 10px; /* Thêm khoảng cách dọc cho các nút đã xuống dòng */
    }

    .page-faq__btn-secondary {
        margin-left: 0;
    }

    .page-faq__button-group {
        flex-direction: column; /* Xếp chồng các nút theo chiều dọc trên di động */
        gap: 10px;
        padding: 0 15px;
    }

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

    .page-faq__category-title {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

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

    .page-faq__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px); /* Điều chỉnh chiều rộng để tạo không gian cho nút bật/tắt */
    }

    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }

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

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

    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Ensure minimum size on mobile */
        min-height: 200px !important; /* Ensure minimum size on mobile */
    }
    
    .page-faq__hero-image img,
    .page-faq__image-inline {
        border-radius: 4px;
    }

    .page-faq__content-area,
    .page-faq__cta-section,
    .page-faq__cta-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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