/* 게시글 뷰 컨테이너 */
.document-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fff;
}

/* 게시글 헤더 */
.document-header {
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
    margin-bottom: 30px;
}

.document-category {
    margin-bottom: 15px;
}

.category-badge {
    display: inline-block;
    padding: 5px 15px;
    background: #f8f9fa;
    color: #666;
    font-size: 0.9em;
    font-weight: 600;
    border: 1px solid #e5e5e5;
}

.document-title {
    font-size: 2em;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.95em;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-profile {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.author-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: #333;
}

.meta-divider {
    color: #ddd;
}

.meta-right {
    display: flex;
    gap: 5px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e5e5;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    border-color: #006cb0;
    background: #f8f9fa;
}

.btn-icon .icon {
    font-size: 1.1em;
}

/* 게시글 본문 */
.document-content {
    padding: 40px 0;
    min-height: 300px;
    font-size: 1em;
    line-height: 1.8;
    color: #333;
}

.document-content img {
    max-width: 100%;
    height: auto;
}

.document-content p {
    margin-bottom: 1em;
}

/* 첨부파일 */
.document-attachments {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    margin: 30px 0;
}

.attachments-title {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attachments-list {
    list-style: none;
}

.attachment-item {
    margin-bottom: 10px;
}

.attachment-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.attachment-link:hover {
    border-color: #006cb0;
    background: #fafbfc;
}

.file-icon {
    font-size: 1.2em;
    margin-right: 10px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: #999;
    margin-left: 5px;
}

.file-download {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.download-count {
    font-size: 0.9em;
}

/* 태그 */
.document-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
}

.tag-icon {
    font-size: 1.1em;
}

.tag-item {
    display: inline-block;
    padding: 5px 12px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.tag-item:hover {
    background: #006cb0;
    color: white;
    border-color: #006cb0;
}

/* 게시글 푸터 */
.document-footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.document-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #e5e5e5;
    color: #333;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    border-color: #006cb0;
    color: #006cb0;
    background: #f8f9fa;
}

.btn-action .icon {
    font-size: 1.2em;
}

.btn-action .count {
    color: #006cb0;
}

/* 이전글/다음글 네비게이션 */
.document-navigation {
    border: 1px solid #e5e5e5;
    margin: 30px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
    border-bottom: 1px solid #e5e5e5;
}

.nav-item:last-child {
    border-bottom: none;
}

.nav-item:hover {
    background: #f8f9fa;
}

.nav-label {
    display: inline-block;
    min-width: 70px;
    padding: 4px 10px;
    background: #f8f9fa;
    color: #666;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 15px;
}

.nav-prev .nav-label {
    background: #e8f4f8;
    color: #006cb0;
}

.nav-title {
    flex: 1;
    font-weight: 500;
}

/* 하단 버튼 */
.document-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-top: 2px solid #333;
}

.buttons-left,
.buttons-right {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    border: none;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn .icon {
    font-size: 1em;
}

.btn-primary {
    background: #006cb0;
    color: white;
    border: 1px solid #006cb0;
}

.btn-primary:hover {
    background: #004a7c;
    border-color: #004a7c;
}

.btn-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    border-color: #333;
    background: #f8f9fa;
}

.btn-danger {
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: #dc3545;
    color: white;
}

.comment-count {
    color: #006cb0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .document-view {
        padding: 30px 15px;
    }

    .document-title {
        font-size: 1.5em;
    }

    .document-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .meta-left {
        flex-wrap: wrap;
    }

    .meta-right {
        width: 100%;
        justify-content: flex-end;
    }

    .document-content {
        padding: 30px 0;
        font-size: 0.95em;
    }

    .document-actions {
        flex-wrap: wrap;
    }

    .nav-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav-label {
        margin-right: 0;
    }

    .document-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .buttons-left,
    .buttons-right {
        width: 100%;
        justify-content: center;
    }

    .btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .document-title {
        font-size: 1.3em;
    }

    .document-content {
        font-size: 0.9em;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }

    .btn .icon {
        display: none;
    }

    .btn-action {
        padding: 10px 16px;
    }
}

/* 인쇄 스타일 */
@media print {
    .document-view {
        padding: 20px;
    }

    .meta-right,
    .document-footer,
    .document-navigation,
    .document-buttons {
        display: none;
    }

    .document-content {
        color: #000;
    }
}