/* ================= GLOBAL ================= */

body {
    background: #ffffff;
    font-family: 'Segoe UI', sans-serif;
}

/* ================= CARD CONTAINER ================= */

.card-container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;

    display: grid;
    grid-template-columns: repeat(5, 1fr); /* เพิ่มเป็น 6 ช่อง */
    gap: 20px;
}

/* ================= NEWS CARD ================= */

.news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ================= IMAGE ================= */

.image-card {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;   /* ลดความสูงรูป */
    overflow: hidden;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================= OVERLAY ================= */

.overlay {
    position: absolute;
    inset: 0;
    padding: 14px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 40%,
        rgba(0,0,0,0.4),
        transparent
    );

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    color: #fff;
    opacity: 0;
    transition: 0.3s ease;
}

.image-card:hover .overlay {
    opacity: 1;
}

.overlay h2 {
    font-size: 14px;
    margin: 0 0 4px;
    font-weight: 600;
}

.overlay p {
    font-size: 12px;
    opacity: 0.85;
    margin: 0;
}

/* ================= NO DATA ================= */

.no-data-card {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 260px;
    border-radius: 16px;
    border: 2px dashed #d6d6d6;
    background: #ffffff;
}

.no-data-content h5 {
    margin-top: 10px;
    font-weight: 600;
    color: #444;
}

.no-data-content p {
    font-size: 14px;
    color: #777;
}

.no-data-icon {
    font-size: 36px;
    opacity: 0.5;
}

/* ================= RESPONSIVE ================= */

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

@media (max-width: 900px) {
    .card-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

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