/* 게시물 상세보기 스타일 */

.post-view {
    background: white;
    overflow: hidden;
    position: relative;
    z-index: auto;
}

/* 게시물 헤더 */
.post-header {
    padding: 2rem 1.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.post-title {
    font-size: 1.8rem;
    color: #2c3e50;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin: 1rem 0;
    word-break: keep-all;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: #7f8c8d;
    font-size: 14px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    font-size: 13px;
    opacity: 0.8;
}

/* 유튜브 임베드 */
.youtube-embed {
    text-align: center;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    max-width: 90%;
}

.youtube-embed iframe {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    aspect-ratio: 16/9;
}

/* 첨부파일 */
.post-files {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.post-files h3 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-files h3 i {
    color: #6c757d;
}

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

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    text-decoration: none;
    color: #2c3e50;
    border-top: 1px solid #dee2e6;
    transition: all 0.3s;
    background: white;
}

.file-item:first-child {
    border-top: none;
}

.file-item:hover {
    background: #e9ecef;
    color: #1e3d6f;
}

.file-item i {
    font-size: 18px;
    color: #6c757d;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.file-size,
.file-download {
    color: #6c757d;
    font-size: 13px;
}

.file-download i {
    font-size: 12px;
    margin-right: 4px;
}

/* 게시물 내용 */
.post-content {
    padding: 2rem 1.5rem;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    word-break: keep-all;
}

.post-content p {
    padding: 8px 0;
    margin: 0 0 1rem 0;
}

.post-content img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    margin: 1.5rem 0;
    border-radius: 8px;
    display: block;
    box-sizing: border-box;
}

.post-content iframe {
    max-width: 100%;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #2c5aa0;
    color: #555;
}

.post-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.post-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* 이전/다음글 */
.post-navigation {
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    margin-top: 2rem;
}

.post-nav-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #dee2e6;
    transition: background 0.3s;
}

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

.post-nav-item:hover {
    background: #f8f9fa;
}

.post-nav-label {
    width:80px;
    text-align: center;
    border:#ddd solid 1px;
    border-radius: 4px;
    background: #fff;
    padding:2px 6px;
    font-size: 13px;
    margin-right:6px;
    color: #555;
    font-weight: 500;
}

.post-nav-label i {
    margin-right: 4px;
}

.post-nav-item a {
    color: #2c3e50;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.post-nav-item a:hover {
    color: #2c5aa0;
}

/* 댓글 */
.post-comments {
    padding: 2rem 1.5rem;
    background: #f8f9fa;
    margin-top: 2rem;
    border-top: 2px solid #dee2e6;
}

.post-comments h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-comments h3 i {
    color: #6c757d;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment-item {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e9ecef;
}

.comment-header strong {
    color: #2c3e50;
    font-size: 15px;
}

.comment-date {
    color: #95a5a6;
    font-size: 13px;
}

.comment-content {
    color: #2c3e50;
    line-height: 1.7;
    font-size: 15px;
}

/* 댓글 폼 */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.comment-form textarea::placeholder {
    color: #adb5bd;
}

.login-required {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    background: white;
    border-radius: 8px;
}

.login-required a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
}

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

/* 게시물 액션 버튼 */
.post-actions {
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #ecf0f1;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-share-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.post-action-buttons a:hover {color:#fff !important;}

/* 반응형: 태블릿 */
@media (max-width: 1024px) {
    .post-header {
        padding: 1.5rem 1rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    .post-content {
        padding: 1.5rem 1rem;
        font-size: 15px;
    }
    
    .post-comments {
        padding: 1.5rem 1rem;
    }
}

/* 반응형: 모바일 */
@media (max-width: 768px) {
    /* 모바일에서 좌우 여백 최소화 */
    .post-header,
    .post-content,
    .post-files,
    .post-comments,
    .post-actions,
    .post-nav-item {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .post-header {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .post-title {
        font-size: 20px;
        line-height: 24px;
    }
    
    .post-meta {
        display: inline-flex;
        gap: 0.5rem;
    }
    
    .youtube-embed {
        padding: 0;
        margin: 1rem 0;
        max-width: 100%;
        background: transparent;
        border-radius: 0;
    }
    
    .youtube-embed iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        border-radius: 0;
    }
    
    .post-files {
        padding: 1rem;
    }
    
    .file-item {
        flex-wrap: wrap;
        padding: 10px 12px;
    }
    
    .file-name {
        flex-basis: 100%;
        margin-bottom: 6px;
    }
    
    .post-content {
        padding: 1.5rem 1rem;
        font-size: 15px;
        line-height: 1.7;
    }
    
    .post-content img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        margin: 1rem 0;
        display: block;
        box-sizing: border-box;
    }
    
    .post-nav-item {
        padding: 1rem;
    }
    
    .post-comments {
        padding: 1.5rem 1rem;
    }
    
    .post-comments h3 {
        font-size: 1.1rem;
    }
    
    .comment-item {
        padding: 1rem;
    }
    
    .comment-form textarea {
        min-height: 100px;
        padding: 0.8rem;
    }
    
    .post-actions {
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .post-share-actions,
    .post-action-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* 반응형: 작은 모바일 */
@media (max-width: 480px) {
    .post-title {
        font-size: 1.2rem;
    }
    
    .post-content {
        font-size: 14px;
        padding: 1rem;
    }
    
    .post-content p {
        padding: 6px 0;
    }
    
    .comment-item {
        padding: 0.8rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 프린트 스타일 */
@media print {
    .post-actions,
    .post-share-actions,
    .post-comments,
    .post-navigation {
        display: none !important;
    }
    
    .post-content {
        padding: 0;
    }
    
    .post-content img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        page-break-inside: avoid;
        display: block;
        box-sizing: border-box;
    }
}

