.container {
    max-width: 1200px;
    margin: auto;
}

.news-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.news-track {
    display: flex;
    width: max-content;
    animation: scrollNews 30s linear infinite;
}

.news-card {
    width: 20%; /* 5 ข่าวต่อแถว */
    min-width: 240px;
    margin-right: 20px;
    background: #ffffff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.news-card:hover {
    transform: translateY(-2px);
}

.news-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.news-card p {
    font-size: 14px;
    color: #555;
}

.read-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: #007bff;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* animation */
@keyframes scrollNews {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}


.news-wrapper:hover .news-track {
    animation-play-state: paused;
}
/* ================= CARD VIEW ================= */

.news-card {
    width: 20%;
    min-width: 240px;
    margin-right: 20px;
    background: #ffffff;
    padding: 20px 15px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    transition: 0.3s;
}

/* รูปวงกลม */
.news-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f0f0f0;
}

.news-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

