.s3-gallery { margin: 1.5rem 0; }
.s3-gallery__slide { margin: 0 0 1rem; }
.s3-gallery__slide[hidden], .s3-gallery__controls[hidden] { display: none; }
.s3-gallery__image { display: table; position: relative; max-width: 100%; margin: 0 auto; }
.s3-gallery__slide img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.s3-gallery__image .s3-gallery__image-arrow { position: absolute; top: 0; bottom: 0; width: 50%; display: flex; align-items: center; padding: 1rem; border: 0; background: transparent; cursor: pointer; }
.s3-gallery__image .s3-gallery__image-arrow[hidden] { display: none; }
.s3-gallery__image-previous { left: 0; justify-content: flex-start; }
.s3-gallery__image-next { right: 0; justify-content: flex-end; }
.s3-gallery__image-arrow svg { width: 2.5rem; height: 2.5rem; padding: .5rem; border-radius: 50%; background: rgba(0, 0, 0, .7); fill: none; stroke: #fff; stroke-width: 2.5; opacity: 0; transition: opacity .15s; }
.s3-gallery__image:hover .s3-gallery__image-arrow svg, .s3-gallery__image:focus-within .s3-gallery__image-arrow svg { opacity: 1; }
.s3-gallery__image-arrow:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (hover: none) { .s3-gallery__image-arrow svg { opacity: 1; } }
.s3-gallery__slide figcaption { margin-top: .5rem; }
.s3-gallery__copyright { display: block; font-size: .875em; }
.s3-gallery__controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.s3-gallery__controls button { border: 1px solid currentColor; padding: .5rem .75rem; cursor: pointer; }
@media (max-width: 600px) {
    .s3-gallery__controls { align-items: stretch; gap: .375rem; }
    .s3-gallery__controls > * { margin: 0; }
    .s3-gallery__controls button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: .3rem .4rem; font-size: .875em; line-height: 1.2; overflow-wrap: anywhere; }
    .s3-gallery__count { align-self: center; flex-shrink: 0; white-space: nowrap; }
}
