.slideshow {
    position: relative;
    width: 1024px;
    max-width: 100%;
    height: 576px;
    margin: 25px auto 15px auto !important;
    float: none !important;
    clear: both;
    display: block;
    overflow: hidden;
    background: #111;
    box-sizing: border-box;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition:
        opacity 0.7s ease,
        transform 6s ease;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide.active img {
    cursor: zoom-in;
}

.slideshow-overlay {
    pointer-events: none;
}

.slideshow::after {
    content: "View full image";
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 8;
    padding: 6px 10px;
    border-radius: 4px;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    font-size: 13px;
    pointer-events: none;
}

.slideshow-viewer {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 64px 20px 24px;
    background: rgba(0, 0, 0, 0.94);
    touch-action: none;
}

.slideshow-viewer.is-open {
    display: flex;
}

.slideshow-viewer-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    cursor: grab;
}

.slideshow-viewer-image.is-dragging {
    cursor: grabbing;
}

.slideshow-viewer-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 8px;
}

.slideshow-viewer button {
    appearance: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 50%;
    color: #fff;
    background: rgba(30,30,30,.8);
    font-size: 24px;
    font-family: Arial, Helvetica, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.slideshow-viewer button::before {
    display: block;
}

.slideshow-viewer [data-viewer-zoom="out"]::before {
    content: "-";
}

.slideshow-viewer [data-viewer-zoom="in"]::before {
    content: "+";
}

.slideshow-viewer [data-viewer-close]::before {
    content: "x";
}

.slideshow-viewer button:hover,
.slideshow-viewer button:focus-visible {
    background: #92000a;
}

.slideshow-viewer-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.8);
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
}

.slideshow-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 45px;
}

.slideshow-caption {
    color: white;
    max-width: 700px;
    text-align: left;
}

.slideshow-caption span {
    display: inline-block;
    background: #92000a;
    padding: 7px 13px;
    margin-bottom: 10px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.slideshow-caption h2 {
    color: white !important;
    font-size: 38px;
    line-height: 1.1;
    margin: 0 0 8px;
    font-weight: 700;
    text-shadow:
        0 2px 5px rgba(0,0,0,0.6);
}

.slideshow-caption p {
    color: white;
    font-size: 17px;
    margin: 0;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.5);
}

.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: white;
    font-size: 25px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
}

.slideshow-prev {
    left: 20px;
}

.slideshow-next {
    right: 20px;
}

.slideshow-prev:hover,
.slideshow-next:hover {
    background: #92000a;
    transform:
        translateY(-50%)
        scale(1.1);
}

.slideshow-dots {
    position: absolute;
    left: 50%;
    bottom: 23px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
    z-index: 10;
}

.slideshow-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid white;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.25s ease;
}

.slideshow-dot.active {
    background: white;
    transform: scale(1.2);
}

.slideshow-dot:hover {
    background: white;
}

.slideshow-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255,255,255,0.25);
    z-index: 11;
}

.slideshow-progress-bar {
    height: 100%;
    width: 0%;
    background: #92000a;
}

@media screen and (max-width: 736px) {
    .slideshow {
        width: 100%;
        height: 350px;
    }

    .slideshow-overlay {
        padding: 25px;
    }

    .slideshow-caption h2 {
        font-size: 27px;
    }

    .slideshow-caption p {
        font-size: 14px;
    }

    .slideshow-caption span {
        font-size: 9px;
        padding: 6px 9px;
    }

    .slideshow-prev,
    .slideshow-next {
        width: 38px;
        height: 38px;
        font-size: 19px;
    }

    .slideshow-prev {
        left: 10px;
    }

    .slideshow-next {
        right: 10px;
    }

    .slideshow-viewer {
        padding: 20px 12px calc(104px + env(safe-area-inset-bottom));
    }

    .slideshow-viewer-controls {
        top: auto;
        right: auto;
        bottom: calc(16px + env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        gap: 12px;
    }

    .slideshow-viewer button {
        width: 52px;
        height: 52px;
        font-size: 28px;
    }

    .slideshow-viewer-hint {
        bottom: calc(78px + env(safe-area-inset-bottom));
        width: 100%;
        font-size: 12px;
        white-space: normal;
    }
}
