.az-gallery .gallery-preview img {display:block;max-width:100%;height:auto;}

/* Borderless work view, matching the original gallery lightbox. */
html.az-lightbox-open {overflow:hidden;}
.az-lightbox {
    position:fixed;
    inset:0;
    width:max-content;
    max-width:calc(100vw - 48px);
    max-height:calc(100vh - 16px);
    max-height:calc(100dvh - 16px);
    box-sizing:border-box;
    margin:auto;
    padding:32px 0 28px;
    border:0;
    border-radius:0;
    background:transparent;
    color:#ddd;
    box-shadow:none;
    overflow:visible;
    z-index:100000;
}
.az-lightbox::backdrop {background:rgba(0,0,0,.8);}
.az-lightbox figure {margin:0;}
.az-lightbox img {
    display:block;
    width:auto;
    height:auto;
    max-width:calc(100vw - 48px);
    max-height:calc(100vh - 80px);
    max-height:calc(100dvh - 80px);
    margin:0 auto;
    object-fit:contain;
    box-shadow:0 0 8px rgba(0,0,0,.4);
}
.az-lightbox.has-caption img {
    max-height:calc(100vh - 176px);
    max-height:calc(100dvh - 176px);
}
.az-lightbox figcaption {
    box-sizing:border-box;
    width:0;
    min-width:100%;
    max-height:96px;
    margin:0;
    padding-top:10px;
    overflow:auto;
    color:#ddd;
    font-size:14px;
    line-height:1.45;
    white-space:pre-line;
    overflow-wrap:anywhere;
}
.az-lightbox button {
    display:block;
    box-sizing:border-box;
    min-width:44px;
    min-height:44px;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    color:#ddd;
    font-family:Arial,sans-serif;
    font-weight:normal;
    text-align:center;
    text-transform:none;
    box-shadow:none;
    opacity:.8;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}
.az-lightbox button:hover {color:#fff;opacity:1;}
.az-lightbox button:focus-visible {outline:2px solid #fff;outline-offset:2px;opacity:1;}
.az-lightbox-close {
    position:absolute;
    top:-6px;
    right:-11px;
    font-size:28px;
    line-height:44px;
}
.az-lightbox-nav {margin:0;padding:0;}
.az-lightbox-nav button {
    position:fixed;
    top:50%;
    width:56px;
    height:64px;
    transform:translateY(-50%);
    font-size:56px;
    line-height:56px;
    text-shadow:0 1px 5px #000;
}
.az-lightbox-nav [data-step="-1"] {left:8px;}
.az-lightbox-nav [data-step="1"] {right:8px;}
.az-lightbox-nav span {position:absolute;right:0;bottom:0;font-size:12px;line-height:24px;}
.az-lightbox [hidden] {display:none!important;}
@media(max-width:600px) {
    .az-lightbox,.az-lightbox img {max-width:calc(100vw - 24px);}
    .az-lightbox-nav button {width:44px;font-size:48px;}
    .az-lightbox-nav [data-step="-1"] {left:0;}
    .az-lightbox-nav [data-step="1"] {right:0;}
}
@media(prefers-reduced-motion:reduce) {.az-lightbox {scroll-behavior:auto;}}

/* Existing TYPO3 spacing values, preserved from the live stylesheet. */
.frame-space-before-extra-small{margin-top:1em;}
.frame-space-before-small{margin-top:2em;}
.frame-space-before-medium{margin-top:3em;}
.frame-space-before-large{margin-top:4em;}
.frame-space-before-extra-large{margin-top:5em;}
.frame-space-after-extra-small{margin-bottom:1em;}
.frame-space-after-small{margin-bottom:2em;}
.frame-space-after-medium{margin-bottom:3em;}
.frame-space-after-large{margin-bottom:4em;}
.frame-space-after-extra-large{margin-bottom:5em;}

/* AZ-FOOTERLINKS: Footerlinks wie auf der bisherigen Webseite. */
.footer .frame-type-menu_pages .frame-inner > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer .frame-type-menu_pages .frame-inner > ul > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* AZ-CONTENT-LIGHTBOX-LABEL: accessible label, visually hidden. */
a.lightbox > .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
