/* =========================================================
   XIAOHUYE FAQ
   首頁常見問題
   Version: 2026-08-05 FAQ V3 MOBILE FIXED
========================================================= */

.faq,
.faq * {
    box-sizing: border-box;
}

.faq {
    position: relative;

    padding:
        88px
        0
        94px;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #f3f6f8 0%,
            #ffffff 52%,
            #f5f7f9 100%
        );
}

.faq::before {
    content: "";

    position: absolute;
    top: -180px;
    left: 50%;

    width: 720px;
    height: 360px;

    border-radius: 50%;

    background:
        radial-gradient(
            ellipse,
            rgba(245, 154, 35, 0.10) 0%,
            rgba(245, 154, 35, 0) 72%
        );

    transform: translateX(-50%);

    pointer-events: none;
}

.faq__container {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 920px;

    margin:
        0
        auto;

    padding:
        0
        24px;
}


/* =========================================================
   區塊標題
========================================================= */

.faq__header {
    max-width: 760px;

    margin:
        0
        auto;

    text-align: center;
}

.faq__eyebrow {
    display: flex;

    align-items: center;
    justify-content: center;
    gap: 10px;

    color: #d9780a;

    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.18em;
}

.faq__eyebrow-line {
    width: 36px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(217, 120, 10, 0.72) 100%
        );
}

.faq__eyebrow-line:last-child {
    background:
        linear-gradient(
            90deg,
            rgba(217, 120, 10, 0.72) 0%,
            transparent 100%
        );
}

.faq__title {
    margin:
        18px
        0
        0;

    color: #07111d;

    font-size: 43px;
    font-weight: 1000;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.faq__title-accent {
    color: transparent;

    background:
        linear-gradient(
            135deg,
            #f59a23 0%,
            #d9780a 100%
        );

    -webkit-background-clip: text;
    background-clip: text;
}

.faq__subtitle {
    max-width: 650px;

    margin:
        17px
        auto
        0;

    color: #66788a;

    font-size: 15px;
    line-height: 1.8;
}


/* =========================================================
   FAQ 列表
========================================================= */

.faq__list {
    display: flex;

    margin-top: 42px;

    flex-direction: column;
    gap: 11px;
}


/* =========================================================
   單一 FAQ
========================================================= */

.faq-item {
    overflow: hidden;

    border: 1px solid #dde4ea;
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.92);

    box-shadow:
        0 10px 28px rgba(15, 27, 45, 0.055);

    transition:
        border-color 0.20s ease,
        box-shadow 0.20s ease;
}

.faq-item.is-open {
    border-color: rgba(245, 154, 35, 0.35);

    box-shadow:
        0 15px 34px rgba(15, 27, 45, 0.085);
}


/* =========================================================
   問題按鈕
========================================================= */

.faq-item__question {
    display: flex;

    width: 100%;

    padding:
        18px
        19px;

    align-items: center;
    justify-content: space-between;
    gap: 16px;

    border: 0;

    color: inherit;
    background: transparent;

    font: inherit;

    text-align: left;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.18s ease;
}

.faq-item__question:hover {
    background: rgba(245, 154, 35, 0.035);
}

.faq-item__question:focus-visible {
    outline: 3px solid rgba(245, 154, 35, 0.28);
    outline-offset: -3px;
}

.faq-item__question-content {
    display: flex;

    min-width: 0;

    align-items: center;
    gap: 12px;
}

.faq-item__number {
    display: inline-flex;

    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    align-items: center;
    justify-content: center;

    border: 1px solid #efcf95;
    border-radius: 9px;

    color: #d9780a;
    background: #fff5e3;

    font-size: 10px;
    font-weight: 1000;
    line-height: 1;
}

.faq-item.is-open
.faq-item__number {
    border-color: #f59a23;

    color: #07111d;
    background: #ffc35a;
}

.faq-item__question-text {
    color: #102033;

    font-size: 16px;
    font-weight: 900;
    line-height: 1.5;
}


/* =========================================================
   箭頭
========================================================= */

.faq-item__chevron {
    width: 20px;
    height: 20px;

    flex: 0 0 20px;

    fill: none;
    stroke: #62758a;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        transform 0.28s ease,
        stroke 0.18s ease;
}

.faq-item.is-open
.faq-item__chevron {
    stroke: #d9780a;

    transform: rotate(180deg);
}


/* =========================================================
   回答展開區
========================================================= */

.faq-item__answer-wrap {
    display: grid;

    grid-template-rows: 0fr;

    opacity: 0;

    transition:
        grid-template-rows 0.28s ease,
        opacity 0.24s ease;
}

.faq-item.is-open
.faq-item__answer-wrap {
    grid-template-rows: 1fr;

    opacity: 1;
}

.faq-item__answer-inner {
    min-height: 0;

    overflow: hidden;
}

.faq-item__answer {
    position: relative;

    padding:
        0
        20px
        20px
        63px;

    color: #66788a;

    font-size: 13px;
    line-height: 1.8;
}

.faq-item__answer::before {
    content: "";

    position: absolute;
    top: 2px;
    bottom: 22px;
    left: 46px;

    width: 2px;

    border-radius: 999px;

    background:
        linear-gradient(
            180deg,
            #ffc35a 0%,
            rgba(255, 195, 90, 0.12) 100%
        );
}


/* =========================================================
   加入提示
========================================================= */

.faq__join-note {
    display: flex;

    min-height: 78px;

    margin-top: 18px;
    padding:
        15px
        17px;

    align-items: center;
    gap: 13px;

    border: 1px solid #d9e2ea;
    border-radius: 14px;

    background:
        linear-gradient(
            90deg,
            #ffffff 0%,
            #f7fafc 62%,
            #fff7e9 100%
        );
}

.faq__join-icon {
    display: flex;

    width: 41px;
    height: 41px;

    flex: 0 0 41px;

    align-items: center;
    justify-content: center;

    border: 1px solid #cdddea;
    border-radius: 12px;

    color: #2e79b5;
    background: #eef7fd;
}

.faq__join-icon svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.faq__join-copy {
    min-width: 0;
}

.faq__join-copy strong {
    display: block;

    color: #102033;

    font-size: 12px;
    font-weight: 1000;
    line-height: 1.45;
}

.faq__join-copy span {
    display: block;

    margin-top: 3px;

    color: #6a7b8e;

    font-size: 11px;
    line-height: 1.6;
}


/* =========================================================
   手機
========================================================= */

@media (max-width: 767px) {

    .faq {
        padding:
            67px
            0
            72px;
    }

    .faq__container {
        padding:
            0
            14px;
    }

    .faq__title {
        font-size: 32px;
    }

    .faq__subtitle {
        font-size: 13px;
        line-height: 1.72;
    }

    .faq__list {
        margin-top: 34px;

        gap: 9px;
    }

    .faq-item {
        border-radius: 13px;
    }

    .faq-item__question {
        padding:
            15px
            13px;

        align-items: flex-start;
        gap: 10px;
    }

    .faq-item__question-content {
        align-items: flex-start;

        gap: 9px;
    }

    .faq-item__number {
        width: 28px;
        height: 28px;

        flex-basis: 28px;

        margin-top: 1px;
    }

    .faq-item__question-text {
        font-size: 14px;
        line-height: 1.55;
    }

    .faq-item__chevron {
        width: 18px;
        height: 18px;

        flex-basis: 18px;

        margin-top: 4px;
    }

    .faq-item__answer {
        padding:
            0
            14px
            16px
            51px;

        font-size: 12px;
    }

    .faq-item__answer::before {
        left: 40px;
        bottom: 18px;
    }

    .faq__join-note {
        align-items: flex-start;

        padding:
            14px;
    }

}


/* =========================================================
   小手機
========================================================= */

@media (max-width: 420px) {

    .faq__title {
        font-size: 29px;
    }

    .faq__eyebrow {
        font-size: 8px;
    }

    .faq__eyebrow-line {
        width: 24px;
    }

    .faq__join-note {
        display: block;
    }

    .faq__join-copy {
        margin-top: 10px;
    }

}


/* =========================================================
   減少動畫偏好
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .faq-item,
    .faq-item__question,
    .faq-item__chevron,
    .faq-item__answer-wrap {
        transition: none;
    }

}

/* =========================================================
   MOBILE V2：FAQ 移動端緊湊重排
   只作用於 767px 以下，PC／平板完全不動
========================================================= */

@media (max-width: 767px) {

    /* 整區上下留白明顯縮短 */
    .faq {
        padding:
            43px
            0
            49px;
    }

    .faq__container {
        padding:
            0
            13px;
    }

    /* 標題區 */
    .faq__eyebrow {
        gap: 8px;

        font-size: 7px;
        letter-spacing: 0.14em;
    }

    .faq__eyebrow-line {
        width: 24px;
    }

    .faq__title {
        margin-top: 14px;

        font-size: 28px;
        line-height: 1.14;
    }

    .faq__title-accent {
        display: block;

        margin-top: 3px;
    }

    .faq__subtitle {
        margin-top: 11px;

        font-size: 12px;
        line-height: 1.62;
    }

    /* FAQ 列表 */
    .faq__list {
        margin-top: 27px;

        gap: 7px;
    }

    .faq-item {
        border-radius: 12px;
    }

    /* 問題列縮短 */
    .faq-item__question {
        min-height: 50px;

        padding:
            10px
            11px;

        align-items: center;
        gap: 8px;
    }

    .faq-item__question-content {
        align-items: center;

        gap: 8px;
    }

    .faq-item__number {
        width: 25px;
        height: 25px;

        flex-basis: 25px;

        margin-top: 0;

        border-radius: 7px;

        font-size: 8px;
    }

    .faq-item__question-text {
        font-size: 12px;
        line-height: 1.42;
    }

    .faq-item__chevron {
        width: 16px;
        height: 16px;

        flex-basis: 16px;

        margin-top: 0;
    }

    /* 展開回答改成緊湊版 */
    .faq-item__answer {
        padding:
            0
            12px
            12px
            43px;

        font-size: 10px;
        line-height: 1.62;
    }

    .faq-item__answer::before {
        top: 1px;
        bottom: 13px;
        left: 34px;

        width: 2px;
    }

    /* LINE 登入提示改成緊湊橫向卡 */
    .faq__join-note {
        display: grid;

        min-height: 0;

        margin-top: 10px;
        padding:
            12px
            11px;

        grid-template-columns:
            34px
            minmax(0, 1fr);

        align-items: center;
        gap: 10px;

        border-radius: 12px;
    }

    .faq__join-icon {
        width: 34px;
        height: 34px;

        flex-basis: 34px;

        border-radius: 10px;
    }

    .faq__join-icon svg {
        width: 18px;
        height: 18px;
    }

    .faq__join-copy {
        margin-top: 0;
    }

    .faq__join-copy strong {
        font-size: 10px;
        line-height: 1.4;
    }

    .faq__join-copy span {
        margin-top: 3px;

        font-size: 9px;
        line-height: 1.5;
    }

}


/* =========================================================
   MOBILE V2：小手機
========================================================= */

@media (max-width: 420px) {

    .faq__title {
        font-size: 27px;
    }

    .faq__join-note {
        display: grid;
    }

    .faq__join-copy {
        margin-top: 0;
    }

}
