/* ==========================================================
   Flyfy · 常见问答
   手风琴、搜索框、分类标签、分页
   ========================================================== */

/* ---------------- FAQ Hero ---------------- */
.faq-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 74px 0 62px;
    background:
        radial-gradient(760px 430px at 78% 48%, rgba(102, 126, 234, .18), transparent 68%),
        linear-gradient(180deg, #eef2ff 0%, #f7f8ff 82%, #fff 100%);
}

.faq-hero::before {
    content: "";
    position: absolute;
    top: 24px;
    right: 7%;
    z-index: -1;
    width: 430px;
    height: 330px;
    border: 1px solid rgba(102, 126, 234, .1);
    border-radius: 38px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 62%),
        repeating-linear-gradient(90deg, transparent 0 39px, rgba(102, 126, 234, .06) 40px),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(102, 126, 234, .06) 40px);
    pointer-events: none;
    transform: rotate(-8deg);
}

.faq-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
    align-items: center;
    gap: 66px;
}

.faq-hero__copy {
    max-width: 690px;
}

.faq-hero__title {
    margin: 0;
    color: #20263a;
    font-size: clamp(3rem, 4.2vw, 4.4rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
}

html[lang^="en"] .faq-hero__title {
    max-width: 720px;
    font-size: clamp(2.55rem, 3.7vw, 3.9rem);
}

.faq-hero__description {
    max-width: 640px;
    margin: 24px 0 0;
    color: #515b70;
    font-size: clamp(1rem, 1.08vw, 1.14rem);
    line-height: 1.9;
}

.faq-hero__visual {
    justify-self: end;
    width: min(100%, 540px);
    margin: 0;
}

.faq-hero__visual img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 28px 38px rgba(71, 88, 173, .14));
}

.faq-hero__search {
    width: min(100%, 620px);
    margin: 30px 0 0;
}

.faq-hero__search .input-group {
    padding: 6px;
    border: 1px solid rgba(102, 126, 234, .16);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(72, 85, 158, .12);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.faq-hero__search .input-group:focus-within {
    border-color: rgba(82, 96, 239, .42);
    box-shadow: 0 20px 48px rgba(72, 85, 158, .16), 0 0 0 4px rgba(102, 126, 234, .08);
}

.faq-hero__search .form-control {
    min-height: 58px;
    padding-left: 22px;
    border: 0;
    border-radius: 999px !important;
    color: #293149;
    background: transparent;
}

.faq-hero__search .form-control:focus {
    box-shadow: none;
}

.faq-hero__search .btn {
    min-width: 112px;
    min-height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px !important;
    background: linear-gradient(100deg, #4f81fb 0%, #5866f3 48%, #5b50d7 100%);
    box-shadow: 0 10px 24px rgba(77, 88, 220, .22);
    font-weight: 600;
}

.faq-hero__search .btn:hover {
    background: linear-gradient(100deg, #4779f6 0%, #5260ef 48%, #5549cf 100%);
    box-shadow: 0 14px 30px rgba(77, 88, 220, .3);
}

.faq-content {
    padding-top: 0;
}

.stock-accordion .accordion-item {
    border: 1px solid var(--stock-border);
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 14px;
}

.stock-accordion .accordion-button {
    gap: 10px;
    font-weight: 600;
    color: var(--stock-text);
    background: #fff;
    box-shadow: none !important;
}

    .stock-accordion .accordion-button:not(.collapsed) {
        color: var(--stock-primary-dark);
        background: rgba(102, 126, 234, .06);
    }

.stock-accordion .accordion-body {
    color: var(--stock-text-muted);
    line-height: 1.9;
    font-size: .92rem;
}

/* FAQ page: search, category chips, long answers and pagination */
.faq-search .form-control {
    border-color: var(--stock-border);
    border-radius: 12px 0 0 12px;
    box-shadow: none;
    max-width: none;
}

/* Keep the placeholder readable inside the large input. */
.faq-search .input-group-lg > .form-control {
    font-size: 1rem;
}

    .faq-search .form-control:focus {
        border-color: var(--stock-primary-light);
        box-shadow: 0 0 0 .2rem rgba(102, 126, 234, .12);
    }

.faq-search .btn {
    border-radius: 0 12px 12px 0;
    padding-left: 26px;
    padding-right: 26px;
}

.faq-category {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(102, 126, 234, .1);
    color: var(--stock-primary);
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}

.faq-question {
    min-width: 0;
}

.stock-accordion .accordion-body.faq-answer {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.faq-page-status {
    margin: 28px 0 12px;
    font-size: .88rem;
}

.faq-pagination .page-link {
    min-width: 42px;
    color: var(--stock-primary);
    border-color: var(--stock-border);
    text-align: center;
}

    .faq-pagination .page-link:hover {
        color: var(--stock-primary-dark);
        background: var(--stock-bg-soft);
    }

.faq-pagination .page-item.active .page-link {
    color: #fff;
    background: var(--stock-primary);
    border-color: var(--stock-primary);
}

.faq-pagination .page-item.disabled {
    cursor: not-allowed;
}

.faq-pagination .page-item.disabled .page-link {
    color: #b0b6c3;
    background: #fff;
}

@media (max-width: 991.98px) {
    .faq-hero {
        padding: 68px 0 56px;
    }

    .faq-hero__layout {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .faq-hero__copy {
        max-width: 740px;
    }

    .faq-hero__visual {
        justify-self: center;
        width: min(100%, 430px);
        margin-top: -10px;
    }
}

@media (max-width: 575.98px) {
    .faq-hero {
        padding: 54px 0 44px;
    }

    .faq-hero::before {
        top: 54px;
        right: -120px;
        width: 320px;
        height: 260px;
    }

    .faq-hero__layout {
        gap: 26px;
    }

    .faq-hero__title {
        font-size: clamp(2.35rem, 11vw, 2.85rem);
    }

    html[lang^="en"] .faq-hero__title {
        font-size: clamp(2rem, 8.4vw, 2.4rem);
        line-height: 1.08;
    }

    .faq-hero__description {
        margin-top: 18px;
        font-size: .94rem;
        line-height: 1.78;
    }

    .faq-hero__visual {
        width: min(100%, 276px);
        margin-top: 0;
    }

    .faq-hero__search {
        margin-top: 24px;
    }

    .faq-hero__search .input-group {
        flex-wrap: wrap;
        gap: 6px;
        padding: 6px;
        border-radius: 18px;
    }

    .faq-hero__search .form-control {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        min-height: 52px;
        border-radius: 12px !important;
    }

    .faq-hero__search .btn {
        flex: 1 1 100%;
        width: 100%;
        min-height: 50px;
        border-radius: 12px !important;
    }

    .faq-content {
        padding-top: 44px;
    }

    .faq-search .input-group {
        flex-wrap: wrap;
    }

        .faq-search .input-group > .form-control {
            flex: 1 1 100%;
            width: 100%;
            max-width: none;
            border-radius: 12px 12px 0 0;
        }

        .faq-search .input-group > .btn {
            flex: 1 1 100%;
            width: 100%;
            border-radius: 0 0 12px 12px;
        }

    .stock-accordion .accordion-button {
        flex-wrap: wrap;
        padding: 16px;
    }

    .stock-accordion .accordion-button::after {
        margin-left: auto;
    }

    .faq-question {
        flex: 1 1 180px;
    }

    .faq-pagination .page-item:not(.active):not(:first-child):not(:last-child) {
        display: none;
    }

    .faq-pagination .page-link {
        min-width: 72px;
        padding: 8px 12px;
        font-size: .86rem;
    }
}
