/* 버전: 202607080010 */
/* 통합 게시판(공지/문의·건의/자유) 목록·상세·작성 페이지 스타일. 댓글 영역은 course-detail.css 댓글 스타일을 그대로 이식. */

body { margin: 0; padding: 0; background: #f4f6f9; }

#board-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 0;
    font-family: 'Pretendard', sans-serif;
    color: #333;
}

.board-page-title {
    font-size: 24px;
    font-weight: 800;
    color: #222;
    margin: 0 0 20px;
}

/* ===== 카테고리 탭 ===== */
.board-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.board-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: 1px solid #dadce0;
    border-radius: 22px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}
.board-tab:hover { border-color: #2E9E6B; color: #2E9E6B; }
.board-tab.active { background: #2E9E6B; border-color: #2E9E6B; color: #fff; }

/* ===== 목록 ===== */
.board-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    overflow: hidden;
}
.board-list-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}
.board-list-toolbar-bottom { margin-top: 20px; margin-bottom: 0; }
.board-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-table thead th {
    font-size: 13px;
    font-weight: 700;
    color: #888;
    text-align: left;
    padding: 14px 18px;
    border-bottom: 2px solid #f0f0f0;
    background: #fafbfc;
}
.board-table th.col-no, .board-table td.col-no { width: 64px; text-align: center; color: #aaa; }
.board-table th.col-author, .board-table td.col-author { width: 140px; }
.board-table th.col-date, .board-table td.col-date { width: 96px; color: #aaa; font-size: 13px; }
.board-table tbody td { padding: 15px 18px; border-bottom: 1px solid #f3f3f3; font-size: 15px; }
.board-table tbody tr:last-child td { border-bottom: none; }
.board-table tbody tr:hover { background: #fafdfb; }
.board-title-cell { display: flex; align-items: center; min-width: 0; }
.board-title-link { color: #333; text-decoration: none; font-weight: 600; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-title-link:hover { color: #2E9E6B; }
.board-title-cell .board-cmt-count, .board-attach-flag { flex-shrink: 0; }
.board-secret-icon { color: #b0b0b0; margin-right: 5px; font-size: 13px; }
.board-cmt-count { color: #2E9E6B; font-weight: 700; font-size: 13px; margin-left: 6px; }
.board-author-name { color: #555; font-size: 14px; font-weight: 700; cursor: pointer; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.board-empty { text-align: center; padding: 50px 0; color: #aaa; font-size: 15px; }

/* ===== 페이지네이션 ===== */
.board-pagination { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 24px; }
.board-pagination a, .board-pagination span {
    min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; color: #555;
    font-size: 15px; font-weight: 600; padding: 0 10px;
    text-decoration: none; transition: all 0.2s ease;
}
.board-pagination a:hover { border-color: #2E9E6B; color: #2E9E6B; }
.board-pagination .current { background: #2E9E6B; border-color: #2E9E6B; color: #fff; cursor: default; }

/* ===== 상세 ===== */
.board-detail-card { background: #fff; border: 1px solid #eaeaea; border-radius: 14px; padding: 30px 34px; }
.board-detail-head { border-bottom: 1px solid #f0f0f0; padding-bottom: 18px; margin-bottom: 22px; }
.board-detail-cat { font-size: 13px; font-weight: 700; color: #2E9E6B; }
.board-detail-title { font-size: 23px; font-weight: 800; color: #222; margin: 8px 0 12px; line-height: 1.4; }
.board-detail-meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: #999; }
.board-detail-meta .author { color: #555; font-weight: 700; }
.board-detail-body { font-size: 16px; line-height: 1.8; color: #333; white-space: pre-wrap; word-break: break-word; min-height: 120px; }
.board-detail-body .auto-link { color: #2E9E6B; font-weight: 600; text-decoration: none; background-color: transparent; border-radius: 2px; padding: 0 4px; word-break: break-all; }
.board-detail-body .auto-link:hover { background-color: #2E9E6B; color: #ffffff; }
.board-detail-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.board-locked { text-align: center; padding: 60px 0; color: #999; }
.board-locked i { font-size: 30px; color: #ccc; display: block; margin-bottom: 14px; }

/* ===== 작성 폼 ===== */
.board-write-card { background: #fff; border: 1px solid #eaeaea; border-radius: 14px; padding: 30px 34px; }
.board-form-row { margin-bottom: 18px; }
.board-form-label { display: block; font-size: 14px; font-weight: 700; color: #444; margin-bottom: 8px; }
.board-cat-select, .board-title-input {
    width: 100%; box-sizing: border-box; border: 1px solid #dadce0; border-radius: 10px;
    padding: 12px 14px; font-size: 15px; font-family: inherit; color: #333; outline: none; transition: border-color 0.2s;
    background: #fff;
}
.board-cat-select { max-width: 240px; cursor: pointer; }
.board-title-input:focus, .board-content-input:focus, .board-cat-select:focus { border-color: #2E9E6B; }
.board-content-input {
    width: 100%; box-sizing: border-box; border: 1px solid #dadce0; border-radius: 10px;
    padding: 14px; font-size: 15px; font-family: inherit; color: #333; line-height: 1.7;
    resize: none; overflow-y: hidden; min-height: 320px; outline: none; transition: border-color 0.2s;
}
.board-form-error { color: #e53935; font-size: 14px; margin-bottom: 14px; font-weight: 600; }
.board-secret-note { font-size: 13px; color: #999; margin-top: 8px; }
.board-form-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* ===== 댓글(course-detail.css 이식) ===== */
.comment-section { margin-top: 0; border-top: none; padding-top: 0; }
.comment-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.comment-section-title { font-size: 18px; font-weight: 700; color: #444; display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
.comment-section-title i { color: #888; }
.comment-total-count { font-size: 13px; font-weight: 500; color: #888; }
.comment-sort-btn { background: transparent; border: none; padding: 0; font-size: 13px; font-weight: 400; color: #333; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 4px; transition: color 0.2s; }
.comment-sort-btn:hover { color: #2E9E6B; }
.comment-divider { border: none; border-top: 1px dashed #eaeaea; margin: 12px 0; }
.comment-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.comment-author { font-size: 15px; font-weight: 700; color: #333; cursor: pointer; }
.comment-date { font-size: 11px; color: #aaa; }
.comment-content { font-size: 15px; color: #333; line-height: 1.7; word-break: break-word; margin-bottom: 6px; }
.comment-actions { display: flex; gap: 8px; justify-content: flex-end; }
.comment-reply-btn { background: none; border: none; font-size: 13px; color: #333; cursor: pointer; padding: 0; font-family: inherit; font-weight: 600; }
.comment-reply-btn:hover { color: #2E9E6B; text-decoration: underline; }
.comment-delete-btn { background: none; border: none; font-size: 13px; color: #aaa; cursor: pointer; padding: 0; font-family: inherit; }
.comment-delete-btn:hover { color: #e53935; }
.reply-list { margin-top: 6px; padding-left: 14px; border-left: 2px solid #E2F5EC; }
.reply-item { padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.reply-item:last-child { border-bottom: none; }
.reply-form-wrap { margin-top: 8px; padding: 10px; background: #f8f9fa; border-radius: 10px; display: none; }
.reply-form-wrap.open { display: block; }
.comment-form-wrap { margin-top: 14px; }
.comment-textarea { width: 100%; box-sizing: border-box; border: 1px solid #dadce0; border-radius: 10px; padding: 10px 12px; font-size: 15px; font-family: inherit; color: #333; resize: none; min-height: 72px; overflow: hidden; outline: none; transition: border-color 0.2s; }
.comment-textarea:focus { border-color: #2E9E6B; }
.comment-form-footer { display: flex; justify-content: flex-end; margin-top: 6px; }
.comment-submit-btn { background: #2E9E6B; border: none; border-radius: 22px; color: #fff; font-size: 15px; font-weight: 600; padding: 10px 18px; cursor: pointer; font-family: inherit; transition: background 0.2s; }
.comment-submit-btn:hover { background: #24835A; }
.comment-mention { font-size: 13px; font-weight: 600; color: #2E9E6B; }
.comment-empty { font-size: 13px; color: #aaa; text-align: center; padding: 16px 0; }
.comment-pagination { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.comment-page-btn { background: #fff; border: 1px solid #dadce0; border-radius: 8px; color: #555; font-size: 12px; font-weight: 600; padding: 4px 10px; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.comment-page-btn:hover { border-color: #2E9E6B; color: #2E9E6B; }
.comment-page-btn.active { background: #2E9E6B; border-color: #2E9E6B; color: #fff; }
.comment-page-btn:disabled { opacity: 0.4; cursor: default; }

/* 상세 하단 댓글 카드 간격 */
.board-comment-card { background: #fff; border: 1px solid #eaeaea; border-radius: 14px; padding: 26px 34px; margin-top: 20px; }

/* 버튼(디자인 시스템 BTN-02/03) */
.board-btn-primary {
    background: #2E9E6B; color: #fff; border: none; border-radius: 22px;
    padding: 10px 28px; font-size: 15px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
    transition: background 0.2s; font-family: inherit;
}
.board-btn-primary:hover { background: #24835A; }
.board-btn-outline {
    background: #fff; border: 1px solid #c0c0c0; color: #555;
    border-radius: 22px; padding: 10px 28px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; font-family: inherit; text-decoration: none;
    display: inline-flex; align-items: center; gap: 7px;
}
.board-btn-outline:hover { background: #EEFAF3; border-color: #2E9E6B; color: #2E9E6B; }
.board-btn-danger:hover { background: #fdecea; border-color: #e53935; color: #e53935; }

/* ===== 조회수 열 ===== */
.board-table th.col-views, .board-table td.col-views { width: 64px; text-align: center; color: #aaa; font-size: 13px; }

/* ===== 상단 고정(공지) 행 — COL-03 ===== */
.board-row-pinned td { background: #EEFAF3; }
.board-row-pinned:hover td { background: #e4f6ec; }
.board-notice-badge {
    display: inline-block; background: #2E9E6B; color: #fff; font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 10px;
}
.board-notice-prefix { color: #2E9E6B; font-weight: 800; }
.board-cat-prefix { color: #888888; font-weight: 400; }
.board-attach-flag { color: #aaa; margin-left: 6px; font-size: 13px; }

/* ===== 상세 조회수 ===== */
.board-detail-views { display: inline-flex; align-items: center; gap: 4px; }

/* ===== 상세 이미지 갤러리 ===== */
.board-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.board-gallery-item {
    width: 150px; height: 150px; border-radius: 10px; overflow: hidden;
    border: 1px solid #eaeaea; cursor: pointer; background: #f5f5f5;
}
.board-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.board-gallery-item:hover img { transform: scale(1.05); }

/* ===== 상세 첨부파일 목록 ===== */
.board-file-list { margin-top: 24px; border-top: 1px solid #f0f0f0; padding-top: 18px; }
.board-file-list-title { font-size: 14px; font-weight: 700; color: #444; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.board-file-item {
    display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 6px;
    border: 1px solid #eaeaea; border-radius: 10px; text-decoration: none; color: #444;
    font-size: 14px; transition: all 0.2s;
}
.board-file-item:hover { border-color: #2E9E6B; background: #EEFAF3; color: #2E9E6B; }
.board-file-name { flex: 1; word-break: break-all; }
.board-file-size { color: #aaa; font-size: 12px; }

/* ===== 작성 폼 첨부 ===== */
.board-pin-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #444; cursor: pointer; }
.board-pin-check input { width: 16px; height: 16px; accent-color: #2E9E6B; }

/* ===== 첨부 드롭존(course-save 패턴 이식) ===== */
.board-attach-count { font-size: 12px; font-weight: 700; color: #2E9E6B; margin-left: 4px; }
.board-drop-area {
    border: 2px dashed #d5dbe0; border-radius: 12px; padding: 26px 16px; text-align: center;
    color: #9aa3ab; cursor: pointer; background: #fafbfc; transition: all 0.2s;
}
.board-drop-area:hover, .board-drop-area.drag-hover { border-color: #2E9E6B; color: #2E9E6B; background: #f1faf5; }
.board-drop-area i { font-size: 22px; display: block; margin-bottom: 8px; }
.board-drop-area span { font-size: 14px; }
.board-drop-area input[type=file] { display: none; }
.board-attach-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.board-attach-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border: 1px solid #eaeaea; border-radius: 10px; background: #fff;
}
.board-attach-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid #eee; flex-shrink: 0; }
.board-attach-fileicon {
    width: 44px; height: 44px; border-radius: 8px; background: #f1faf5; color: #2E9E6B;
    display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.board-attach-name { flex: 1; min-width: 0; font-size: 14px; color: #444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-attach-insert {
    background: #EEFAF3; border: 1px solid #2E9E6B; color: #2E9E6B; border-radius: 8px;
    padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s;
}
.board-attach-insert:hover { background: #2E9E6B; color: #fff; }
.board-attach-remove { background: none; border: none; color: #bbb; cursor: pointer; font-size: 15px; padding: 4px; }
.board-attach-remove:hover { color: #e53935; }

/* ===== 본문 인라인 이미지·파일 ===== */
.board-content-img { display: block; max-width: 100%; border-radius: 10px; margin: 10px 0; cursor: pointer; }
.board-content-file {
    display: inline-flex; align-items: center; gap: 8px; margin: 6px 0; padding: 8px 12px;
    border: 1px solid #eaeaea; border-radius: 10px; background: #fafbfc; font-size: 14px; color: #444;
}
.board-content-file i.fa-file { color: #888; }
.board-content-file-name { font-weight: 600; }
.board-content-file-dl { color: #2E9E6B; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.board-content-file-dl:hover { text-decoration: underline; }

/* ===== 이미지 라이트박스(course-detail 패턴 이식) ===== */
#board-lightbox-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 10050;
    align-items: center; justify-content: center;
}
#board-lightbox-overlay.active { display: flex; }
#board-lightbox-overlay img { max-width: 90vw; max-height: 86vh; border-radius: 6px; }
.board-lb-btn {
    position: fixed; background: rgba(255,255,255,0.15); border: none; color: #fff; cursor: pointer;
    width: 46px; height: 46px; border-radius: 50%; font-size: 20px; display: flex; align-items: center; justify-content: center;
}
.board-lb-btn:hover { background: rgba(255,255,255,0.3); }
#board-lb-close { top: 24px; right: 24px; }
#board-lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
#board-lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
#board-lb-counter { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; }
