.posts-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 568px;         /* ✅ 최소 높이만 유지 */
    margin-bottom: 15px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb; /* 더 또렷한 경계선 */
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06); /* 부드러운 그림자 */
    overflow: hidden;
    position: relative; /* 포지션 컨텍스트 설정 */
}


@media (max-width: 768px) {
    .posts-wrapper {
        min-height: unset;         /* ✅ 최소 높이만 유지 */
        max-height: unset;
    }
}


/* #post-list 스타일 - empty-board-message와 post-row를 포함하는 컨테이너 */
#post-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 564px; /* 최소 높이 설정 */
    overflow-y: auto;
}

/* 페이지네이션 래퍼를 하단에 고정 */
#pagination-wrapper {
    width: 100%;
    padding: 15px 0;
    background-color: white;
    margin-top: auto;
    border-top: 1px solid #eee; /* 구분선 추가 */
}

/* 페이지네이션이 없을 때도 공간 유지 */
#pagination-wrapper:empty::after {
    content: "";
    display: block;
    min-height: 400px;
}


.board-section {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.board-container {
    max-width: 1200px;
    margin: 20px auto;
    flex : 3;
    /* padding: 20px; */
    /* background-color: #fff; */
}

.board-header {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}







.posts-header,
.post-row {
    display: grid;
    grid-template-columns: 120px 1fr 60px 40px 40px;
    align-items: center;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.posts-header {
    /* 캐주얼한 플랫 톤으로 조정 */
    background-color: #1F4EB2;
    color: white;
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7; /* 부드러운 구분선 */
}

/* 헤더 타이포그래피 약간 개선 */
.posts-header span {
    font-size: 0.9rem;
    letter-spacing: 0.05px;
}

.post-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    height: 548px;
}

/* 행 호버 시 가벼운 하이라이트 */
.post-row:hover {
    background-color: #f9fafb;
}


@media (max-width: 480px) {
    .post-list {
        height: auto;              /* ✅ 기존 height 제거 */
        overflow-y: visible;       /* ✅ 스크롤도 제거 */
    }
}



.post-row span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-row .date {
    color: #aaa;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.post-row .category {
    color: #1F4EB2;
    font-weight: 500;
    flex-shrink: 0;
}

/*.post-row .title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    color: black;
}*/

.post-row .title a {
    color: black;
    text-decoration: none; /* 필요시 밑줄 제거 */
}

.post-row .title a:hover {
    color: #1F4EB2;
}

.post-row .title.with-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
    overflow: hidden;
}

.post-row .title .by-author {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.2;
    text-overflow: ellipsis;
    overflow: hidden;
}


.post-row .nickname {
    flex-shrink: 0;
    font-size: 0.9rem;
    color: #666;
}

.post-row .by-author {
    font-size: 0.78rem;
    color: #777;
    margin-top: 2px;
    line-height: 1.2;
    text-overflow: ellipsis;
    overflow: hidden;
}





.post-row a {
    text-decoration: none;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-row a:hover {
    text-decoration: underline;
}

.board-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
    margin-bottom: 10px;
}

 .mobile {
    display: none;
}





/* 데스크탑 레이아웃 */
@media (min-width: 769px) {
    .post-row {
        min-height: 50px; /* ✅ 한 줄 높이 고정 */
        max-height: 50px;
        overflow: hidden;
        padding: 0px 10px;
    }
}


/* 모바일 레이아웃 */
@media (max-width: 768px) {
    /* START : 게시판 레이아웃*/
    .posts-header,
    .post-row> .author,
    .post-row> .date,
    .post-row> .views,
    .post-row> .likes,
    .post-row > .title.with-author {
        display: none !important;
    }

    .post-row> .mobile-title {
        display: inline;
    }



    /* END : 게시판 레이아웃*/
    /* START : 게시글 로우 */
    .board-section {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        max-width: 1200px;
        margin: auto;
        padding: 0px;
    }

    .post-row{
        display: grid;
        grid-template-areas:
      "title title"
      "category meta";
        grid-template-columns: 1fr 2fr;
        row-gap: 1px;
        column-gap: 8px;
        padding: 12px 10px;
        font-size: 0.95rem;
        align-items: center;
    }


    /* 구분자 스타일 */
    .meta span:not(:last-child)::after {
        content: "|";
        margin: 0 6px;
        color: #bbb;
    }


    .meta .views::before {
        content: "\f06e"; /* Font Awesome eye icon */
        font-family: "Font Awesome 6 Free";
        font-weight: 900; /* solid */
        margin-right: 4px;
    }

    .meta .likes::before {
        content: "\f164"; /* Font Awesome heart icon */
        font-family: "Font Awesome 6 Free";
        font-weight: 900; /* solid */
        margin-right: 4px;
    }

    .post-row .category {
        grid-area: category;
        font-weight: bold;
        font-size: 1rem;
        word-break: break-word;
    }

    .post-row .title {
        grid-area: title;
        font-size: 1rem;
        font-weight: bold;
        word-break: break-word;
    }


    .post-row .author,
    .post-row .date,
    .post-row .views,
    .post-row .likes {
        font-size: 0.85rem;
        color: #666;
    }

    .post-row .meta {
        grid-area: meta;
        display: flex;
        justify-content: end;
        font-size: 0.85rem;
        color: #666;
    }

    /* END : 게시글 로우 */






    /* START : 빈 게시판 메시지 */
    .empty-board-message {
        text-align: center;
        padding: 60px 20px;
        color: #666;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        min-height: 300px; /* 빈 메시지일 때의 최소 높이 */
        flex: 1;
    }

    .empty-board-message i {
        font-size: 48px;
        color: #c0c0c0;
    }

    .empty-text {
        font-size: 1.2rem;
        font-weight: bold;
        margin-bottom: 4px;
    }

    .empty-sub {
        font-size: 0.95rem;
        color: #999;
    }

    .empty-btn {
        margin-top: 10px;
        padding: 8px 16px;
        background-color: var(--primary-color, #1F4EB2);
        color: white;
        border: none;
        border-radius: 6px;
        text-decoration: none;
        font-size: 0.95rem;
        transition: background-color 0.2s ease;
    }

    .empty-btn:hover {
        background-color: var(--primary-hover, #163c8c);
    }
    /* END : 빈 게시판 메시지 */
}
