* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.main-body {
    font-family: Arial, 'Noto Sans Thai', sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 40px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.news-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease; /* เพิ่มทรานซิชัน */
}

.news-image:hover {
    transform: scale(1.05); /* ขยายภาพเล็กน้อย */
    filter: brightness(0.8); /* ลดความสว่าง */
}

.news-card:hover {
    transform: translateY(-5px); /* ยกการ์ดขึ้น */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* เพิ่มเงา */
}

.news-content {
    padding: 20px;
    line-height: 0.5;
}

.news-date {
    color: #636262;
    font-size: 0.9em;
    margin-bottom: -5px;
    display: flex;
    align-items: center;
}

.news-date img {
    width: 16px;
    margin-right: 5px;
}

.news-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: bold;
    color: #006a6a;
}

.news-excerpt {
    color: #3b3b3b;
    font-size: 0.9em;
    line-height: 1.3;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #f0f0f0;
}

.pagination a.active {
    background-color: rgba(0, 96, 96, 0.6 );
    color: white;
    border-color: rgba(0, 96, 96, 0.6 );
}

.pagination a.disabled {
pointer-events: none;
opacity: 0.5;
background-color: #f5f5f5;
border-color: #ddd;
}

.news-label {
    position: absolute;
    background-color: #ff0000;
    color: white;
    padding: 5px 15px;
    font-size: 0.9em;
    font-weight: bold;
    z-index: 10;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    width: fit-content;
}

.news-card .news-label {
    position: absolute;
    top: 10px; /* ระยะจากด้านบน */
    left: 10px; /* ระยะจากด้านซ้าย */
    z-index: 10; /* ตั้งค่าระดับชั้นให้ป้ายอยู่เหนือกล่อง */
}

.news-card:first-child .news-content {
    margin-top: 0; /* ทำให้กล่องแรกไม่มี margin-top ที่ทำให้เลื่อนลง */
}




