/**
 * Solo fichas de servicio (data-elementor-post-type="services").
 * NO tocar header, page-title ni footer — un selector amplio rompió el menú.
 *
 * Sidebar: izquierda, sin moverse.
 * Contenido: centrado en el espacio restante a la derecha de la sidebar.
 */

body.single-services .elementor[data-elementor-post-type="services"] > .elementor-section.elementor-section-stretched {
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative !important;
    transform: none !important;
}

body.single-services main.main-content .container:has(.elementor[data-elementor-post-type="services"]) {
    width: 100% !important;
    max-width: min(1230px, calc(100% - 2rem)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1025px) {
    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start;
        justify-content: flex-start;
        column-gap: clamp(1.5rem, 2.5vw, 2.25rem);
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    /* Sidebar / botones: fijos a la izquierda */
    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container > .elementor-col-33 {
        float: none !important;
        width: 18.5rem !important;
        max-width: 18.5rem !important;
        flex: 0 0 18.5rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Columna de contenido: todo el hueco restante */
    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container > .elementor-col-66 {
        float: none !important;
        width: auto !important;
        max-width: none !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    /* El contenido visual se centra dentro de ese hueco */
    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container > .elementor-col-66 > .elementor-widget-wrap {
        width: 100% !important;
        max-width: 44rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
    }

    body.single-services .elementor[data-elementor-post-type="services"] .elementor-col-66 .elementor-section > .elementor-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 1024px) {
    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container {
        display: block !important;
    }

    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container > .elementor-col-33,
    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container > .elementor-col-66 {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    body.single-services .elementor[data-elementor-post-type="services"] > .elementor-top-section > .elementor-container > .elementor-col-66 > .elementor-widget-wrap {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
