/* ═══════════════════════════════════════════════════════════
   커뮤니티 게시판 스타일
   ═══════════════════════════════════════════════════════════ */

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ─── Post List ─────────────────────────────────────────── */
.post-list {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-item {
    display: grid;
    grid-template-columns: 1fr 100px 60px 120px;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background: var(--bg-card-hover);
}

.post-item.pinned {
    background: var(--accent-cyan-dim);
    border-left: 3px solid var(--accent-cyan);
}

.post-title-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.post-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-comment-count {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-weight: 600;
    flex-shrink: 0;
}

.post-author {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.post-views {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

.post-list-header {
    display: grid;
    grid-template-columns: 1fr 100px 60px 120px;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.post-list-header span:nth-child(2),
.post-list-header span:nth-child(3) {
    text-align: center;
}
.post-list-header span:nth-child(4) {
    text-align: right;
}

/* ─── Post Detail ───────────────────────────────────────── */
.post-detail {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-detail-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-detail-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-detail-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-detail-body {
    padding: 2rem;
    line-height: 1.8;
    min-height: 200px;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-detail-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* ─── Comments ──────────────────────────────────────────── */
.comments-section {
    margin-top: 2rem;
}

.comments-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-item {
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-bottom: none;
    background: var(--gradient-card);
    transition: background var(--transition-fast);
}

.comment-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.comment-item:last-child {
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.comment-item:only-child {
    border-radius: var(--radius-md);
    border-bottom: 1px solid var(--border-color);
}

.comment-item:hover {
    background: var(--bg-card-hover);
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-cyan);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.comment-body {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Comment Form */
.comment-form {
    margin-top: 1rem;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* ─── Write Form ────────────────────────────────────────── */
.write-form {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.write-form textarea.form-control {
    min-height: 300px;
}

/* ─── Delete Modal ──────────────────────────────────────── */
.delete-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.delete-modal.show {
    display: flex;
}

.delete-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .post-item {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .post-author, .post-views, .post-date {
        text-align: left;
        font-size: 0.8rem;
    }

    .post-list-header {
        display: none;
    }

    .post-detail-header, .post-detail-body {
        padding: 1.25rem;
    }

    .comment-form-row {
        grid-template-columns: 1fr;
    }
}
