@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;600;700;800&display=swap');

:root {
    --color-blue: #003F80;
    --color-blue-light: #009EFB;
    --color-gray: #EAE7E7;
    --color-gray-light: #F9F9F9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Kanit", sans-serif;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* จัดกลางในแนวนอน */
    margin: 0 auto; /* ลบการตั้งค่ามาร์จินเริ่มต้น */
    padding-top: 130px;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin-top: 20px;
    padding: 0px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.head-article-highlight , .head-article-newsUpdate{
    max-width: 1140px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    background-color: var(--color-blue);
    border-radius: 10px;
    
    h2 {
        font-size: 26px;
        padding: 15px;
        color: var(--color-gray-light);
    }

}

/*highlight*/

#newsUpdate-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.news-update-con-newsUpdate {
    display: grid;
    grid-template-columns: repeat(auto-fit,340px);
    justify-content: center;
    justify-items: center;
    transition: transform 0.5s ease-in-out;
    max-width: 1140px;
    margin: 0 auto;

    background-color: #dbdbdb;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.news-update-card-newsUpdate {
    position: relative;
    flex: 0 0 auto;
    width: 250px;
    margin: 30px;
    overflow: hidden;
    box-shadow: 0 0 5px #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
    background-color: #fff;
    border-radius: 10px;
}

.news-update-card-newsUpdate .img-container-nwu {
    width: 100%;
    height: auto;
    min-height: 200px;
    position: relative;
    object-fit: cover;
}

.news-update-card-newsUpdate img {
    width: 100%;
    height: auto;
    min-height: 200px;
    object-fit: cover;
    float: inline-start;
}

.news-update-card-newsUpdate h3 {
    height: 3.3em;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 3px 10px;
    background-color: var(--color-blue);
    color: var(--color-gray-light);
    box-shadow: 0 0 5px #888888;
}

.news-update-card-newsUpdate p {
    height: 7.5em;
    width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    white-space: normal;
    padding: 3px 10px;
}

.btn-readmore {
    position: absolute;
    width: 100%;
    z-index: 10;
    padding: 10px 20px 50px 20px;
    bottom: -130px;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.3s ease;
    background-color: var(--color-blue);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.news-update-card-newsUpdate:hover .btn-readmore {
    transform: translate(-50%, -50px);
}

.btn-readmore a {
    color: var(--color-gray-light);
    padding: 10px 20px 50px 20px;
    text-decoration: none;
    font-size: 16px;
    display: block;
}

.btn-readmore:hover {
    background-color: var(--color-gold);
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    margin: 20px;

    .page-btn {
        padding: 3px 10px;
        font-size: 16px;
        background-color: var(--color-blue);
        color: var(--color-gray-light);
        border: none;
        border-radius: 10px;
        transition: 0.3s;

        &:hover {
            background-color: var(--color-blue-light);
        }
    }
}

/*highlight , news update end*/

/* news-end*/

@media only screen and (max-width: 800px) {

    main {
        padding-top: 90px;
        width: 100%;
        padding: 90px 10px;
    }

}
