/* 基礎設定 */
body {
    font-family: "Microsoft JhengHei", "Heiti TC", sans-serif;
    background-color: #e6f2f8; /* 背景淡藍色 */
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 單個問答卡片 */
.faq-item {
    background-color: #fff;
    border: 1px solid #5fa675; /* 綠色邊框 */
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 問題區域 (可點擊) */
.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.125rem;
    color: #333;
    user-select: none; /* 防止點擊時選取文字 */
}

    .faq-question:hover {
        background-color: #f9fdfa;
    }

/* Icon 樣式 */
.icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0; /* 防止 icon 被擠壓 */
    margin-left: 15px;
}

/* SVG 箭頭設定 */
.arrow-icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid #288a44; /* 預設綠色箭頭 */
    border-bottom: 2px solid #288a44;
    transform: rotate(-45deg); /* 預設向右 */
    transition: all 0.3s ease;
}

/* 答案區域 (隱藏/顯示) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 25px;
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

/* --- 啟動狀態 (Active) --- */

/* 當 active 時，icon 背景變綠色 */
.faq-item.active .icon-wrapper {
    background-color: #218838;
}

/* 當 active 時，箭頭變白色且轉向 */
.faq-item.active .arrow-icon {
    border-color: #fff;
    transform: rotate(45deg); /* 轉向向下 */
    margin-top: -5px; /* 微調位置使其居中 */
}

/* 當 active 時，答案顯示 */
.faq-item.active .faq-answer {
    padding-bottom: 35px; /* 展開時才給底部 padding */
}
