/* ============================================================
   post.css — 게시글 목록 + 상세 + 댓글
   ============================================================ */

/* ============ 게시글 목록 (post_list.html partial) ============ */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.post-list li {
    padding: 14px 4px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    gap: 14px;
}
.post-list li:last-child {
    border-bottom: 0;
}
.post-list .badge {
    flex-shrink: 0;
}
.post-list .post-body {
    flex: 1;
    min-width: 0;
}
.post-list .title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-list .title:hover {
    color: var(--color-primary);
}
.post-list .meta {
    font-size: 12px;
    color: var(--color-muted);
}
.post-list .meta span {
    margin-right: 10px;
}

/* 빈 목록 */
.empty-list {
    padding: 30px 14px;
    text-align: center;
    color: var(--color-muted);
    font-size: 14px;
}

/* ============ 게시글 상세 ============ */
.post-detail {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px 32px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}
.post-detail h1 {
    font-size: 26px;
    line-height: 1.4;
    margin: 0 0 14px;
}
.post-detail .meta {
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border-light);
}
.post-detail .meta .badge {
    margin-right: 8px;
}

/* 게시글 이미지 (상단/중간) */
.post-hero-image,
.post-mid-image {
    max-width: 720px;
    margin: 22px auto 28px;
    text-align: center;
}
.post-hero-image img,
.post-mid-image img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    object-fit: cover;
}
.post-mid-image img {
    max-height: 340px;
}

/* 요약 박스 */
.post-summary {
    background: var(--color-primary-bg);
    border-left: 4px solid var(--color-primary);
    padding: 16px 22px;
    margin: 22px auto;
    max-width: 720px;
    border-radius: 0 8px 8px 0;
    color: #1e3a8a;
    font-size: 15.5px;
    line-height: 1.85;
    text-align: justify;
    text-justify: inter-character;
    word-break: keep-all;
}

/* 본문 */
.post-content {
    font-size: 16.5px;
    line-height: 2.05;
    color: #1f2937;
    white-space: pre-wrap;
    word-break: keep-all;
    word-wrap: break-word;
    margin: 22px 0;
    text-align: justify;
    text-justify: inter-character;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.01em;
}

/* Part1 / Part2 구분선 */
.part-divider {
    border: none;
    border-top: 2px dashed #d1d5db;
    margin: 40px auto;
    max-width: 720px;
    opacity: 0.6;
}

/* 출처 */
.post-sources {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border-light);
}
.post-sources h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #374151;
}
.post-sources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.post-sources li {
    padding: 6px 0;
    font-size: 14px;
}
.post-sources a {
    color: var(--color-primary);
    word-break: break-all;
}

/* 태그 영역 */
.post-tags {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border-light);
}
.post-tags-label {
    font-size: 13px;
    color: var(--color-muted);
    margin-right: 8px;
}

/* 게시글 액션 (수정/삭제) */
.post-actions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    gap: 8px;
}

/* ============ 댓글 ============ */
.comments {
    margin-top: 28px;
}
.comments h2 {
    font-size: 17px;
    margin-bottom: 14px;
    color: #374151;
}
.comment {
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border-light);
}
.comment:last-child {
    border-bottom: 0;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}
.comment-author {
    font-weight: 600;
    color: var(--color-text);
}
.comment-date {
    color: var(--color-muted);
    font-size: 12px;
}
.comment-content {
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
    word-break: keep-all;
    white-space: pre-wrap;
}
.comment-delete {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-muted);
    background: none;
    border: none;
    cursor: pointer;
}
.comment-delete:hover {
    color: var(--color-danger);
}

/* 댓글 작성 폼 */
.comment-form {
    margin-top: 14px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 8px;
}
.comment-form textarea {
    min-height: 80px;
    margin-bottom: 8px;
}
.comment-form .login-hint {
    color: var(--color-muted);
    font-size: 13px;
    text-align: center;
    padding: 14px;
}