/* Zboard 메인 스타일 */

.zboard-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 헤더 */
.zboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.zboard-title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 검색 폼 */
.zboard-search {
    margin-bottom: 20px;
}

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

.search-form select,
.search-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-form input[type="text"] {
    flex: 1;
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #0073aa;
    color: #fff;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #f0f0f1;
    color: #2c3338;
}

.btn-secondary:hover {
    background: #dcdcde;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-search {
    background: #2271b1;
    color: #fff;
    padding: 8px 20px;
}

/* 게시글 테이블 */
.zboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.zboard-table thead {
    background: #f8f9fa;
    border-top: 2px solid #333;
    border-bottom: 1px solid #ddd;
}

.zboard-table th {
    padding: 12px 8px;
    font-weight: 600;
    text-align: center;
    font-size: 14px;
}

.zboard-table tbody tr {
    border-bottom: 1px solid #eee;
}

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

.zboard-table tbody tr.notice {
    background: #fff9e6;
}

.zboard-table td {
    padding: 12px 8px;
    font-size: 14px;
    text-align: center;
}

.col-no {
    width: 60px;
}

.col-category {
    width: 100px;
}

.col-title {
    width: auto;
    text-align: left;
}

.col-author {
    width: 100px;
}

.col-date {
    width: 100px;
}

.col-views {
    width: 60px;
}

.col-likes {
    width: 60px;
}

/* 게시글 제목 */
.post-title {
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-title:hover {
    color: #0073aa;
    text-decoration: underline;
}

.badge-notice {
    background: #dc3545;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.badge-new {
    background: #28a745;
    color: #fff;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: bold;
}

.comment-count {
    color: #dc3545;
    font-weight: bold;
}

.icon-secret,
.icon-file {
    font-size: 14px;
}

/* 페이지네이션 */
.zboard-pagination {
    text-align: center;
    margin-top: 30px;
}

.page-numbers {
    display: inline-block;
    margin: 0 3px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
}

.page-numbers:hover,
.page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* 글쓰기 폼 */
.zboard-write-form {
    margin-top: 20px;
}

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

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #0073aa;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.col-6 {
    flex: 1;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 게시글 보기 */
.zboard-post-header {
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}

.zboard-post-header .post-title {
    font-size: 24px;
    margin: 0 0 10px 0;
}

.post-meta {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.post-meta .separator {
    color: #ddd;
}

.zboard-post-content {
    padding: 30px 0;
    line-height: 1.8;
    font-size: 15px;
    color: #333;
    min-height: 200px;
}

.zboard-post-content img {
    max-width: 100%;
    height: auto;
}

/* 첨부파일 */
.zboard-files {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 20px 0;
}

.zboard-files h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.file-list li:last-child {
    border-bottom: none;
}

.file-download {
    color: #0073aa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-download:hover {
    text-decoration: underline;
}

.filesize,
.downloads {
    color: #666;
    font-size: 13px;
}

/* 추천/비추천 */
.zboard-vote {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.btn-vote {
    padding: 12px 30px;
    font-size: 16px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-vote:hover {
    border-color: #0073aa;
    background: #f8f9fa;
}

.btn-vote:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-like {
    color: #0073aa;
}

.btn-dislike {
    color: #dc3545;
}

/* 게시글 액션 */
.zboard-post-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

/* 댓글 */
.zboard-comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.zboard-comments h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.zboard-comments h3 .count {
    color: #0073aa;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.comment-item {
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.comment-item.reply {
    margin-left: 40px;
    background: #fff;
    border: 1px solid #e9ecef;
}

.comment-author {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.comment-author strong {
    color: #333;
}

.comment-author .date {
    color: #666;
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 8px;
}

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

.btn-reply {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.comment-likes {
    color: #666;
}

/* 댓글 작성 폼 */
.comment-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.comment-form h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

/* 위젯 */
.zboard-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zboard-widget-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.zboard-widget-list li:last-child {
    border-bottom: none;
}

.zboard-widget-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zboard-widget-list a:hover {
    color: #0073aa;
}

.zboard-widget-list .comment-count {
    color: #dc3545;
    font-size: 13px;
}

.zboard-widget-list .post-date {
    font-size: 12px;
    color: #999;
}

/* 반응형 */
@media (max-width: 768px) {
    .zboard-wrap {
        padding: 15px;
    }

    .zboard-table {
        font-size: 12px;
    }

    .zboard-table th,
    .zboard-table td {
        padding: 8px 4px;
    }

    .col-views,
    .col-likes {
        display: none;
    }

    .search-form {
        flex-direction: column;
    }

    .row {
        flex-direction: column;
    }
}