/* 언어설정 */
@charset 'utf-8';

@font-face {
    font-family: 'SUIT-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'KCCHyerim-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2411-3@1.0/KCCHyerim-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* 전체설정 */
* {
    margin: 0;
    padding: 0;
    font-family: 'SUIT-Regular';
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--main-text);
}

img {
    vertical-align: bottom;
}

html,
body {
    overflow-x: hidden;
    scroll-behavior: smooth;

}

.body {
    max-width: 100%;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
    /* 스크롤 막기 */
    touch-action: none;
    /* 터치 시 흔들림 방지 (모바일 UX 향상) */
}

/* 색상설정 */
:root {
    --main-navi: #204B62;
    --main-text: #333;
    --main-white: #fff;
}

/* 상세설정 ---------------------------------------------------------------------------- */

main {
    margin-top: 60px;
}

.txt {
    background-image: url(/img/success_bg.jpg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    width: 100%;
    height: 400px;
    /* 또는 원하는 높이 */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

.txt h1 {
    font-size: 60px;
    font-weight: bold;
    display: inline-block;
    color: #fff;
}

/* 성공사례 상단 필터 + 검색 영역 */
.success-filter-search {
    max-width: 1200px;
    margin: 60px auto 30px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.filter-tabs {
    font-size: 22px;
    font-weight: bold;
    color: #123144;
}

.filter-tabs .tab {
    display: inline-block;
    margin: 0 6px;
    cursor: pointer;
    position: relative;
}

.filter-tabs .tab.active {
    box-shadow: inset 0 -10px 0 rgba(207, 222, 236, 1);
}

.filter-tabs .divider {
    color: #123144;
}

.search-box {
    position: relative;
    background-color: #e3ecf2;
    border-radius: 30px;
    padding: 10px 40px 10px 20px;
    width: 280px;
    height: 20px;
}

.search-box input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #456;
    cursor: pointer;
}


/* 카드 리스트 전체 영역 */
.success-cards {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: flex-start;
}

/* 개별 카드 */
.card-item {
    width: calc(33.333% - 20px);
    background-color: #f9f9f9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    filter: grayscale(0%);
}

/* 카드 이미지 */
.card-item img {
    object-position: top;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* 카드 텍스트 영역 */
.card-text {
    padding: 15px;
}

/* 카드 제목 */
.card-title {
    font-size: 19px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #204b62;
}

/* 카드 요약 설명 */
.card-desc {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}


/* 페이지네이션 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 80px;
    gap: 12px;
}

.pagination .page-num {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background-color: #eee;
    color: #333;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.pagination .page-num:hover {
    background-color: #ccc;
}

.pagination .page-num.active {
    background-color: #204B62;
    color: #fff;
}

.profile-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-top: 5px;
}
.lawyer-box{
    display:flex;
    flex-direction: row;
    align-items: center;
    margin-left: 25%;
    margin-top: 10px;
    gap: 10px;
    margin-bottom: 10px;
}

.card-item .lawyer-img {
    width: 60px;         /* 작게 설정 */
    height: 60px;        /* 정사각형 */
    border-radius: 50%;  /* 완전 둥글게 */
    object-fit: contain;   /* 비율 유지하면서 자르기 */
    object-position: top;
    border: 1px solid #ccc;
}

/* 미디어 쿼리 구간------------------------------------------------------------------------------------- */


/* PC 전용 */
@media screen and (min-width: 1440px) {}

/* 노트북 전용 */
@media screen and (min-width: 1025px) and (max-width: 1439px) {
    .txt h1 {
        font-size: 45px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }
}

/* 태블릿 전용 */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    .txt h1 {
        font-size: 45px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }

    .search-box{
        margin-top: 20px;
        width: 270px;
    }

    .lawyer-box{
        margin-left: 15%;
    }
}

/* 모바일 전용 */
@media screen and (min-width: 481px) and (max-width: 767px) {

    .txt h1 {
        font-size: 40px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }

    .card-item {
        width: calc(50% - 15px);  /* ✅ 2개로 */
    }

    .card-title {
        font-size: 16px;
    }

    .card-desc {
        font-size: 13px;
    }

    .card-item img {
        height: 140px;
    }
    .search-box{
        margin-top: 20px;
    }

    .lawyer-box{
        margin-left: 25%;
    }

    .filter-tabs{
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) and (orientation: portrait) {

    .txt {
        height: 250px;          /* 배경 영역 축소 */
    }

    .txt h1 {
        font-size: 35px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }

    .card-item {
        width: calc(50% - 15px);  /* ✅ 2개로 */
    }

    .card-title {
        font-size: 13px;
    }

    .card-desc {
        font-size: 11px;
    }

    .card-item img {
        height: 140px;
    }
    .search-box{
        margin-top: 20px;
    }

    .lawyer-box{
        margin-left: 2%;
    }
    .lawyer-name{
        font-size: 10px;
    }
    .lawyer-specialty{
        font-size: 10px;
    }

    .filter-tabs{
        font-size: 15px;
    }
}