/* ===============================
   COLOR
================================ */

:root {
    --primary-color: #1674e8;
    --primary-hover: #125fc0;

    --border-color: #e2e5e9;

    --text-dark: #25282d;
    --text-normal: #4b5058;
    --text-muted: #9298a1;

    --background-light: #f8f9fb;
}


/* ===============================
   PAGE
================================ */

.news-page {
    width: 100%;
    padding: 80px 20px 120px;
}
/* ===============================
   write btn
================================ */
.news-admin-top {
    display: flex;
    justify-content: flex-end;
    margin-right: 30px;
}

.btn-write {
    display: inline-block;
    padding: 10px 22px;

    background-color: #1b5ac2;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    border-radius: 3px;
    text-decoration: none;
}

.btn-write:hover {
    background-color: #134596;
}

/* 관리자 버튼 */
.news-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-right: 30px;
}

.news-admin-actions form {
    margin: 0;
}

.btn-news-edit,
.btn-news-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 34px;
    padding: 0 13px;

    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
}

.btn-news-edit {
    color: #1b5ac2;
    background: #fff;
    border: 1px solid #1b5ac2;
    text-decoration: none;
}

.btn-news-edit:hover {
    color: #fff;
    background: #1b5ac2;
}

.btn-news-delete {
    color: #dc3545;
    background: #fff;
    border: 1px solid #dc3545;
}

.btn-news-delete:hover {
    color: #fff;
    background: #dc3545;
}
/* ===============================
   TITLE
================================ */

.board-title {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 30px;
}


.title-group {
    display: flex;
    align-items: flex-end;
    gap: 18px;
}


.board-title h1 {
    margin: 0;

    color: var(--text-dark);

    font-size: 38px;
    font-weight: 800;

    letter-spacing: -1.5px;
}


.board-title p {
    margin: 0 0 5px;

    color: #666c75;

    font-size: 14px;
    font-weight: 400;

    line-height: 1.5;
}


/* ===============================
   BOARD CONTAINER
================================ */

.news-container {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;
}


/* ===============================
   SEARCH
================================ */

.board-search-wrap {
    display: flex;
    justify-content: flex-end;

    padding-bottom: 16px;

    border-bottom: 2px solid var(--primary-color);
}


.board-search {
    display: flex;

    height: 42px;

    gap: 8px;
}


.search-select {
    width: 90px;

    padding: 0 12px;

    background-color: #ffffff;

    border: 1px solid #9da2aa;

    font-size: 14px;
    color: #383c43;

    outline: none;

    cursor: pointer;
}


.search-input {
    width: 210px;

    padding: 0 14px;

    border: 1px solid #9da2aa;

    outline: none;

    font-size: 14px;

    transition: border-color 0.2s ease;
}


.search-input:focus {
    border-color: var(--primary-color);
}


.search-input::placeholder {
    color: #b0b4ba;
}


.search-btn {
    width: 90px;

    border: none;

    background-color: var(--primary-color);

    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}


.search-btn:hover {
    background-color: var(--primary-hover);
}


/* ===============================
   NEWS LIST
================================ */

.news-list {
    width: 100%;
}


/* 게시글 한 줄 
.news-item {
    display: flex;
    align-items: center;

    width: 100%;

    min-height: 160px;

    padding: 24px 35px;

    border-bottom: 1px solid var(--border-color);

    color: inherit;
    text-decoration: none;

    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}
*/
.news-item {
    display: flex;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #ddd;
  
}

/* 상세보기 클릭 영역 */
.news-link {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 40px 85px;

    color: inherit;
    text-decoration: none;
}

.news-item:hover {
    background-color: #f8faff;
}


/* ===============================
   THUMBNAIL
================================ */

.news-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 180px;
    height: 110px;

    margin-right: 35px;

    overflow: hidden;

    background-color: #ffffff;
}


.news-thumbnail img {
    display: block;

    max-width: 120px;
    max-height: 80px;

    width: auto;
    height: auto;

    object-fit: contain;

    transition: transform 0.3s ease;
}


.news-item:hover .news-thumbnail img {
    transform: scale(1.04);
}


/* ===============================
   CONTENT
================================ */

.news-content {
    flex: 1;

    min-width: 0;
}


/* 제목 */
.news-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    
    margin: 0 0 24px;

    color: #353a41;

    font-size: 17px;
    font-weight: 500;

    letter-spacing: -0.3px;

    
    text-overflow: ellipsis;
    word-break: keep-all;
	overflow-wrap: anywhere;
    transition: color 0.2s ease;
}


.news-item:hover .news-title {
    color: var(--primary-color);
}
/*뉴스 글이 잆을때*/
.news-empty {
    width: 100%;
    min-height: 300px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-bottom: 1px solid #ddd;

    color: #8a8f98;
    font-size: 16px;
}

.news-empty p {
    margin: 0;
}
/* ===============================
   META
================================ */

.news-meta {
    display: flex;
    align-items: center;

    gap: 12px;

    color: var(--text-muted);

    font-size: 14px;
}


.meta-divider {
    width: 1px;
    height: 13px;

    background-color: #d4d7dc;
}


.news-views {
    display: flex;
    align-items: center;

    gap: 5px;
}


.news-views i {
    font-size: 14px;
}


/* ===============================
   PAGINATION
================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 4px;

    margin-top: 70px;
}


.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    color: #555b63;

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;

    border: 1px solid #d2d6dc;

    background-color: #ffffff;

    transition: all 0.2s ease;
}


.page-btn:hover {
    color: var(--primary-color);

    border-color: var(--primary-color);
}


.page-btn.active {
    color: #ffffff;

    border-color: var(--primary-color);

    background-color: var(--primary-color);
}


.page-btn.arrow {
    color: #555b63;
}


/* ===============================
   TABLET
================================ */

@media (max-width: 900px) {

    .news-page {
        padding: 60px 20px 90px;
    }


    .news-item {
        min-height: 145px;

        padding: 20px 15px;
    }


    .news-thumbnail {
        width: 150px;
        height: 100px;

        margin-right: 25px;
    }


    .news-thumbnail img {
        max-width: 105px;
    }

}


/* ===============================
   MOBILE
================================ */

@media (max-width: 768px) {

    .news-page {
        padding:
            50px 18px
            80px;
    }


    /* 제목 */
    .title-group {
        display: block;
    }


    .board-title {
        padding-bottom: 25px;
    }


    .board-title h1 {
        font-size: 30px;
    }


    .board-title p {
        margin-top: 7px;

        font-size: 14px;
    }


    /* 검색 */
    .board-search-wrap {
        padding-bottom: 14px;
    }


    .board-search {
        width: 100%;

        height: 42px;

        gap: 5px;
    }


    .search-select {
        width: 80px;

        padding: 0 8px;
    }


    .search-input {
        flex: 1;

        min-width: 0;
        width: auto;
    }


    .search-btn {
        width: 65px;
    }


    /* 뉴스 */
    .news-item {
        align-items: flex-start;

        min-height: auto;

        padding: 20px 0;
    }


    .news-thumbnail {
        width: 105px;
        height: 80px;

        margin-right: 18px;
    }


    .news-thumbnail img {
        max-width: 85px;
        max-height: 60px;
    }


    .news-title {
        margin: 5px 0 15px;

        font-size: 15px;

        white-space: normal;

        display: -webkit-box;

        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }


    .news-meta {
        gap: 8px;

        font-size: 12px;
    }


    /* 페이지 */
    .pagination {
        margin-top: 50px;

        gap: 3px;
    }


    .page-btn {
        width: 31px;
        height: 31px;

        font-size: 13px;
    }

}


/* ===============================
   SMALL MOBILE
================================ */

@media (max-width: 480px) {

    .news-thumbnail {
        width: 85px;

        margin-right: 12px;
    }


    .news-thumbnail img {
        max-width: 70px;
    }


    .news-title {
        font-size: 14px;
    }


    .news-date {
        font-size: 11px;
    }


    .news-views {
        font-size: 11px;
    }

}