/* EC46 municipio · publicidad estilo localidad.php.
   Sólo afecta a /tiempo/tendencias/prueba-tendencias-ec46.php.
   Las reglas de columnas provienen de prevision-espana-new.css?v=15. */
main.es-pt-main {
    width: 100%;
    max-width: 1380px;
}
main.es-pt-main .center-column {
    min-width: 0;
}
/* Evitar las reglas flotantes clásicas de .sidebar.left, dentro de la rejilla. */
@media (min-width: 1400px) {
    main.es-pt-main .left-rail.sidebar.left,
    main.es-pt-main .left-rail.sidebar.left.sticky {
        float: none;
        width: 100%;
        margin: 0;
        position: sticky;
        top: 85px;
        align-self: start;
    }
}
main.es-pt-main .right-rail {
    min-width: 0;
    position: sticky;
    top: 85px;
    align-self: start;
}
main.es-pt-main .right-rail > .sidebar.left,
main.es-pt-main .right-rail > .sidebar.left.sticky {
    float: none;
    width: 100%;
    margin: 0;
    position: static;
}
/* Los ganchos están dentro de .ec46-main, no directamente de .center-column. */
main.es-pt-main .ec46-main > .r89-desktop-leaderboard-atf,
main.es-pt-main .ec46-main > .r89-mobile-premium,
main.es-pt-main .ec46-main > .r89-mobile-mid {
    clear: both;
    margin: 15px auto 10px;
    max-width: 100%;
}
@media (max-width: 900px) {
    main.es-pt-main .ec46-main > .r89-mobile-premium:not(:empty),
    main.es-pt-main .ec46-main > .r89-mobile-mid:not(:empty) {
        min-height: 330px;
        overflow: visible;
    }
}
/* En pantallas estrechas el lateral derecho sólo contiene publicidad,
   no módulos de contenido: evitar que ocupe una segunda fila debajo. */
@media (max-width: 1099px) {
    main.es-pt-main .right-rail {
        display: none;
    }
}

/* Corrección móvil V2: evitar los dos acolchados laterales acumulados.
   El contenedor EC46 conserva sus 13 px de espacio interno. */
@media (max-width: 680px) {
    main.es-pt-main {
        padding-left: 0;
        padding-right: 0;
    }
    /* No partir la cifra y la unidad en las tarjetas semana a semana. */
    main.es-pt-main .ec46-main .metricline strong {
        white-space: nowrap;
        flex-shrink: 0;
    }
    main.es-pt-main .ec46-main .metricline small {
        min-width: 0;
    }
}

/* Corrección móvil V3: los márgenes visibles estaban dentro de EC46.
   Total antes: 13 (EC46) + 15 (sección) + 18 (tarjeta) = 46 px por lado.
   Ahora: 4 + 8 + 12 = 24 px por lado; sin alterar escritorio ni banners. */
@media (max-width: 680px) {
    main.es-pt-main .ec46-main {
        padding-right: 4px;
        padding-left: 4px;
    }
    main.es-pt-main .ec46-main .section {
        padding-right: 8px;
        padding-left: 8px;
    }
    main.es-pt-main .ec46-main .week {
        padding-right: 12px;
        padding-left: 12px;
    }
}

/* V4 - En móvil, ancho completo de la zona central.
   El hueco visible en Edge (12 px a cada lado) está FUERA de las tarjetas.
   Se neutraliza el espaciado lateral de TODOS los contenedores de la rejilla,
   sin cambiar el relleno interior de las tarjetas ni el escritorio. */
@media (max-width: 680px) {
    body .pusher main.es-pt-main,
    body .pusher main.es-pt-main > .page-grid,
    body .pusher main.es-pt-main > .page-grid > .center-column,
    body .pusher main.es-pt-main .center-column > .ec46-main {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}
