/* START : 게시판 */
.challenge,
.community,
.contest {
    padding : 20px;
}

/* END : 게시판 */


/* START : 책 영역 */

.books-section {
    display: flex;
    gap : 20px;
}

.books-section .latest-books-section{
    flex : 1;
}

.books-section  .recommended-books-section{
    flex : 0.5;
}


@media (max-width: 768px) {
    .books-section {
        flex-direction: column; /* 가로 -> 세로로 전환 */
        gap : 10px;
    }

    .books-section .latest-books-section,
    .books-section .recommended-books-section {
        width: 100%; /* 각 요소가 전체 너비 차지 */
    }
}



.latest-books-section, .recommended-books-section{
    overflow: hidden;
}

.latest-books-container {
    box-sizing: border-box;
}

.latest-books-wrapper {
    display: flex;
    gap : 5px;

}


.book-carousel, .book-pick-carousel {
    width: 100%;
    padding: 10px 0;
    position: relative; /* 중요! 화살표 위치 기준 */
}

.book-carousel .swiper-slide {
    flex-shrink: 0;
}

.latest-book-card {
    width: 150px;
    text-align: center;
}


.book-carousel .swiper-button-prev,
.book-carousel .swiper-button-next,
.swiper-book-pick-button-prev,
.swiper-book-pick-button-next
{
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-carousel .swiper-button-prev {
    left: 0;
}

.book-carousel .swiper-button-next {
    right: 0;
}


/* 건필 픽 */
.book-pick-reason {
    font-weight: bold;
    font-style : italic;
}

.img-wrapper{
    display: flex;
    justify-content: center;
}

.recommend-books-header,
.latest-books-header{
    margin-left: 15px;
    margin-top: 15px;
    margin-right: 15px;
}

/* END : 책 영역 */



/*메인화면 게시글 */
.main-section .post-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #e0e0e0; /* ✅ 회색 구분선 추가 */
}

.main-section .post-row:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.main-section .post-row:hover {
    background-color: #f9f9f9;
    cursor: pointer;
}

.main-section .post-row .category {
    font-weight: bold;
    color: #1f4eb2;
}

.main-section .title-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-section .post-row .title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    max-width: 100%;
}

.main-section .post-row .nickname {
    font-size: 0.85rem;
    color: #888;
    white-space: nowrap;
}

.main-section .post-row .commentCount {
    font-size: 0.85rem;
    color: #999;
}

/* 메인화면 게시글 끝 */


/* 메인화면 공모전 디자인 시작 */

.contest-poster {
    width: 90px;
    height: 120px;
    flex-shrink: 0; /* 이미지 영역이 줄어들지 않게 */
}


.contest-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-contest-info {
    flex: 1;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.main-contest-title,
.main-contest-subtitle {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    color: #333;
}

.main-contest-title {
    font-size: 16px;
    font-weight: bold;
    -webkit-line-clamp: 1;
}

.main-contest-subtitle {
    font-size: 15px;
    -webkit-line-clamp: 1;
}

.main-contest-category {
    font-size: 14px;
}

.main-contest-bottom {
    margin-top: auto;
    font-size: 13px;
    color: #444;
    display: flex;
    justify-content: space-between;
}

.main-contest-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.main-contest-wrapper {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    height: 120px; /* 고정 높이 */
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
}

.main-contest-wrapper:hover {
    background-color: #f9f9f9;
    cursor: pointer;
}

/* 메인 화면 공모전 디자인 끝 */