/* 게시글 목록 테이블 */
.post-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    color: #333;
    text-align: center;
}
.post-th, .post-td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}
.post-th {
    background-color: #f4f4f4;
    font-weight: bold;
}
.post-th-small {
    width: 120px;
}
.post-th-title, .post-td-title {
    width: 60%;
    text-align: left;
}
.post-link {
    width: 100%;
    color: #f4a300;
    text-decoration: none;
}
.post-link:hover {
    text-decoration: underline;
}
.post-tr {
    transition: background-color 0.3s ease;
}
.post-tr:hover {
    background-color: #f0f0f0;
}

/* 카테고리 */
.category-label {
    border-radius: 3px;
    text-align: left;
}
.category-label.질문 { color: #ff4a4a; }
.category-label.정보 { color: #5858ff; }
.category-label.자유 { color: #45ffad; }

/* 카테고리 링크 */
.category-links {
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}
.category-links a {
    color: #333;
    text-decoration: none;
    padding: 5px 10px;
    margin-right: 10px;
}
.category-links a.active,
.category-links a:hover {
    font-weight: bold;
    color: #f4a300;
}
.active-category {
    font-weight: bold;
    color: #000;
}

/* 글쓰기 버튼 */
.write-post-btn-container {
    text-align: right;
    margin-bottom: 20px;
}
.write-post-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f4a300;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}
.write-post-btn:hover {
    background-color: #e28e00;
    color: #333;
}

/* 글쓰기 폼 */
.post-form {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.form-title { text-align: center; color: #333; margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: bold; color: #333; }
.form-select,
.form-input,
.form-textarea,
.form-file {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
}
.form-textarea { resize: vertical; height: 150px; }
.form-file { background-color: #fff; font-size: 14px; }
.form-submit-btn {
    padding: 10px 20px;
    background-color: #f4a300;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}
.form-submit-btn:hover {
    background-color: #e28e00;
    color: #333;
}

/* ─────── 상세보기 세련된 카드 스타일 ─────── */
.content-container {
    max-width: 1000px;
    margin: 100px auto 40px;
    padding: 0 20px;
    background: none;
}
.post-detail-container {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 40px 50px;
    position: relative;
    overflow: hidden;
}
.post-detail-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg,#fdcf25 0%,#f4a300 50%,#fdcf25 100%);
}
.category-label {
    display:inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background:#fff7db;
    margin-bottom: 12px;
}
.category-label.질문 { color:#ff4a4a; background:#ffeaea; }
.category-label.정보 { color:#5858ff; background:#eef0ff; }
.category-label.자유 { color:#00a97f; background:#e6fff6; }

.post-title  { font-size: 30px; font-weight: 700; color:#222; }
.post-content{ font-size:17px; line-height:1.8; color:#444; }
.post-info   { margin:20px 0 28px; font-size:14px; color:#888; }

.comment {
    background:#fafafa;
    border-radius:6px;
    box-shadow:inset 0 0 0 1px #eee;
    padding:12px 16px;
    margin-bottom:12px;
}
.comment p:first-child {
    margin-bottom:6px;
    font-weight:600;
    color:#222;
}

/* 상세보기 버튼 */
.post-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: baseline;
}
.btn-edit, .form-delete-btn {
    background-color: #f4a300;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
.btn-edit:hover, .form-delete-btn:hover {
    background-color: #e28e00;
}
.btn-delete {
    background-color: #f44336;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
.btn-delete:hover {
    background-color: #e53935;
}

/* 반응형 스타일 */
@media screen and (max-width: 480px) {
    .post-table { font-size: 14px; }
    .post-th, .post-td { padding: 8px; }
    .post-th-small { width: 70px; font-size: 13px; }
    .post-th-title, .post-td-title {
        width: auto;
        text-align: left;
        font-size: 14px;
    }
    .category-links { font-size: 14px; margin: 10px 0; }
    .write-post-btn-container { text-align: center; }
    .write-post-btn { padding: 8px 15px; font-size: 14px; }
    .post-form { padding: 15px; margin: 10px; }
    .form-input, .form-textarea, .form-select {
        font-size: 14px; padding: 8px;
    }
    .form-submit-btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .post-detail-container {
        padding: 20px;
        margin: 10px;
    }
    .post-title { font-size: 22px; }
    .post-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .post-content { font-size: 15px; }
    .comment { font-size: 14px; padding: 8px; }
    .comment-form textarea {
        font-size: 14px; padding: 8px;
    }
    .comment-form button {
        font-size: 13px;
        padding: 8px 12px;
    }

    .post-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-edit, .form-delete-btn, .btn-delete {
        font-size: 14px;
        padding: 8px 16px;
        width: 100%;
        text-align: center;
    }
    .pagination { font-size: 14px; }
    .pagination a {
        padding: 6px 10px;
        margin: 0 3px;
    }
    .post-image {
        max-width: 100%;
        height: auto;
    }
    .content-container {
        margin: 60px 10px 20px 10px;
        padding: 15px;
    }
}



/* ===== 게시글 상세보기 페이지 스타일 통합 ===== */

/* 기본 글꼴 및 레이아웃 설정 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #fafafa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* 컨테이너 전체 */
.content-container {
    max-width: 1000px;
    margin: 100px auto 40px;
    padding: 0 20px;
    background: none;
}

/* 상세 카드 */
.post-detail-container {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 40px 50px;
    position: relative;
    overflow: hidden;
}
.post-detail-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 6px;
    background: linear-gradient(90deg,#fdcf25 0%,#f4a300 50%,#fdcf25 100%);
}

/* 카테고리 태그 */
.category-label {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
    background: #fff7db;
}
.category-label.질문 {
    color: #ff4a4a;
    background: #ffeaea;
}
.category-label.정보 {
    color: #5858ff;
    background: #eef0ff;
}
.category-label.자유 {
    color: #00a97f;
    background: #e6fff6;
}

/* 제목, 작성자, 날짜 */
.post-title {
    font-size: 30px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}
.post-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
}

/* 게시글 내용 */
.post-content {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 40px;
    white-space: pre-line;
}

/* 댓글 영역 */
.post-comments h3 {
    font-size: 20px;
    margin-bottom: 15px;
}
.comment {
    background: #fefefe;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px #eee;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.comment p:first-child {
    margin-bottom: 6px;
    font-weight: 600;
    color: #222;
}
.comment-date {
    font-size: 12px;
    color: #888;
}

/* 댓글 작성 */
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
    resize: none;
}
.comment-form button {
    padding: 10px 20px;
    background-color: #f4a300;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.comment-form button:hover {
    background-color: #e28e00;
}

/* 수정/삭제 버튼 */
.post-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
.btn-edit, .form-delete-btn, .btn-delete {
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.btn-edit, .form-delete-btn {
    background-color: #f4a300;
    color: #333;
}
.btn-edit:hover, .form-delete-btn:hover {
    background-color: #e28e00;
}
.btn-delete {
    background-color: #f44336;
    color: white;
}
.btn-delete:hover {
    background-color: #e53935;
}

/* 반응형 */
@media screen and (max-width: 480px) {
    .post-detail-container {
        padding: 20px;
    }
    .post-title {
        font-size: 22px;
    }
    .post-info {
        flex-direction: column;
        gap: 5px;
    }
    .post-content {
        font-size: 15px;
    }
    .post-actions {
        flex-direction: column;
    }
    .btn-edit, .form-delete-btn, .btn-delete {
        width: 100%;
        text-align: center;
    }
}
