/* Container to make the cards scrollable on small screens */
#users-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 10px;
}

.user-card {
    flex: 1 1 calc(30% - 20px);
	padding: 10px;
	margin: 0 10px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
	border: 1px solid #333;
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: pointer;
	/* Fixed height for uniformity */
/*    height: 200px; */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
	justify-content: center;
}

.user-card img {
	width: 100px;
	height: 100px; /* Fixed height for the image */
	object-fit: scale-down; /* Center-crop the image */
	display: block;
	border-radius: 50%;
	align-self: center;
}

.user-card button {
    margin: 5px 0 0 0;
	padding: 5px 0;
    font-size: 16px;
    text-align: center; /* Align price to the center */
	border: 0 solid transparent;
	border-radius: 5px; 
	background: #6e67cc;
	text-decoration: none;
	color: white;
}

.user-card p {
    margin: 5px 0;
    font-size: 14px;
    text-align: center; /* Align title to the center */
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Trim title if it exceeds one line */
	text-decoration: none;
}

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

/* Grid layout for large screens */
@media (min-width: 992px) {
    #users-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .user-card {
        flex: 1 1 calc(16.66% - 10px); /* 6 columns layout */
    }
}

/* Horizontal scrollable layout for small screens */
@media (max-width: 768px) {
    #users-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 10px;
    }

    .user-card {
        flex: 0 0 calc(30% - 10px); /* 2 columns layout with partial view of the next card */
        scroll-snap-align: start;
    }

    /* Hide scrollbar */
    #users-container::-webkit-scrollbar {
        display: none;
    }

    #users-container {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* Full-width cards on very small screens */
@media (max-width: 480px) {
    .user-card {
/*        flex: 0 0 calc(30% - 10px);*/
        flex: 0 0 calc(45% - 10px);
    }
	

	.user-card img {
		width: 100px;
		height: 100px; /* Fixed height for the image */
		object-fit: scale-down; /* Center-crop the image */
		display: block;
		border-radius: 50%;
		align-self: center;
	}
}
