/* ========== FAQ 페이지 ========== */

.faq-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.faq-inner {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 40px;
}

/* ========== 카테고리 탭 ========== */
.faq-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.faq-tab-item {
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-sub1);
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: #fff;
    transition: all 0.15s;
    white-space: nowrap;
}

.faq-tab-item:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

.faq-tab-item.active {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
    font-weight: 600;
}

/* ========== 검색 ========== */
.faq-search {
    margin-bottom: 32px;
}

.faq-search-form {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-search-form:focus-within {
    border-color: var(--main-color);
}

.faq-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text-main);
    background: transparent;
}

.faq-search-input::placeholder {
    color: #aaa;
}

.faq-search-btn {
    border: none;
    background: none;
    padding: 14px 18px;
    cursor: pointer;
    color: var(--text-sub2);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.faq-search-btn:hover {
    color: var(--main-color);
}

/* ========== FAQ 목록 ========== */
.faq-list {
    border-top: 2px solid var(--text-main);
}

.faq-list-header {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.faq-list-header .faq-col-num,
.faq-list-header .faq-col-cat,
.faq-list-header .faq-col-question {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-sub1);
    text-align: center;
}

.faq-col-num {
    width: 70px;
    min-width: 70px;
    text-align: center;
    font-size: 14px;
    color: var(--text-sub2);
}

.faq-col-cat {
    width: 140px;
    min-width: 140px;
    text-align: center;
    padding: 0 8px;
}

.faq-col-question {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
}

/* 목록 행 */
.faq-list-row {
    display: flex;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}

.faq-list-row:hover {
    background: #f8f7fc;
}

/* 카테고리 라벨 */
.faq-cat-label {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--main-color);
    background: rgba(123, 104, 184, 0.08);
    border-radius: 4px;
    white-space: nowrap;
}

/* Q 마크 */
.faq-q-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: var(--main-color);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    flex-shrink: 0;
    margin: 0 6px;
}

.faq-q-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.5;
    word-break: keep-all;
}

.faq-list-row:hover .faq-q-text {
    color: var(--main-color);
}

/* ========== 빈 상태 ========== */
.faq-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--text-sub2);
    border-top: 2px solid var(--text-main);
}

.faq-empty svg {
    margin-bottom: 16px;
    color: #ccc;
}

.faq-empty p {
    font-size: 15px;
    margin: 0;
}

/* ========== FAQ 상세 페이지 ========== */
.faq-detail-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.faq-detail-category {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(123, 104, 184, 0.08);
    color: var(--main-color);
    font-size: 13px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 16px;
}

.faq-detail-question {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 14px;
    line-height: 1.5;
    word-break: keep-all;
}

.faq-detail-q-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: var(--main-color);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
    margin-top: 2px;
}

.faq-detail-meta {
    font-size: 14px;
    color: var(--text-sub2);
    padding-left: 48px;
}

/* 답변 영역 */
.faq-detail-content {
    min-height: 200px;
    margin-bottom: 40px;
}

.faq-detail-answer {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 32px;
    background: #f9f8fc;
    border-radius: 10px;
}

.faq-detail-a-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: var(--sub-color);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

.faq-detail-a-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.85;
    color: var(--text-main);
    padding-top: 5px;
    word-break: keep-all;
}

.faq-detail-a-text p {
    margin: 0 0 12px;
}

/* 목록 버튼 */
.faq-detail-actions {
    margin-top: 40px;
}

.faq-detail-actions .btn-list {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px 0;
    background-color: var(--text-main);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    letter-spacing: 0.5px;
}

.faq-detail-actions .btn-list:hover {
    background-color: var(--sub-color);
}

/* ========== 반응형 ========== */
@media (max-width: 1024px) {
    .faq-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
    }

    .faq-tab-item {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .faq-wrap {
        padding-bottom: 60px;
    }

    .faq-tab-item {
        padding: 8px 16px;
        font-size: 14px;
    }

    .faq-search-input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .faq-list-header {
        display: none;
    }

    .faq-col-num {
        display: none;
    }

    .faq-col-cat {
        display: none;
    }

    .faq-list-row {
        padding: 16px 4px;
    }

    .faq-col-question {
        padding-right: 0;
    }

    .faq-q-text {
        font-size: 14px;
    }

    .faq-detail-question {
        font-size: 18px;
    }

    .faq-detail-answer {
        padding: 24px 20px;
    }

    .faq-detail-a-text {
        font-size: 15px;
    }

    .faq-detail-meta {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .faq-tabs {
        gap: 5px;
    }

    .faq-tab-item {
        padding: 7px 12px;
        font-size: 13px;
    }

    .faq-q-mark {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 12px;
        border-radius: 5px;
    }

    .faq-q-text {
        font-size: 13px;
    }

    .faq-detail-question {
        font-size: 16px;
    }

    .faq-detail-q-icon,
    .faq-detail-a-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 14px;
    }

    .faq-detail-answer {
        padding: 18px 14px;
        flex-direction: column;
    }

    .faq-detail-a-text {
        font-size: 14px;
    }
}
