/* 게시판 공통 스타일 */

/* 게시판 목록 (board_list.php) */
.board-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.board-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.btn-write {
    padding: 10px 24px;
    background-color: #06553f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-write:hover {
    background-color: #044030;
}

.board-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-end;
}

.board-search form {
    display: flex;
    gap: 10px;
}

.search-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
}

.btn-search {
    padding: 8px 20px;
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.btn-search:hover {
    background-color: #5a6268;
}

.board-table {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    font-size: 14px;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.table .title-col {
    text-align: left;
    max-width: 500px;
}

.board-title-link {
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.board-title-link:hover {
    color: #06553f;
}

.badge-notice {
    display: inline-block;
    padding: 3px 8px;
    background-color: #dc3545;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
}

.comment-count {
    color: #06553f;
    font-weight: 600;
    margin-left: 5px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
    text-decoration: none;
}

.page-link:hover {
    background-color: #06553f;
    color: #fff;
    border-color: #06553f;
}

.page-link.active {
    background-color: #06553f;
    color: #fff;
    border-color: #06553f;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
}

/* 게시판 테이블 컬럼 너비 */
.col-number {
    width: 80px;
}

.col-author {
    width: 120px;
}

.col-views {
    width: 100px;
}

.col-date {
    width: 120px;
}

/* 게시글 보기 (board_view.php) */
.view-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.view-header {
    background-color: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.view-category {
    display: inline-block;
    padding: 5px 12px;
    background-color: #06553f;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.view-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.view-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.view-content {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 40px 30px;
    min-height: 300px;
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.view-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.view-footer {
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-list {
    background-color: #6c757d;
    color: #fff;
}

.btn-list:hover {
    background-color: #5a6268;
}

.btn-edit {
    background-color: #28a745;
    color: #fff;
}

.btn-edit:hover {
    background-color: #218838;
}

.btn-delete {
    background-color: #dc3545;
    color: #fff;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* 댓글 섹션 */
.comment-section {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.comment-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.comment-write {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
    margin-bottom: 10px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #06553f;
}

.btn-comment {
    padding: 10px 24px;
    background-color: #06553f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-comment:hover {
    background-color: #044030;
}

.comment-list {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comment-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

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

.comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.comment-date {
    font-size: 13px;
    color: #999;
    margin-left: 10px;
}

.comment-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 10px;
}

.btn-comment-action {
    padding: 4px 12px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
}

.btn-comment-action:hover {
    background-color: #f8f9fa;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 댓글 작성 안내 */
.comment-login-notice {
    text-align: center;
    color: #666;
}

.comment-login-notice a {
    color: #06553f;
    text-decoration: none;
}

.comment-login-notice a:hover {
    text-decoration: underline;
}

/* 게시글 작성 (board_write.php) */
.write-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.write-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.write-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.write-form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #06553f;
}

textarea.form-control {
    min-height: 400px;
    resize: vertical;
    font-family: inherit;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-primary {
    background-color: #06553f;
    color: #fff;
}

.btn-primary:hover {
    background-color: #044030;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.editor-btn {
    padding: 6px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.editor-btn:hover {
    background-color: #e9ecef;
}

#contentEditor {
    border-radius: 0 0 6px 6px;
}

/* 이미지 업로드 숨김 */
.image-upload-hidden {
    display: none;
}

/* 에디터 내 이미지 스타일 */
.editor-image {
    max-width: 100%;
    height: auto;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .board-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .board-search {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .table {
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 10px 5px;
    }
    
    .view-header,
    .view-content,
    .view-footer {
        padding: 20px;
    }
    
    .view-title {
        font-size: 20px;
    }
    
    .view-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .view-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-group {
        width: 100%;
        justify-content: center;
    }
    
    .write-form {
        padding: 20px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
