.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.card {
    position: relative;
    width: 300px;
    height: 100vh;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: scale(1.05);
}

.card-image {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    text-align: justify;
}

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

.card-title {
    font-size: 18px;
    margin: 0;
}

.card-description {
    font-size: 14px;
    padding: 1rem;
}

/* Responsiveness */
@media only screen and (max-width: 768px) {
    .card {
        width: 80%; /* Lebar kartu lebih kecil di tablet */
        height: auto;
    }

    .card-container {
        gap: 1rem; /* Jarak antar kartu lebih kecil di tablet */
        flex-wrap: wrap;
    }

    .card-description {
        font-size: 0.875rem;
    }
}

@media only screen and (max-width: 480px) {
    .card {
        width: 100%; /* Kartu memenuhi lebar layar di mobile */
        height: auto;
    }

    .card-description {
        font-size: 0.75rem; /* Ukuran teks lebih kecil di mobile */
    }

    .card-container {
        gap: 0.5rem; /* Jarak antar kartu lebih kecil di mobile */
    }
}
