/*
 * Shared news-detail media layout.
 *
 * Loaded after the locale stylesheet by news/detail.html.twig so every locale
 * uses the same article rules.
 */

.news-article {
    min-width: 0;
}

.news-article .post-header {
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.news-article__hero {
    width: 100%;
    overflow: visible;
    background: transparent;
}

.news-article__hero img {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    max-height: none;
    margin: 0;
    object-fit: contain;
}

.news-article__hero--portrait img {
    width: auto !important;
    max-width: min(100%, 520px);
    max-height: min(650px, 68vh);
}

.news-article__body {
    color: #202428;
    font-size: clamp(1rem, 0.96rem + 0.12vw, 1.125rem);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.news-article__body::after {
    display: table;
    clear: both;
    content: "";
}

.news-article__block {
    min-width: 0;
}

.news-article__block--intro,
.news-article__block--text {
    margin-block: 0 1.25rem;
}

.news-article__block--gallery,
.news-article__block--product {
    clear: both;
    margin-block: clamp(1.25rem, 3vw, 2rem);
}

.news-article__copy > :first-child {
    margin-top: 0;
}

.news-article__copy > :last-child {
    margin-bottom: 0;
}

.post-sx.news-article .news-article__body h2,
.post-sx.news-article .news-article__body h3,
.post-sx.news-article .news-article__body h4 {
    clear: none;
    margin: clamp(1.5rem, 3vw, 2.25rem) 0 0.75rem;
    color: #111;
    line-height: 1.25;
}

.post-sx.news-article .news-article__body h2 {
    font-size: clamp(1.5rem, 1.25rem + 0.7vw, 2rem);
    font-weight: 600;
}

.post-sx.news-article .news-article__body h3 {
    font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.55rem);
    font-weight: 700;
}

.news-article__copy p {
    margin: 0 0 1rem;
}

.news-article__copy figure {
    max-width: 100%;
    margin: clamp(1rem, 2.5vw, 1.75rem) auto;
}

.news-article__copy img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(620px, 70vh);
    margin: clamp(1rem, 2.5vw, 1.75rem) auto;
    object-fit: contain;
}

.news-article__copy img[align="left"],
.news-article__copy img[style*="float: left"],
.news-article__copy img[style*="float:left"] {
    float: left;
    width: min(46%, 420px) !important;
    margin: 0.35rem clamp(1rem, 2.5vw, 1.75rem) 1rem 0;
}

.news-article__copy img[align="right"],
.news-article__copy img[style*="float: right"],
.news-article__copy img[style*="float:right"] {
    float: right;
    width: min(46%, 420px) !important;
    margin: 0.35rem 0 1rem clamp(1rem, 2.5vw, 1.75rem);
}

.news-article__copy iframe,
.news-article__copy embed,
.news-article__copy object,
.news-article__copy video {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: clamp(1rem, 2.5vw, 1.75rem) auto;
}

.news-article__copy table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.news-article__pair {
    display: flow-root;
    clear: both;
    margin-block: clamp(1.5rem, 4vw, 2.75rem);
}

.news-article__pair--tower {
    display: block;
    min-height: 0;
}

.news-article__pair .news-article__block--gallery {
    clear: none;
    margin: 0 0 1rem;
}

.news-article__pair--portrait .news-article__block--gallery {
    width: min(32%, 280px);
}

.news-article__pair--tower .news-article__block--gallery {
    width: min(27%, 220px);
}

.news-article__pair--landscape .news-article__block--gallery {
    width: min(50%, 440px);
}

.news-article__pair--text-first .news-article__block--gallery {
    float: right;
    margin-left: clamp(1rem, 3vw, 2rem);
}

.news-article__pair--media-first .news-article__block--gallery {
    float: left;
    margin-right: clamp(1rem, 3vw, 2rem);
}

.news-article__pair .news-article__block--text {
    margin: 0;
}

.news-article__pair .news-article__copy h2:first-child,
.news-article__pair .news-article__copy h3:first-child,
.news-article__pair .news-article__copy h4:first-child {
    margin-top: 0;
}

.news-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: clamp(0.75rem, 2vw, 1.25rem);
    width: 100%;
    margin: 0;
}

.news-gallery__item {
    min-width: 0;
    margin: 0;
}

.news-gallery__link {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: visible;
    background: transparent;
}

.news-gallery__image {
    display: block;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: min(620px, 68vh);
    margin: 0 auto;
    object-fit: contain;
}

.news-gallery--single.news-gallery--standalone {
    display: block;
    width: 100%;
}

.news-gallery--single.news-gallery--standalone .news-gallery__item,
.news-gallery--single.news-gallery--standalone .news-gallery__link {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.news-gallery--single.news-gallery--standalone .news-gallery__image {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    max-height: none;
    margin: 0;
}

.news-gallery--single .news-gallery__item--landscape .news-gallery__image,
.news-gallery--single .news-gallery__item--panorama .news-gallery__image,
.news-gallery--single .news-gallery__item--square .news-gallery__image {
    width: 100% !important;
    max-height: none;
    margin: 0;
}

.news-gallery--multi .news-gallery__link {
    height: auto;
}

.news-gallery--multi .news-gallery__image {
    width: 100% !important;
    height: auto !important;
    max-height: min(620px, 68vh);
    object-fit: contain;
}

.news-gallery--multi .news-gallery__item--panorama {
    grid-column: 1 / -1;
}

.news-gallery--multi .news-gallery__item--panorama .news-gallery__link {
    height: auto;
}

.news-gallery--multi .news-gallery__item--portrait .news-gallery__image,
.news-gallery--multi .news-gallery__item--tower .news-gallery__image {
    width: auto !important;
    max-width: 100%;
    max-height: min(480px, 65vh);
    margin-inline: auto;
}

.news-gallery--count-5 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.news-gallery--count-5 .news-gallery__item {
    grid-column: span 2;
}

.news-gallery--count-5 .news-gallery__item:nth-child(n + 4) {
    grid-column: span 3;
}

.news-gallery--single.news-gallery--standalone .news-gallery__item--portrait,
.news-gallery--single.news-gallery--standalone .news-gallery__item--tower {
    width: min(100%, 460px);
    margin-inline: auto;
}

.news-gallery--single.news-gallery--standalone .news-gallery__item--portrait .news-gallery__image,
.news-gallery--single.news-gallery--standalone .news-gallery__item--tower .news-gallery__image {
    width: auto !important;
    max-width: 100%;
    margin-inline: auto;
}

.news-gallery--single.news-gallery--standalone .news-gallery__item--tower .news-gallery__image {
    max-height: min(560px, 64vh);
}

.news-gallery--paired {
    align-self: start;
}

.news-gallery--paired .news-gallery__item,
.news-gallery--paired .news-gallery__link {
    height: auto;
}

.news-gallery--paired .news-gallery__image {
    width: 100% !important;
    height: auto !important;
    max-height: min(500px, 60vh);
}

.news-gallery--paired .news-gallery__item--portrait .news-gallery__image,
.news-gallery--paired .news-gallery__item--tower .news-gallery__image {
    width: auto !important;
}

@media (max-width: 767.98px) {
    .news-article {
        padding-right: 15px;
    }

    .news-article__hero img,
    .news-article__hero--landscape img,
    .news-article__hero--panorama img {
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        max-height: none;
    }

    .news-article__hero--portrait img {
        width: auto !important;
        max-width: 100%;
        max-height: min(520px, 62vh);
    }

    .news-article__pair {
        display: block;
    }

    .news-article__pair .news-article__block--gallery {
        float: none;
        width: 100%;
        margin: 0 0 1rem;
    }

    .news-gallery--multi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-gallery--count-5 .news-gallery__item {
        grid-column: span 1;
    }

    .news-gallery--count-5 .news-gallery__item:last-child {
        grid-column: 1 / -1;
    }

    .news-article__copy img[align="left"],
    .news-article__copy img[align="right"],
    .news-article__copy img[style*="float: left"],
    .news-article__copy img[style*="float:left"],
    .news-article__copy img[style*="float: right"],
    .news-article__copy img[style*="float:right"] {
        float: none !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 1rem auto !important;
    }
}

@media (max-width: 479.98px) {
    .news-gallery--multi {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-gallery--count-5 .news-gallery__item,
    .news-gallery--count-5 .news-gallery__item:last-child {
        grid-column: auto;
    }
}
