/* ════════════════════════════════════════════════════════
   view.css  —  주요 해결사례 상세 페이지
   레퍼런스: 이미지 첨부 디자인 (밝은 배경, 딥네이비 타이포, 우측 사이드바)
   ════════════════════════════════════════════════════════ */

:root {
    --bv-navy:      #1a2744;
    --bv-navy-soft: #2c3e6b;
    --bv-accent:    var(--main-color);
    --bv-accent-lt: #e6f5fa;
    --bv-gold:      var(--gold-color);
    --bv-bg:        #f7f8fc;
    --bv-white:     #ffffff;
    --bv-border:    #e2e6f0;
    --bv-text:      #333d52;
    --bv-muted:     #7a849a;
    --bv-radius:    12px;
    --bv-shadow:    0 4px 24px rgba(26,39,68,.08);
}


.header {
    border-bottom: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
    background-color: #fff;
}

.header .logo-w {
    display: none;
}

.header .logo {
    display: flex;
}

.header .gnb-menu li a {
    color: #3d3d3d;
    font-weight: 700;
}

.header .menuBtns {
    background-color: var(--main-color);
}


/* ── 히어로 ──────────────────────────────────────────────── */
.bv-hero {
    background: var(--bv-bg);
    padding: 80rem 0;
    margin-top: 100px;
}
.bv-hero-inner {
    text-align: center;
    margin: 0 auto;
}


/* ── 배지 ────────────────────────────────────────────────── */
.bv-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.bv-badges span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 100px;
    letter-spacing: .02em;
}
.badge-category {
    background: var(--bv-navy);
    color: #fff;
}
.badge-agency {
    background: var(--bv-accent-lt);
    color: var(--bv-accent);
    border: 1px solid #c7d6f9;
}
.badge-result {
    background: #f0faf4;
    color: #1f7a45;
    border: 1px solid #b8e6cb;
}
.result-win-full  { background: #f0faf4; color: #1f7a45; border-color: #b8e6cb; }
.result-win-part  { background: #fdf5e8; color: #8a6010; border-color: #f0d48a; }
.result-agree     { background: #eef7fd; color: var(--bv-accent); border-color: #c7d6f9; }
.result-mediate,
.result-settle    { background: #f5f0fb; color: #6b3fb5; border-color: #d8c9f5; }


/* ── 히어로 제목 ─────────────────────────────────────────── */
.bv-title {
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800;
    color: var(--bv-navy);
    line-height: 1.4;
    letter-spacing: -.02em;
    margin: 0 0 20px;
    word-break: keep-all;
}


/* ── 해시태그 ────────────────────────────────────────────── */
.bv-hashtags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.bv-tag {
    font-size: 14px;
    color: var(--bv-muted);
    letter-spacing: .01em;
}
.bv-tag:not(:last-child)::after {
    content: '';
    margin-left: 8px;
}


/* ── 관리자 버튼 ─────────────────────────────────────────── */
.bv-admin-btns {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.bv-btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bv-white);
    border: 1px solid var(--bv-border);
    color: var(--bv-text);
    text-decoration: none;
    transition: all .2s;
}
.bv-btn-admin:hover { border-color: var(--bv-accent); color: var(--bv-accent); }
.bv-btn-del:hover   { border-color: #e04040; color: #e04040; }


/* ── 본문 레이아웃 ───────────────────────────────────────── */
.bv-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin: 56px auto;
    align-items: start;
}


/* ── 사례요약 박스 ───────────────────────────────────────── */
.bv-summary {
    background: var(--bv-white);
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius);
    padding: 24px 28px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.8;
    color: var(--bv-text);
    margin-bottom: 36px;
}


/* ── 모바일 목차 ─────────────────────────────────────────── */
.bv-toc-mobile {
    display: none;
    margin-bottom: 32px;
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius);
    overflow: hidden;
}
.bv-toc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bv-white);
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--bv-navy);
    cursor: pointer;
}
.bv-toc-toggle i { font-size: 18px; transition: transform .2s; }
#bv-toc-list-mobile { overflow: hidden; transition: max-height .3s ease; }
#bv-toc-list-mobile.is-open { max-height: 400px; }


/* ── 섹션 공통 ───────────────────────────────────────────── */
.bv-section {
    margin-bottom: 80rem;
}
.bv-sec-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--bv-navy);
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bv-border);
    letter-spacing: -.01em;
}
.bv-sec-num {
    color: var(--bv-accent);
    background: var(--bv-accent-lt);
    width: 40rem;
    height: 40rem;
    font-size: 15rem;
    font-weight: 700;
    letter-spacing: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.bv-sec-body {
    font-size: 19px;
    line-height: 1.9;
    color: var(--bv-text);
    word-break: keep-all;
}



/* ── 의뢰인 후기 ─────────────────────────────────────────── */
.bv-chat-wrap {
    background: #bacee0;
    padding: 80rem 50rem;
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    border-radius: var(--bv-radius);
}

/* wr_content - 흰색, 좌측 상단 */
.bv-chat-user {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
}

.bv-chat-user .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
}

.bv-chat-user .bubble {
    background: #fff;
    border-radius: 0 18px 18px 18px;
    padding: 16px 18px;
    font-size: 18px;
    line-height: 1.7;
    color: #1a1a1a;
    max-width: 65%;
}

/* lawyer_note - 노란색, 우측 하단 */
.bv-chat-lawyer {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
}

.bv-chat-lawyer .bubble {
    background: #FFE033;
    border-radius: 18px 0 18px 18px;
    padding: 16px 18px;
    font-size: 18px;
    line-height: 1.7;
    color: #1a1a1a;
    max-width: 65%;
}

.bv-chat-lawyer .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}


.bt-notice {
    padding: 30rem;
    color: #555;
    font-size: 15px;
    line-height: 1.4;
    background: var(--bv-bg);
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius);
    padding: 22px 20px 18px;
    text-align: center;
}



/* ── 사이드바 공통 ───────────────────────────────────────── */
.bv-sidebar {
    position: sticky;
    top: 160rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bv-side-box {
    background: var(--bv-white);
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius);
    overflow: hidden;
    box-shadow: var(--bv-shadow);
}
.bv-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bv-border);
}
.bv-side-header span {
    font-size: 15px;
    font-weight: 700;
    color: var(--bv-navy);
}
.bv-toc-collapse {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--bv-muted);
    font-size: 20px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}
.bv-toc-collapse:hover { color: var(--bv-navy); }


/* ── 사이드 목차 리스트 ──────────────────────────────────── */
.bv-toc-list {
    list-style: none;
    padding: 12px 0;
    margin: 0;
    transition: all .25s ease;
}
.bv-toc-list.is-collapsed {
    display: none;
}
.bv-toc-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 16px;
    color: var(--bv-text);
    text-decoration: none;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.bv-toc-list li a em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: var(--bv-accent);
    background: var(--bv-accent-lt);
    padding: 2px 7px;
    border-radius: 100px;
    flex-shrink: 0;
}

.bv-toc-list li a:hover {
    background-color: #f7f7f7;
}

.bv-toc-list li a.is-active {
    color: var(--bv-accent);
    border-left-color: var(--bv-accent);
    background: var(--bv-accent-lt);
    font-weight: bold;
}
.bv-toc-list li a.is-active em {
    background: var(--bv-accent);
    color: #fff;
}


/* ── 담당 변호사 사이드 ──────────────────────────────────── */
.bv-lawyer-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
}
.bv-lawyer-info.is-collapsed { display: none; }
.bv-lawyer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bv-accent-lt);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bv-lawyer-avatar i {
    font-size: 26px;
    color: var(--bv-accent);
}
.bv-lawyer-meta { display: flex; flex-direction: column; gap: 4px; }
.bv-lawyer-meta strong {
    font-size: 17px;
    font-weight: 700;
    color: var(--bv-navy);
}
.bv-lawyer-meta span {
    font-size: 12px;
    color: var(--bv-muted);
}

.bv-field-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}
.bv-field-tag {
    font-size: 11px;
    padding: 2px 8px;
    color: var(--bv-accent);
    border-radius: 100px;
    border: 1px solid #c7d6f9;
    white-space: nowrap;
}
.bv-field-tag:hover {
    color: #fff;
    border: 1px solid var(--main-color);
    background-color: var(--main-color);
}



/* ── 상담 신청 CTA 버튼 ──────────────────────────────────── */
.bv-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 24px;
    background: var(--bv-navy);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--bv-radius);
    text-decoration: none;
    transition: background .2s;
    letter-spacing: .02em;
}
.bv-cta-btn i { font-size: 20px; }
.bv-cta-btn:hover { background: var(--bv-accent); color: #fff; }


/* ══ 반응형 ══════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .bv-toc-collapse,
    .bv-toc-toggle i {
        display: none;
    }
    
    .bv-layout {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 32px auto;
    }

    .bv-summary {
        margin-bottom: 10px;
    }
    
    .bv-sidebar {
        position: static;
        order: -1;
        /* 모바일에서 사이드바는 본문 위로 */
    }

    /* 데스크톱 전용 사이드 목차 숨기고 모바일 인라인 목차 노출 */
    #bv-toc-box {
        display: none;
    }

    .bv-toc-mobile {
        display: block;
    }

    .bv-side-lawyer {
        order: 0;
        margin-bottom: 10px;
        box-shadow: none;
    }

    .bv-cta-btn {
        order: 1;
    }

    .bv-section {
        margin-bottom: 50px;
    }

    .bv-toc-list li a {
        font-size: 18px;
        font-weight: 500;
    }

    .bv-lawyer-note .bv-sec-body {
        margin-top: 0;
    }
    
    #bv-sec-reviews {
        margin-bottom: 20px;
    }

    .bv-review-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .bv-chat-wrap {
        padding: 40px 20px;
    }

    .bubble {
        max-width: 77% !important;
    }
}


@media (max-width: 768px) {
    .bv-hero {
        margin-top: 80px;
    }
}


@media (max-width: 550px) {
    .bv-hero {
        margin-top: 70px;
    }

    .bv-hero-inner {
        padding: 0 20px;
    }

    .bv-title {
        font-size: 22px;
        padding: 0 15%;
    }

    .bv-sec-num {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .bv-sec-title {
        font-size: 22px;
    }

    .bv-sec-body {
        font-size: 16px;
        line-height: 1.7;
    }

    .bv-toc-list li a {
        padding: 6px 20px;
        font-size: 16px;
    }

    .bv-chat-user,
    .bv-chat-lawyer {
        gap: 8px;
    }

    .avatar {
        width: 36px !important;
        height: 36px !important;
    }
    
    .bubble {
        font-size: 15px !important;
        line-height: 1.5 !important;
    }
}