/* 게시판 상세보기 공통 스타일 - 리디자인 with clear boundaries */
.board-view {
    background: #fff;

    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* 헤더 영역 */
.board-view-header {
    padding: 22px 28px;
    background: #F9FAFB; /* 약한 대비 배경 */
    border-bottom: 2px solid var(--border-medium, #D1D5DB); /* 경계라인 강조 */
    position: relative;
}

.view-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark, #1F2937);
    margin: 0 0 10px;
    line-height: 1.35;
    word-break: keep-all;
}

.notice-badge {
    display: inline-block;
    background: var(--state-danger, #DC2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-right: 8px;
    vertical-align: middle;
}

.view-info, .info-item {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    color: var(--text-light, #6B7280);
    justify-content: flex-end;
}

.view-info span, .info-item {
    position: relative;
}

.view-info span:not(:last-child)::after,
.info-item:not(:last-child)::after {
    content: '';
    width: 4px;
    height: 4px;
    background: #CBD5E1;
    border-radius: 50%;
    position: absolute;
    right: -11px;
    top: 50%;
    transform: translateY(-50%);
}

.view-author, .view-source {
    font-weight: 600;
}

/* 콘텐츠 영역 */
.view-content, .board-view-content {
    padding: 28px;
    min-height: 320px;
    line-height: 1.85;
    color: var(--text-medium, #374151);
    font-size: 1rem;
    background: #FFFFFF;
}

.view-content img, .view-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-light, #E5E7EB);
    padding: 2px;
    margin: 16px 0;
}

.view-content p, .view-text p {
    margin: 0 0 1rem;
}

/* 첨부파일 영역 */
.view-attachments {
    background: #F8FAFC;
    border: 1px solid var(--border-light, #E5E7EB);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 22px;
}

.attachment-item {
    margin-top: 10px;
    list-style-type: none !important;
    padding: 8px 0;
    border-top: 1px dashed #E5E7EB; /* 항목 구분선 */
}

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

.attachment-link {
    display: inline-flex;
    align-items: center;
    color: var(--leaf, #3A5A40);
    text-decoration: none;
    transition: color 0.2s;
}

.attachment-link:hover {
    color: var(--chestnut-medium, #8B5A2B);
    text-decoration: underline;
}

.file-size {
    margin-left: 6px;
    font-size: 0.82rem;
    color: #94A3B8;
}

/* 푸터 영역 */
.board-view-footer {
    padding: 18px 28px;
    background: #F9FAFB;
    border-top: 2px solid var(--border-medium, #D1D5DB); /* 경계라인 강조 */
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 14px;
}

/* 네비게이션 (이전/다음글) */
.view-navigation {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 70%;
}

.nav-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #E5E7EB;
}

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

.nav-label {
    flex: 0 0 auto;
    min-width: 54px;
    color: #6B7280;
    font-weight: 600;
}

.nav-link {
    color: var(--text-medium, #374151);
    text-decoration: none;
    transition: color .2s;
}

.nav-link:hover { color: var(--chestnut-dark, #5A3825); text-decoration: underline; }

/* 액션 영역 (목록 버튼) */
.view-actions { display: flex; align-items: center; gap: 8px; }

.btn-outline, .btn-secondary {
    padding: 10px 20px;
    border: 1px solid var(--border-medium, #D1D5DB);
    color: var(--text-medium, #374151);
    background: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-outline:hover, .btn-secondary:hover {
    background: #EEF2FF;
    border-color: #C7D2FE;
    color: #1F2937;
}

.btn-primary {
    padding: 10px 22px;
    background: var(--leaf, #3A5A40);
    color: #fff;
    border: 1px solid var(--leaf, #3A5A40);
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: #32503b;
    border-color: #32503b;
}

/* 미디어 원문 링크 */
.media-original {
    margin-top: 28px;
    text-align: center;
}

/* 액션 아이콘 버튼 (공유/인쇄) */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    border: none;
    background: transparent;
    color: var(--text-light, #6B7280);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
    margin-left: 6px;
}
.icon-btn i { font-size: 1.125rem; line-height: 1; }
.icon-btn:hover { background: #EEF2FF; color: #1F2937; }
.icon-btn:active { transform: translateY(1px); }

/* 반응형 조정 */
@media (max-width: 768px) {
    .view-header, .board-view-header { padding: 16px 18px; }
    .view-content, .board-view-content { padding: 18px; }
    .view-title { font-size: 1.35rem; }
    .board-view-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .view-navigation { width: 100%; }
    .view-actions { width: 100%; justify-content: center; }
}

/* 프린트 스타일: board-view-header, board-view-content만 인쇄 */
@media print {
    .sub_topbg{
        display: none;
    }
    /* 레이아웃 단순화 */
    .header, header, .footer, footer, nav, .sub_header, .sub_tab,
    .board-view-footer, .view-actions, .view-navigation, .skip-link {
        display: none !important;
    }

    /* 인쇄 영역 조상 노드도 가시화 */
    .content-section, .container, .content-wrapper, .board-container, .board-view {
        visibility: visible !important;
    }

    /* 배경/그림자 제거, 여백 조정 */
    .content-section, .container, .content-wrapper, .board-container, .board-view {
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 인쇄 가독성 향상 */
    .board-view-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border-bottom: 1px solid #999 !important;
        background: #fff !important;
    }
    .board-view-content {
        background: #fff !important;
    }

    /* 아이콘 버튼, 링크 밑줄 제거 */
    .icon-btn { display: none !important; }
    a { text-decoration: none !important; color: #000 !important; }
}
