/* notice.css - 공지사항 페이지 스타일 (핫플썰과 동일한 디자인) */

/* 공지사항 페이지 전체 배경을 흰색으로 */
body {
    background-color: #ffffff !important;
}

/* 공지사항 페이지 전체 스타일 */
.notice-page {
    background-color: #ffffff;
    min-height: 100vh;
    padding: 60px 0 20px 0;
}

/* 공지사항 페이지의 body 배경만 오버라이드 */
body:has(.notice-page) {
    background-color: #ffffff !important;
}

/* 우주 배경 제거 */
.notice-page .space-background {
    display: none;
}

/* 별들 컨테이너 제거 */
.notice-page .stars-container {
    display: none;
}

/* 메인 콘텐츠 래퍼 */
.notice-content-wrapper {
    position: relative;
    z-index: 2;
    background: transparent;
    min-height: auto;
    padding-bottom: 0;
}

/* all.css의 main-container와 완벽 호환 */
.notice-content-wrapper .main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* 공지사항 상세 페이지 */
.notice-detail-page {
    background-color: #ffffff;
    min-height: 100vh;
    padding: 60px 0 20px 0;
}

/* 공지사항 상세 페이지의 body 배경만 오버라이드 */
body:has(.notice-detail-page) {
    background-color: #ffffff !important;
}

/* 우주 배경 제거 */
.notice-detail-page .space-background {
    display: none;
}

/* 별들 컨테이너 제거 */
.notice-detail-page .stars-container {
    display: none;
}

/* 메인 콘텐츠 래퍼 */
.notice-detail-content-wrapper {
    position: relative;
    z-index: 2;
    background: transparent;
    min-height: auto;
    padding-bottom: 0;
}

/* all.css의 main-container와 완벽 호환 */
.notice-detail-content-wrapper .main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.notice-detail-content-wrapper .container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 공지사항 제목 */
.notice-title {
    margin: 0 0 20px 0;
}

.notice-title h2 {
    color: #000000;
    font-weight: bold;
    font-size: 28px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* 공지사항 목록 스타일 */
.notice-list-container {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
    width: 100%;
}

.notice-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.notice-list-title {
    font-size: 2rem;
    font-weight: bold;
    color: #000000;
    margin: 0;
}

.notice-write-btn {
    font-size: 18px;
    padding: 12px 24px;
    border-radius: 8px;
    background: #6c757d;
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.notice-write-btn:hover {
    background: #495057;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    text-decoration: none;
    color: white;
}

.notice-count {
    color: #666666;
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: bold;
}

/* 게시글 목록 헤더 */
.notice-header {
    margin: 20px 0 5px 0;
    width: 100%;
}

.notice-header .row {
    color: #000000;
    font-weight: bold;
    font-size: 20px;
}

.notice-header .row > div {
    text-align: center;
    padding: 16px 4px;
    color: #000000;
    font-weight: bold;
}

/* 구분선 */
.notice-divider {
    border: none;
    border-top: 1px solid #a0a0a0;
    margin: 0 0 5px 0;
    height: 1px;
}

/* 게시글 목록 영역 */
.notice-content {
    min-height: 300px;
    width: 100%;
}

/* 게시글 아이템 */
.notice-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.notice-item:hover {
    background-color: #f8f9fa;
}

/* 고정된 공지사항 아이템 */
.notice-item.pinned {
    background-color: rgba(0, 123, 255, 0.05);
}

.notice-item > div {
    text-align: center;
    padding: 10px 4px;
    color: #000000;
    font-size: 16px;
}

/* 제목 컬럼 특별 스타일 */
.notice-item .col-6 {
    text-align: left !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #000000 !important;
}

/* 제목 텍스트 스타일 */
.notice-title-text {
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 18px;
    font-weight: 600;
}

/* 작성일 회색 스타일 */
.notice-date {
    color: #666666 !important;
    font-size: 16px;
}

/* 게시글 아이템 구분선 */
.notice-item-divider {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 0;
    height: 1px;
}

.notice-content .text-center {
    color: #666666;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.notice-content .text-center p {
    margin-bottom: 10px;
    font-size: 16px;
}

/* 전체 컨테이너 배경 */
.container.mt-5 {
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5px;
}

/* 공지사항 상세 스타일 */
.notice-detail-item {
    background: transparent;
    padding: 0;
    margin: 20px 0;
    max-width: 100%;
}

.notice-detail-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.notice-detail-title {
    color: #000000;
    font-size: 2rem;
    margin: 0;
    font-weight: bold;
    flex: 1;
    min-width: 300px;
}

.notice-detail-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.notice-detail-meta {
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666666;
    flex-wrap: wrap;
}

.notice-detail-writer,
.notice-detail-date,
.notice-detail-views {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.notice-detail-photo {
    margin: 20px 0;
    text-align: center;
}

.notice-detail-photo img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.notice-detail-content {
    color: #000000;
    line-height: 1.8;
    font-size: 1.1rem;
    word-wrap: break-word;
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
}

/* 링크 스타일 */
.notice-detail-content a {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.notice-detail-content a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* 뒤로가기 버튼 */
.back-button {
    margin-bottom: 20px;
}

.back-button a {
    color: #666666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-button a:hover {
    color: #007bff;
    transform: translateX(-5px);
}

/* 공지사항 작성 모달 */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: #6c757d;
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
    background: none;
    border: none;
    padding: 0;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000000;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    margin: 0;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #6c757d;
    color: white;
}

.btn-primary:hover {
    background: #495057;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #495057;
    transform: translateY(-1px);
}

/* 빈 상태 메시지 */
.empty-notice {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
}

.empty-notice i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.empty-notice p {
    font-size: 1.1rem;
    margin: 0;
}

/* 고정 배지 */
.pinned-badge {
    background: transparent;
    color: #007bff;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 관리자 버튼 스타일 */
.admin-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-buttons .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-buttons .btn-warning {
    background-color: #ffc107;
    color: #000;
}

.admin-buttons .btn-warning:hover {
    background-color: #e0a800;
}

.admin-buttons .btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.admin-buttons .btn-danger:hover {
    background-color: #c82333;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .notice-page,
    .notice-detail-page {
        padding: 10px;
    }
    
    .notice-list-container,
    .notice-detail-item {
        padding: 20px;
    }
    
    .notice-list-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .notice-meta,
    .notice-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .notice-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .notice-detail-title {
        font-size: 1.5rem;
        min-width: auto;
        width: 100%;
    }
    
    .notice-detail-header-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .admin-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .admin-buttons .btn {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .notice-header .row > div {
        font-size: 16px;
        padding: 12px 2px;
    }
    
    .notice-title h2 {
        font-size: 24px;
    }
    
    .notice-item > div {
        font-size: 15px;
        padding: 8px 2px;
    }
    
    .notice-item .col-6 {
        font-size: 16px !important;
    }
}