.servicios-section {
    background-color: #f4f4f4;
    padding: 4rem 2rem;
}

.servicios-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
}

/* Texto lateral izquierdo */
.servicios-texto {
    width: 30%;
    min-width: 280px;
    margin-right: 2rem;
}

.servicios-texto h2 {
    font-size: 3.8rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.servicios-texto p {
    font-size: 1.5rem;
    color: #333;
}

/* Imágenes de servicios */
.servicio-img {
    position: relative;
    margin-bottom: 2rem;
}

.servicio-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.servicio-label {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: black;
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.8rem 1rem;
    line-height: 1.2;
}

@keyframes shake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    10% {
        transform: translate(-5px, 0) rotate(-5deg);
    }

    20% {
        transform: translate(5px, 0) rotate(5deg);
    }

    30% {
        transform: translate(-5px, 0) rotate(-5deg);
    }

    40% {
        transform: translate(5px, 0) rotate(5deg);
    }

    50% {
        transform: translate(-5px, 0) rotate(-5deg);
    }

    60% {
        transform: translate(5px, 0) rotate(5deg);
    }

    70% {
        transform: translate(-5px, 0) rotate(-5deg);
    }

    80% {
        transform: translate(5px, 0) rotate(5deg);
    }

    90% {
        transform: translate(-5px, 0) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.servicio-img:hover .servicio-label {
    animation: shake 1s;
}

.servicio-img:hover .servicio-label {
    animation: shake 1s;
}

/* Estilo individual de cada imagen */
.servicio-1 {
    width: 45%;
    margin-top: 0;
}

.servicio-2 {
    width: 35%;
    margin-top: -8rem;
    /* Mueve la imagen hacia arriba sin romper el layout */
    align-self: flex-start;
    /* Evita que el flexbox la alinee mal */
}


.servicio-3 {
    width: 45%;
    margin-top: 10rem;
    margin-left: auto;
    margin-right: 5%;
}


.servicio-4 {
    width: 90%;
    margin: 5rem auto 0 auto;
}

.servicios {
    width: 80%;
    margin: 0 auto;
}

.servicios h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 30px;
}

.servicio {
    border-bottom: 1px solid #000;
    margin-top: 20px;
    padding-bottom: 20px;
}

.servicio-header {
    width: 100%;
    background: none;
    border: none;
    /* outline: none; */
    display: flex;
    font-weight: bold;
    font: inherit;
    color: inherit;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    font-size: 1.5rem;
    cursor: pointer;
}

.arrow {
    width: 10px;
    height: 10px;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    transform: rotate(45deg);
    transition: transform 0.3s ease;

}

.servicio.active .arrow {
    transform: rotate(-135deg);
}

.servicio-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-left: 0;
    font-size: 1.2rem;
}

.servicio.active .servicio-content {
    max-height: 200px;
    /* Ajusta según el contenido */
    padding: 10px 0 15px 0;
}