/* style/faq.css */
/* Custom Color Palette */
:root {
    --primary-color: #11A84E; /* Chủ sắc */
    --secondary-color: #22C768; /* Sắc phụ */
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Nút */
    --card-bg: #11271B; /* Nền thẻ */
    --background-main: #08160F; /* Nền chính */
    --text-main: #F2FFF6; /* Chữ chính */
    --text-secondary: #A7D9B8; /* Chữ phụ */
    --border-color: #2E7A4E; /* Viền */
    --glow-color: #57E38D; /* Hiệu ứng phát sáng */
    --gold-color: #F2C14E; /* Vàng */
    --divider-color: #1E3A2A; /* Đường phân cách */
    --deep-green: #0A4B2C; /* Xanh lá đậm */
}

.page-faq {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main); /* Màu chữ mặc định cho trang */
    background-color: var(--background-main); /* Màu nền mặc định cho khu vực nội dung chính */
    line-height: 1.6;
    font-size: 16px;
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* body đã xử lý --header-offset */
    background: var(--deep-green); /* Nền ví dụ cho hero */
    box-sizing: border-box;
}

.page-faq__container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px; /* Thêm khoảng đệm ngang cho màn hình nhỏ hơn */
    box-sizing: border-box;
}

.page-faq__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Sử dụng clamp để đảm bảo kích thước chữ phù hợp */
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.page-faq__description {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.page-faq__highlight {
    color: var(--glow-color); /* Nổi bật với màu phát sáng */
}

.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Cho phép các nút xuống dòng trên màn hình nhỏ hơn */
    width: 100%; /* Đảm bảo container chiếm toàn bộ chiều rộng */
    max-width: 600px; /* Giới hạn chiều rộng tối đa cho nhóm nút */
    margin: 0 auto;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
    box-sizing: border-box;
    white-space: normal; /* Cho phép chữ xuống dòng */
    word-wrap: break-word; /* Cho phép chữ ngắt từ */
}

.page-faq__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main); /* Chữ trắng cho nút chính */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-faq__btn-secondary {
    background: transparent;
    color: var(--glow-color); /* Chữ màu phát sáng cho nút phụ */
    border: 2px solid var(--glow-color);
}

.page-faq__btn-secondary:hover {
    background: var(--glow-color);
    color: var(--background-main); /* Chữ tối khi di chuột */
    transform: translateY(-2px);
}

/* Image Section */
.page-faq__image-section {
    padding: 40px 0;
    background-color: var(--background-main);
    box-sizing: border-box;
}

.page-faq__main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    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 */
}

/* FAQ List Section */
.page-faq__faq-list-section {
    padding: 60px 20px;
    background-color: var(--background-main);
    box-sizing: border-box;
}

.page-faq__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.page-faq__faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.page-faq__faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.page-faq__faq-item[open] {
    background: var(--deep-green);
    border-color: var(--glow-color);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    list-style: none; /* Cho details/summary */
    transition: color 0.3s ease;
}

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* Ẩn dấu mặc định cho Chrome/Safari */
}

.page-faq__faq-question:hover {
    color: var(--glow-color);
}

.page-faq__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--glow-color);
}

.page-faq__faq-answer {
    padding: 0 20px 20px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-secondary);
}

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

.page-faq__faq-answer a {
    color: var(--glow-color);
    text-decoration: none;
}

.page-faq__faq-answer a:hover {
    text-decoration: underline;
}

.page-faq__contact-cta {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__contact-text {
    font-size: 1.2em;
    color: var(--text-main);
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Additional Info Section */
.page-faq__additional-info {
    padding: 60px 20px;
    background-color: var(--background-main);
    box-sizing: border-box;
}

.page-faq__text-block {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: clamp(2em, 4vw, 3em);
    }
    .page-faq__section-title {
        font-size: clamp(1.8em, 3.5vw, 2.2em);
    }
    .page-faq__faq-question {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body đã xử lý --header-offset */
    }

    .page-faq__main-title {
        font-size: clamp(1.8em, 6vw, 2em);
        margin-bottom: 15px;
    }

    .page-faq__description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px; /* Thêm khoảng đệm để ngăn nút chạm vào mép màn hình */
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important; /* Buộc chiều rộng đầy đủ trên di động */
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .page-faq__image-section,
    .page-faq__faq-list-section,
    .page-faq__additional-info {
        padding: 30px 0; /* Điều chỉnh khoảng đệm cho di động */
    }

    .page-faq__container {
        padding: 0 15px !important; /* Đảm bảo khoảng đệm container */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-faq__main-image {
        max-width: 100% !important;
        height: auto !important;
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .page-faq__section-title {
        font-size: clamp(1.5em, 5vw, 1.8em);
        margin-bottom: 30px;
    }

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

    .page-faq__faq-answer {
        padding: 0 15px 15px;
        font-size: 0.95em;
    }

    .page-faq__contact-cta {
        margin-top: 30px;
        padding: 20px;
    }

    .page-faq__contact-text {
        font-size: 1.1em;
    }

    .page-faq p,
    .page-faq li,
    .page-faq__text-block {
        font-size: 16px; /* Tăng kích thước chữ để dễ đọc hơn trên di động */
        line-height: 1.6;
    }
}

/* Đảm bảo hình ảnh nội dung đáp ứng kích thước tối thiểu và yêu cầu responsive */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block;
    min-width: 200px; /* Kích thước tối thiểu toàn cầu cho tất cả hình ảnh */
    min-height: 200px; /* Kích thước tối thiểu toàn cầu cho tất cả hình ảnh */
    box-sizing: border-box;
    /* Không có thuộc tính filter để thay đổi màu sắc */
}

/* Media query cho hình ảnh di động, đặc biệt nhắm mục tiêu img trong nội dung */
@media (max-width: 768px) {
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
        /* Không có thuộc tính filter */
    }
    /* Đảm bảo bất kỳ container nào chứa hình ảnh cũng responsive */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__image-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Ngăn cuộn ngang */
    }
}