/* ============================
   게시판 전용 스타일
   ============================ */

/* 삭제 버튼 스타일 */
.btn-delete, .btn-delete-post {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.btn-delete:hover, .btn-delete-post:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

.btn-delete:active, .btn-delete-post:active {
    transform: translateY(0);
}

/* 게시글 헤더 수정 - 삭제 버튼을 위한 레이아웃 */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.post-title-section {
    flex: 1;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-salary {
    font-weight: 600;
    color: #667eea;
}

/* 메인과 일관된 색상 변수 적용 */
:root {
    --primary-color: #1a4f8a;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --white-color: #fff;
    --success-color: #27ae60;
}

/* 게시판 헤더 */
.board-header {
    background: white;
    color: #333;
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.board-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.board-header h1 i {
    margin-right: 15px;
    color: #666;
}

.board-header p {
    font-size: 1.2rem;
    color: #666;
}

/* 게시판 메인 */
.board-main {
    padding: 60px 0;
    background-color: white;
    min-height: 80vh;
}

/* 게시판 컨트롤 */
.board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.board-stats {
    font-size: 1.1rem;
    color: #666;
}

.board-stats strong {
    color: #333;
    font-weight: 700;
}

.board-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #666;
}

.btn-write {
    background: #666;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-write:hover {
    background: #555;
    transform: translateY(-2px);
}

/* 게시글 목록 */
.board-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.board-item {
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
}

.board-item:last-child {
    border-bottom: none;
}

.board-item:hover {
    background-color: white;
    transform: translateX(5px);
}

.board-item.notice {
    background: white;
    color: #333;
    border-left: 4px solid #e74c3c;
}

.board-item.notice:hover {
    background: white;
}

.board-content {
    padding: 25px 30px;
}

.board-badge {
    display: inline-block;
    background: #f8f9fa;
    color: #666;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    border: 1px solid #e1e5e9;
}

.board-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    line-height: 1.4;
}

.board-item h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.board-item.notice h3 a {
    color: #333;
}

.board-item h3 a:hover {
    color: #666;
}

.board-item.notice h3 a:hover {
    color: #333;
}

.board-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.board-item.notice .board-meta {
    color: #666;
}

.board-meta .author {
    font-weight: 600;
    color: #333;
}

.board-item.notice .board-meta .author {
    color: #333;
}

.board-meta .salary {
    background: #f8f9fa;
    color: #666;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #e1e5e9;
}

.board-preview {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.board-item.notice .board-preview {
    color: #666;
}

.board-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: #f1f3f4;
    color: #555;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    background: white;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid #e1e5e9;
}

.page-btn:hover {
    background: #666;
    color: white;
    border-color: #666;
}

.page-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    background: white;
    color: #666;
    border-color: #e1e5e9;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .board-header {
        padding: 60px 0 40px;
    }
    
    .board-header h1 {
        font-size: 2rem;
    }
    
    .board-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .board-actions {
        justify-content: space-between;
    }
    
    .board-content {
        padding: 20px;
    }
    
    .board-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .board-item h3 {
        font-size: 1.1rem;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* 모바일에서 삭제 버튼 조정 */
    .btn-delete, .btn-delete-post {
        padding: 6px 10px;
        font-size: 0.8rem;
        margin-left: 4px;
    }
    
    .post-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    
    .post-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* 로딩 상태와 기타 상태 스타일 */
.loading-state, .no-posts, .error-message {
    padding: 60px 30px;
    text-align: center;
    color: #666;
}

.loading-spinner {
    margin-bottom: 1rem;
}

.loading-state p, .no-posts p, .error-message p {
    font-size: 1.1rem;
    margin: 0;
}

.no-posts .btn, .error-message .btn {
    margin-top: 1rem;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.no-posts .btn:hover, .error-message .btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}
