/* 공지사항 게시판 스타일 */

/* 서브 비주얼 높이 조정 - 테이블이 더 빨리 보이도록 */
.sub-visual {
    min-height: 200px !important;
    padding: 40px 0 !important;
}

.sub-visual-content {
    min-height: auto !important;
}

/* 메인 컨텐츠 상단 여백 줄이기 */
.main-content {
    padding-top: 40px !important;
}

/* 검색 섹션 */
.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: flex-end;
}

.search-input {
    width: 300px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #5AABA5;
}

/* 공지사항 테이블 */
.notice-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.notice-table thead {
    background: #f8f9fa;
    border-top: 2px solid #333;
}

.notice-table thead th {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.notice-table tbody td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.notice-table tbody td.text-left {
    text-align: left;
}

.notice-table tbody tr:hover {
    background: #f8f9fa;
}

.notice-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.notice-link:hover {
    color: #5AABA5;
    text-decoration: underline;
}

/* 공지사항 상세 모달 */
.notice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.notice-modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notice-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.notice-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #333;
    flex: 1;
    padding-right: 20px;
}

.notice-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.notice-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.notice-modal-info {
    padding: 15px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.notice-modal-info span {
    display: flex;
    align-items: center;
}

.notice-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.8;
    color: #333;
}

.notice-modal-body p {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notice-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    background: #f8f9fa;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
}

.page-btn {
    padding: 10px 20px;
    background: #5AABA5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: #4a9b95;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.page-info {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* 버튼 스타일 */
.btn-primary {
    padding: 12px 24px;
    background: #5AABA5;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #4a9b95;
}

.btn-secondary {
    padding: 12px 24px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .notice-table thead th:nth-child(3),
    .notice-table tbody td:nth-child(3) {
        display: none;
    }

    .notice-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .notice-modal-header {
        padding: 20px;
    }

    .notice-modal-header h2 {
        font-size: 18px;
    }

    .notice-modal-info {
        flex-direction: column;
        gap: 8px;
        padding: 15px 20px;
    }

    .notice-modal-body {
        padding: 20px;
    }

    .notice-modal-footer {
        padding: 15px 20px;
    }

    .pagination {
        gap: 15px;
    }

    .page-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .notice-table thead th:nth-child(4),
    .notice-table tbody td:nth-child(4) {
        display: none;
    }

    .notice-modal-header h2 {
        font-size: 16px;
    }

    .notice-modal-info {
        font-size: 12px;
    }
}
