/* community board */

.community-board-page {
    padding: 80px 0 100px;
    background: #fff;
}

.community-write-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    background: #1d3557;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.community-write-btn:hover {
    background: #16304f;
}

.community-board-table-wrap {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
}

.community-board-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.community-board-table thead th {
    height: 60px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.community-board-table tbody td {
    height: 72px;
    padding: 0 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 15px;
    vertical-align: middle;
}

.community-board-table tbody tr:last-child td {
    border-bottom: 0;
}

.community-board-table tbody tr:hover {
    background: #fafcff;
}

.td-num,
.td-category,
.td-name,
.td-date,
.td-hit {
    text-align: center;
}

.td-title {
    text-align: left;
}

.td-title a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    color: #111827;
    font-size: 16px;
    font-weight: 500;
    vertical-align: middle;
}

.td-title a:hover {
    color: #2563eb;
}

.notice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 28px;
    border-radius: 999px;
    background: #1d4ed8;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.comment-count {
    margin-left: 4px;
    color: #2563eb;
    font-weight: 700;
}

.empty-community {
    padding: 80px 20px !important;
    text-align: center;
    color: #64748b;
    font-size: 15px;
}

/* 카테고리 */

.td-category {
    text-align: center;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;

    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* 공지사항 */
.category-badge.notice {
    background: #ef4444;
}

/* 기업소식 */
.category-badge.news {
    background: #2563eb;
}

/* 협업제안 */
.category-badge.partner {
    background: #10b981;
}

/* 작성자 */

.td-name {
    font-weight: 600;
}

/* 날짜 */

.td-date {
    color: #64748b;
    font-size: 14px;
}

/* 조회수 */

.td-hit {
    color: #64748b;
    font-size: 14px;
}

/* 글작성 */
.community-write-page {
    padding: 80px 0;
}

.community-write-box {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: #fff;
}

.community-write-box .write-row {
    display: flex;
    gap: 40px;
    padding: 28px 36px;
    border-bottom: 1px solid #eef2f7;
}

.community-write-box .write-row:last-child {
    border-bottom: 0;
}

.community-write-box label {
    flex: 0 0 180px;
    padding-top: 12px;

    color: #111827;
    font-size: 16px;
    font-weight: 700;
}

.community-write-box label strong {
    color: #ef4444;
}

.community-write-box .write-row > div,
.community-write-box .write-row > input,
.community-write-box .write-row > select,
.community-write-box .write-row > textarea {
    flex: 1;
}

.community-write-box .frm_input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;

    border: 1px solid #dbe2ea;
    border-radius: 12px;

    background: #fff;

    font-size: 15px;
    color: #111827;

    box-shadow: none;
}

.community-write-box select.frm_input {
    cursor: pointer;
}

.community-write-box textarea.frm_input {
    min-height: 320px;
    padding: 18px;
    resize: vertical;
}

.community-write-box .frm_input:focus {
    border-color: #1d4ed8 !important;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08);
}

.community-write-box .file-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.community-write-box input[type="file"] {
    padding: 12px;
    height: auto;
}

.community-write-box .file-current {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 16px;

    border-radius: 10px;
    background: #f8fafc;
}

.community-write-box .file-name {
    color: #334155;
    font-size: 14px;
}

.community-write-box .file-delete-btn {
    padding: 6px 12px;

    border-radius: 8px;
    background: #ef4444;

    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.community-write-box .file-delete-btn:hover {
    background: #dc2626;
}

.write-btn-wrap {
    display: flex;
    justify-content: center;
    gap: 12px;

    margin-top: 40px;
}

.write-btn-wrap .btn-cancel,
.write-btn-wrap .btn-submit {
    min-width: 160px;
    height: 54px;

    border-radius: 12px;

    font-size: 16px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;
}

.write-btn-wrap .btn-cancel {
    background: #64748b;
    color: #fff;
}

.write-btn-wrap .btn-cancel:hover {
    background: #475569;
}

.write-btn-wrap .btn-submit {
    background: #1d4ed8;
    color: #fff;
}

.write-btn-wrap .btn-submit:hover {
    background: #1e40af;
}

/* 상세 */
.community-view-page {
    padding: 80px 0 100px;
    background: #fff;
}

.community-view-box {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #fff;
}

.community-view-head {
    padding: 42px 46px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.community-category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #1d3557;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.community-view-head h2 {
    color: #111827;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 18px;
}

.community-view-meta-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    background: #fff;
}

.community-meta-item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 60px;
    padding: 0 28px;
    border-right: 1px solid #e2e8f0;
}

.community-meta-item:last-child {
    border-right: 0;
}

.community-meta-item span:not(.sv_member) {
    font-size: 15px;
}

.community-meta-item strong {
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    margin-left: 20px;
}

.community-view-content {
    min-height: 300px;
    padding: 46px;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.community-file-list {
    padding: 30px 46px 42px;
    border-top: 1px solid #e2e8f0;
}

.community-file-list h3 {
    margin-bottom: 16px;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
}

.community-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 15px;
}

.community-file-item + .community-file-item {
    margin-top: 8px;
}

.community-file-item em {
    flex-shrink: 0;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 800;
}

.community-view-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 36px;
}

.community-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 50px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.community-btn-list {
    border: 1px solid #dbe2ea;
    background: #fff;
    color: #1d3557;
}

.community-btn-edit {
    background: #1d4ed8;
    color: #fff;
}

.community-btn-delete {
    background: #ef4444;
    color: #fff;
}

.community-btn-list:hover {
    border-color: #1d3557;
}

.community-btn-edit:hover {
    background: #1e40af;
}

.community-btn-delete:hover {
    background: #dc2626;
}

.community-meta-item > div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.community-meta-item span:not(.sv_member) {
    flex-shrink: 0;
}

.community-meta-item strong {
    margin-left: 0;
    text-align: right;
}

/* ==============================
   Community Board Mobile
============================== */
@media (max-width: 768px) {

    /* =========================
       LIST
    ========================= */

    .community-board-page {
        padding: 44px 0 70px;
    }

    .community-board-table-wrap {
        width: 100%;
        overflow: hidden;
        border-radius: 16px;
    }

    .community-board-table {
        display: block;
        width: 100%;
        min-width: 0;
        table-layout: auto;
    }

    /* PC 열 너비 설정 제거 */
    .community-board-table colgroup {
        display: none;
    }

    /* PC용 헤더 숨김 */
    .community-board-table thead {
        display: none;
    }

    .community-board-table tbody {
        display: block;
        width: 100%;
    }

    .community-board-table tbody tr {
        display: grid;

        /*
         * 첫 줄: 번호 / 카테고리 / 제목
         * 둘째 줄: 작성자 / 날짜 / 조회수
         */
        grid-template-columns:
            30px
            auto
            minmax(0, 1fr)
            auto
            auto;

        grid-template-areas:
            "num category title title title"
            ". name name date hit";

        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 16px 14px;
        column-gap: 10px;
        row-gap: 10px;
        border-bottom: 1px solid #e2e8f0;
        background: #fff;
        box-sizing: border-box;
    }

    .community-board-table tbody tr:last-child {
        border-bottom: 0;
    }

    .community-board-table tbody tr:hover {
        background: #fafcff;
    }

    .community-board-table tbody td {
        display: block;
        width: auto !important;
        min-width: 0 !important;
        height: auto;
        padding: 0;
        border: 0;
        box-sizing: border-box;
    }

    /* 번호 */
    .community-board-table .td-num {
        grid-area: num;
        color: #64748b;
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
        text-align: center;
    }

    /* 카테고리 */
    .community-board-table .td-category {
        grid-area: category;
        min-width: 0;
        text-align: left;
    }

    .community-board-table .category-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        height: 25px;
        padding: 0 9px;
        border-radius: 999px;
        font-size: 11px;
        line-height: 1;
        white-space: nowrap;
    }

    /* 제목 */
    .community-board-table .td-title {
        grid-area: title;
        width: 100% !important;
        min-width: 0 !important;
        text-align: left;
    }

    .community-board-table .td-title a {
        display: -webkit-box;
        width: 100%;
        min-width: 0;

        color: #111827;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.45;

        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;

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

    .community-board-table .td-title a:hover {
        color: #2563eb;
    }

    .community-board-table .comment-count {
        margin-left: 3px;
        font-size: 11px;
    }

    /* 작성자 */
    .community-board-table .td-name {
        grid-area: name;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 날짜 */
    .community-board-table .td-date {
        grid-area: date;
    }

    /* 조회수 */
    .community-board-table .td-hit {
        grid-area: hit;
        justify-self: end;
    }

    /* 작성자, 날짜, 조회수는 값만 노출 */
    .community-board-table .td-name,
    .community-board-table .td-date,
    .community-board-table .td-hit {
        color: #94a3b8;
        font-size: 11px;
        font-weight: 500;
        line-height: 1.4;
        text-align: left;
        white-space: nowrap;
    }

    /* 혹시 이전에 추가한 라벨 가상 요소가 남아 있을 경우 제거 */
    .community-board-table .td-name::before,
    .community-board-table .td-date::before,
    .community-board-table .td-hit::before {
        display: none;
        content: none;
    }

    /* 공지 배지 */
    .community-board-table .notice-badge {
        min-width: 0;
        height: 24px;
        padding: 0 9px;
        font-size: 11px;
    }

    .empty-community {
        display: block !important;
        width: 100%;
        padding: 48px 16px !important;
        color: #64748b;
        font-size: 14px;
        text-align: center;
    }

    /* =========================
       WRITE
    ========================= */

    .community-write-page {
        padding: 44px 0 70px;
    }

    .community-write-box {
        border-radius: 18px;
    }

    .community-write-box .write-row {
        display: block;
        padding: 18px 16px;
    }

    .community-write-box label {
        display: block;
        padding-top: 0;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .community-write-box .frm_input {
        width: 100%;
        min-height: 50px;
        padding: 0 15px;
        border-radius: 10px;
        font-size: 14px;
    }

    .community-write-box textarea.frm_input {
        min-height: 220px;
        padding: 14px 15px;
        line-height: 1.7;
    }

    .community-write-box .file-input-wrap {
        gap: 10px;
    }

    .community-write-box input[type="file"] {
        width: 100%;
        padding: 10px;
        font-size: 13px;
    }

    .community-write-box .file-current {
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .community-write-box .file-name {
        min-width: 0;
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .community-write-box .file-delete-btn {
        flex-shrink: 0;
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .write-btn-wrap {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 24px;
    }

    .write-btn-wrap .btn-cancel,
    .write-btn-wrap .btn-submit {
        width: 100%;
        min-width: 0;
        height: 50px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* =========================
       VIEW
    ========================= */

    .community-view-page {
        padding: 44px 0 70px;
    }

    .community-view-box {
        border-radius: 18px;
    }

    .community-view-head {
        padding: 26px 20px;
    }

    .community-category-badge {
        height: 28px;
        padding: 0 12px;
        margin-bottom: 14px;
        font-size: 12px;
    }

    .community-view-head h2 {
        margin-bottom: 16px;
        font-size: 24px;
        line-height: 1.4;
    }

    .community-view-meta-card {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .community-meta-item {
        min-height: 50px;
        padding: 0 16px;
        gap: 10px;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .community-meta-item:last-child {
        border-bottom: 0;
    }

    .community-meta-item > div {
        gap: 14px;
    }

    .community-meta-item span:not(.sv_member) {
        font-size: 13px;
    }

    .community-meta-item strong {
        margin-left: auto;
        font-size: 14px;
        text-align: right;
    }

    .community-view-content {
        min-height: 220px;
        padding: 26px 20px;
        font-size: 15px;
        line-height: 1.8;
    }

    .community-view-content img {
        max-width: 100%;
        height: auto;
    }

    .community-file-list {
        padding: 22px 20px 28px;
    }

    .community-file-list h3 {
        margin-bottom: 12px;
        font-size: 16px;
    }

    .community-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        min-height: auto;
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .community-file-item em {
        font-size: 12px;
    }

    .community-view-btns {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 24px;
    }

    .community-btn {
        width: 100%;
        min-width: 0;
        height: 46px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* =========================
       WRITE
    ========================= */
    .community-write-page {
        padding: 44px 0 70px;
    }

    .community-write-box {
        border-radius: 18px;
    }

    .community-write-box .write-row {
        display: block;
        padding: 18px 16px;
    }

    .community-write-box label {
        display: block;
        padding-top: 0;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .community-write-box .frm_input {
        width: 100%;
        min-height: 50px;
        padding: 0 15px;
        border-radius: 10px;
        font-size: 14px;
    }

    .community-write-box textarea.frm_input {
        min-height: 220px;
        padding: 14px 15px;
        line-height: 1.7;
    }

    .community-write-box .file-input-wrap {
        gap: 10px;
    }

    .community-write-box input[type="file"] {
        width: 100%;
        padding: 10px;
        font-size: 13px;
    }

    .community-write-box .file-current {
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .community-write-box .file-name {
        min-width: 0;
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .community-write-box .file-delete-btn {
        flex-shrink: 0;
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .write-btn-wrap {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 24px;
    }

    .write-btn-wrap .btn-cancel,
    .write-btn-wrap .btn-submit {
        width: 100%;
        min-width: 0;
        height: 50px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* =========================
       VIEW
    ========================= */
    .community-view-page {
        padding: 44px 0 70px;
    }

    .community-view-box {
        border-radius: 18px;
    }

    .community-view-head {
        padding: 26px 20px;
    }

    .community-category-badge {
        height: 28px;
        padding: 0 12px;
        margin-bottom: 14px;
        font-size: 12px;
    }

    .community-view-head h2 {
        margin-bottom: 16px;
        font-size: 24px;
        line-height: 1.4;
    }

    .community-view-meta-card {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .community-meta-item {
        min-height: 50px;
        padding: 0 16px;
        gap: 10px;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .community-meta-item:last-child {
        border-bottom: 0;
    }

    .community-meta-item > div {
        gap: 14px;
    }

    .community-meta-item span:not(.sv_member) {
        font-size: 13px;
    }

    .community-meta-item strong {
        margin-left: auto;
        font-size: 14px;
        text-align: right;
    }

    .community-view-content {
        min-height: 220px;
        padding: 26px 20px;
        font-size: 15px;
        line-height: 1.8;
    }

    .community-view-content img {
        max-width: 100%;
        height: auto;
    }

    .community-file-list {
        padding: 22px 20px 28px;
    }

    .community-file-list h3 {
        margin-bottom: 12px;
        font-size: 16px;
    }

    .community-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        min-height: auto;
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .community-file-item em {
        font-size: 12px;
    }

    .community-view-btns {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 24px;
    }

    .community-btn {
        width: 100%;
        min-width: 0;
        height: 46px;
        border-radius: 10px;
        font-size: 14px;
    }
}