/*
 * REDE Theme Comercial — Matrix Lab 0.4.1
 * Contrato visual basado en la estructura pública aprobada rede-approved-landing.
 * No es un diseño alternativo.
 */

.rede-theme-lab-approved-preview{
    padding:28px 0 60px;
}
.rede-lab-status{
    width:min(1180px,calc(100% - 32px));
    margin:0 auto 14px;
    padding:10px 14px;
    display:flex;
    justify-content:space-between;
    gap:10px;
    border:1px solid #ead18a;
    background:#fff6d5;
    border-radius:10px;
    font-size:12px;
}
.rede-approved-landing{
    width:min(1180px,calc(100% - 32px));
    margin:0 auto;
    color:#20252b;
}
.rede-approved-landing *{box-sizing:border-box}
.rede-approved-hero{
    display:grid;
    grid-template-columns:minmax(360px,.95fr) minmax(0,1.05fr);
    align-items:stretch;
    overflow:hidden;
    border-radius:28px;
    background:#f7f7f4;
    border:1px solid #e6e6e0;
    box-shadow:0 18px 46px rgba(0,0,0,.08);
}
.rede-approved-hero-media{
    min-width:0;
    background:#ececec;
}
.rede-approved-hero-media img{
    width:100%;
    height:100%;
    min-height:460px;
    display:block;
    object-fit:contain;
    background:#ededed;
}
.rede-approved-hero-copy{
    padding:48px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.rede-approved-kicker{
    display:inline-flex;
    border-radius:999px;
    padding:7px 12px;
    background:#111827;
    color:#fff;
    font-size:12px;
    font-weight:800;
}
.rede-approved-hero-copy h1{
    margin:16px 0 14px;
    font-size:clamp(38px,4.7vw,68px);
    line-height:1.04;
    letter-spacing:-.04em;
}
.rede-approved-hero-copy>p{
    font-size:18px;
    line-height:1.55;
}
.rede-approved-hero-points{
    list-style:none;
    padding:0;
    margin:16px 0 22px;
}
.rede-approved-hero-points li{
    margin:9px 0;
    font-weight:700;
}
.rede-approved-cta{
    display:inline-flex;
    min-height:48px;
    align-items:center;
    justify-content:center;
    padding:12px 20px;
    border-radius:999px;
    background:#20b85a;
    color:#fff!important;
    text-decoration:none!important;
    font-weight:900;
}
.rede-approved-hero-copy small,
.rede-approved-final small{
    display:block;
    margin-top:9px;
    color:#6b7280;
}
.rede-approved-trust{
    margin:22px 0;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.rede-approved-trust>div{
    min-width:0;
    display:grid;
    grid-template-columns:auto 1fr;
    grid-template-areas:"ico title" "ico copy";
    gap:2px 10px;
    padding:18px;
    border:1px solid #e2e5e8;
    border-radius:18px;
    background:#fff;
}
.rede-approved-trust b{grid-area:ico;font-size:24px}
.rede-approved-trust strong{grid-area:title}
.rede-approved-trust>div{font-size:14px;color:#59636f}
.rede-approved-benefits{
    padding:38px;
    background:#f7f4ec;
    border-radius:24px;
    margin:22px 0;
}
.rede-approved-benefits h2,
.rede-approved-faq h2,
.rede-approved-section-heading h2,
.rede-approved-final h2{
    margin:0 0 24px;
    font-size:clamp(28px,3.5vw,46px);
    line-height:1.1;
    letter-spacing:-.025em;
}
.rede-approved-benefits>div{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}
.rede-approved-benefits article{
    padding:20px;
    background:#fff;
    border:1px solid #e5e0d5;
    border-radius:16px;
}
.rede-approved-benefits article>strong{
    display:block;
    font-size:24px;
    margin-bottom:12px;
}
.rede-approved-benefits article>b,
.rede-approved-benefits article>small{
    display:block;
}
.rede-approved-benefits article>small{
    margin-top:7px;
    color:#68707a;
    line-height:1.45;
}
.rede-approved-projects{
    padding:38px;
    background:#111827;
    color:#fff;
    border-radius:24px;
    margin:22px 0;
}
.rede-approved-section-heading{
    display:grid;
    grid-template-columns:1fr auto;
    gap:24px;
    align-items:end;
    margin-bottom:24px;
}
.rede-approved-section-heading h2{color:#fff;margin-bottom:8px}
.rede-approved-section-heading p{color:#d8dde5}
.rede-approved-project{
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);
    overflow:hidden;
    border-radius:20px;
    background:#fff;
    color:#20252b;
}
.rede-approved-project-media{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0;
    background:#ececec;
}
.rede-approved-project-photo{
    width:100%;
    height:100%;
    min-height:360px;
    display:block;
    object-fit:contain;
    background:#efefef;
}
.rede-approved-project-copy{
    padding:30px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.rede-approved-project-copy h3{
    font-size:clamp(26px,3vw,38px);
    line-height:1.12;
    margin:8px 0 14px;
}
.rede-approved-project-tags{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:8px 0 14px;
}
.rede-approved-project-tags em{
    font-style:normal;
    padding:7px 10px;
    border-radius:999px;
    background:#f1f3f5;
    font-size:12px;
    font-weight:800;
}
.rede-approved-faq{
    padding:38px;
    background:#f7f4ec;
    border-radius:24px;
    margin:22px 0;
}
.rede-approved-faq details{
    background:#fff;
    border:1px solid #e5e0d5;
    border-radius:14px;
    padding:16px 18px;
    margin:10px 0;
}
.rede-approved-faq summary{
    cursor:pointer;
    font-weight:800;
}
.rede-approved-final{
    margin-top:22px;
    padding:44px;
    text-align:center;
    border-radius:24px;
    background:#111827;
    color:#fff;
}
.rede-approved-final h2{color:#fff}
.rede-approved-final>p{font-size:17px}
.rede-lab-missing{
    min-height:420px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
    color:#8a1f11;
    background:#fff2f0;
    font-weight:800;
}

/* MÓVIL: layout explícito, no reducción del escritorio */
@media screen and (max-width:767px){
    html,body{max-width:100%;overflow-x:hidden}
    .rede-theme-lab-approved-preview{
        padding:8px 0 40px;
    }
    .rede-lab-status{
        width:calc(100% - 20px);
        flex-direction:column;
        font-size:11px;
    }
    .rede-approved-landing{
        width:100%;
        max-width:none;
        margin:0;
        padding:0;
    }
    .rede-approved-hero{
        display:block;
        width:100%;
        border-radius:0;
        border-left:0;
        border-right:0;
        box-shadow:none;
    }
    .rede-approved-hero-media{
        display:block;
        width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        margin:0;
        padding:0;
        background:transparent;
    }
    .rede-approved-hero-media>img{
        display:block;
        width:100%;
        max-width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        margin:0;
        padding:0;
        object-fit:contain;
        object-position:center;
        aspect-ratio:auto;
    }
    .rede-approved-hero-copy,
    .rede-approved-trust,
    .rede-approved-benefits,
    .rede-approved-projects,
    .rede-approved-faq,
    .rede-approved-final{
        padding-left:18px;
        padding-right:18px;
    }
    .rede-approved-hero-copy{
        padding-top:24px;
        padding-bottom:28px;
    }
    .rede-approved-hero-copy h1{
        font-size:clamp(34px,9.2vw,42px);
        line-height:1.08;
        letter-spacing:-.035em;
    }
    .rede-approved-hero-copy>p,
    .rede-approved-project-copy>p,
    .rede-approved-benefits p,
    .rede-approved-trust,
    .rede-approved-faq summary,
    .rede-approved-faq p{
        font-size:17px;
        line-height:1.55;
    }
    .rede-approved-cta{
        width:100%;
        max-width:none;
    }
    .rede-approved-trust{
        grid-template-columns:1fr;
        gap:10px;
        margin:14px 0;
    }
    .rede-approved-benefits{
        border-radius:0;
        margin:0;
        padding-top:28px;
        padding-bottom:28px;
    }
    .rede-approved-benefits>div{
        grid-template-columns:1fr;
    }
    .rede-approved-projects{
        border-radius:0;
        margin:0;
        padding-top:28px;
        padding-bottom:28px;
    }
    .rede-approved-section-heading{
        display:block;
    }
    .rede-approved-section-heading>.rede-approved-cta,
    .rede-approved-section-heading .rede-approved-cta-small{
        width:100%;
    }
    .rede-approved-project{
        display:block;
        width:100%;
    }
    .rede-approved-project-media{
        display:block;
        width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        margin:0;
        padding:0;
        overflow:visible;
    }
    .rede-approved-project-media>img.rede-approved-project-photo{
        display:block;
        position:static;
        float:none;
        width:100%;
        max-width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        margin:0 0 16px;
        padding:0;
        object-fit:contain;
        object-position:center;
        aspect-ratio:auto;
        transform:none;
    }
    .rede-approved-project-copy{
        padding:22px 18px 26px;
    }
    .rede-approved-project-copy h3,
    .rede-approved-section-heading h2,
    .rede-approved-faq h2{
        font-size:28px;
        line-height:1.16;
    }
    .rede-approved-faq{
        border-radius:0;
        margin:0;
        padding-top:28px;
        padding-bottom:28px;
    }
    .rede-approved-final{
        border-radius:0;
        margin:0;
        padding-top:34px;
        padding-bottom:34px;
    }
}


.rede-approved-monthly-theme{
    display:grid;
    grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);
    gap:0;
    overflow:hidden;
    margin:0 0 18px;
    border-radius:22px;
    background:#0d0d0f;
    color:#fff;
    border:1px solid #22242a;
}
.rede-approved-monthly-media{
    min-width:0;
    background:#111;
}
.rede-approved-monthly-media img{
    display:block;
    width:100%;
    height:100%;
    min-height:180px;
    max-height:260px;
    object-fit:contain;
    object-position:center;
    background:#111;
}
.rede-approved-monthly-copy{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:24px;
}
.rede-approved-monthly-copy>span{
    display:inline-flex;
    align-self:flex-start;
    padding:6px 10px;
    border-radius:999px;
    background:#f5c400;
    color:#111;
    font-size:11px;
    font-weight:900;
    letter-spacing:.04em;
}
.rede-approved-monthly-copy h2{
    color:#fff;
    font-size:clamp(25px,3vw,40px);
    line-height:1.08;
    margin:12px 0 8px;
}
.rede-approved-monthly-copy p{
    color:#e7e7e7;
    line-height:1.5;
    margin:0 0 14px;
}


@media screen and (max-width:767px){
    .rede-approved-monthly-theme{
        display:block;
        margin:0 0 12px;
        border-radius:0;
        border-left:0;
        border-right:0;
    }
    .rede-approved-monthly-media img{
        width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        object-fit:contain;
    }
    .rede-approved-monthly-copy{
        padding:18px;
    }
    .rede-approved-monthly-copy h2{
        font-size:28px;
    }
}


/* 0.3.0: ownership separation */
.rede-external-campaign-slot{margin:0 0 18px}
.rede-approved-materials{
    padding:38px;
    background:#fff;
    border:1px solid #e6e6e0;
    border-radius:24px;
    margin:22px 0;
}
.rede-approved-materials-heading{margin-bottom:22px}
.rede-approved-materials-heading h2{color:#20252b}
.rede-approved-materials-heading p{color:#68707a}
.rede-approved-material-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}
.rede-approved-material-card{
    overflow:hidden;
    border:1px solid #e2e5e8;
    border-radius:16px;
    background:#fff;
}
.rede-approved-material-card img{
    display:block;
    width:100%;
    aspect-ratio:4/3;
    object-fit:contain;
    background:#f3f5f6;
}
.rede-approved-material-card>div{padding:16px}
.rede-approved-material-card h3{font-size:18px;margin:0 0 8px}
.rede-approved-product-price{font-size:18px;font-weight:900;margin:8px 0}
.rede-approved-product-link{font-weight:800;text-decoration:none}
.rede-stock-ok{color:#16723a;font-weight:800}
.rede-stock-no{color:#8a6514;font-weight:800}
.rede-lab-warning{
    padding:18px;
    border-radius:14px;
    background:#fff6d5;
    border:1px solid #ead18a;
    color:#624d00;
    font-weight:700;
}
.rede-lab-warning-dark{
    background:#212938;
    border-color:#3b4659;
    color:#fff;
}
.rede-approved-project-gallery{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}
.rede-approved-project-tile{
    overflow:hidden;
    border-radius:16px;
    background:#fff;
    color:#20252b;
}
.rede-approved-project-tile img{
    display:block;
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
}
.rede-approved-project-tile>div{
    padding:14px;
    display:flex;
    flex-direction:column;
    gap:4px;
}
.rede-approved-project-tile span{font-size:13px;color:#68707a}
.rede-approved-project-cta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:18px;
    padding-top:18px;
    border-top:1px solid #354055;
}
.rede-approved-project-cta p{margin:0;color:#fff;font-weight:800}
@media screen and (max-width:767px){
    .rede-approved-materials{
        padding:28px 18px;
        margin:0;
        border-radius:0;
        border-left:0;
        border-right:0;
    }
    .rede-approved-material-grid{grid-template-columns:1fr}
    .rede-approved-project-gallery{grid-template-columns:1fr}
    .rede-approved-project-tile img{aspect-ratio:auto;height:auto;object-fit:contain}
    .rede-approved-project-cta{display:block}
    .rede-approved-project-cta .rede-approved-cta{margin-top:12px}
}


.rede-lab-campaign-missing{
    margin:0 0 18px;
    padding:14px 16px;
    border:1px dashed #c89b16;
    border-radius:14px;
    background:#fff8dd;
    color:#5e4900;
    font-size:13px;
    font-weight:800;
}

/* 0.4.1 */
.rede-external-campaign-secondary{margin:22px 0;}
@media screen and (max-width:767px){.rede-external-campaign-slot{margin:0}.rede-external-campaign-secondary{margin:0}}

/* 0.6.0 — landing de familia: catálogo WooCommerce + evidencia delegada */
.rede-family-nav{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:8px;
}
.rede-family-nav a,
.rede-approved-secondary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:9px 14px;
    border-radius:999px;
    border:1px solid #d8dce1;
    background:#fff;
    color:#20252b!important;
    text-decoration:none!important;
    font-weight:800;
}
.rede-material-actions{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:9px;
    margin-top:12px;
}
.rede-material-actions .rede-approved-cta,
.rede-material-actions .rede-approved-secondary{
    width:100%;
}
.rede-material-actions .rede-approved-product-link{
    padding-top:3px;
}
.rede-work-link-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}
.rede-work-link-card{
    display:block;
    overflow:hidden;
    border-radius:16px;
    background:#fff;
    color:#20252b!important;
    text-decoration:none!important;
}
.rede-work-link-card img{
    display:block;
    width:100%;
    aspect-ratio:4/3;
    object-fit:contain;
    background:#eef1f2;
}
.rede-work-link-card span{
    display:block;
    padding:14px;
}
.rede-work-link-card b,
.rede-work-link-card small{
    display:block;
}
.rede-work-link-card small{
    margin-top:6px;
    color:#59636f;
}
.rede-material-work-links code{
    color:inherit;
}
@media screen and (max-width:767px){
    .rede-family-nav{display:block}
    .rede-family-nav a{width:100%;margin-top:8px}
    .rede-work-link-grid{grid-template-columns:1fr}
}


/* v0.7.0 — navegación entre familias después del catálogo */
.rede-family-nav-after-materials{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0 24px;padding:16px 18px;border:1px solid #e4ded2;border-radius:18px;background:#fff}
.rede-family-nav-after-materials>span{font-weight:800;color:#39424e;margin-right:auto}
.rede-family-nav-after-materials a{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border-radius:999px;text-decoration:none;font-weight:800;border:1px solid #151d2d;color:#151d2d;background:#fff}
.rede-family-nav-after-materials a:hover{background:#151d2d;color:#fff}
@media(max-width:720px){.rede-family-nav-after-materials{align-items:stretch}.rede-family-nav-after-materials>span{width:100%;margin:0 0 2px}.rede-family-nav-after-materials a{flex:1 1 100%}}

/* v0.9.0 — contrato público */
.rede-approved-public-title{
    font:inherit;
    font-size:clamp(38px,5vw,72px);
    line-height:1.02;
    letter-spacing:-.035em;
    font-weight:500;
    margin:0 0 18px;
    color:inherit;
}
.rede-commercial-master{width:100%;box-sizing:border-box}


/* =========================================================
   v0.10.0 — MUESTRA + PROYECTOS REALES
   ========================================================= */
.rede-material-evidence-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:22px;
}
.rede-material-evidence-card{
    display:grid;
    grid-template-columns:minmax(240px, .72fr) minmax(0, 1.28fr);
    gap:20px;
    padding:18px;
    align-items:start;
}
.rede-material-evidence-card.is-exact-sample{
    outline:2px solid rgba(255,207,0,.85);
    outline-offset:-2px;
}
.rede-material-sample{
    min-width:0;
}
.rede-material-sample img{
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    display:block;
    border-radius:14px;
    background:#f4f5f7;
}
.rede-exact-sample-label,
.rede-sample-label{
    display:inline-flex;
    margin:0 0 10px;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    line-height:1;
}
.rede-exact-sample-label{
    background:#fff3b0;
    color:#5b4700;
}
.rede-sample-label{
    background:#eef2f6;
    color:#4b5563;
}
.rede-material-sample-copy{
    padding-top:12px;
}
.rede-material-projects{
    min-width:0;
    padding:4px 0 0;
}
.rede-material-projects-heading{
    display:flex;
    flex-direction:column;
    gap:3px;
    margin-bottom:12px;
}
.rede-material-projects-heading strong{
    font-size:16px;
}
.rede-material-projects-heading small{
    color:#6b7280;
}
.rede-material-projects-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
}
.rede-real-project-card{
    display:flex;
    flex-direction:column;
    gap:7px;
    text-decoration:none !important;
    color:inherit !important;
    border:1px solid #e2e5e9;
    border-radius:12px;
    padding:8px;
    background:#fff;
    min-width:0;
}
.rede-real-project-card img{
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    border-radius:8px;
    display:block;
}
.rede-real-project-card span{
    font-size:13px;
    font-weight:700;
    line-height:1.25;
}
.rede-real-project-card small{
    color:#59626e;
    font-size:11px;
}
.rede-material-projects-empty{
    min-height:130px;
    border:1px dashed #d8dde5;
    border-radius:12px;
    padding:18px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:6px;
    color:#667085;
}
.rede-material-projects-empty strong{
    color:#27303b;
}
@media (max-width: 860px){
    .rede-material-evidence-card{
        grid-template-columns:1fr;
    }
    .rede-material-projects-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media (max-width: 520px){
    .rede-material-projects-grid{
        grid-template-columns:1fr;
    }
}


/* ==========================================================
   v0.11.0 — TRES MODELOS DE LANDING
   ========================================================== */

/* Ocultar solo la presentación heredada; nunca se borran título/fecha del WP. */
.rede-theme-contract-live article > .entry-header,
.rede-theme-contract-live article > header.entry-header,
.rede-theme-contract-live .site-main > article > .entry-header,
.rede-theme-contract-live .site-main > article > .post-meta,
.rede-theme-contract-live .site-main > article > .entry-meta{
    display:none !important;
}

.rede-theme-contract-live .rede-approved-hero-copy h1{
    font-size:clamp(34px,5vw,66px);
    line-height:1.02;
    letter-spacing:-.035em;
    margin:0 0 16px;
    font-weight:600;
}
.rede-hero-copy-full{max-width:920px}
.rede-evidence-image{
    width:100% !important;
    aspect-ratio:4/3 !important;
    object-fit:cover !important;
    object-position:center !important;
    display:block !important;
    border-radius:12px;
}

/* Modelo catálogo */
.rede-catalog-master{display:flex;flex-direction:column;gap:28px}
.rede-catalog-family{
    padding:22px;
    border:1px solid #e2e5e9;
    border-radius:18px;
    background:#fff;
}
.rede-catalog-family-heading{
    display:flex;
    justify-content:space-between;
    align-items:end;
    gap:12px;
    margin-bottom:16px;
}
.rede-catalog-family-heading h2{margin:0}
.rede-catalog-family-heading span{font-size:12px;color:#667085}
.rede-catalog-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}
.rede-catalog-card{
    border:1px solid #e2e5e9;
    border-radius:14px;
    overflow:hidden;
    background:#fff;
}
.rede-catalog-card img{
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    display:block;
}
.rede-catalog-card > div{padding:14px}
.rede-catalog-card h3{font-size:16px;margin:0 0 8px}

/* Modelo material */
.rede-material-evidence-card{
    grid-template-columns:minmax(260px,.78fr) minmax(0,1.22fr);
}
.rede-material-projects-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.rede-real-project-card .rede-evidence-image,
.rede-material-sample .rede-evidence-image{
    aspect-ratio:4/3 !important;
}

/* Modelo proyecto */
.rede-project-proof{
    margin:22px 0;
    padding:28px;
    border-radius:18px;
    background:#fff;
    border:1px solid #e2e5e9;
}
.rede-project-gallery{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}
.rede-project-gallery figure{margin:0}

/* Banner siempre fuera de prueba real */
.rede-external-campaign-slot{
    clear:both;
    margin:18px 0;
}
.rede-project-gallery .rede-external-campaign-slot,
.rede-material-projects-grid .rede-external-campaign-slot{
    display:none !important;
}

@media (max-width:980px){
    .rede-catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
    .rede-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .rede-material-evidence-card{grid-template-columns:1fr}
    .rede-project-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:520px){
    .rede-catalog-grid,
    .rede-project-gallery,
    .rede-material-projects-grid{grid-template-columns:1fr}
}


/* v0.11.1 — muestras y proyectos nunca comparten el mismo bloque */
.rede-material-samples-only-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}
.rede-sample-only-card{
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:16px;
    border:1px solid #e2e5e9;
    border-radius:16px;
    background:#fff;
}
.rede-sample-only-card .rede-evidence-image,
.rede-installed-project-card .rede-evidence-image{
    width:100% !important;
    aspect-ratio:4/3 !important;
    object-fit:cover !important;
    object-position:center !important;
}
.rede-installed-results-block{
    margin:28px 0;
    padding:28px;
    border-radius:20px;
    background:#111827;
    color:#fff;
}
.rede-installed-results-block .rede-approved-section-heading h2,
.rede-installed-results-block .rede-approved-section-heading p{
    color:#fff;
}
.rede-installed-projects-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}
.rede-installed-project-card{
    display:block;
    text-decoration:none !important;
    color:#fff !important;
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    overflow:hidden;
    background:#1f2937;
}
.rede-installed-project-card .rede-evidence-image{
    border-radius:0 !important;
}
.rede-installed-project-card > div{
    display:flex;
    flex-direction:column;
    gap:6px;
    padding:12px;
}
.rede-project-badge{
    width:max-content;
    padding:4px 8px;
    border-radius:999px;
    background:#16a34a;
    color:#fff;
    font-size:11px;
    font-weight:700;
}
.rede-installed-project-card small{color:#cbd5e1}
@media (max-width:760px){
    .rede-material-samples-only-grid,
    .rede-installed-projects-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:520px){
    .rede-material-samples-only-grid,
    .rede-installed-projects-grid{grid-template-columns:1fr}
}


/* ==========================================================
   v0.11.2 — HERO PROYECTO COMPACTO + FOTO REAL
   Solo afecta landing model=project.
   ========================================================== */
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-balanced{
    grid-template-columns:minmax(360px,.92fr) minmax(0,1.08fr);
    min-height:0;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-media{
    min-height:0;
    background:#eef0f2;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-media img{
    width:100%;
    height:100%;
    min-height:430px;
    max-height:620px;
    object-fit:cover;
    object-position:center;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy{
    max-width:none;
    padding:38px 42px;
    justify-content:center;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy h1{
    font-size:clamp(34px,3.35vw,52px);
    line-height:1.02;
    letter-spacing:-.032em;
    margin:14px 0 14px;
    overflow-wrap:anywhere;
    word-break:normal;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy>p{
    font-size:16px;
    line-height:1.48;
    margin:0 0 12px;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-points{
    margin:10px 0 16px;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-points li{
    margin:6px 0;
    line-height:1.35;
}

/* Si por seguridad no existe foto válida, el texto ocupa todo el ancho:
   no se reserva una columna vacía. */
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-balanced:not(:has(.rede-project-hero-media)){
    grid-template-columns:1fr;
}
.rede-theme-contract-live.rede-landing-model-project .rede-project-hero-balanced:not(:has(.rede-project-hero-media)) .rede-project-hero-copy{
    max-width:860px;
}

/* Tablet */
@media screen and (max-width:980px) and (min-width:768px){
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-balanced{
        grid-template-columns:minmax(300px,.9fr) minmax(0,1.1fr);
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy{
        padding:30px 32px;
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy h1{
        font-size:clamp(32px,4.2vw,44px);
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-media img{
        min-height:400px;
    }
}

/* Móvil: foto arriba, texto abajo, sin huecos laterales ni alto artificial. */
@media screen and (max-width:767px){
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-balanced{
        display:flex;
        flex-direction:column;
        width:100%;
        min-height:0;
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-media{
        order:1;
        width:100%;
        min-height:0;
        margin:0;
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-media img{
        width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        aspect-ratio:4/3;
        object-fit:cover;
        display:block;
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy{
        order:2;
        width:100%;
        padding:22px 18px 26px;
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy h1{
        font-size:clamp(29px,8.3vw,39px);
        line-height:1.04;
        letter-spacing:-.028em;
        margin:12px 0 12px;
        overflow-wrap:anywhere;
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-copy>p{
        font-size:16px;
        line-height:1.45;
    }
    .rede-theme-contract-live.rede-landing-model-project .rede-project-hero-points li{
        font-size:15px;
        line-height:1.35;
    }
}


/* =========================================================
   v0.12.0 — HERO GLOBAL + NORMALIZACIÓN DE CONTENIDO REDE
   ========================================================= */

/* Material/entrada/página: imagen y texto viven dentro del mismo hero. */
.rede-theme-contract-live .rede-global-hero{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:stretch;
    overflow:hidden;
    background:#f6f6f3;
}
.rede-theme-contract-live .rede-global-hero-media{
    min-width:0;
    min-height:520px;
    background:#eceff1;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}
.rede-theme-contract-live .rede-global-hero-media img{
    width:100%;
    height:100%;
    min-height:520px;
    display:block;
    object-fit:cover;
    object-position:center;
}
/* Las muestras de producto no se recortan: deben conservar proporción. */
.rede-theme-contract-live .rede-global-hero-media.rede-hero-source-sample img{
    object-fit:contain;
    padding:22px;
    background:#eef1f3;
}
.rede-theme-contract-live .rede-global-hero .rede-approved-hero-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

/* H1 adaptativo: evita títulos gigantes sin tocar el texto/SEO guardado. */
.rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-short{
    font-size:clamp(38px,4.6vw,66px);
}
.rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-medium{
    font-size:clamp(35px,4.0vw,58px);
}
.rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-long{
    font-size:clamp(31px,3.35vw,50px);
}
.rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-xl-long{
    font-size:clamp(28px,2.9vw,44px);
}

/*
 * Defensa visual adicional: cuando el contrato REDE está activo, piezas heredadas
 * con clases típicas de banners/social/CTA no deben reaparecer alrededor del contrato.
 * Sólo se aplica a elementos fuera del master REDE.
 */
.rede-theme-contract-live .entry-content > .wp-block-image[class*="banner"]:not(:has(.rede-commercial-master)),
.rede-theme-contract-live .entry-content > [class*="social-share"]:not(.rede-commercial-master),
.rede-theme-contract-live .entry-content > [class*="social-icons"]:not(.rede-commercial-master),
.rede-theme-contract-live .entry-content > [class*="call-to-action"]:not(.rede-commercial-master){
    display:none!important;
}

@media screen and (max-width:980px){
    .rede-theme-contract-live .rede-global-hero{
        grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    }
    .rede-theme-contract-live .rede-global-hero-media,
    .rede-theme-contract-live .rede-global-hero-media img{
        min-height:440px;
    }
}

@media screen and (max-width:767px){
    .rede-theme-contract-live .rede-global-hero{
        display:flex;
        flex-direction:column;
    }
    .rede-theme-contract-live .rede-global-hero-media{
        width:100%;
        min-height:0;
        max-height:none;
    }
    .rede-theme-contract-live .rede-global-hero-media img{
        width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        aspect-ratio:auto;
        object-fit:contain;
        padding:0;
    }
    .rede-theme-contract-live .rede-global-hero-media.rede-hero-source-sample img{
        padding:12px;
    }
    .rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-short,
    .rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-medium,
    .rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-long,
    .rede-theme-contract-live .rede-approved-hero-copy h1.rede-h1-xl-long{
        font-size:clamp(30px,9.2vw,42px);
        line-height:1.04;
    }
}


/* =========================================================
   v0.12.1 — QUITAR SÓLO LA IMAGEN DESTACADA DUPLICADA DEL TEMA
   =========================================================
   En URLs con Diseño REDE activo, Electro/WordPress puede imprimir
   la imagen destacada fuera de the_content, antes del contrato REDE.
   Se oculta únicamente esa salida del tema. El hero REDE no se toca.
*/
body.rede-theme-contract-live .post-thumbnail,
body.rede-theme-contract-live .entry-thumbnail,
body.rede-theme-contract-live .entry-media.post-thumbnail,
body.rede-theme-contract-live .post-format-media .post-thumbnail,
body.rede-theme-contract-live .single-post .post-thumbnail,
body.rede-theme-contract-live .single-page .post-thumbnail {
    display:none !important;
}

/* Respaldo para temas que imprimen la destacada como wp-post-image
   fuera del contrato REDE. No afecta imágenes dentro del master REDE. */
body.rede-theme-contract-live .entry-content > img.wp-post-image,
body.rede-theme-contract-live .entry-content > p > img.wp-post-image:first-child,
body.rede-theme-contract-live .entry-content > figure:first-child > img.wp-post-image {
    display:none !important;
}


/* =========================================================
   v0.12.2 — ELECTRO: OCULTAR LA MEDIA-ATTACHMENT DUPLICADA
   =========================================================
   Confirmado por inspección del DOM:
   <div class="media-attachment">
      <img class="attachment-electro_blog_medium ... wp-post-image">
   </div>

   Esta imagen es renderizada por Electro FUERA de the_content.
   Se oculta sólo en URLs con Diseño REDE activo.
   El hero REDE usa .rede-approved-hero-media/.rede-global-hero-media
   y no queda afectado.
*/
body.rede-theme-contract-live article .media-attachment,
body.rede-theme-contract-live .site-content .media-attachment,
body.rede-theme-contract-live .content-area .media-attachment {
    display:none !important;
}


/* =========================================================
   v0.12.3 — RENDER ÚNICO REDE
   =========================================================
   Si existe .rede-commercial-master, cualquier contenido heredado
   hermano dentro de entry-content queda fuera del render público.
   No borra post_content.
*/
body.rede-theme-contract-live .entry-content:has(.rede-commercial-master) > :not(.rede-commercial-master),
body.rede-theme-contract-live .post-content:has(.rede-commercial-master) > :not(.rede-commercial-master),
body.rede-theme-contract-live .content:has(.rede-commercial-master) > :not(.rede-commercial-master) {
    display:none !important;
}

/* Cabeceras/títulos/meta heredados del artículo, no el header global del sitio. */
body.rede-theme-contract-live article > .entry-header,
body.rede-theme-contract-live article > header.entry-header,
body.rede-theme-contract-live article .entry-title:not(.rede-approved-hero *) {
    display:none !important;
}

/* Electro: medios externos al contrato. */
body.rede-theme-contract-live article > .media-attachment,
body.rede-theme-contract-live article > .post-thumbnail,
body.rede-theme-contract-live article > .entry-thumbnail {
    display:none !important;
}

/* El contrato REDE siempre visible. */
body.rede-theme-contract-live .rede-commercial-master,
body.rede-theme-contract-live .rede-commercial-master * {
    visibility:visible;
}


/* =========================================================
   v0.12.4 — LIMPIEZA POR CAMINO DE ANCESTROS
   =========================================================
   Respaldo CSS. La limpieza principal se ejecuta inline en wp_footer
   y oculta hermanos del camino .rede-commercial-master -> article.
*/
body.rede-theme-contract-live article[data-rede-clean-render="1"] [data-rede-legacy-hidden="1"] {
    display:none !important;
}
body.rede-theme-contract-live .rede-commercial-master {
    display:block !important;
}
