﻿

.faq-page .faq-header-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--accent);
    backdrop-filter: blur(6px);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.faq-page .faq-header-text {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

    .faq-page .faq-header-text h2 {
        font-size: 22px;
        font-weight: 700;
        margin: 0 0 4px;
        letter-spacing: 0.2px;
        color: var(--white);
    }

    .faq-page .faq-header-text p {
        font-size: 13.5px;
        margin: 0;
        color: rgba(255, 255, 255, 0.85);
        line-height: 1.4;
    }

/* ---------- Search bar ---------- */
.faq-page .faq-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 3px 12px rgba(0, 45, 88, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

    .faq-page .faq-toolbar:focus-within {
        border-color: rgba(243, 178, 0, 0.6);
        box-shadow: 0 8px 24px rgba(0, 45, 88, 0.08);
    }

.faq-page .faq-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

    .faq-page .faq-search-wrap > i.fa-search {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray);
        font-size: 14px;
        pointer-events: none;
        transition: color 0.2s ease;
    }

    .faq-page .faq-search-wrap:focus-within > i.fa-search {
        color: var(--primary);
    }

.faq-page #txtSearchFAQ {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 40px 11px 40px;
    font-size: 14.5px;
    color: var(--dark-text);
    background: #FCFDFE;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
}

    .faq-page #txtSearchFAQ::placeholder {
        color: var(--gray);
    }

    .faq-page #txtSearchFAQ:hover {
        border-color: rgba(0, 45, 88, 0.25);
    }

    .faq-page #txtSearchFAQ:focus {
        border-color: var(--accent);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(243, 178, 0, 0.18);
    }

.faq-page .faq-search-clear {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(0, 45, 88, 0.06);
    color: var(--light-text);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

    .faq-page .faq-search-clear:hover {
        background: var(--accent);
        color: var(--primary);
    }

    .faq-page .faq-search-clear.visible {
        display: inline-flex;
    }

/* ---------- View All button ---------- */
.faq-page #btnClearSearchFAQ {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: var(--accent);
    color: var(--primary);
    border: 1px solid var(--accent);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .faq-page #btnClearSearchFAQ:hover {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--primary);
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(243, 178, 0, 0.28);
    }

    .faq-page #btnClearSearchFAQ i {
        font-size: 12px;
    }

/* Legacy search button — hidden (search is now live) */
.faq-page #btnSearchFAQ {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 45, 88, 0.18);
}

    .faq-page #btnSearchFAQ:hover {
        color: var(--accent);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0, 45, 88, 0.25);
    }

/* ---------- Accordion ---------- */
.faq-page .accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-page .faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 45, 88, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

    .faq-page .faq-item:hover {
        border-color: rgba(243, 178, 0, 0.5);
        box-shadow: 0 8px 22px rgba(0, 45, 88, 0.08);
    }

    .faq-page .faq-item.open {
        border-color: var(--accent);
        box-shadow: 0 10px 28px rgba(0, 45, 88, 0.1);
    }

/* Question */
.faq-page .faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 20px;
    background: var(--white);
    color: var(--primary);
    font-size: 15.5px;
    font-weight: 600;
    text-align: right;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    transition: background 0.2s ease, color 0.2s ease, padding 0.25s ease;
    position: relative;
}

    .faq-page .faq-question::before {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(180deg, var(--accent) 0%, var(--light-gold) 100%);
        transform: scaleY(0);
        transform-origin: top center;
        transition: transform 0.3s ease;
    }

    .faq-page .faq-question:hover {
        background: rgba(0, 45, 88, 0.03);
    }

.faq-page .faq-item.open .faq-question::before {
    transform: scaleY(1);
}

.faq-page .faq-chevron {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(243, 178, 0, 0.12);
    color: var(--accent);
    font-size: 12px;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.25s ease, color 0.25s ease;
}

.faq-page .faq-item.open .faq-chevron {
    transform: rotate(-90deg);
    background: var(--accent);
    color: var(--white);
}

.faq-page .faq-question-text {
    flex: 1;
    min-width: 0;
}

/* Answer */
.faq-page .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #FAFCFD;
    border-top: 1px solid transparent;
}

.faq-page .faq-item.open .faq-answer {
    border-top-color: var(--border);
}

.faq-page .faq-answer-inner {
    padding: 20px 22px 22px 22px;
    font-size: 14.5px;
    color: var(--dark-text);
    line-height: 1.7;
    border-right: 3px solid var(--accent);
    margin: 0 0 0 0;
    background: #FAFCFD;
}

    .faq-page .faq-answer-inner p {
        margin: 0 0 12px;
    }

        .faq-page .faq-answer-inner p:last-child {
            margin-bottom: 0;
        }

    .faq-page .faq-answer-inner ul {
        margin: 0 0 12px;
        padding-right: 20px;
    }

    .faq-page .faq-answer-inner li {
        margin-bottom: 6px;
    }

/* Hidden via search */
.faq-page .faq-item.is-hidden {
    display: none;
}

/* ---------- Empty state ---------- */
.faq-page .faq-empty {
    display: none;
    text-align: center;
    padding: 48px 24px;
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--light-text);
}

    .faq-page .faq-empty.visible {
        display: block;
    }

    .faq-page .faq-empty i {
        font-size: 34px;
        color: var(--gray);
        margin-bottom: 12px;
        display: block;
    }

    .faq-page .faq-empty h4 {
        font-size: 16px;
        color: var(--primary);
        margin: 0 0 6px;
        font-weight: 700;
    }

    .faq-page .faq-empty p {
        font-size: 13.5px;
        margin: 0;
    }

/* ---------- Highlight matching text ---------- */
.faq-page mark {
    background: rgba(243, 178, 0, 0.35);
    color: var(--primary);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .faq-page .faq-header {
        padding: 18px 20px;
        gap: 14px;
    }

    .faq-page .faq-header-icon {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .faq-page .faq-header-text h2 {
        font-size: 18px;
    }

    .faq-page .faq-header-text p {
        font-size: 12.5px;
    }

    .faq-page .faq-toolbar {
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .faq-page #btnClearSearchFAQ {
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .faq-page .faq-question {
        font-size: 14.5px;
        padding: 15px 16px;
        gap: 12px;
    }

    .faq-page .faq-answer-inner {
        padding: 16px 16px 18px;
        font-size: 14px;
    }
}


