/* paycalc.kr 커뮤니티 스타일 */
.community-wrap { max-width: 100%; margin: 0 auto; padding: 0; }

/* 카테고리 탭 */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 auto 24px; padding: 12px 20px; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); position: relative; z-index: 10; }
.cat-tabs a { padding: 8px 14px; border-radius: 20px; font-size: .9rem; color: #4b5563; text-decoration: none; transition: all .15s; }
.cat-tabs a:hover { background: #f3f4f6; }
.cat-tabs a.active { background: #2563eb; color: #fff; font-weight: 600; }

/* 액션 영역 */
.post-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 4px; }
.post-count { font-size: .9rem; color: #6b7280; }
.btn-write { display: inline-block; padding: 10px 18px; background: #2563eb; color: #fff; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .9rem; transition: background .15s; }
.btn-write:hover { background: #1d4ed8; color: #fff; }

/* 게시글 목록 */
.post-list { list-style: none; padding: 0; margin: 0; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow: hidden; }
.post-item { list-style: none; padding: 14px 20px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.post-item:last-child { border-bottom: none; }
.post-cat { font-size: .8rem; color: #2563eb; font-weight: 600; flex-shrink: 0; }
.post-title { flex: 1; font-size: 1rem; color: #1f2937; text-decoration: none; font-weight: 500; min-width: 200px; }
.post-title:hover { color: #2563eb; }
.post-meta { font-size: .8rem; color: #9ca3af; flex-shrink: 0; }

.empty-state { background: #fff; border-radius: 12px; padding: 60px 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: #6b7280; }
.empty-state a { color: #2563eb; font-weight: 600; }

/* 글 보기 */
.post-view { padding: 32px; }
.post-view-header { padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; margin-bottom: 24px; }
.post-cat-badge { display: inline-block; padding: 4px 12px; background: #dbeafe; color: #2563eb; border-radius: 20px; font-size: .8rem; font-weight: 600; margin-bottom: 12px; }
.post-view h1 { font-size: 1.5rem; margin-bottom: 12px; letter-spacing: -.02em; }
.post-view-meta { font-size: .9rem; color: #6b7280; }
.post-view-content { font-size: 1rem; line-height: 1.85; color: #1f2937; word-break: keep-all; padding: 16px 0; min-height: 100px; }
.post-view-actions { margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e7eb; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-like { padding: 8px 16px; background: #fff; border: 2px solid #ef4444; color: #ef4444; border-radius: 20px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-like:hover:not(:disabled) { background: #ef4444; color: #fff; }
.btn-like.liked { background: #ef4444; color: #fff; cursor: not-allowed; opacity: .8; }
.btn-like small { font-weight: 400; opacity: .9; margin-left: 4px; }
.btn-delete, .btn-list { padding: 8px 14px; border-radius: 8px; text-decoration: none; font-size: .9rem; font-weight: 500; }
.btn-delete { color: #ef4444; border: 1px solid #fee2e2; background: #fff; }
.btn-delete:hover { background: #fee2e2; color: #ef4444; }
.btn-list { color: #6b7280; background: #f9fafb; margin-left: auto; }
.btn-list:hover { background: #e5e7eb; color: #1f2937; }

/* 댓글 */
.comments-section { margin-top: 24px; padding: 24px 28px; }
.comments-section h2 { font-size: 1.1rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
.empty-comment { text-align: center; padding: 24px; color: #9ca3af; }
.comment-list { list-style: none; padding: 0; margin-bottom: 20px; }
.comment-item { list-style: none; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.comment-item:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-head strong { font-size: .9rem; color: #1f2937; }
.comment-time { font-size: .8rem; color: #9ca3af; }
.comment-delete { margin-left: auto; font-size: .75rem; color: #ef4444; text-decoration: none; }
.comment-delete:hover { text-decoration: underline; }
.comment-body { font-size: .95rem; line-height: 1.6; color: #4b5563; word-break: keep-all; }

.comment-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.comment-form textarea { width: 100%; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: .95rem; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.comment-form-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.comment-form-row input { flex: 1; min-width: 120px; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: .9rem; }
.comment-form-row button { padding: 8px 16px; }

/* 작성 폼 */
.write-form { padding: 28px; }
.write-form .form-group { margin-bottom: 16px; }
.write-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.write-form input, .write-form select, .write-form textarea {
    width: 100%; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: .95rem;
}
.write-form textarea { resize: vertical; min-height: 200px; line-height: 1.6; }
.write-form input:focus, .write-form select:focus, .write-form textarea:focus {
    outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.write-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e5e7eb; }
.btn-cancel { padding: 12px 20px; background: #f9fafb; color: #6b7280; border-radius: 8px; text-decoration: none; font-weight: 500; text-align: center; width: 100%; box-sizing: border-box; }
.btn-cancel:hover { background: #e5e7eb; color: #1f2937; }
.form-notice { margin-top: 12px; padding: 12px 16px; background: #fef3c7; border-radius: 8px; font-size: .85rem; color: #92400e; }

.alert-error { padding: 10px 16px; background: #fee2e2; color: #b91c1c; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }

/* 페이지네이션 (전체 스타일 재사용) */

@media (max-width: 640px) {
    .post-item { padding: 12px 16px; gap: 8px; }
    .post-cat, .post-meta { font-size: .75rem; width: 100%; }
    .post-title { font-size: .95rem; min-width: 0; }
    .post-view { padding: 20px; }
    .write-form { padding: 20px; }
    .write-form .form-row { grid-template-columns: 1fr; }
    .comment-form-row { flex-direction: column; }
}
.form-actions .btn-primary { width: 100%; text-align: center; padding: 12px 20px; }


/* 페이지네이션 */
.paging {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 32px 0 8px;
    flex-wrap: wrap;
}
.paging a,
.paging .paging-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.paging a:hover {
    background: #f3f4f6;
    border-color: #2563eb;
    color: #2563eb;
}
.paging .paging-current {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: default;
}
@media (max-width: 480px) {
    .paging a,
    .paging .paging-current {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 0.875rem;
    }
}