.news-image-group {
    --image-group-height: clamp(220px, 55vw, 360px);
    margin: 32px calc(0px - var(--image-group-gutter, 0px));
    min-width: 0;
    max-width: none;
}

.news-image-group-track {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding: 0 var(--image-group-gutter, 0px) 10px;
    scroll-padding-inline: var(--image-group-gutter, 0px);
    touch-action: pan-x pan-y pinch-zoom;
}

.news-image-group-track:focus-visible {
    outline: 2px solid #02a568;
    outline-offset: 4px;
    border-radius: 16px;
}

.news-image-group .news-image-group-slide {
    flex: 0 0 auto;
    width: calc(var(--image-group-height) * var(--image-group-ratio, 1.333333));
    margin: 0;
    scroll-snap-align: start;
}

.news-image-group .news-image-group-slide img {
    display: block;
    width: 100%;
    height: var(--image-group-height);
    max-width: none;
    border-radius: 16px;
    object-fit: contain;
    background: #f5f5f7;
}

.news-image-group .news-image-group-slide figcaption {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #6e6e73;
    overflow-wrap: anywhere;
}

.news-image-group-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-inline: var(--image-group-gutter, 0px);
}

.news-image-group-footer p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #6e6e73;
    overflow-wrap: anywhere;
}

.news-image-group-controls {
    margin-inline-start: auto;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.news-image-group-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ededf1;
    color: #343438;
    cursor: pointer;
}

.news-image-group-controls button:disabled {
    opacity: 0.35;
    cursor: default;
}

.news-image-group-controls button:focus-visible {
    outline: 2px solid #02a568;
    outline-offset: 3px;
}

.news-image-group-controls svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Let the scroll area reach the article edges while the first/last photo
   and controls retain the same inset as the text. */
.article-content > .news-image-group {
    --image-group-gutter: var(--spacing-lg, 24px);
}

.np-content > .news-image-group {
    --image-group-gutter: 24px;
}

.news-editor-mobile .np-content > .news-image-group {
    --image-group-gutter: 20px;
}
