/* =========================================================================
   삼우건축 고객센터 - 자주 묻는 질문 (FAQ) 스킨 스타일
   ========================================================================= */

/* Accessibility */
.sound_only {
    display: none !important;
}

/* ===== Hero Banner Section ===== */
.cs_hero_section {
    width: 100%;
    height: 400px;
    background-image: url('/theme/samwoo/images/pc/support/main.png');
    background-size: auto;
    background-position: center top;
    background-repeat: no-repeat;
}

.cs_hero_section picture {
    display: none; /* Hide default responsive picture on PC */
}

@media (max-width: 1024px) {
    .cs_hero_section {
        height: auto;
        background-image: none;
    }
    .cs_hero_section picture {
        display: block;
    }
    .cs_hero_section picture img {
        width: 100%;
        height: auto;
        display: block;
    }
}

/* ===== Tab Navigation ===== */
.cs_tab_wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px 0;
}

.cs_tab_title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #222;
    margin: 0 0 30px 0;
    letter-spacing: -0.03em;
}

.cs_tab_nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0;
}

.cs_tab_link {
    flex: 1;
    text-align: center;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: #999;
    text-decoration: none;
    padding: 16px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.cs_tab_link:hover {
    color: #555;
}

.cs_tab_link.active {
    color: #927554;
    font-weight: 700;
    border-bottom-color: #927554;
}

/* ===== FAQ Content Container ===== */
.faq_content_wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 40px 100px;
    display: flex;
    flex-direction: column;
}

.faq_section_title {
    order: 1;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin: 40px 0 30px 0;
    letter-spacing: -0.02em;
}

/* ===== Search + Count Toolbar (PC: Order 2, Mobile: Order 3) ===== */
.faq_toolbar {
    order: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.faq_total_count {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.faq_search_form {
    display: flex;
    align-items: center;
}

.faq_search_box {
    position: relative;
    width: 320px;
}

.faq_search_input {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    width: 100%;
    padding: 12px 48px 12px 20px;
    border: none;
    border-radius: 30px;
    outline: none;
    color: #333;
    box-sizing: border-box;
    background: #f5f5f5;
    transition: all 0.2s;
}

.faq_search_input::placeholder {
    color: #999;
}

.faq_search_input:focus {
    background: #eaeaea;
}

.faq_search_btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* ===== Category Filter (PC: Order 3, Mobile: Order 2) ===== */
.faq_category_wrap {
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.faq_category_wrap a {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid #e5dfd9;
    border-radius: 30px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background-color: #fff;
    transition: all 0.2s ease;
    text-decoration: none;
}

.faq_category_wrap a.active,
.faq_category_wrap a:hover {
    background-color: #2e2e2e;
    border-color: #2e2e2e;
    color: #fff;
}

/* ===== Accordion List (Order 4) ===== */
.faq_accordion {
    order: 4;
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    border-top: 2px solid #222;
}

.faq_accordion > li {
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.faq_question {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    cursor: pointer;
    background: #fff;
    transition: background-color 0.2s;
    user-select: none;
}

.faq_question:hover {
    background-color: #fafafa;
}

.faq_q_category {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #927554;
    width: 130px;
    flex-shrink: 0;
}

/* In GnuBoard, we can style specific categories differently if needed */
.faq_q_category:contains('인테리어상담') {
    color: #ca7a44;
}

.faq_q_label {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-right: 12px;
    flex-shrink: 0;
}

.faq_q_text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    flex-grow: 1;
    line-height: 1.5;
    padding-right: 20px;
}

.faq_q_toggle {
    flex-shrink: 0;
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.faq_q_toggle i {
    transition: transform 0.3s ease;
}

/* Open State */
.faq_accordion > li.open .faq_question {
    background-color: #fafafa;
}

.faq_accordion > li.open .faq_q_toggle i {
    transform: rotate(180deg);
}

.faq_answer {
    display: none;
    background: #faf9f7;
    border-top: 1px solid #f0ebe4;
}

.faq_accordion > li.open .faq_answer {
    display: block;
}

.faq_a_inner {
    display: flex;
    padding: 30px 20px 30px 170px; /* Offset to align with the question text */
}

.faq_a_label {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-right: 12px;
    flex-shrink: 0;
}

.faq_a_text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    flex-grow: 1;
    word-break: break-all;
}

.faq_a_text p {
    margin: 0 0 10px 0;
}

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

/* Empty State */
.faq_empty {
    order: 4;
    text-align: center;
    padding: 80px 0;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    color: #888;
    border-top: 2px solid #222;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

/* ===== Pagination (Order 5) ===== */
.faq_pagination_wrap {
    order: 5;
    margin-top: 40px;
}

.pg_wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.pg_wrap .pg_current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #927554;
    color: #fff;
    border-radius: 50%;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin: 0 3px;
}

.pg_wrap .pg_page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #888;
    border-radius: 50%;
    text-decoration: none;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin: 0 3px;
}

.pg_wrap .pg_page:hover {
    background: #f5f0eb;
    color: #333;
}

.pg_wrap .pg_start,
.pg_wrap .pg_prev,
.pg_wrap .pg_next,
.pg_wrap .pg_end {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: 34px;
    line-height: 34px;
    border-radius: 17px !important;
    padding: 0 12px !important;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    background: #f5f0eb;
    border: 1px solid #e8e2dc;
    transition: all 0.2s;
    box-sizing: border-box;
}

.pg_wrap .pg_start:hover,
.pg_wrap .pg_prev:hover,
.pg_wrap .pg_next:hover,
.pg_wrap .pg_end:hover {
    background: #927554;
    color: #fff;
    border-color: #927554;
}

/* ===== Admin Panel (Order 6) ===== */
.faq_admin {
    order: 6;
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.faq_admin .btn_admin {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 600;
    background: #927554;
    color: #fff;
    border-radius: 6px;
    padding: 10px 24px;
    text-decoration: none;
    transition: all 0.2s;
}

.faq_admin .btn_admin:hover {
    background: #7a5f43;
}


/* =========================================================================
   Responsive Design for Mobile
   ========================================================================= */
@media (max-width: 1024px) {
    .cs_tab_wrap {
        padding: 40px 20px 0;
    }

    .cs_tab_title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .cs_tab_link {
        font-size: 15px;
        padding: 14px 0;
    }

    .faq_content_wrap {
        padding: 30px 20px 60px;
    }

    .faq_section_title {
        font-size: 24px;
        margin: 30px 0 20px 0;
    }

    /* Change order on mobile: title(1) -> category(2) -> toolbar(3) -> accordion(4) */
    .faq_category_wrap {
        order: 2;
        margin-bottom: 16px;
        gap: 6px;
    }

    .faq_category_wrap a {
        padding: 8px 18px;
        font-size: 13px;
    }

    .faq_toolbar {
        order: 3;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 20px;
    }

    .faq_search_box {
        width: 100%;
    }

    .faq_search_input {
        padding: 10px 44px 10px 18px;
        font-size: 13px;
    }

    .faq_total_count {
        font-size: 13px;
        color: #666;
    }

    /* Accordion in Mobile */
    .faq_question {
        padding: 18px 12px;
        flex-wrap: wrap;
    }

    .faq_q_category {
        width: auto;
        margin-right: 8px;
        font-size: 13px;
    }

    .faq_q_label {
        font-size: 14px;
        margin-right: 6px;
    }

    .faq_q_text {
        font-size: 14px;
        width: calc(100% - 120px); /* Leave space for category, label, and toggle */
        flex-grow: 1;
        padding-right: 10px;
    }

    .faq_q_toggle {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .faq_a_inner {
        padding: 20px 12px;
        flex-direction: row;
    }

    .faq_a_label {
        font-size: 14px;
        margin-right: 6px;
    }

    .faq_a_text {
        font-size: 14px;
        line-height: 1.6;
    }
}
