/* =========================================================
   ThinkX - TriliumNext Share Collection Grid
   관리자 Collection Grid 스타일에 가깝게 구성
   ========================================================= */

#childLinks.grid {
    width: 100%;
    margin: 32px 0 0;
    padding: 0;
    border: 0;
}

#childLinks.grid ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 카드 */
#childLinks.grid li {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    height: 190px;
    margin: 0;
    padding: 0;

    background: var(--background-primary);
    border: 1px solid var(--background-highlight);
    border-radius: 10px;

    overflow: hidden;

    box-sizing: border-box;

    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

/* 카드 hover */
#childLinks.grid li:hover {
    transform: translateY(-2px);
    border-color: var(--text-secondary);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* 링크 전체 */
#childLinks.grid li > a {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: 100%;
    height: 100%;
    min-height: 0;

    padding: 20px;

    box-sizing: border-box;

    background: transparent;
    color: var(--text-primary);

    text-align: left;
    text-decoration: none;

    font-size: inherit;
    font-weight: inherit;

    overflow: hidden;

    transform: none;
}

/* 기존 Share Theme hover 제거 */
#childLinks.grid li > a:hover {
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    transform: none;
}

/* ---------------------------------------------------------
   제목
   --------------------------------------------------------- */

#childLinks.grid .thinkx-title {
    display: -webkit-box;

    margin: 0 0 10px;

    color: var(--text-primary);

    font-size: 17px;
    font-weight: 650;
    line-height: 1.4;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

/* ---------------------------------------------------------
   본문 미리보기
   --------------------------------------------------------- */

#childLinks.grid .thinkx-preview {
    display: -webkit-box;

    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;

    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

/* ---------------------------------------------------------
   하단 영역
   --------------------------------------------------------- */

#childLinks.grid .thinkx-card-footer {
    display: flex;

    margin-top: auto;
    padding-top: 12px;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.4;
}

/* ---------------------------------------------------------
   내용이 없는 카드
   --------------------------------------------------------- */

#childLinks.grid .thinkx-empty {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ---------------------------------------------------------
   태블릿
   --------------------------------------------------------- */

@media (max-width: 1000px) {

    #childLinks.grid ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* ---------------------------------------------------------
   모바일
   --------------------------------------------------------- */

@media (max-width: 650px) {

    #childLinks.grid {
        margin-top: 24px;
    }

    #childLinks.grid ul {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #childLinks.grid li {
        height: 160px;
    }

    #childLinks.grid li > a {
        padding: 18px;
    }

    #childLinks.grid .thinkx-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    #childLinks.grid .thinkx-preview {
        font-size: 14px;
        line-height: 1.6;
        -webkit-line-clamp: 3;
    }

}