/* Common safety rails */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

img {
    max-width: 100%;
}

/* Article images retain their natural proportions. */
.entry-content img,
.post-content img,
.td-post-content img {
    height: auto;
}

/* Card and hero images use a predictable newsroom frame. */
.home .read-img,
.archive .read-img,
.home .td-module-thumb,
.archive .td-module-thumb {
    overflow: hidden;
}

.home .read-img > img,
.archive .read-img > img,
.home .read-img > a > img,
.archive .read-img > a > img,
.home .td-module-thumb img,
.archive .td-module-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.home img.nnpg-portrait,
.archive img.nnpg-portrait {
    object-position: center 18%;
}

.home img.nnpg-contain,
.archive img.nnpg-contain {
    object-fit: contain;
    object-position: center center;
    background: #f3f4f6;
}

/* MoreNews sites: centred desktop canvas and compact hero. */
body.wp-theme-morenews .container-wrapper,
body.wp-theme-morenews .aft-main-banner-wrapper,
body.wp-theme-morenews .af-main-banner-editors-picks,
body.wp-theme-morenews .af-main-banner-latest-posts,
body.wp-theme-morenews .af-main-banner-trending-posts,
body.wp-theme-morenews .below-main-banner-section,
body.wp-theme-morenews .aft-main-banner-section .container-wrapper,
body.wp-theme-morenews #content.container-wrapper {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

body.wp-theme-morenews .aft-main-banner-wrapper {
    padding-left: 0;
    padding-right: 0;
}

body.wp-theme-morenews.home .aft-slider-part .af-widget-carousel,
body.wp-theme-morenews.home .aft-slider-part .slick-wrapper,
body.wp-theme-morenews.home .aft-slider-part .slick-list,
body.wp-theme-morenews.home .aft-slider-part .slick-slide,
body.wp-theme-morenews.home .aft-slider-part .read-single,
body.wp-theme-morenews.home .aft-slider-part .read-img,
body.wp-theme-morenews.home .aft-slider-part .read-img img {
    height: clamp(340px, 38vw, 500px) !important;
}

body.wp-theme-morenews .slick-list,
body.wp-theme-morenews .slick-wrapper {
    max-width: 100%;
}

/* Prevent third-party wide creatives from creating horizontal scrolling. */
body.wp-theme-morenews .google-auto-placed,
body.wp-theme-morenews ins.adsbygoogle,
body.wp-theme-morenews [id^="aswift_"] {
    max-width: 100% !important;
}

@media (max-width: 1024px) {
    body.wp-theme-morenews .container-wrapper,
    body.wp-theme-morenews .aft-main-banner-wrapper,
    body.wp-theme-morenews #content.container-wrapper {
        width: min(100% - 24px, 1180px);
    }
}

@media (max-width: 767px) {
    body.wp-theme-morenews .container-wrapper,
    body.wp-theme-morenews .aft-main-banner-wrapper,
    body.wp-theme-morenews #content.container-wrapper {
        width: min(100% - 16px, 1180px);
    }

    body.wp-theme-morenews.home .aft-slider-part .af-widget-carousel,
    body.wp-theme-morenews.home .aft-slider-part .slick-wrapper,
    body.wp-theme-morenews.home .aft-slider-part .slick-list,
    body.wp-theme-morenews.home .aft-slider-part .slick-slide,
    body.wp-theme-morenews.home .aft-slider-part .read-single,
    body.wp-theme-morenews.home .aft-slider-part .read-img,
    body.wp-theme-morenews.home .aft-slider-part .read-img img {
        height: clamp(260px, 72vw, 380px) !important;
    }
}

