.sil-gallery {
    margin-top: 32px;
}

.sil-gallery__title {
    margin: 0 0 18px;
    color: #243347;
    font-size: clamp(22px, 2.5vw, 32px);
    line-height: 1.2;
}

.sil-gallery__slider {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #d9d9d9;
    box-shadow: 0 12px 34px rgba(22, 43, 66, 0.16);
}

.sil-gallery__viewport,
.sil-gallery__track {
    width: 100%;
    height: clamp(320px, 62vw, 720px);
}

.sil-gallery__item {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 0;
    margin: 0;
    place-items: center;
}

.sil-gallery__item[hidden],
.sil-gallery__previous[hidden],
.sil-gallery__next[hidden] {
    display: none !important;
}

.sil-gallery__button {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    place-items: center;
    background: transparent;
    cursor: zoom-in;
}

.sil-gallery__button::after {
    content: "↗";
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 28, 43, 0.72);
    font-size: 18px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sil-gallery__button:hover::after,
.sil-gallery__button:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.sil-gallery__button:focus-visible {
    outline: 3px solid #c8102e;
    outline-offset: 3px;
}

.sil-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.sil-gallery__button:hover .sil-gallery__image {
    transform: scale(1.025);
}

.sil-gallery__caption {
    position: absolute;
    right: 76px;
    bottom: 18px;
    left: 76px;
    z-index: 2;
    margin: 0;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.sil-gallery__previous,
.sil-gallery__next {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 28, 52, 0.72);
    font: inherit;
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sil-gallery__previous {
    left: 16px;
}

.sil-gallery__next {
    right: 16px;
}

.sil-gallery__previous:hover,
.sil-gallery__next:hover,
.sil-gallery__previous:focus-visible,
.sil-gallery__next:focus-visible {
    border-color: #c8102e;
    background: #c8102e;
    outline: none;
}

.sil-gallery__counter {
    position: absolute;
    z-index: 3;
    top: 16px;
    left: 50%;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 28, 52, 0.66);
    font-size: 13px;
    line-height: 1;
    transform: translateX(-50%);
    pointer-events: none;
}

.sil-gallery__empty {
    margin: 0;
    padding: 20px;
    border: 1px dashed #b9c4cf;
    border-radius: 12px;
    color: #657386;
    background: #f7f9fb;
}

body.sil-lightbox-open {
    overflow: hidden;
}

.sil-lightbox[hidden] {
    display: none !important;
}

.sil-lightbox button[hidden] {
    display: none !important;
}

.sil-lightbox {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 72px 76px 54px;
    color: #fff;
    background: rgba(5, 10, 16, 0.94);
}

.sil-lightbox__figure {
    display: grid;
    max-width: min(1500px, 100%);
    max-height: 100%;
    margin: 0;
    place-items: center;
}

.sil-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
}

.sil-lightbox__caption {
    max-width: 900px;
    margin-top: 14px;
    color: #e8edf2;
    text-align: center;
}

.sil-lightbox__close,
.sil-lightbox__previous,
.sil-lightbox__next {
    position: absolute;
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    background: rgba(20, 30, 42, 0.72);
    font: inherit;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.sil-lightbox__close:hover,
.sil-lightbox__previous:hover,
.sil-lightbox__next:hover,
.sil-lightbox__close:focus-visible,
.sil-lightbox__previous:focus-visible,
.sil-lightbox__next:focus-visible {
    border-color: #c8102e;
    background: #c8102e;
    outline: none;
}

.sil-lightbox__close {
    top: 18px;
    right: 18px;
}

.sil-lightbox__previous,
.sil-lightbox__next {
    top: 50%;
    transform: translateY(-50%);
}

.sil-lightbox__previous {
    left: 18px;
}

.sil-lightbox__next {
    right: 18px;
}

.sil-lightbox__counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    color: #cbd4dd;
    transform: translateX(-50%);
}

@media (max-width: 700px) {
    .sil-gallery__viewport,
    .sil-gallery__track {
        height: clamp(280px, 100vw, 520px);
    }

    .sil-gallery__previous,
    .sil-gallery__next {
        width: 40px;
        height: 40px;
    }

    .sil-gallery__previous {
        left: 10px;
    }

    .sil-gallery__next {
        right: 10px;
    }

    .sil-gallery__caption {
        right: 58px;
        bottom: 12px;
        left: 58px;
    }

    .sil-lightbox {
        padding: 62px 12px 54px;
    }

    .sil-lightbox__previous,
    .sil-lightbox__next {
        top: auto;
        bottom: 14px;
        transform: none;
    }

    .sil-lightbox__previous {
        left: 14px;
    }

    .sil-lightbox__next {
        right: 14px;
    }

    .sil-lightbox__image {
        max-height: calc(100vh - 130px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sil-gallery__button::after,
    .sil-gallery__image,
    .sil-gallery__previous,
    .sil-gallery__next {
        transition: none;
    }
}

.content-card-text .sil-gallery__button {
    position: relative;
}

.content-card-text .sil-gallery__image {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
}