@charset "utf-8";

/* ==============================================
   FAQ 스킨 전용 스타일
   ============================================== */

/* FAQ 컨테이너 */
.faq-container {
    max-width: var(--wrap) !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* 히어로 섹션 */
.page-hero {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-d) 100%);
    border-radius: 0 0 32px 32px;
    padding: 60px 40px;
    margin-bottom: 50px;
    text-align: center;
    color: #fff;
}
.page-hero h1 {
    font-size: 36px;
    margin-bottom: 12px;
}
.page-hero h1 i {
    margin-right: 12px;
}
.page-hero p {
    font-size: 16px;
    opacity: 0.9;
}

/* FAQ 목록 */
.faq_list {
    max-width: 800px;
    margin: 0 auto 40px;
}

/* FAQ 아이템 */
.faq_item {
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #fff;
}

/* 질문 영역 */
.faq_question {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
}
.faq_question:hover {
    background: var(--bg);
}
.faq_question .q_mark {
    width: 30px;
    height: 30px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.faq_question span:not(.q_mark) {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
    color: var(--txt);
}
.faq_question i {
    color: var(--txt-s);
    transition: transform 0.3s;
    font-size: 14px;
}
.faq_item.open .faq_question i {
    transform: rotate(180deg);
}

/* ✅ 답변 영역 - max-height 트릭 (더 안정적) */
.faq_answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg);
}

.faq_item.open .faq_answer {
    max-height: 500px;  /* 충분히 큰 값 (내용이 더 길면 증가) */
}

.faq_answer_inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px 22px 22px;
    border-top: 1px solid var(--border);
}

.faq_answer .a_mark {
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.faq_answer_content {
    flex: 1;
    line-height: 1.7;
}

.faq_answer_content p {
    font-size: 15px;
    color: var(--txt-s);
    margin: 0 0 8px 0;
    line-height: 1.7;
}

.faq_answer_content p:last-child {
    margin-bottom: 0;
}

/* 내용이 500px보다 길 경우 대비 (FAQ 내용이 길면 숫자 증가) */
.faq_item .faq_answer {
    max-height: 0;
}
.faq_item.open .faq_answer {
    max-height: 500px;
}
/* 만약 내용이 더 길다면 여기에 추가 */
.faq_item.long-content.open .faq_answer {
    max-height: 800px;
}

/* 빈 목록 */
.faq_empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--txt-s);
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}
.faq_empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
    color: #ccc;
}

/* 마무리 문구 */
.closing_msg {
    text-align: center;
    padding: 40px 20px;
    font-size: 20px;
    font-weight: 500;
    color: var(--brand);
    border-top: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
}

/* 반응형 */
@media (max-width: 768px) {
    .page-hero {
        padding: 40px 24px;
    }
    .page-hero h1 {
        font-size: 28px;
    }
    .faq-container {
        padding: 0 16px !important;
    }
    .faq_question {
        padding: 14px 18px;
        gap: 10px;
    }
    .faq_question span:not(.q_mark) {
        font-size: 13px;
    }
    .faq_answer_inner {
        padding: 14px 18px 18px 18px;
        gap: 10px;
    }
    .faq_answer .a_mark {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    .faq_answer_content p {
        font-size: 13px;
    }
    .closing_msg {
        font-size: 14px;
        padding: 30px 16px;
    }
}