/* ========================================
   관리자 모드
   ======================================== */
.admin-controls {
    display: none;
}

.admin-mode .admin-controls {
    display: table-cell;
}

.delete-btn {
    padding: 5px 10px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.delete-btn:hover {
    background-color: #c82333;
}


/* ========================================
   모달
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
}

.modal-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}

.modal-textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    min-height: 200px;
    box-sizing: border-box;
    font-family: inherit;
}

.modal-buttons {
    text-align: right;
}

.modal-btn {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.modal-btn-submit {
    background-color: #333;
    color: white;
}

.modal-btn-submit:hover {
    background-color: #555;
}

.modal-btn-cancel {
    background-color: #ccc;
    color: #333;
}

.modal-btn-cancel:hover {
    background-color: #bbb;
}


/* ========================================
   게시판 컨테이너
   ======================================== */
.board-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.board-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.board-table thead {
    background-color: #f8f9fa;
    border-top: 2px solid #333;
    border-bottom: 1px solid #ddd;
}

.board-table th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.board-table td {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.board-footer {
    text-align: right;
    padding: 20px 0;
}

.write-btn {
    padding: 10px 30px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.write-btn:hover {
    background-color: #555;
}

/* 검색 영역 */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px 0;
}

.search-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 250px;
    font-size: 14px;
}

.search-btn {
    padding: 8px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.search-btn:hover {
    background-color: #555;
}


/* ========================================
   공지사항 상세보기
   ======================================== */
.notice-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.notice-detail-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
    word-break: keep-all;
    line-height: 1.4;
}

.notice-detail-info {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.notice-detail-content {
    line-height: 1.8;
    font-size: 15px;
    color: #333;
    min-height: 300px;
    white-space: pre-wrap;
    margin-bottom: 30px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.notice-detail-back {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.back-btn {
    padding: 10px 30px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.back-btn:hover {
    background-color: #555;
}


/* ========================================
   반응형 디자인 - 태블릿
   ======================================== */
@media (max-width: 992px) {
    .board-container {
        padding: 15px;
    }
    
    .board-table th,
    .board-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .search-input {
        width: 200px;
    }
}


/* ========================================
   반응형 디자인 - 모바일 (심플 버전)
   ======================================== */
@media (max-width: 768px) {
    /* 컨테이너 */
    .board-container {
        padding: 15px 10px;
    }
    
    /* 테이블 숨기기 */
    .board-table {
        border: 0;
    }
    
    .board-table thead {
        display: none;
    }
    
    .board-table tbody {
        display: block;
    }
    
    /* 모바일에서 불필요한 열 숨기기 */
    .board-table td:nth-child(1),  /* 번호 */
    .board-table td:nth-child(3),  /* 작성자 */
    .board-table td:nth-child(5)   /* 조회수 */
    {
        display: none;
    }
    
    /* 각 행을 깔끔한 리스트 아이템으로 */
    .board-table tr {
        display: flex;
        flex-direction: column;
        padding: 15px;
        margin-bottom: 10px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background-color: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        transition: all 0.2s;
    }
    
    .board-table tr:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.12);
        border-color: #ccc;
    }
    
    /* 제목 스타일 */
    .board-table td:nth-child(2) {
        display: block;
        text-align: left !important;
        font-size: 15px;
        font-weight: 500;
        color: #222;
        padding: 0 0 8px 0;
        border-bottom: none;
        line-height: 1.5;
        word-break: keep-all;
    }
    
    /* 날짜 스타일 */
    .board-table td:nth-child(4) {
        display: block;
        text-align: left !important;
        font-size: 12px;
        color: #999;
        padding: 0;
        border-bottom: none;
    }
    
    /* 관리자 삭제 버튼 (관리자 모드일 때만) */
    .board-table td:nth-child(6) {
        display: none;
        text-align: right !important;
        padding: 10px 0 0 0;
        border-bottom: none;
        margin-top: auto;
    }
    
    .admin-mode .board-table td:nth-child(6) {
        display: block;
    }
    
    /* 검색 영역 */
    .search-container {
        flex-wrap: wrap;
        padding: 20px 0;
        gap: 8px;
    }
    
    .search-select {
        width: 70px;
        font-size: 14px;
        padding: 10px 8px;
    }
    
    .search-input {
        flex: 1;
        min-width: 0;
        font-size: 14px;
        padding: 10px;
    }
    
    .search-btn {
        padding: 10px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* 버튼 */
    .write-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .delete-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .board-footer {
        padding: 15px 0;
    }
    
    /* 공지사항 상세보기 */
    .notice-detail {
        padding: 20px 15px;
    }
    
    .notice-detail-title {
        font-size: 19px;
        line-height: 1.5;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .notice-detail-info {
        flex-direction: column;
        gap: 5px;
        font-size: 13px;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .notice-detail-content {
        font-size: 14px;
        line-height: 1.8;
        min-height: 200px;
        margin-bottom: 20px;
    }
    
    .notice-detail-back {
        padding: 15px;
    }
    
    .back-btn {
        padding: 10px 30px;
        font-size: 14px;
    }
    
    /* 모달 */
    .modal-content {
        margin: 10% auto;
        padding: 25px 20px;
        width: 90%;
    }
    
    .modal-header {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .modal-input {
        padding: 10px;
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .modal-textarea {
        min-height: 180px;
        padding: 10px;
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .modal-btn {
        padding: 10px 18px;
        font-size: 14px;
        margin-left: 8px;
    }
}


/* ========================================
   반응형 디자인 - 소형 모바일
   ======================================== */
@media (max-width: 480px) {
    .board-container {
        padding: 10px 8px;
    }
    
    .board-table tr {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .board-table td:nth-child(2) {
        font-size: 14px;
        padding-bottom: 6px;
    }
    
    .board-table td:nth-child(4) {
        font-size: 11px;
    }
    
    .search-select {
        width: 65px;
        font-size: 13px;
        padding: 8px 6px;
    }
    
    .search-input {
        font-size: 13px;
        padding: 8px;
    }
    
    .search-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .write-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .notice-detail {
        padding: 15px 10px;
    }
    
    .notice-detail-title {
        font-size: 17px;
    }
    
    .notice-detail-info {
        font-size: 12px;
    }
    
    .notice-detail-content {
        font-size: 13px;
        line-height: 1.7;
    }
    
    .back-btn {
        padding: 8px 25px;
        font-size: 13px;
    }
    
    .modal-content {
        padding: 20px 15px;
    }
    
    .modal-header {
        font-size: 17px;
    }
    
    .modal-textarea {
        min-height: 150px;
    }
    
    .delete-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}