/* FAQ Page Styles */

/* KV Section */
.kv_wrap {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 80px;
    overflow: hidden;
    background: url('/resources/images/faq/kv_img.png') center top / cover no-repeat;
}
.kv_wrap .inner {
    margin: 0 auto;
    padding: 115px 40px 0;
    max-width: 1280px;
}
.kv_wrap .inner h2 {
    color: #fff;
    font-size: 64px;
    font-weight: 700;
}

/* Tab Section */
.faq_tabs_wrap {
    position: sticky;
    top: 80px;
    width: 100%;
    margin-top: 40px;
    background: #fff;
    z-index: 100;
}

.faq_tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 1280px;
}

.faq_tabs button {
    text-indent: 0;
}

.faq_tab {
    position: relative;
    width: 240px;
    height: 52px;
    background: #fff;
    border: 1px solid #2196f3;
    border-left: none;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 24px;
    color: #2196f3;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq_tab:first-child {
    border-left: 1px solid #2196f3;
}

.faq_tab.active {
    background: #2196f3;
    color: #fff;
    font-weight: 500;
}

.faq_tab:hover:not(.active) {
    background: #e3f2fd;
}

/* FAQ Content Section */
.faq_content {
    padding: 80px 0;
    background: #fff;
}

.faq_content .inner {
    margin: 0 auto;
    padding: 0 40px;
    max-width: 1280px;
}

.faq_section {
    margin-bottom: 80px;
    scroll-margin-top: 160px; /* 헤더(80px) + sticky탭(52px) + 여백(28px) */
}

.faq_section:last-child {
    margin-bottom: 0;
}

.faq_section_title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 56px;
    color: #000;
    margin: 0 0 29px 0;
}

.faq_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq_list::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: #000;
    margin-bottom: 0;
}

.faq_item {
    border-bottom: 1px solid #ddd;
}

/* Q - 질문 */
.faq_question {
    width: 100%;
    padding: 20px 10px 20px 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    text-indent: 0;
    gap: 16px;
    align-items: flex-start;
    transition: background-color 0.2s ease;
}

.faq_question:hover {
    background-color: transparent;
}

.faq_q_icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #000;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #fff;
    line-height: 32px;
}

.faq_question_text {
    flex: 1;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
    color: #000;
    padding: 4px 0;
    text-align: left;
}

.faq_question.active .faq_question_text {
    font-weight: 700;
}

.faq_toggle_icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-image: url('/resources/images/faq/icon_plus.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.faq_question.active .faq_toggle_icon {
    background-image: url('/resources/images/faq/icon_minus.svg');
}

/* A - 답변 */
.faq_answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq_answer.active {
    max-height: 2000px;
}

.faq_answer_inner {
    display: flex;
    gap: 16px;
    padding: 0 10px 20px 0;
}

.faq_a_icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #2196f3;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #fff;
    line-height: 32px;
}

.faq_answer_content {
    flex: 1;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #000;
    padding: 8px 0;
    white-space: pre-wrap;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .kv_wrap {
        margin-top:50px;
    }
    .faq_tabs {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .faq_tab {
        flex-shrink: 0;
    }

    .faq_content .inner {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .kv_wrap {
        height: 300px;
        margin-top: 50px;
    }

    .kv_wrap .inner {
        padding: 80px 20px 0;
    }

    .kv_wrap .inner h2 {
        font-size: 48px;
    }

    .faq_tabs_wrap {
        top:50px;
        margin-top: 0;
    }
    .faq_tab {
        width: 160px;
        font-size: 14px;
    }

    .faq_content {
        padding: 40px 0;
    }

    .faq_content .inner {
        padding: 0 20px;
    }

    .faq_section {
        margin-bottom: 60px;
        scroll-margin-top: 120px; /* 모바일 헤더(50px) + sticky탭(52px) + 여백(18px) */
    }

    .faq_section_title {
        font-size: 32px;
        line-height: 40px;
        margin-bottom: 40px;
    }

    .faq_question {
        padding: 16px 8px 16px 0;
        gap: 12px;
    }

    .faq_q_icon,
    .faq_a_icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
        line-height: 24px;
    }

    .faq_question_text {
        font-size: 18px;
        line-height: 28px;
    }

    .faq_toggle_icon {
        width: 32px;
        height: 32px;
    }

    .faq_answer_inner {
        padding: 0 8px 16px 0;
        gap: 12px;
    }

    .faq_answer_content {
        font-size: 14px;
        line-height: 1.5;
    }
}
