.ms-article-gallery {
    --ms-accent: #4ecccd;
    --ms-accent-shadow: rgba(78, 204, 205, .38);
    width: 100%;
    max-width: 820px;
    margin: 16px auto 20px;
    color: #f5f7f7;
    font-family: inherit;
}

.ms-article-gallery[data-ms-article-gallery="cash"] {
    --ms-accent: #ffca05;
    --ms-accent-shadow: rgba(255, 202, 5, .34);
}

.ms-article-gallery__card {
    overflow: hidden;
    border: 1px solid rgba(102, 181, 180, .25);
    border-radius: 14px;
    background: #0d1717;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
}

.ms-article-gallery__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 17px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, #141d1d, #101919);
}

.ms-article-gallery__captions { min-width: 0; flex: 1; }
.ms-article-gallery__caption { display: none; }
.ms-article-gallery__caption.is-active { display: block; }

.ms-article-gallery__caption strong {
    display: block;
    margin: 0 0 4px;
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
}

.ms-article-gallery__caption strong::before {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 9px 2px 0;
    border-radius: 50%;
    background: var(--ms-accent);
    box-shadow: 0 0 9px var(--ms-accent-shadow);
    content: "";
}

.ms-article-gallery__caption span {
    display: block;
    color: #b8c7c7;
    font-size: 12px;
    line-height: 1.45;
}

.ms-article-gallery__dots { display: flex; flex: none; gap: 7px; }

.ms-article-gallery__dots button {
    width: 23px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: rgba(210, 225, 225, .2);
    cursor: pointer;
}

.ms-article-gallery__dots button.is-active {
    width: 36px;
    background: var(--ms-accent);
    box-shadow: 0 0 9px var(--ms-accent-shadow);
}

.ms-article-gallery__viewport { position: relative; overflow: hidden; background: #111919; touch-action: pan-y; }
.ms-article-gallery__viewport::before,
.ms-article-gallery__viewport::after {
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    width: 14%;
    min-width: 60px;
    max-width: 140px;
    pointer-events: none;
    content: "";
}
.ms-article-gallery__viewport::before { left: 0; background: linear-gradient(90deg, rgba(8, 19, 19, .22), transparent); }
.ms-article-gallery__viewport::after { right: 0; background: linear-gradient(270deg, rgba(8, 19, 19, .22), transparent); }
.ms-article-gallery__track { display: flex; transition: transform .38s ease; }
.ms-article-gallery__slide { min-width: 100%; box-sizing: border-box; }

.ms-article-gallery__slide img,
article[data-detail-content-root] .ms-article-gallery__slide img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    user-select: none;
}

.ms-article-gallery__arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    width: 44px;
    height: 88px;
    padding: 0;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ms-accent);
    font-size: 0;
    cursor: pointer;
}

.ms-article-gallery__arrow::before {
    display: block;
    width: 20px;
    height: 54px;
    background: currentColor;
    clip-path: polygon(90% 0, 100% 3%, 12% 50%, 100% 97%, 90% 100%, 0 50%);
    content: "";
}
.ms-article-gallery__arrow { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)) drop-shadow(0 0 6px var(--ms-accent-shadow)); }
.ms-article-gallery__arrow:hover { color: #fff; }
.ms-article-gallery__arrow--prev { left: 10px; }
.ms-article-gallery__arrow--next { right: 10px; }
.ms-article-gallery__arrow--next::before { transform: scaleX(-1); }

.news-detail-block--articles .ms-article-gallery__slide img { cursor: zoom-in; }
.ms-article-image-viewer {
    position: fixed;
    inset: 0;
    width: fit-content;
    height: fit-content;
    max-width: 95vw;
    max-height: 95vh;
    margin: auto;
    padding: 36px 12px 12px;
    border: 0;
    background: transparent;
    overflow: visible;
}
.ms-article-image-viewer::backdrop { background: rgba(0, 0, 0, .88); }
.ms-article-image-viewer img {
    display: block;
    width: auto;
    margin: 0 auto;
    max-width: calc(95vw - 24px);
    max-height: calc(95vh - 48px);
    object-fit: contain;
}
.ms-article-image-viewer__close {
    position: absolute;
    top: 0;
    right: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: 32px/1 Arial, sans-serif;
    cursor: pointer;
}

@media (max-width: 560px) {
    .ms-article-gallery__head { gap: 10px; padding: 12px; }
    .ms-article-gallery__caption strong { font-size: 12px; }
    .ms-article-gallery__caption span { font-size: 11px; }
    .ms-article-gallery__dots { gap: 4px; }
    .ms-article-gallery__dots button { width: 13px; }
    .ms-article-gallery__dots button.is-active { width: 23px; }
    .ms-article-gallery__arrow { width: 36px; height: 64px; }
    .ms-article-gallery__arrow::before { width: 15px; height: 44px; }
    .ms-article-gallery__arrow--prev { left: 2px; }
    .ms-article-gallery__arrow--next { right: 2px; }
}
