body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    text-align: center;
}

.contenedor-busqueda {
    margin: 20px;
}

#buscar-perfiles {
    width: 60%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Grid para mostrar los perfiles */
.grid-perfiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Ajuste flexible */
    gap: 10px; /* Espaciado por defecto */
    margin-top: 20px;
    padding: 20px;
    justify-content: center;
}

/* Tarjeta de perfil */
.perfil {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    width: 180px;
    height: 230px;
}

.perfil:hover {
    transform: scale(1.05);
}

/* Establece todas las imágenes del mismo tamaño */
.perfil img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

/* Nombre y edad sobre la imagen */
.overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 14px;
    padding: 5px;
    text-align: center;
}

.overlay .edad {
    color: lightgray;
}

/* Enlace en toda la imagen */
.perfil a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 📌 Ajuste para móviles: 3 perfiles por fila con separación pequeña */
@media (max-width: 768px) {
    .grid-perfiles {
        grid-template-columns: repeat(3, 1fr); /* 3 perfiles por fila */
        gap: 5px; /* Pequeña separación entre perfiles */
        padding: 10px;
    }

    .perfil {
        width: 100%; /* Ajuste para ocupar bien la columna */
        height: auto;
    }

    .perfil img {
        height: 150px; /* Ajuste para que las imágenes queden proporcionadas */
    }
}



/* Botón flotante */
.floating-button {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #007bff;
    color: white;
    font-size: 28px; /* Más grande */
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.3s, transform 0.2s;
    z-index: 1000;
    flex-direction: column;
    text-align: center;
}

/* Efecto hover */
.floating-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

/* Texto debajo del botón */
.floating-text {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-top: 3px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Ajuste para pantallas más pequeñas */
@media (max-width: 600px) {
    .floating-button {
        top: 30px;
        right: 10px;
        width: 65px;
        height: 65px;
        font-size: 24px;
    }

    .floating-text {
        font-size: 10px;
    }
}
