/* 공지사항 컨테이너 */
.notice-container {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background-color: #FFFFFF;
}

.notice-header {
    color: #000;
    font-weight: 700;
    font-size: 1.2em;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-base-300);
    border-radius: 8px 8px 0 0;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    justify-content: space-between;
}

.notice-body {
    background-color: #FFFFFF;
    border-radius: 0 0 8px 8px;
    padding: 25px;
}

/* 공지사항 상세 스타일 */
.notice-title {
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 2px solid var(--color-blue);
    border-bottom: 1px solid var(--color-border);
    word-wrap: break-word;
}

.notice-title h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.notice-info {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
    gap: 15px;
    color: #666;
    font-size: 0.9em;
    align-items: center;
}

/* ===== CKEditor 컨텐츠 영역 스타일 ===== */
.notice-content {
    padding: 30px 20px;
    min-height: 300px;
    line-height: 1.6;
    word-wrap: break-word;
}

/* 에디터 컨텐츠 - 단락 */
.notice-content p {
    margin: 0 0 15px 0;
    line-height: 1.8;
}

/* 에디터 컨텐츠 - 굵은 글씨 */
.notice-content strong,
.notice-content b {
    font-weight: 700;
    color: #333;
}

/* 에디터 컨텐츠 - 이탤릭 */
.notice-content em,
.notice-content i {
    font-style: italic;
}

/* 에디터 컨텐츠 - 줄바꿈 */
.notice-content br {
    line-height: 1.8;
}

/* 에디터 컨텐츠 - 리스트 */
.notice-content ul,
.notice-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.notice-content ul li {
    list-style-type: disc;
    margin: 8px 0;
    line-height: 1.8;
}

.notice-content ol li {
    list-style-type: decimal;
    margin: 8px 0;
    line-height: 1.8;
}

/* 에디터 컨텐츠 - 제목 */
.notice-content h1,
.notice-content h2,
.notice-content h3,
.notice-content h4,
.notice-content h5,
.notice-content h6 {
    margin: 20px 0 15px 0;
    font-weight: 700;
    line-height: 1.4;
}

.notice-content h1 { font-size: 2em; }
.notice-content h2 { font-size: 1.7em; }
.notice-content h3 { font-size: 1.5em; }
.notice-content h4 { font-size: 1.3em; }
.notice-content h5 { font-size: 1.1em; }
.notice-content h6 { font-size: 1em; }

/* 에디터 컨텐츠 - 링크 */
.notice-content a {
    color: var(--color-blue);
    text-decoration: underline;
}

.notice-content a:hover {
    color: #0056b3;
}

/* 에디터 컨텐츠 - 이미지 */
.notice-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
}

/* 에디터 컨텐츠 - 인용구 */
.notice-content blockquote {
    margin: 15px 0;
    padding: 10px 20px;
    border-left: 4px solid #ddd;
    background-color: #f9f9f9;
    color: #666;
}

/* 에디터 컨텐츠 - 코드 */
.notice-content code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.notice-content pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.notice-content pre code {
    background-color: transparent;
    padding: 0;
}

/* 에디터 컨텐츠 - 테이블 */
.notice-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.notice-content table th,
.notice-content table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.notice-content table th {
    background-color: #f8f9fa;
    font-weight: 700;
}

/* 에디터 컨텐츠 - 구분선 */
.notice-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* 파일 목록 */
.file-list {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-right: auto;
}

.file-list-title {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
    align-self: center;
}

.file-item {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    margin-right: 10px;
}

.file-item a {
    color: var(--color-blue);
    margin-left: 5px;
    font-size: 0.9em;
    text-decoration: none;
}

.file-item a:hover {
    text-decoration: underline;
}

/* 이전/다음 글 스타일 */
.adjacent-post {
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

.adjacent-post-label {
    color: #666;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
    width: 60px;
}

.adjacent-post-title {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adjacent-post-title a {
    color: #333;
    text-decoration: none;
}

.adjacent-post-title a:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

/* 버튼 영역 */
.button-area {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.btn-list {
    padding: 10px 25px;
    background-color: #fff;
    color: #333;
    border: 1px solid #adb5bd;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-list:hover {
    background-color: #f8f9fa;
    border-color: #666;
}

/* ===== 반응형 스타일 (모바일) ===== */
@media (max-width: 768px) {
    .notice-header {
        font-size: 1em;
        padding: 0 15px;
        height: 48px;
    }
    
    .notice-body {
        padding: 15px;
    }
    
    .notice-title {
        padding: 15px;
    }
    
    .notice-title h3 {
        font-size: 1.2em;
    }
    
    /* 모바일 - 정보 영역 세로 정렬 */
    .notice-info {
        padding: 10px 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    /* 첨부파일은 맨 위에 전체 너비로 표시 */
    .notice-info .file-list {
        width: 100%;
        order: -1;
        margin-right: 0;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 5px;
    }

    /* 모바일 - 파일 목록 타이틀 */
    .notice-info .file-list-title {
        width: auto;
        margin-right: 5px;
        margin-bottom: 0;
    }

    /* 파일 아이템을 감싸는 div (인라인 스타일 덮어쓰기) */
    .notice-info .file-list > div {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: auto;
        gap: 5px;
    }

    /* 모바일 - 파일 아이템 스타일 */
    .notice-info .file-item {
        width: auto;
        margin-right: 0;
        margin-bottom: 0;
        justify-content: flex-start;
    }

    /* 작성자/작성일/조회수를 한 줄에 가운데 정렬 */
    .notice-info > div:not(.file-list) {
        font-size: 0.85em;
        margin: 0;
        padding: 0 8px;
    }
    
    /* 컨텐츠 영역 - 모바일 */
    .notice-content {
        padding: 20px 15px;
        min-height: 200px;
    }
    
    .notice-content p {
        margin: 0 0 12px 0;
        line-height: 1.7;
    }
    
    .notice-content ul,
    .notice-content ol {
        padding-left: 20px;
    }
    
    .notice-content h1 { font-size: 1.6em; }
    .notice-content h2 { font-size: 1.4em; }
    .notice-content h3 { font-size: 1.3em; }
    .notice-content h4 { font-size: 1.2em; }
    .notice-content h5 { font-size: 1.05em; }
    .notice-content h6 { font-size: 1em; }
    
    .notice-content table {
        font-size: 0.9em;
    }
    
    .notice-content table th,
    .notice-content table td {
        padding: 8px;
    }
    
    .notice-content blockquote {
        padding: 8px 15px;
        font-size: 0.95em;
    }
    
    .notice-content pre {
        padding: 10px;
        font-size: 0.85em;
    }
    
    .adjacent-post {
        padding: 10px 15px;
    }
}
