/* Estilos para secciones de texto sobre imagen */
.sobre-text-img {
    position: relative;
    overflow: hidden;
}

.sobre-text-img .e-con-inner {
    display: flex;
    align-items: center;
    position: relative;
    min-height: 350px;
    max-height: 450px;
    overflow: hidden;
}

/* Contenedor de la imagen */
.sobre-text-img.right .e-con-inner > div:first-child {
    flex: 0 0 80%;
    max-width: 80%;
    position: relative;
    z-index: 1;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

/* Contenedor de la imagen para LEFT - second-child */
.sobre-text-img.left .e-con-inner > div:last-child {
    flex: 0 0 80%;
    max-width: 80%;
    position: relative;
    z-index: 1;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    order: 2;
    margin-left: auto;
}

/* Estilos para las imágenes dentro del contenedor */
.sobre-text-img .e-con-inner > div:first-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Estilos para las imágenes en LEFT - second-child */
.sobre-text-img.left .e-con-inner > div:last-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Contenedor del texto - estilos base para RIGHT */
.sobre-text-img.right .e-con-inner > div:last-child {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    max-height: 80%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Contenedor del texto - estilos base para LEFT */
.sobre-text-img.left .e-con-inner > div:first-child {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    z-index: 3;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    max-height: 80%;
    overflow: hidden;
    order: 1;
    left: 0;
    margin-left: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Variante RIGHT - texto a la derecha, superponiendo imagen izquierda */
.sobre-text-img.right .e-con-inner > div:last-child {
    right: 0;
    margin-right: 0;
}

/* Variante LEFT - texto a la izquierda, superponiendo imagen derecha */
.sobre-text-img.left .e-con-inner > div:first-child {
    left: 0;
    margin-left: 0;
}


/* Estilos para el contenido del texto en RIGHT */
.sobre-text-img.right .elementor-widget-text-editor h2 {
    margin-bottom: 10px;
    color: #2d5a27;
    font-size: 24px;
    line-height: 1.2;
}

.sobre-text-img.right .elementor-widget-text-editor p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Estilos para el contenido del texto en LEFT */
.sobre-text-img.left .elementor-widget-text-editor h2 {
    margin-bottom: 10px;
    color: #2d5a27;
    font-size: 24px;
    line-height: 1.2;
}

.sobre-text-img.left .elementor-widget-text-editor p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Responsive para tablets en RIGHT */
@media (max-width: 1024px) {
    .sobre-text-img.right .e-con-inner {
        min-height: 350px;
    }
    
    .sobre-text-img.right .e-con-inner > div:last-child {
        width: 60%;
        padding: 25px;
    }
    
    .sobre-text-img.right .elementor-widget-text-editor h2 {
        font-size: 24px;
    }
}

/* Responsive para tablets en LEFT */
@media (max-width: 1024px) {
    .sobre-text-img.left .e-con-inner {
        min-height: 350px;
    }
    
    .sobre-text-img.left .e-con-inner > div:first-child {
        width: 60%;
        padding: 25px;
    }
    
    .sobre-text-img.left .e-con-inner > div:last-child {
        flex: 0 0 85%;
        max-width: 85%;
        margin-left: auto;
    }
    
    .sobre-text-img.left .elementor-widget-text-editor h2 {
        font-size: 24px;
    }
}

/* Responsive para móviles en RIGHT */
@media (max-width: 768px) {
    .sobre-text-img.right .e-con-inner {
        flex-direction: column;
        min-height: auto;
    }
    
    .sobre-text-img.right .e-con-inner > div:first-child,
    .sobre-text-img.right .e-con-inner > div:last-child {
        flex: 0 0 100%;
        max-width: 100%;
        position: static;
        top: auto;
        transform: none;
        width: 100%;
        margin: 0;
        order: unset;
    }
    
    .sobre-text-img.right .e-con-inner > div:last-child {
        padding: 20px;
        margin-top: -20px;
    }
    
    .sobre-text-img.right .elementor-widget-text-editor h2 {
        font-size: 22px;
    }
    
    .sobre-text-img.right .elementor-widget-text-editor p {
        font-size: 15px;
    }
}

/* Responsive para móviles en LEFT */
@media (max-width: 768px) {
    .sobre-text-img.left .e-con-inner {
        flex-direction: column;
        min-height: auto;
    }
    
    .sobre-text-img.left .e-con-inner > div:first-child,
    .sobre-text-img.left .e-con-inner > div:last-child {
        flex: 0 0 100%;
        max-width: 100%;
        position: static;
        top: auto;
        transform: none;
        width: 100%;
        margin: 0;
        order: unset;
    }
    
    .sobre-text-img.left .e-con-inner > div:last-child {
        height: auto;
    }
    
    .sobre-text-img.left .e-con-inner > div:first-child {
        padding: 20px;
        margin-top: -20px;
    }
    
    .sobre-text-img.left .elementor-widget-text-editor h2 {
        font-size: 22px;
    }
    
    .sobre-text-img.left .elementor-widget-text-editor p {
        font-size: 15px;
    }
}

/* Responsive para móviles pequeños en RIGHT */
@media (max-width: 480px) {
    .sobre-text-img.right .e-con-inner > div:last-child {
        padding: 15px;
        margin-top: -15px;
    }
    
    .sobre-text-img.right .elementor-widget-text-editor h2 {
        font-size: 20px;
    }
    
    .sobre-text-img.right .elementor-widget-text-editor p {
        font-size: 14px;
    }
}

/* Responsive para móviles pequeños en LEFT */
@media (max-width: 480px) {
    .sobre-text-img.left .e-con-inner > div:first-child {
        padding: 15px;
        margin-top: -15px;
    }
    
    .sobre-text-img.left .elementor-widget-text-editor h2 {
        font-size: 20px;
    }
    
    .sobre-text-img.left .elementor-widget-text-editor p {
        font-size: 14px;
    }
}

/* Ocultar productos relacionados */
.related.products {
    display: none !important;
}
