
/* 기본 스타일 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 20px;
    text-align: center;
}

/* 컨테이너 - 중앙 정렬 */
.container {
    //max-width: 900px;
    //background: #fff;
    background-color: #faf9f6;
    padding: 10px;
    margin: 0 auto; /* 화면 중앙 배치 */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    text-align: center; /* 내부 콘텐츠 중앙 정렬 */
}

/* 제목 스타일 */
h2 {
    color: #444;
    text-align: center;
    margin-bottom: 20px;
}

/* 버튼 스타일 */
button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* 리스트 스타일 */
ul {
    list-style: none;
    padding: 0;
}

li {
    background: #fff;
    padding: 12px;
    margin: 8px 0;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row; /* 기본적으로 가로 배치 */
    align-items: center;
    justify-content: space-between;
}

table, th, td {
    border: 1px solid;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table.noborder, table.noborder th, table.noborder td {
  border: none;
}

/* 제목과 내용이 나란히 배치되도록 설정 */
.post-item {
    display: flex;
    flex-direction: row; /* 기본은 가로 정렬 */
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.post-title {
    font-size: 18px;
    font-weight: bold;
    flex: 1;
    text-align: left;
    color: #333;
    margin-bottom: 10px;
}

.post-content {
    flex: 2;
    text-align: left;
    font-size: small;
    line-height: 1.5;
    color: #555;
}


/* 반응형 (모바일 화면에서 세로 배치) */
@media screen and (max-width: 600px) {
    li {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-item {
        flex-direction: column;
    }

    .post-title, .post-content {
        width: 100%;
    }
}

/* 게시글 상세보기 스타일 */
.post-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

/* 목록으로 돌아가기 버튼 */
.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.back-button:hover {
    background-color: #0056b3;
}

/* 카테고리 선택 */
.category-form {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-form label {
    font-size: 16px;
    margin-right: 10px;
}

select {
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* 게시글 카드 스타일 */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center; /* 중앙 정렬 */
    align-items: center;
    margin-top: 20px;
}

.post-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
    text-align: center; /* 제목과 내용 중앙 정렬 */
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    text-align: center;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.read-more:hover {
    background-color: #0056b3;
}

/* 반응형 - 모바일 최적화 */
@media screen and (max-width: 600px) {
    .post-grid {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 18px;
    }

    .post-excerpt {
        font-size: 14px;
    }
}

