/* =========================================
   Profile View (교체본)
   ========================================= */

:root{
    --main-navi:#204B62;
    --main-text:#333;
    --main-white:#fff;

    --wrap-max: 1200px;
    --hero-max: 1400px;

    --gap: 32px;
    --muted-bg: #ededed;
    --tag-border: 2px solid var(--main-navi);
}

/* 상단(프로필) 영역 */
.main{
    width: 100%;
    min-height: 720px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;  /* 좌(텍스트) / 우(이미지) */
    align-items: end;
    gap: var(--gap);
    max-width: var(--hero-max);
    margin: 0 auto;
    padding: 80px 20px 40px;
    box-sizing: border-box;
}

/* 좌측 텍스트 묶음 */
.txt{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

/* quote 이미지 */
.txt .quote{
    width: min(720px, 100%);
    margin: 0;                 /* 기존 고정 margin 제거 */
}

/* 이름/직함/연락처 영역 */
.info{
    margin: 0;                 /* 기존 고정 margin 제거 */
    color: var(--main-text);
}
.info h1{
    font-size: 44px;
    margin: 0 0 10px;
    line-height: 1.2;
    display: block;
}
.info h1 span{
    display: block;
    margin-top: 6px;
    font-size: 28px;
    font-weight: 400;
    color: var(--main-text);
}
.info p{
    font-size: 22px;
    margin: 14px 0 0;
}
.info p strong{
    font-size: 22px;
}

/* 태그 */
.tags{
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tags span{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--main-navi);
    font-weight: 800;
    font-size: 15px;
    padding: 7px 14px;
    border-radius: 999px;
    border: var(--tag-border);
}

/* 우측 이미지 */
.img{
    display: flex;
    align-items: end;
    justify-content: center;
}
.img img{
    width: min(520px, 100%);
    height: auto;
    /* 사진마다 가로세로가 조금씩 달라(0.55~0.69) 고정 비율 상자에 담는다.
       사진이 도착하기 전부터 자리가 잡혀 아래 글이 밀리지 않는다 (2026-10-19) */
    aspect-ratio: 5 / 8;
    max-height: 680px;
    object-fit: contain;
    object-position: center bottom;
    margin-bottom: -6.5%;
}

/* 본문 배경 */
.profile_txt{
    background-color: var(--muted-bg);
}

/* =========================================
   Section 공통(경력/학력/사례/저서)
   - 좌측 타이틀(고정폭) + 우측 내용
   ========================================= */

.career,
.education,
.cases,
.publications{
    padding: 70px 20px 0;
    box-sizing: border-box;
}

.cases{ padding-bottom: 60px; }
.publications{ padding-bottom: 80px; }

.career-inner,
.education-inner,
.cases-inner,
.publications-inner{
    max-width: var(--wrap-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 50px;
    align-items: start;
}

/* 왼쪽 타이틀 */
.career-title,
.education-title,
.cases-title,
.publications-title{
    width: auto;
    margin: 0;                 /* 기존 margin 보정 제거 */
}
.career-title h3,
.education-title h3,
.cases-title h3,
.publications-title h3{
    font-size: 26px;
    color: var(--main-navi);
    border-bottom: 3px solid var(--main-navi);
    padding-bottom: 10px;
    margin: 0;
}

/* 우측 내용: ul 대신 p로 쓰는 케이스 고려 */
.career-content,
.education-content,
.cases-content,
.publications-content{
    width: 100%;
}

/* ul이 있다면 */
.career-content ul,
.education-content ul,
.cases-content ul{
    padding-left: 18px;
    margin: 0;
}
.career-content ul li,
.education-content ul li,
.cases-content ul li{
    list-style: disc;
    font-size: 18px;
    color: #333;
    line-height: 2.1;
}

/* p로 출력되는 경우(현재 코드 기준) */
.career-content p,
.education-content p,
.cases-content p,
.publications-content p{
    font-size: 19px;
    line-height: 2.2;
    letter-spacing: .2px;
    color: #333;
    margin: 0;
}

.profile-multiline{
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* 주요업무사례 타입 문구 */
.cases-content p.case-type{
    font-size: 18px;
    font-weight: 800;
    color: var(--main-navi);
    margin: 0 0 10px;
}

/* =========================================
   관리자에서 선택한 대표 콘텐츠
   - 법률정보 상세의 관련 콘텐츠 박스와 같은 형태
   ========================================= */
.profile-featured-content{
    width: 100%;
    max-width: var(--hero-max);
    margin: 0 auto;
    padding: 50px 20px 70px;
    box-sizing: border-box;
}

.profile-related-wide{
    margin-top: 50px;
    border: 1px solid #e6eef4;
    background: #f6fbfe;
    border-radius: 10px;
    padding: 18px 20px 14px;
    box-sizing: border-box;
}

.profile-related-wide:first-child{
    margin-top: 0;
}

.profile-related-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.profile-related-title h2{
    margin: 0;
    color: #0e384a;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.35;
}

.profile-related-title .more{
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.profile-related-title .more:hover,
.profile-related-title .more:focus-visible{
    text-decoration: underline;
}

.profile-related-wide hr{
    margin: 8px 0 12px;
    border: 0;
    border-top: 2px solid #0e384a;
    opacity: .6;
}

.profile-related-wide ul{
    margin: 0;
    padding: 0;
    list-style: disc inside;
}

.profile-related-wide li{
    padding: 10px;
    color: #333;
    font-size: 18px;
    line-height: 1.65;
    list-style: disc inside;
    overflow-wrap: anywhere;
}

.profile-related-wide li a{
    color: inherit;
    text-decoration: none;
}

.profile-related-wide li a:hover,
.profile-related-wide li a:focus-visible{
    text-decoration: underline;
}

/* 변호사 성공사례: 건수·분야 탭·메타·더 보기 (2026-10-16) */
.profile-cases-count{
    margin-left: 10px;
    color: #4b6b7a;
    font-size: 18px;
    font-weight: 600;
}
.profile-cases-count strong{ color: #0e384a; }

.profile-cases-tabs{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}
.profile-cases-tabs a{
    text-decoration: none;
    border: 1px solid #c9dbe6;
    background: #fff;
    color: #0e384a;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.profile-cases-tabs a span{
    margin-left: 4px;
    color: #6b8795;
    font-weight: 500;
}
.profile-cases-tabs a:hover,
.profile-cases-tabs a:focus-visible{
    background: #0e384a;
    border-color: #0e384a;
    color: #fff;
    text-decoration: none;
}
.profile-cases-tabs a:hover span{ color: #cfe3ee; }

/* 분야별 묶음 (2026-10-16) */
.profile-cases-group{ margin-top: 22px; scroll-margin-top: 90px; }
.profile-cases-group h3{
    margin: 0 0 4px;
    color: #0e384a;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
}
.profile-cases-group h3 span{
    margin-left: 6px;
    color: #4b6b7a;
    font-size: 16px;
    font-weight: 600;
}
.profile-cases-group ul{ margin: 0; }
.profile-cases-group .profile-cases-more{ margin: 4px 0 2px; text-align: left; padding-left: 10px; }
.profile-cases-group .profile-cases-more button{ padding: 7px 18px; font-size: 14px; }

/* 「그 외」 묶음: 분류 칩, 누른 칩은 진하게 (2026-10-16) */
.profile-cases-other-chips{ display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.profile-cases-other-chips button{
    border: 1px solid #c9dbe6;
    background: #fff;
    color: #0e384a;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.profile-cases-other-chips button span{ margin-left: 4px; color: #6b8795; font-weight: 500; }
.profile-cases-other-chips button:hover{ border-color: #0e384a; }
.profile-cases-other-chips button[aria-pressed="true"]{ background: #0e384a; border-color: #0e384a; color: #fff; }
.profile-cases-other-chips button[aria-pressed="true"] span{ color: #cfe3ee; }
.profile-cases-other ul{ margin-top: 8px; }

.profile-cases-meta{
    display: inline-block;
    margin-left: 8px;
    color: #6b7280;
    font-size: 14px;
}
.profile-cases-badge{
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    border-radius: 4px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    vertical-align: 1px;
}
.profile-cases-error{ color: #b91c1c; list-style: none; }

.profile-cases-more{ text-align: center; margin-top: 10px; }
.profile-cases-more button{
    border: 1px solid #0e384a;
    background: #fff;
    color: #0e384a;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.profile-cases-more button:hover{ background: #0e384a; color: #fff; }
.profile-cases-more button:disabled{ opacity: .5; cursor: default; }

@media (max-width: 767px){
    .profile-cases-count{ display: block; margin: 4px 0 0; font-size: 15px; }
    .profile-cases-tabs a{ font-size: 13px; padding: 5px 11px; }
    .profile-cases-group h3{ font-size: 17px; }
    .profile-cases-group h3 span{ font-size: 14px; }
    .profile-cases-other-chips button{ font-size: 13px; padding: 5px 11px; }
    .profile-cases-meta{ display: block; margin: 2px 0 0 0; }
}

/* =========================================
   Responsive
   ========================================= */

/* 노트북 이하: 여백/크기만 다듬기 */
@media (max-width: 1439px){
    .main{
        padding: 70px 20px 30px;
        min-height: 640px;
    }
    .info h1{ font-size: 40px; }
    .info h1 span{ font-size: 26px; }

    .img img{
        margin-bottom: -5%;
    }
}

/* 태블릿: 상단 2열 유지(비율 조정), 섹션은 2열 유지 */
@media (max-width: 1024px){
    .main{
        grid-template-columns: 1.1fr .9fr;
        min-height: 560px;
        gap: 24px;
    }
    .info h1{ font-size: 36px; }
    .info h1 span{ font-size: 24px; }
    .info p{ font-size: 20px; }

    .career-inner,
    .education-inner,
    .cases-inner,
    .publications-inner{
        grid-template-columns: 170px 1fr;
        gap: 34px;
    }
    .career-title h3,
    .education-title h3,
    .cases-title h3,
    .publications-title h3{
        font-size: 24px;
    }

    .img img{
        margin-bottom: -8%;
    }
}

/* 모바일: 상단 1열(텍스트 위, 이미지 아래) + 섹션 1열 */
@media (max-width: 767px){
    .main{
        grid-template-columns: 1fr;
        align-items: start;
        min-height: auto;
        padding: 40px 16px 20px;
    }
    .img{
        order: 2;
        margin-top: 10px;
    }
    .img img{
        max-height: 360px;
        width: min(420px, 100%);
        margin-bottom: -3%;
    }

    .info h1{ font-size: 30px; }
    .info h1 span{ font-size: 18px; }
    .info p{ font-size: 16px; }
    .tags span{ font-size: 12px; padding: 6px 12px; }

    .career,
    .education,
    .cases,
    .publications{
        padding: 40px 16px 0;
    }

    .career-inner,
    .education-inner,
    .cases-inner,
    .publications-inner{
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .career-title h3,
    .education-title h3,
    .cases-title h3,
    .publications-title h3{
        font-size: 20px;
    }

    .career-content p,
    .education-content p,
    .cases-content p,
    .publications-content p{
        font-size: 15px;
        line-height: 2.0;
        letter-spacing: 0;
    }

    .profile-featured-content{
        padding: 40px 16px 55px;
    }

    .profile-related-wide{
        margin-top: 30px;
        padding: 16px 16px 12px;
    }

    .profile-related-title h2{
        font-size: 22px;
    }

    .profile-related-title .more{
        font-size: 14px;
    }

    .profile-related-wide li{
        padding: 8px 4px;
        font-size: 15px;
    }
}

/* 소형 모바일(<=480) */
@media (max-width: 480px){
    .txt{
        margin-top: 15%;
    }
    .main{ padding: 30px 14px 15px; }
    .txt .quote{ width: 100%; }

    .info h1{ font-size: 26px; }
    .info h1 span{ font-size: 15px; }

    .tags{ gap: 6px; }
    .tags span{
        font-size: 11px;
        padding: 6px 10px;
    }
    .img img{
        margin-bottom: -5%;
    }

    .profile-related-title{
        gap: 12px;
    }

    .profile-related-title h2{
        font-size: 20px;
    }
}

/* <picture> 로 감싸도 img 가 예전처럼 부모의 직접 자식으로 배치되게 (WebP 도입, 2026-10-19) */
.img picture{ display: contents; }
