/* Article overflow fixes. Existing fonts, colours, textures and wide-screen
   content dimensions come from news.css/detail.css without being overridden. */
.catalog-article #banner {
    padding-right: 16px;
}

/* Keep the original outer block and negative margin. Making #banner itself a
   flex container makes it avoid the preceding floats and moves the page down. */
.catalog-article .article-breadcrumb {
    display: flex;
    align-items: flex-start;
    column-gap: 4px;
    white-space: nowrap;
}

.catalog-article #banner .article-breadcrumb > img {
    flex: none;
    margin-top: 4px;
}

.catalog-article .article-breadcrumb > .spanTitle,
.catalog-article .article-breadcrumb > #title1 {
    flex: none;
    height: 22px;
    padding-top: 0;
    margin-bottom: 0;
    line-height: 22px;
}

.catalog-article .article-breadcrumb > #title1 {
    flex: 0 1 350px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-article #main > .title {
    overflow-wrap: anywhere;
}

/* The original logo and navigation stop fitting on one row below 1322px.
   Contain that second row so its links cannot spill onto the breadcrumb. */
@media (max-width: 1321px) {
    .catalog-article #logo {
        float: none;
        margin-left: 16px;
        margin-right: 16px;
    }

    .catalog-article #logo img {
        max-width: 100%;
        height: auto;
    }

    .catalog-article #navUL {
        float: none;
        height: auto;
        margin-left: 0;
    }

    .catalog-article #navUL ul {
        display: flex;
        margin: 0;
        padding: 0;
    }

    .catalog-article #navUL li {
        flex: 1;
        float: none;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .catalog-article #banner {
        margin-top: 0;
        padding-left: 16px;
    }
}

/* Below the original 1200px content width plus side gutters, keep the article
   inside the viewport. Desktop browser zoom reaches the same CSS viewport. */
@media (max-width: 1231px) {
    .catalog-article #main {
        width: calc(100% - 32px);
        margin-left: 16px;
    }

    .catalog-article #main > .title {
        width: 100%;
    }

    .catalog-article #words img,
    .catalog-article #words video {
        max-width: 100%;
        height: auto;
    }
}
