@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');



#services {
    text-align: center;
    padding: 50px 20px;
    padding-top: 150px;
    background-color: black;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 0px;
}
#service-item {
    
    transform-origin: left center;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 2px 4px 8px rgb(255, 0, 0);
    transition: border 1s ease-in-out, transform 0.3s ease-in-out, color 0.3s ease-in-out, box-shadow 0.5s ease-in-out;
    color: rgb(255, 255, 255); /* Color original del texto */
    position: relative; /* Para posicionar el pseudo-elemento */
    overflow: hidden; /* Oculta la parte del fondo que no se ha deslizado aún */
    z-index: 1;
    border: none;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 5px;
    border-top-left-radius: 50px;
    border-bottom-right-radius: 50px;
    cursor: pointer;
}
#service-item:hover {
    box-shadow: -5px 20px 80px rgba(255, 255, 255, 0.795);
    transform: translateY(0px) scale(1) rotateY(0deg);
    z-index: 1px;
    color: white; /* Cambiar el texto a blanco */
    z-index: 2;
    border: solid white 1px;
}
#service-item::before {
    content: ''; /* Necesario para el pseudo-elemento */
    position: absolute;
    top: 100%; /* Inicialmente está fuera de la vista, en la parte inferior */
    left: 0;
    width: 100%;
    height: 100%;
    background-color: red; /* El color rojo que queremos deslizar */
    border-radius: 50%; /* Curvas para dar un aspecto fluido */
    transition: top 0.6s ease-in-out, border-radius 0.6s ease-in-out; /* Animación con transiciones suaves */
    z-index: -1;
}


#service-item:hover::before {
    top: 0; /* Desliza el fondo desde abajo hacia arriba */
    border-radius: 0%; /* Alineación de las esquinas para el efecto fluido */
}

#service-item:hover .service-icon{
    background-color: rgb(233, 102, 102);
    box-shadow: 2px 4px 8px rgba(248, 162, 162, 0.432);
}


.service-icon {
    background-color: white;
    width: 80px;
    height: auto;
    margin-bottom: 10px;
    border: none;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 5px;
    border-top-left-radius: 20px;
    border-bottom-right-radius: 20px;
    transition: background-color 0.5s ease-in-out;
    box-shadow: 2px 4px 8px rgba(255, 0, 0, 0.432);
}


h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: white;
    
    transition: all 0.5s ease-in-out;
}

h3 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #1d2b2d;
    transition: all 0.5s ease-in-out;
}

p {
    font-size: 1rem;
    color: #555;
}
#service-item:hover h3, #service-item:hover p {
    color: white; /* Asegurar que el texto dentro de h3 y p sea blanco */
}
/* Responsivo */

@media (max-width: 1300px) {
    #service-item:hover {
        transform: translateX(-5px) scale(1.02);
    }
}

@media (max-width: 900px) {
    .service-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 600px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
}
