body {
    font-family: Arial, sans-serif;
}

.board {
    width: 80%;
    max-width: 800px;
    margin: 2em auto;
}

.controls {
    width: 50%;  
    display: flex;
    flex-direction: column;
    justify-content: space-between;  /* 양 끝으로 요소 배치 */
    margin: auto;
}

.pagination {
    display: block;
    text-align: center;
    margin: auto;  /* 가운데 배치 */
    border-radius: 3px;
    margin-top:30px;
    margin-bottom: 30px;
}

.page-btn {
    background-color: #e0e0e0;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.page-btn:hover, .page-btn:active {
    background-color: rgb(184, 81, 81);
}


.post-header, .post {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    padding: 10px;
}

.post-header {
    text-align: center;
    align-items: center;
    background-color: #eee;
    font-weight: bold;
}

.side-button {
    display: none;
    margin: 20px 0;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}

.side-button:hover {
    background-color: #555;
}

.post {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* 백그라운드 색 변경 시 부드럽게 효과 적용 */
    align-items: center; /* 세로 정렬 추가 */
    height: 50px; /* 게시글 높이 설정 */
}

.post:hover {
    background-color: #f5f5f5; /* 마우스 오버 시 연한 회색으로 변경 */
}

.post img {
    width: 80px;
    height: 80px;
    margin-right: 10px;
}

.post-content {
    flex-grow: 1;;
}

.post-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0;
}

.post-summary {
    margin-top: 5px;
}

.page-btn {
    margin: 0 5px;
    padding: 5px 10px;
    cursor: pointer;
}

.page-btn:hover {
    background-color: #f0f0f0;
}

#postsList {
    flex-direction: column;
}

.post-id {
    text-align: center;
    width: 5%; 
}

.post-image {
    width: 15%; 
}

.post-content {
    margin-left: 3%;
    width: 45%; 
}

.post-date, .post-category {
    text-align: center;
    width: 15%;
}

/* 게시글 내용과 버튼 사이의 구분선 */
hr {
    border: 0.5px solid #e0e0e0;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 버튼 스타일 수정 */
#previousPostBtn, #nextPostBtn {
    padding: 5px 15px;
    margin: 5px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    cursor: pointer;
}

#backToPostsBtn {
    position: relative;
    left: 82.3%;
    z-index: 1000;
    padding: 5px 15px;
    margin: 5px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    cursor: pointer;
    top: 10px;
}


.side-button {
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
}

.top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #eee;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.category-dropdown {
    position: relative;
    display: inline-block;
}

.category-button {
    background-color: brown;
    color: white;
    padding: 10px 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 5px;
}

.category-button:hover, .category-button:focus {
    background-color: rgb(184, 81, 81);
}

.category-menu {
    display: none;
    position: absolute;
    top: 100%;
    left:0;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.category-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.category-menu a:hover {
    background-color: #ddd;
}

.category-dropdown:hover .category-menu {
    display: block;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    display: flex;
    width: 290px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-left: auto;  /* 이 줄을 추가 */
    margin-bottom: 20px;
}


#searchInput {
    flex-grow: 1;
    border: none;
    padding: 5px 10px;
    outline: none;
}

#searchBtn {
    background-color: brown;
    border: none;
    color: white;
    padding: 6px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#searchBtn:hover {
    background-color: rgb(184, 81, 81);
}
  
