@charset "utf-8";

/* =============================================================================
   Fonts
============================================================================= */
@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: 400;
    font-style: normal;
    font-display: swap;   /* 웹폰트 도착 전에도 글자를 먼저 그린다 (2026-10-19) */
}

@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: 400;
    font-style: normal;
    font-display: swap;   /* 웹폰트 도착 전에도 글자를 먼저 그린다 (2026-10-19) */
}

/* =============================================================================
   Tokens
============================================================================= */
:root {
    --main-navi: #204b62;
    --main-text: #333;
    --main-white: #fff;

    --wrap-max: 1500px;
    --gap: 30px;
}

/* =============================================================================
   Base / Reset
============================================================================= */
* {
    margin: 0;
    padding: 0;
    font-family: "SUIT-Regular";
    box-sizing: border-box;
}

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;
}

/* =============================================================================
   Hero
============================================================================= */
.txt {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url(/img/success_bg.jpg) center top / cover no-repeat;
}

.txt h1 {
    margin-top: 50px;
    font-size: 60px;
    font-weight: 700;
    display: inline-block;
    color: var(--main-white);
}

/* =============================================================================
   Filter + Search
============================================================================= */
.success-filter-search {
    max-width: var(--wrap-max);
    margin: 60px auto 30px;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;

    font-size: 16px;
    font-weight: 700;
    color: var(--main-navi);
}

.filter-tabs .tab {
    display: inline-block;
    padding: 10px 20px;

    border: 2px solid var(--main-navi);
    border-radius: 30px;

    background: var(--main-white);
    color: var(--main-navi);

    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.filter-tabs .tab:hover,
.filter-tabs .tab.active {
    background: var(--main-navi);
    color: var(--main-white);
}

/* search */
.search-box {
    position: relative;
    width: 280px;
    height: 44px;

    background: #e3ecf2;
    border-radius: 30px;
    padding: 10px 40px 10px 20px;
}

.search-box form {
    width: 100%;
    height: 100%;
}

.search-box input {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 15px;
    outline: none;
}

.search-box button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #456;
    cursor: pointer;
}

.search-box i {
    color: #456;
    cursor: pointer;
}

/* =============================================================================
   Cards
============================================================================= */
.success-cards {
    max-width: var(--wrap-max);
    margin: 40px auto 50px;
    padding: 0 20px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.card-item.v2 {
    background: #efefef;
    border: 1px solid #d5d5d5;
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-item.v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.17);
}

.card-inner {
    padding: 24px 22px 26px;
}

.card-top {
    margin-bottom: 16px;
}

.case-badge {
    display: inline-block;
    padding: 8px 12px;
    background: #ef4f4f;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.card-item.v2 .card-title {
    margin: 0 0 18px;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.03em;
    color: #214f6d;
    word-break: keep-all;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    min-height: calc(1.35em * 2);   /* 2줄 높이 고정 */
}

.card-item.v2 .card-title-link {
    color: inherit;
    text-decoration: none;
}

.card-item.v2 .card-title-link:hover,
.card-item.v2 .card-title-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.card-summary-box {
    background: #fff;
    padding: 16px 18px;
    height: 150px;          /* 고정 높이 */
    margin-bottom: 22px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.card-item.v2 .card-desc {
    margin: 0;
    width: 100%;
    font-size: 17px;
    color: #444;
    line-height: 1.65;
    word-break: keep-all;
    overflow: hidden;

    display: -webkit-box;
    -webkit-line-clamp: 4;   /* 4줄까지만 */
    -webkit-box-orient: vertical;
}

.card-lawyers {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lawyer-avatar-link,
.lawyer-avatar-fallback {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #2b6485;
    background: #fff;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    mask-image: radial-gradient(circle, #fff 99%, #000 100%);

}

.lawyer-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 25%;
    display: block;
    filter: none !important;
    transform: none !important;
}
.lawyer-avatar-fallback {
    color: #2b6485;
    font-size: 28px;
}

/* 예전 .card-item img 스타일 충돌 방지 */
.card-item.v2 img {
    filter: none;
    transition: none;
}

/* =============================================================================
   Pagination
============================================================================= */
.pagination-toolbar {
    max-width: var(--wrap-max);
    margin: 0 auto 80px;
    padding: 0 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination .page-num {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;

    background: #eee;
    color: #333;
    border-radius: 12px;
    cursor: pointer;

    font-weight: 700;
    transition: background-color 0.3s;
}

.pagination .page-num:hover { background: #ccc; }

.pagination .page-num.active {
    background: var(--main-navi);
    color: var(--main-white);
}

/* Admin button */
.success-write-btn {
    display: inline-block;
    padding: 10px 14px;

    border: 1px solid #e0e0e0;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: var(--main-white);

    white-space: nowrap;
    transition: box-shadow 0.2s ease, transform 0.08s ease;
}

.success-write-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
/* =============================================================================
   Responsive
============================================================================= */

/* <= 1280 */
@media (max-width: 1280px) {
    .success-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }

    .card-item.v2 .card-title {
        font-size: 24px;
    }

    .lawyer-avatar-link,
    .lawyer-avatar-fallback {
        width: 120px;
        height: 120px;
    }
}

/* <= 1024 */
@media (max-width: 1024px) {
    .success-filter-search {
        gap: 16px;
    }

    .search-box {
        margin-top: 20px;
        width: 270px;
    }

    .success-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .card-inner {
        padding: 22px 20px 24px;
    }

    .card-item.v2 .card-title {
        font-size: 23px;
    }

    .card-summary-box {
        min-height: 130px;
        padding: 15px 16px;
    }

    .card-item.v2 .card-desc {
        font-size: 16px;
        -webkit-line-clamp: 4;
    }

    .lawyer-avatar-link,
    .lawyer-avatar-fallback {
        width: 96px;
        height: 96px;
    }
}

/* <= 767 */
@media (max-width: 767px) {
    .txt {
        height: 280px;
    }

    .txt h1 {
        font-size: 46px;
        margin-top: 40px;
    }

    .success-filter-search {
        flex-direction: column;
        align-items: stretch;
        margin: 40px auto 24px;
    }

    .filter-tabs {
        margin-top: 0;
        gap: 8px;
    }

    .filter-tabs .tab {
        font-size: 16px;
        padding: 9px 16px;
    }

    .search-box {
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .success-cards {
        grid-template-columns: 2fr;
        gap: 20px;
    }

    .card-inner {
        padding: 20px 18px 22px;
    }

    .case-badge {
        font-size: 14px;
        padding: 7px 10px;
    }

    .card-item.v2 .card-title {
        font-size: 21px;
        line-height: 1.4;
        margin-bottom: 16px;
    }

    .card-summary-box {
        min-height: auto;
        padding: 14px 14px;
        margin-bottom: 18px;
    }

    .card-item.v2 .card-desc {
        font-size: 15px;
        line-height: 1.6;
        -webkit-line-clamp: 4;
    }

    .card-lawyers {
        gap: 10px;
    }

    .lawyer-avatar-link,
    .lawyer-avatar-fallback {
        width: 82px;
        height: 82px;
    }

    .pagination {
        gap: 8px;
    }

    .pagination .page-num {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }
}

/* <= 480 portrait */
@media (max-width: 480px) and (orientation: portrait) {
    .txt {
        height: 240px;
    }

    .txt h1 {
        font-size: 38px;
        margin-top: 34px;
    }

    .success-filter-search {
        margin: 32px auto 20px;
        padding: 0 16px;
    }

    .filter-tabs .tab {
        font-size: 14px;
        padding: 8px 14px;
    }

    .success-cards {
        padding: 0 16px;
        gap: 16px;
    }

    .card-item.v2 {
        border-radius: 22px;
    }

    .card-inner {
        padding: 16px 14px 18px;
    }

    .case-badge {
        font-size: 13px;
        padding: 7px 9px;
    }

    .card-item.v2 .card-title {
        font-size: 18px;
        line-height: 1.35;
        margin-bottom: 14px;
        -webkit-line-clamp: 2;
    }

    .card-summary-box {
        padding: 12px 12px;
        margin-bottom: 16px;
    }

    .card-item.v2 .card-desc {
        font-size: 14px;
        line-height: 1.55;
        -webkit-line-clamp: 4;
    }

    .card-lawyers {
        gap: 8px;
    }

    .lawyer-avatar-link,
    .lawyer-avatar-fallback {
        width: 68px;
        height: 68px;
        border-width: 1.5px;
    }

    .pagination-toolbar {
        padding: 0 16px;
    }

    .pagination {
        gap: 6px;
    }

    .pagination .page-num {
        width: 34px;
        height: 34px;
        line-height: 34px;
        border-radius: 10px;
        font-size: 13px;
    }

    .success-write-btn {
        padding: 9px 12px;
        font-size: 13px;
    }
}
