/*
 * NOTICIA.DO — REDISEÑO EDITORIAL
 * Inspiración visual: BBC Mundo
 * Exclusivo de desarrollo
 */

/* Contenedor editorial */
body.home .nd-home,
body.home .nd-category-block,
body.home .nd-two-col-block,
body.home .nd-three-col-block {
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Encabezamiento Santiago primero */
body.home .nd-home {
    padding-top: 12px !important;
}

body.home .nd-kicker {
    margin-bottom: 10px !important;
}

body.home .nd-title {
    font-size: 30px !important;
    line-height: 1.12 !important;
    margin-bottom: 6px !important;
}

body.home .nd-desc {
    margin-bottom: 10px !important;
}

/* Compactar apertura */
body.home .entry-content > div.nd-home {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.home .entry-content > div.nd-home + .wp-block-group.nd-home {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Noticia principal y secundarias */
body.home .nd-main-grid.wp-block-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
    margin-top: 8px !important;
}

body.home .nd-main-grid > .wp-block-column {
    min-width: 0;
    width: auto !important;
    flex-basis: auto !important;
    margin: 0 !important;
}

/* Titular principal */
body.home .nd-main-grid > .wp-block-column:first-child
.wp-block-post-title {
    font-size: 38px !important;
    line-height: 1.12 !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

/* Titulares secundarios */
body.home .nd-side .wp-block-post-title {
    font-size: 19px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

/* Titulares de listas */
body.home .nd-mini-section .wp-block-post-title,
body.home .nd-final-section .wp-block-post-title {
    font-weight: 700 !important;
}

/* Fechas */
body.home .wp-block-post-date {
    font-size: 12px;
    line-height: 1.4;
}

/* Tabletas y móviles */
@media (max-width: 900px) {

    body.home .nd-main-grid.wp-block-columns {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px !important;
    }

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-title {
        font-size: 30px !important;
    }

    body.home .nd-side .wp-block-post-title {
        font-size: 18px !important;
    }
}

@media (max-width: 767px) {

    body.home .nd-home {
        padding-top: 10px !important;
    }

    body.home .nd-title {
        font-size: 24px !important;
    }

    body.home .nd-main-grid.wp-block-columns {
        margin-top: 6px !important;
    }

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-title {
        font-size: 27px !important;
    }
}


/* ND-COMPACTAR-APERTURA-20261109
   Solo portada de desarrollo.
   Selectores verificados contra HTML real.
*/

body.home main#site-main > .nd-home:first-child {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.home main#site-main > .nd-home:first-child .nd-desc {
    margin-bottom: 8px !important;
}

body.home main#site-main > .nd-home + .wp-block-group.nd-home {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
    padding-top: 0 !important;
}

body.home main#site-main > .wp-block-group.nd-home
.nd-main-grid.wp-block-columns {
    margin-top: 8px !important;
    margin-block-start: 8px !important;
}


/* ND-APERTURA-MOVIL-20261109
   Ajuste exclusivo de portada móvil.
*/
@media (max-width: 767px) {
    body.home main#site-main {
        margin-top: -18px !important;
    }
}

/* ND-SECUNDARIAS-EDITORIAL-20261109
   Separadores discretos en Más de Santiago.
   Exclusivo de portada de desarrollo.
*/

body.home .nd-main-grid .nd-side
.wp-block-post-template > li {
    padding-top: 13px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(120, 120, 120, 0.18);
}

body.home .nd-main-grid .nd-side
.wp-block-post-template > li:first-child {
    padding-top: 0;
}

body.home .nd-main-grid .nd-side
.wp-block-post-template > li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

@media (max-width: 767px) {
    body.home .nd-main-grid .nd-side
    .wp-block-post-template > li {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* ND-IMAGEN-PRINCIPAL-MOVIL-20261109
   Preservar proporciones de la imagen principal.
   Exclusivo de portada móvil en desarrollo.
*/

@media (max-width: 767px) {

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-featured-image {
        height: auto !important;
        aspect-ratio: auto !important;
        overflow: visible !important;
    }

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-featured-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
        aspect-ratio: auto !important;
        display: block;
    }
}

/* ND-CORREGIR-ESPACIO-IMAGEN-20261109
   Eliminar altura fija del enlace de la fotografía.
   Exclusivo de portada móvil en desarrollo.
*/

@media (max-width: 767px) {

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-featured-image > a {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
    }

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-featured-image {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 12px !important;
    }

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-featured-image img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
}

/*
 * ND-MOVIL-COMPACTO-20261111
 * Portada de desarrollo.
 * Compactar apertura y eliminar encabezado redundante.
 */

@media (max-width: 767px) {

    /* Compactar encabezamiento editorial */
    body.home main#site-main > .nd-home:first-child {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    body.home .nd-kicker {
        margin-bottom: 6px !important;
    }

    body.home .nd-title {
        margin-bottom: 5px !important;
    }

    body.home main#site-main > .nd-home:first-child .nd-desc {
        margin-bottom: 4px !important;
    }

    /* Reducir separacion de la apertura */
    body.home .nd-main-grid.wp-block-columns {
        margin-top: 0 !important;
        gap: 12px !important;
    }

    /* Ocultar solo Principal de Santiago en movil */
    body.home .nd-main-grid > .wp-block-column:first-child
    > .nd-section-title {
        display: none !important;
    }

    /* Conservar la imagen principal completa */
    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-featured-image {
        margin-top: 0 !important;
        margin-bottom: 10px !important;
    }

    /* Compactar el final de la noticia principal */
    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-excerpt {
        margin-bottom: 8px !important;
    }

    /* Acercar las noticias secundarias */
    body.home .nd-main-grid .nd-side > .nd-section-title {
        margin-top: 4px !important;
        margin-bottom: 12px !important;
    }

}

/*
 * ND-OCULTAR-LEER-MAS-MOVIL-20261111
 * Solo noticia principal en portada movil.
 * Mantiene titular, fotografia y resumen.
 */

@media (max-width: 767px) {

    body.home .nd-main-grid > .wp-block-column:first-child
    .wp-block-post-excerpt__more-link {
        display: none !important;
    }

}
