/**
 * QA Block - 前台樣式
 * 與 page-qa.php 一致的樣式
 */

/* QA 區塊容器 */
.wp-block-my-theme-qa-block {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* QA 列表 */
.qa-block-list {
    display: grid;
    gap: 20px;
}

/* QA 項目 */
.qa-block-front-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.qa-block-front-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 問題區塊 */
.qa-block-question {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.qa-block-question:hover {
    background: #e9ecef;
}

/* Q 圖示 */
.qa-block-question-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

/* 問題文字 */
.qa-block-question-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
}

/* 箭頭 */
.qa-block-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.qa-block-arrow svg {
    width: 100%;
    height: 100%;
    fill: #4A90E2;
}

.qa-block-front-item.active .qa-block-arrow {
    transform: rotate(90deg);
}

/* 答案區塊 */
.qa-block-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
}

.qa-block-front-item.active .qa-block-answer {
    max-height: 1000px;
}

.qa-block-answer-content {
    padding: 20px;
    color: #666;
    line-height: 1.6;
    border-top: 1px solid #e5e5e5;
}

.qa-block-answer-content p {
    margin: 0 0 15px 0;
}

.qa-block-answer-content p:last-child {
    margin-bottom: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .wp-block-my-theme-qa-block {
        margin: 30px auto;
        padding: 0 15px;
    }

    .qa-block-question {
        padding: 15px;
    }

    .qa-block-question-text {
        font-size: 15px;
    }

    .qa-block-answer-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .wp-block-my-theme-qa-block {
        margin: 20px auto;
        padding: 0 10px;
    }

    .qa-block-question {
        padding: 12px;
        gap: 10px;
    }

    .qa-block-question-icon {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .qa-block-question-text {
        font-size: 14px;
    }

    .qa-block-arrow {
        width: 16px;
        height: 16px;
    }

    .qa-block-answer-content {
        padding: 12px;
        font-size: 14px;
    }
}