/* post-common.css - 공지사항, 보도자료 공통 스타일 */

.board-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.board-write-wrapper {
    max-width: 1280px;
    margin: 50px auto 0px auto;
    padding: 0 20px 60px;
}

.board-container {
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 40px;
    width: 80%;
    margin: 0 auto;
}

/* 검색 및 필터 영역 */
.board-search-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.board-search {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 8px 15px;
    width: 350px;
    transition: all 0.3s;
}

.board-search:focus-within {
    border-color: var(--main-color);
    box-shadow: 0 0 0 2px rgba(255, 127, 42, 0.1);
}

.search-category {
    border: none;
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid #e0e0e0;
    color: var(--text-sub1);
    outline: none;
    font-size: 14px;
    background-color: transparent;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-main);
    background-color: transparent;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub2);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    color: var(--main-color);
}

/* post-common.css - 수정 후 코드 */
.board-actions {
    position: absolute;
    right: 0;
}

.board-write-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 15px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.board-write-btn:hover {
    background-color: var(--sub-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(255, 127, 42, 0.3);
}

/* 페이지네이션 영역 수정 - 버튼과 함께 배치하기 위해 */
.board-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    position: relative;
}

.board-write-btn svg {
    width: 16px;
    height: 16px;
}

/* 게시판 목록 테이블 */
.board-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.board-table th {
    padding: 16px 10px;
    text-align: center;
    background-color: #f8f8f8;
    border-top: 2px solid var(--main-color);
    border-bottom: 1px solid #e0e0e0;
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
}

.board-table td {
    padding: 14px 10px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    color: var(--text-sub1);
    font-size: 14px;
}

.board-table tr:hover {
    background-color: #f9f9f9;
}

.board-table td.board-title {
    text-align: left;
    color: var(--text-main);
    font-weight: 500;
}

.board-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.board-title a:hover {
    color: var(--main-color);
}

.board-attachment-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    margin-left: 4px;
    align-items: center;
    justify-content: center;
    color: var(--text-sub1);
    vertical-align: -2px;
}

.board-attachment-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.board-new {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--main-color);
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

.board-important {
    display: inline-block;
    padding: 3px 6px;
    background-color: rgba(255, 127, 42, 0.1);
    color: var(--main-color);
    font-size: 12px;
    border-radius: 3px;
    margin-right: 5px;
    font-weight: 500;
}

/* 게시판 페이지네이션 */
.board-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 0; /* 기존 마진 제거 */
}

.page-item {
    width: 34px;
    height: 34px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: var(--text-sub1);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

.page-item.active .page-link {
    background-color: var(--main-color);
    border-color: var(--main-color);
    color: white;
}

.page-item.disabled .page-link {
    color: #ccc;
    cursor: not-allowed;
}

/* 빈 게시판 안내 */
.board-empty {
    padding: 80px 0;
    text-align: center;
    color: var(--text-sub2);
}

.board-empty svg {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    color: #ddd;
}

.board-empty p {
    font-size: 16px;
    margin: 0;
}

.se-preview {
    display: none !important;
}

/* 반응형 스타일 */
@media (max-width: 1024px) {
    .board-container {
        width: 90%;
        padding: 30px;
    }

    .board-search {
        width: 300px;
    }

    .board-actions {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .board-container {
        width: 100%;
        padding: 25px;
    }

    .board-search-wrapper {
        flex-direction: column;
        align-items: flex-end;
        gap: 15px;
    }

    .board-search {
        width: 100%;
    }

    .board-write-btn {
        padding: 12px 18px;
    }

    .board-table colgroup {
        display: none;
    }

    .board-table th:nth-child(3),
    .board-table th:nth-child(4),
    .board-table td:nth-child(3),
    .board-table td:nth-child(4) {
        display: none;
    }

    .board-table th,
    .board-table td {
        padding: 12px 8px;
    }

    .board-pagination-wrapper {
        flex-direction: column;
        gap: 20px;
        position: static;
    }

    .board-actions {
        position: static;
        width: 100%;
    }

    .board-pagination {
        order: 1;
    }

    .board-write-btn {
        width: 100%;
    }

}

@media (max-width: 480px) {
    .board-container {
        padding: 20px 15px;
    }

    .board-table th:nth-child(1),
    .board-table td:nth-child(1) {
        display: none;
    }

    .board-table th,
    .board-table td {
        padding: 10px 5px;
        font-size: 13px;
    }

    .page-item {
        width: 30px;
        height: 30px;
    }

    .board-pagination {
        gap: 3px;
    }

    .board-actions {
        bottom: 15px;
        right: 15px;
    }

    .board-write-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}
