/* ===================================================================================
 * Empresas
 */
.empresas{
    margin-bottom: 0 !important;
}
.bloque_empresas .imagen_empresa,
.bloque_empresas .texto_empresas{
    width: 50%;
    overflow: hidden;
    margin-bottom: 5%;
}
.body_empresas{
    overflow: hidden;
}
.body_empresas h2{
    margin-bottom: 1.5em;
    font-weight: bold;
}
.body_empresas section{
    margin-bottom: 3%;
}
.empresas_elegir{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.contenido_empresas{
    display: flex;
    flex-direction: column;
}
.bloque_empresas{
    display: flex;
}
.bloque_empresas{
    display: flex;
    align-items: center;
    overflow: hidden;
}
.bloque_empresas img{
    border-radius: 3px;
}
.texto_empresas{
    text-align: center;
    padding: 4%;
}
.texto_empresas h3{
    text-transform: uppercase;
    font-size: 250%;
    margin-bottom: 0.5em;
}
.texto_empresas h4{
    font-weight: bold;
    margin-bottom: 0.5em;
}
.categorias_empresas{
    display: flex;
}
.elemento_categoria_empresas{
    overflow: hidden;
    width: 25%;
    position: relative;
}
.elemento_categoria_empresas img{
    width: 100%;
    height: 100%;
    object-fit: cover; /* Hace que la imagen rellene el contenedor sin deformarse */
    object-position: center; /* Centra la imagen dentro del contenedor */
}
.contenido_elemento_categoria_empresas{
    position: absolute;
    top: 50%;
    display: none;
    transition: all 0.5s;
    text-align: center;
}
.elemento_categoria_empresas:hover .contenido_elemento_categoria_empresas{
    display: block;
    transition: all 0.5s;
}
.contenedor_categorias_lista img{
    width: 100%; /* Asegura que la imagen se ajuste horizontalmente */
    height: 100%; /* Asegura que la imagen ocupe el contenedor verticalmente */
    object-fit: cover; /* Recorta la imagen para que encaje perfectamente */
    object-position: center; /* Centra la parte visible de la imagen */
}
.categorias-contenido{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10%;
}
.categorias-contenido-texto{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.categorias-contenido-texto p{
    text-align: justify;
    margin-bottom: 2em;
}
.categorias-contenido-texto h3{
    margin-bottom: 0.8em !important;
}
.categorias-contenido-img{
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Slide in */
.categorias-contenido {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.categorias-contenido:nth-child(even) {
    transform: translateX(-100px);
}

.categorias-contenido.visible {
    opacity: 1;
    transform: translateX(0);
}

@media (min-width: 1200px) {
    .empresas_elegir{
        padding: 5% 10% 2%;
    }
    .body_empresas{
        margin: 0 !important;
    }
    .body_empresas section{
        padding: 7% 20% 0;
    }
    .categorias-contenido-texto{
        width: 48%;
    }
    .categorias-contenido-img{
        width: 48%;
    }
    .categorias-contenido:nth-child(even) {
        flex-direction: row-reverse; /* Intercala la disposición */
    }
    #espacios-tematicos{
        margin-bottom: 0 !important;
    }
    .categorias-contenido:nth-child(even) .categorias-contenido-texto{
        padding-left: 5%;
    }
    .categorias-contenido:nth-child(odd) .categorias-contenido-texto{
        padding-right: 5%;
    }
}

/* Media Query para pantallas de 1199px o menos */
@media (max-width: 1199px) {
    .empresas_elegir{
        padding: 10%;
    }
    .body_empresas section{
        padding: 10% 5% 0;
        margin-top: 5%;
    }
    .categorias-contenido:nth-child(odd) {
        margin-top: 10%;
        margin-bottom: 10%;
    }
    .categorias-contenido-texto{
        margin-bottom: 10%;
    }
    .categorias-contenido{
        flex-direction: column;
    }
    .categorias-contenido .categorias-contenido-texto{
        padding: 0 5%;
    }
}