@charset "utf-8";

/* ====== 게시판 스타일 개선 ====== */

/* 기본 게시판 래퍼 */
.archive_wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== 게시판 목록 스타일 ====== */
.board_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.board_table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 테이블 헤더 */
.board_table thead tr {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
}

.board_table thead th {
    padding: 20px 15px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.board_table thead th:last-child {
    border-right: none;
}

/* 테이블 바디 */
.board_table tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.board_table tbody tr:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.board_table tbody tr:last-child {
    border-bottom: none;
}

.board_table tbody td {
    padding: 18px 15px;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    color: #555;
}

/* 번호 */
.board_table .cont1 {
    font-weight: 600;
    color: #888;
    font-size: 13px;
}

/* 제목 */
.board_table .cont2 {
    text-align: left !important;
    position: relative;
}

.board_table .cont2 a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.board_table .cont2 a:hover {
    color: #2a5298;
}

/* NEW 아이콘 스타일링 */
.board_table .cont2 img[src*="icon_new"] {
    margin-left: 8px;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    vertical-align: middle;
}

/* 잠금 아이콘 */
.board_table .cont2 img[src*="icon_key"] {
    margin-right: 5px;
    opacity: 0.7;
}

/* 작성자 */
.board_table .cont3 {
    font-weight: 500;
    color: #666;
}

/* 날짜 */
.board_table .cont4 {
    color: #888;
    font-size: 13px;
}

/* 조회수 */
.board_table .cont5 {
    color: #999;
    font-size: 13px;
}

/* ====== 게시판 푸터 (버튼, 페이징, 검색) ====== */
.board_table tfoot tr.btn td {
    padding: 25px 20px;
    text-align: right;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.board_table tfoot tr.btn .btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.board_table tfoot tr.btn .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 페이징 */
.board_table tfoot tr:has(.paging) td {
    padding: 20px;
    text-align: center;
    background: #fff;
}

.pageingWrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pageingWrap a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pageingWrap a:hover {
    background: #2a5298;
    color: #fff;
    border-color: #2a5298;
}

.pageingWrap a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 검색 */
.board_table tfoot tr.search td {
    padding: 25px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.board_table tfoot tr.search form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.board_table tfoot tr.search select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #555;
    outline: none;
    transition: border-color 0.3s ease;
}

.board_table tfoot tr.search select:focus {
    border-color: #2a5298;
}

.board_table tfoot tr.search input[name="skeyword"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #555;
    width: 300px;
    outline: none;
    transition: border-color 0.3s ease;
}

.board_table tfoot tr.search input[name="skeyword"]:focus {
    border-color: #2a5298;
}

.board_table tfoot tr.search a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.board_table tfoot tr.search a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ====== 게시판 상세보기 스타일 ====== */
.board_view {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.board_view caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 상세보기 헤더 */
.board_view thead tr {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
}

.board_view thead th,
.board_view thead td {
    padding: 10px 25px;
    text-align: left;
    font-weight: 500;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.board_view thead th:last-child,
.board_view thead td:last-child {
    border-right: none;
}

.board_view thead .title1 {
    width: 15%;
    font-weight: 600;
}

.board_view thead .title2 {
    width: 50%;
    font-size: 18px;
    font-weight: 600;
}

.board_view thead .title3 {
    width: 15%;
    font-weight: 600;
}

.board_view thead .title4 {
    width: 20%;
    color: rgba(255, 255, 255, 0.9);
}

/* 상세보기 내용 */
.board_view tbody .body_content {
    padding: 40px 30px;
    line-height: 1.8;
    font-size: 15px;
    color: #333;
    min-height: 300px;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

.board_view tbody .body_content p {
    margin-bottom: 15px;
}

.board_view tbody .body_content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

/* 상세보기 푸터 */
.board_view tfoot tr:first-child td {
    padding: 25px 30px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
}

.board_view tfoot .btn {
    display: inline-block;
    margin: 0 5px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.board_view tfoot .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 이전글/다음글 */
.board_view tfoot .next_text1,
.board_view tfoot .prev_text1 {
    width: 15%;
    padding: 15px 25px;
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #eee;
}

.board_view tfoot .next_text2,
.board_view tfoot .prev_text2 {
    padding: 15px 25px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.board_view tfoot .next_text2 a,
.board_view tfoot .prev_text2 a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.board_view tfoot .next_text2 a:hover,
.board_view tfoot .prev_text2 a:hover {
    color: #2a5298;
}

/* ====== 반응형 디자인 ====== */
@media (max-width: 768px) {
    .archive_wrap {
        padding: 0 15px;
    }
    
    /* 모바일에서 테이블을 카드 형태로 변경 */
    .board_table thead {
        display: none;
    }
    
    .board_table tbody,
    .board_table tr,
    .board_table td {
        display: block;
        width: 100%;
    }

    .board_table tr {
        width: 100% !important;
    }

    .board_table colgroup col {
        width: auto !important;
    }
    
    .board_table tbody tr {
        background: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
        margin-bottom: 15px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .board_table tbody tr:hover {
        transform: none;
    }
    
    .board_table tbody td {
        padding: 8px 0;
        border: none;
        text-align: left !important;
        position: relative;
        padding-left: 100px;
    }
    
    .board_table tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 8px;
        width: 90px;
        font-weight: 600;
        color: #666;
        font-size: 13px;
    }
    
    .board_table .cont1:before { content: "번호"; }
    .board_table .cont2:before { content: "제목"; }
    .board_table .cont3:before { content: "작성자"; }
    .board_table .cont4:before { content: "등록일"; }
    .board_table .cont5:before { content: "조회"; }
    
    .board_table .cont2 {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 10px;
    }
    
    /* 검색 폼 모바일 */
    .board_table tfoot tr.search form {
        flex-direction: column;
        gap: 10px;
    }
    
    .board_table tfoot tr.search input[name="skeyword"] {
        width: 100%;
        max-width: 300px;
    }
    
    /* 상세보기 모바일 */
    .board_view thead th,
    .board_view thead td {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .board_view thead .title2 {
        font-size: 16px;
    }
    
    .board_view tbody .body_content {
        padding: 25px 20px;
        font-size: 14px;
    }
    
    .board_view tfoot .btn {
        margin: 5px 2px;
        padding: 10px 15px;
        font-size: 13px;
    }

    .board_view tfoot tr:first-child td {
        padding: 15px 10px;
    }

    .board_view tfoot .next_text1,
    .board_view tfoot .prev_text1 {
        padding: 12px 15px;
        font-size: 13px;
        width: 25%;
    }

    .board_view tfoot .next_text2,
    .board_view tfoot .prev_text2 {
        padding: 12px 15px;
        font-size: 14px;
        width: 75%;
    }

    /* 작성 페이지 모바일 */
    .board_write tbody,
    .board_write tr,
    .board_write th,
    .board_write td {
        display: block;
        width: 100%;
    }

    .board_write colgroup col {
        width: auto !important;
    }

    .board_write tbody th {
        padding: 15px 25px 5px;
        border-right: none;
    }

    .board_write tbody td {
        padding: 0 25px 15px;
    }
}

@media (max-width: 480px) {
    .board_table tfoot .btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .pageingWrap a {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    .board_view thead .title2 {
        font-size: 15px;
    }
    
    .board_view tbody .body_content {
        padding: 20px 15px;
        font-size: 13px;
    }
}

/* ====== 게시판 작성/수정 페이지 스타일 ====== */
.board_write {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.board_write caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 작성 폼 테이블 헤더 */
.board_write tbody th {
    width: 20%;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: left;
    font-weight: 600;
    color: #333;
    vertical-align: top;
    font-size: 15px;
}

.board_write tbody th:first-child {
    border-top: 2px solid #2a5298;
}

/* 작성 폼 테이블 데이터 */
.board_write tbody td {
    padding: 10px 25px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.board_write tbody tr:first-child td {
    border-top: 2px solid #2a5298;
}

/* 입력 필드 스타일 */
.board_write input[type="text"],
.board_write input[type="password"],
.board_write input[type="email"] {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.3s ease;
}

.board_write input[type="text"]:focus,
.board_write input[type="password"]:focus,
.board_write input[type="email"]:focus {
    border-color: #2a5298;
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

/* 라디오 버튼 스타일 */
.board_write input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.board_write label {
    margin-right: 20px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.board_write .ml_20 {
    margin-left: 20px;
}

/* 텍스트에리어 스타일 */
.board_write textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    resize: vertical;
    min-height: 300px;
    transition: border-color 0.3s ease;
}

.board_write textarea:focus {
    border-color: #2a5298;
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

/* 스마트에디터 iframe */
.board_write iframe {
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100% !important;
}

/* 파일 업로드 */
.board_write input[type="file"] {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 14px;
    cursor: pointer;
}

.board_write #no_style {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.board_write #no_style td {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 작성 폼 푸터 */
.board_write tfoot tr td {
    padding: 25px 30px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.board_write tfoot .btn {
    display: inline-block;
    margin: 0 8px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
}

.board_write tfoot .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 취소 버튼 */
.board_write tfoot .btn:last-child {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    box-shadow: 0 3px 10px rgba(149, 165, 166, 0.3);
}

.board_write tfoot .btn:last-child:hover {
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

/* 작성 폼 반응형 */
@media (max-width: 768px) {
    .board_write tbody th {
        width: 25%;
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .board_write tbody td {
        padding: 15px 20px;
    }
    
    .board_write input[type="text"],
    .board_write input[type="password"],
    .board_write input[type="email"],
    .board_write input[type="file"] {
        max-width: 100%;
    }
    
    .board_write .ml_20 {
        margin-left: 0;
        margin-top: 10px;
        display: block;
    }
    
    .board_write tfoot .btn {
        margin: 5px 4px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .board_write {
        font-size: 13px;
    }
    
    .board_write tbody th,
    .board_write tbody td {
        padding: 12px 15px;
    }
    
    .board_write tfoot .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
}

/* ====== 추가 개선사항 ====== */

/* 로딩 애니메이션 */
.board_table tbody tr {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 포커스 스타일 개선 */
.board_table .cont2 a:focus,
.pageingWrap a:focus,
.board_view tfoot .btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 테이블 스크롤 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .table-responsive {
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
}

/* 빈 상태 메시지 */
.board_empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.board_empty i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.board_empty h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #666;
}

.board_empty p {
    font-size: 14px;
    color: #999;
}