
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* เพิ่มระยะห่างระหว่างการ์ด */
    justify-content: space-around; /* จัดเรียงการ์ดให้กระจายตัวเท่ากัน */
    margin: 0 auto;
}

.cardt {
    flex: 1 1 calc(20% - 10px); /* ปรับการ์ดให้ใช้พื้นที่ 20% ต่อการ์ด */
    width: 100%; /* ใช้ความกว้าง 100% ของคอนเทนเนอร์ */
    max-width: 210px; /* จำกัดขนาดสูงสุดของการ์ด */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 5px;
    display: flex;
    flex-direction: column; /* ใช้ Flexbox เพื่อจัดองค์ประกอบในแนวตั้ง */
}

.cardt:hover {
    transform: translateY(-10px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cardt img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #eaeaea;
}

.cardt .content {
    padding: 15px;
    flex-grow: 1; /* ทำให้เนื้อหาขยายได้ */
}

.cardt .title {
    font-size: 25px;
    font-weight: bold;
    margin: 0 0 10px;
    color: #2c2c2d;
}

.cardt .description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px; /* เพิ่มระยะห่างระหว่างคำอธิบายและปุ่ม */
}

.cardt .button {
    display: block;
    text-align: center;
    margin-top: 15px;
    padding: 10px 15px;
    background: #83bcf9;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.cardt .button:hover {
    background: #0056b3;
}

/* เพิ่ม Media Query สำหรับขนาดหน้าจอเล็ก */
@media (max-width: 768px) {
    .cardt {
        width: 100%; /* ใช้ความกว้างเต็มหน้าจอ */
        max-width: 100%; /* ไม่จำกัดขนาดสูงสุด */
        flex: 1 1 100%; /* เต็มความกว้างในจอเล็ก */
    }

    .cardt .title {
        font-size: 20px; /* ปรับขนาดตัวอักษรของชื่อการ์ด */
    }

    .cardt .description {
        font-size: 13px; /* ปรับขนาดตัวอักษรคำอธิบาย */
    }
}
