@charset "utf-8";

/* ── TOTAL_BBS5 ── */
.tbbs5_wrap {
    display: flex;
    gap: clamp(20px, 3vw, 40px);
    align-items: flex-start;
    width: 100%;
    border-top: var(--bbs5-border-top, none);
    padding-top: clamp(16px, 1.8vw, 24px);
}
/* 좌우 모드: 자체 타이틀 없이 리스트만 출력 */
.tbbs5_wrap.tbbs5_no_left {
    display: block;
}
.tbbs5_wrap.tbbs5_no_left .tbbs5_right {
    width: 100%;
}

/* 좌측: 타이틀 + 더보기 */
.tbbs5_left {
    flex-shrink: 0;
    width: clamp(120px, 15vw, 200px);
    padding-top: 4px;
}
.tbbs5_title {
    font-size: var(--bbs5-subject-size, clamp(18px, 2vw, 24px));
    font-weight: 800;
    color: var(--bbs5-subject-color, #111);
    line-height: 1.4;
    word-break: keep-all;
    margin-bottom: clamp(12px, 1.5vw, 20px);
}
.tbbs5_group {
    display: block;
    font-size: var(--bbs5-group-size, clamp(13px, 1.2vw, 15px));
    font-weight: 400;
    color: var(--bbs5-group-color, #888);
    margin-bottom: 2px;
}
.tbbs5_title strong {
    display: block;
    font-weight: 800;
}
.tbbs5_more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--bbs5-more-size, 13px);
    font-weight: 600;
    color: var(--bbs5-more-color, #555);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.tbbs5_more span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary, #e53935);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.tbbs5_more:hover {
    color: var(--primary, #e53935);
}

/* 우측: 게시물 리스트 */
.tbbs5_right {
    flex: 1;
    min-width: 0;
}
.tbbs5_list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tbbs5_list li {
    display: flex;
    align-items: center;
    gap: var(--bbs5-list-gap, clamp(12px, 1.5vw, 20px));
    padding: clamp(10px, 1vw, 14px) 0;
    border-bottom: 1px dotted #ddd;
    cursor: pointer;
    transition: background 0.15s;
}
.tbbs5_list li:first-child {
    padding-top: 0;
}
.tbbs5_list li:last-child {
    border-bottom: 1px dotted #ddd;
}
.tbbs5_list li:hover {
    background: rgba(0,0,0,0.01);
}

/* 날짜 */
.tbbs5_date {
    flex-shrink: 0;
    text-align: center;
    min-width: 50px;
}
.tbbs5_ym {
    display: block;
    font-size: var(--bbs5-ym-size, 11px);
    color: var(--bbs5-ym-color, #999);
    letter-spacing: 0.3px;
    line-height: 1;
    margin-bottom: 2px;
}
.tbbs5_day {
    display: block;
    font-size: var(--bbs5-day-size, clamp(22px, 2.5vw, 30px));
    font-weight: 800;
    color: var(--bbs5-day-color, #222);
    line-height: 1.1;
    font-style: normal;
}

/* 제목 */
.tbbs5_cont {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}
.tbbs5_cont a {
    display: block;
    font-size: var(--bbs5-title-size, clamp(14px, 1.2vw, 16px));
    color: var(--bbs5-title-color, #333);
    text-decoration: none;
    line-height: var(--bbs5-title-lh, 1.5);
    font-weight: var(--bbs5-title-weight);
    letter-spacing: var(--bbs5-title-spacing);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}
.tbbs5_cont a:hover {
    color: var(--primary, #e53935);
}
.tbbs5_cont a strong {
    font-weight: 700;
    color: #111;
}

/* 본문 발췌 */
.tbbs5_content {
    margin: 4px 0 0;
    font-size: var(--bbs5-content-size, 13px);
    color: var(--bbs5-content-color, #888);
    line-height: var(--bbs5-content-lh, 1.5);
    font-weight: var(--bbs5-content-weight);
    letter-spacing: var(--bbs5-content-spacing);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* NEW 아이콘 */
.tbbs5_new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary, #e53935);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    margin: 0 4px;
    vertical-align: middle;
}

/* 댓글수 */
.tbbs5_comment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    padding: 0 5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* 라벨 (게시판명) */
.tbbs5_label {
    display: var(--bbs5-label-display, inline-block);
    margin-top: 4px;
    font-size: var(--bbs5-label-size, 11px);
    background: var(--bbs5-label-color, #f1f5f9);
    color: var(--bbs5-label-font-color, #64748b);
    border-radius: var(--bbs5-label-radius, 20px);
    padding: var(--bbs5-label-padding, 2px 8px);
    line-height: 1.4;
}

/* 빈 게시물 */
.tbbs5_empty {
    padding: 30px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ── 모바일: 세로 배치 ── */
@media screen and (max-width: 640px) {
    .tbbs5_wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .tbbs5_left {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 0;
    }
    .tbbs5_title {
        margin-bottom: 0;
    }
    .tbbs5_date {
        min-width: 42px;
    }
}
