/* ==================== 전체 컨테이너 ==================== */
.board_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #fff;
}

/* ==================== 상단 바 ==================== */
.board_top_bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #000;
}

.board_main_title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.board_search_area {
    flex-shrink: 0;
}

.search_wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search_dropdown {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
}

.search_box {
    width: 250px;
    padding: 10px 15px;
    border: none;
    border-bottom: 1px solid #999;
    font-size: 14px;
    color: #333;
}

.search_box::placeholder {
    color: #bbb;
}

.search_box:focus {
    outline: none;
    border-bottom-color: #000;
}

.search_btn {
    padding: 10px 15px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.search_btn:hover {
    color: #000;
}

/* ==================== 관리자 영역 ==================== */
.admin_top_bar {
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-start;
}

.select_all_label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.select_all_label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.admin_action_bar {
    padding: 15px;
    background: #f8f9fa;
    text-align: right;
    border-top: 1px solid #e9ecef;
}

.btn_admin_delete {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn_admin_delete:hover {
    background: #c82333;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* ==================== 테이블 ==================== */
.board_table_wrap {
    margin-bottom: 30px;
}

.board_table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.board_table thead tr {
    border-top: 1px solid #000;
    border-bottom: 1px solid #ddd;
}

.board_table th {
    padding: 15px 10px;
    background: #fafafa;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.col_check { width: 40px; }
.col_number { width: 70px; }
.col_title { text-align: left; }
.col_author { width: 120px; }
.col_date { width: 120px; }
.col_views { width: 70px; }

.board_table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.board_table tbody tr:hover {
    background: #fafafa;
}

.board_table tbody tr.row_notice {
    background: #fffbf0;
}

.board_table tbody tr.row_notice:hover {
    background: #fff8e1;
}

.board_table td {
    padding: 18px 10px;
    color: #333;
    font-size: 14px;
    text-align: center;
}

.td_title {
    text-align: left;
}

.td_number {
    color: #999;
    font-weight: 500;
}

.td_author {
    color: #666;
}

.td_date {
    color: #999;
    font-size: 13px;
}

.td_views {
    color: #999;
}

/* 제목 링크 */
.title_link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.title_link:hover {
    color: #0056b3;
}

.reply_arrow {
    color: #ccc;
    margin-right: 3px;
}

/* 상태 태그 */
.status_tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

.tag_notice {
    background: #0056b3;
    color: #fff;
}

.tag_new {
    background: #dc3545;
    color: #fff;
    margin-left: 5px;
}

.comment_num {
    color: #0056b3;
    font-weight: 600;
    margin-left: 4px;
}

/* 빈 목록 */
.empty_row {
    padding: 80px 20px !important;
}

.empty_message {
    text-align: center;
    color: #999;
    font-size: 15px;
}

/* ==================== 페이징 ==================== */
.pagination_area {
    text-align: center;
    padding: 40px 0;
}

.pagination_area .pg_page,
.pagination_area .pg_current {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    margin: 0 4px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination_area .pg_page {
    color: #666;
    border-radius: 50%;
}

.pagination_area .pg_page:hover {
    color: #0056b3;
    background: #f0f4ff;
}

.pagination_area .pg_current {
    background: #0056b3;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
}

/* ==================== 글쓰기 버튼 ==================== */
.board_write_area {
    text-align: center;
    padding-top: 20px;
}

.btn_write_post {
    display: inline-block;
    padding: 12px 40px;
    background: #0056b3;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn_write_post:hover {
    background: #004494;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

/* ==================== 글보기 ==================== */
.view_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #fff;
}

.view_header_area {
    padding: 30px 0;
    border-bottom: 2px solid #000;
}

.view_title_main {
    font-size: 26px;
    font-weight: 700;
    color: #000;
    line-height: 1.4;
    margin: 0 0 15px 0;
}

.view_meta_info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
}

.view_meta_info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.view_content_area {
    padding: 40px 0;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    min-height: 300px;
}

.view_content_area p {
    margin: 0 0 18px 0;
}

.view_content_area img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 4px;
}

.view_content_area h2 {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.view_files_section {
    padding: 20px;
    background: #fafafa;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

.view_files_section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.file_list_ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file_list_ul li {
    padding: 8px 0;
}

.file_download_link {
    color: #0056b3;
    text-decoration: none;
    font-size: 14px;
}

.file_download_link:hover {
    text-decoration: underline;
}

.file_size_info {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

/* 버튼 그룹 */
.view_button_group {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
}

.button_left, .button_right {
    display: flex;
    gap: 8px;
}

.view_btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    background: #fff;
    color: #333;
}

.view_btn:hover {
    border-color: #0056b3;
    color: #0056b3;
}

.btn_list_view {
    background: #f8f9fa;
}

.btn_modify_view {
    border-color: #0056b3;
    color: #0056b3;
}

.btn_delete_view {
    border-color: #dc3545;
    color: #dc3545;
}

.btn_delete_view:hover {
    background: #dc3545;
    color: #fff;
}

/* 이전/다음글 */
.nav_post_area {
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
}

.nav_post_item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav_post_item:last-child {
    border-bottom: none;
}

.nav_label_text {
    font-size: 13px;
    color: #999;
    min-width: 60px;
}

.nav_post_item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    flex: 1;
}

.nav_post_item a:hover {
    color: #0056b3;
}

/* ==================== 댓글 ==================== */
.comment_area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #000;
}

.comment_header {
    margin-bottom: 20px;
}

.comment_header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0;
    display: inline-block;
}

.comment_count {
    color: #0056b3;
    margin-left: 5px;
}

.comment_list {
    margin-bottom: 20px;
}

.comment_item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment_info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment_author {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.comment_date {
    font-size: 13px;
    color: #999;
}

.comment_delete_btn {
    padding: 4px 10px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 12px;
    color: #dc3545;
    cursor: pointer;
    margin-left: auto;
}

.comment_delete_btn:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.comment_content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    padding-left: 15px;
}

.comment_empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.comment_write {
    margin-top: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}

.comment_input_area {
    display: flex;
    gap: 10px;
}

.comment_textarea {
    flex: 1;
    min-height: 80px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.comment_textarea:focus {
    outline: none;
    border-color: #0056b3;
}

.comment_submit_btn {
    width: 100px;
    padding: 12px;
    background: #0056b3;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}

.comment_submit_btn:hover {
    background: #004494;
}

.comment_login_msg {
    text-align: center;
    padding: 30px 20px;
    background: #fafafa;
    border-radius: 8px;
    color: #666;
}

.comment_login_msg a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 600;
}

.comment_login_msg a:hover {
    text-decoration: underline;
}

/* ==================== 글쓰기 폼 ==================== */
.write_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #fff;
}

.write_header_section {
    padding: 30px 0;
    border-bottom: 2px solid #000;
    margin-bottom: 30px;
}

.write_page_title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.write_form_area {
    padding: 0;
}

.write_form_group {
    margin-bottom: 25px;
}

.write_label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.required_mark {
    color: #dc3545;
    margin-left: 3px;
}

.write_input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
    box-sizing: border-box;
    transition: border 0.3s;
}

.write_input:focus {
    outline: none;
    border-color: #0056b3;
}

.write_textarea {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
    resize: vertical;
}

.write_textarea:focus {
    outline: none;
    border-color: #0056b3;
}

/* 파일 업로드 */
.file_upload_section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file_input_row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file_input_field {
    flex: 1;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.file_help_text {
    font-size: 12px;
    color: #999;
}

.existing_files_area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.existing_file_row {
    padding: 10px 15px;
    background: #fafafa;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.existing_file_row label {
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* 버튼 영역 */
.write_button_area {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
}

.write_btn_submit {
    padding: 14px 50px;
    background: #0056b3;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.write_btn_submit:hover {
    background: #004494;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.write_btn_cancel {
    padding: 14px 50px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.write_btn_cancel:hover {
    border-color: #999;
    color: #333;
}

/* ==================== 반응형 ==================== */
@media (max-width: 768px) {
    .board_top_bar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .board_main_title {
        font-size: 22px;
    }
    
    .search_box {
        width: 100%;
    }
    
    .board_table th:not(.col_number):not(.col_title),
    .board_table td:not(.td_number):not(.td_title) {
        display: none;
    }
    
    .col_number { width: 50px; }
    
    .view_button_group {
        flex-direction: column;
    }
    
    .button_left, .button_right {
        width: 100%;
        justify-content: center;
    }
    
    .write_button_area {
        flex-direction: column;
    }
    
    .write_btn_submit,
    .write_btn_cancel {
        width: 100%;
    }
}
