
/*
 * Se activa después de que JavaScript confirma que la página contiene
 * un módulo visual de Ecosystem, o cuando PHP reconoce su shortcode/slug.
 */

body.eco-fullscreen-layout-active {
    overflow-x: hidden;
}

/* Ocultar títulos y hero del tema */
body.eco-fullscreen-layout-active .entry-header,
body.eco-fullscreen-layout-active .page-header,
body.eco-fullscreen-layout-active .entry-title,
body.eco-fullscreen-layout-active .page-title,
body.eco-fullscreen-layout-active .hero-section,
body.eco-fullscreen-layout-active .content-title-style-above,
body.eco-fullscreen-layout-active .kadence-page-title,
body.eco-fullscreen-layout-active .page-title-wrap {
    display: none !important;
}

/* Quitar los contenedores, márgenes y fondos que Kadence agrega */
body.eco-fullscreen-layout-active .site-main,
body.eco-fullscreen-layout-active main#main,
body.eco-fullscreen-layout-active .content-area,
body.eco-fullscreen-layout-active .site-content,
body.eco-fullscreen-layout-active .site-middle,
body.eco-fullscreen-layout-active .content-container,
body.eco-fullscreen-layout-active .content-wrap,
body.eco-fullscreen-layout-active .entry,
body.eco-fullscreen-layout-active .entry-content,
body.eco-fullscreen-layout-active .entry-content-wrap,
body.eco-fullscreen-layout-active .post-content-wrap,
body.eco-fullscreen-layout-active .single-content,
body.eco-fullscreen-layout-active .site-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Kadence a veces usa una cuadrícula aunque no haya barra lateral */
body.eco-fullscreen-layout-active .content-container,
body.eco-fullscreen-layout-active .content-wrap {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Quitar bloques vacíos y separadores que generan franjas blancas */
body.eco-fullscreen-layout-active .entry-content > .wp-block-spacer:empty,
body.eco-fullscreen-layout-active .entry-content > p:empty,
body.eco-fullscreen-layout-active .entry-content > div:empty,
body.eco-fullscreen-layout-active .single-content > .wp-block-spacer:empty,
body.eco-fullscreen-layout-active .single-content > p:empty {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* El shortcode debe tocar la cabecera y el footer sin huecos */
body.eco-fullscreen-layout-active .entry-content > [class*="eco-"],
body.eco-fullscreen-layout-active .single-content > [class*="eco-"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Quitar fondo gris/blanco entre cabecera y primer módulo */
body.eco-fullscreen-layout-active .site-content,
body.eco-fullscreen-layout-active .content-area,
body.eco-fullscreen-layout-active main#main {
    min-height: 0 !important;
}

/* No tocar la cabecera ni el footer globales */
body.eco-fullscreen-layout-active header.site-header,
body.eco-fullscreen-layout-active footer.site-footer {
    width: 100%;
}

/* Ajuste móvil */
@media (max-width: 768px) {
    body.eco-fullscreen-layout-active .site-main,
    body.eco-fullscreen-layout-active main#main,
    body.eco-fullscreen-layout-active .content-area,
    body.eco-fullscreen-layout-active .entry-content,
    body.eco-fullscreen-layout-active .entry-content-wrap,
    body.eco-fullscreen-layout-active .single-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    body.eco-fullscreen-layout-active .eco-ers-page,
    body.eco-fullscreen-layout-active .eco-rhs-plans,
    body.eco-fullscreen-layout-active .eco-rhs-access,
    body.eco-fullscreen-layout-active [class*="ecosystem-home"],
    body.eco-fullscreen-layout-active [class*="eco-diagn"] {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
    }
}
