/* Full-bleed background from the original Elementor gallery section, but only
   when explicitly present in the preserved JSON. No effect on other posts. */
.dmc-e2c-gallery-band {
    position: relative;
    isolation: isolate;
    padding-top: var(--dmc-e2c-band-top, 0px);
    padding-bottom: var(--dmc-e2c-band-bottom, 0px);
}
.dmc-e2c-gallery-band::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background-color: var(--dmc-e2c-band-bg, transparent);
    pointer-events: none;
}
/* The native WordPress [gallery] grid is styled by the theme. Only the viewer is ours. */
.dmc-e2c-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 16px;
    color: #fff;
    background: rgba(10, 14, 23, .91);
    -webkit-tap-highlight-color: transparent;
}
.dmc-e2c-lightbox[hidden] { display: none !important; }
.dmc-e2c-lightbox, .dmc-e2c-lightbox * { box-sizing: border-box; }
.dmc-e2c-lightbox__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1800px;
    height: 100%;
    max-height: 100%;
}
.dmc-e2c-lightbox__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}
.dmc-e2c-lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 40px rgba(0,0,0,.25);
}
.dmc-e2c-lightbox__image[hidden] { display: none; }
.dmc-e2c-lightbox__message {
    text-align: center;
    max-width: 38rem;
    font-size: 15px;
    line-height: 1.6;
    color: #fff;
}
.dmc-e2c-lightbox__message a { color: #fff; text-decoration: underline; }
.dmc-e2c-lightbox__message[hidden] { display: none; }
.dmc-e2c-lightbox__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    max-width: 100%;
    gap: 16px;
    padding: 8px 8px 0;
    font: 500 14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;
}
.dmc-e2c-lightbox__caption {
    overflow: hidden;
    max-width: min(70vw, 800px);
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #f4f4f4;
}
.dmc-e2c-lightbox__counter { color: #dedee2; white-space: nowrap; }
.dmc-e2c-lightbox__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    color: #fff;
    font: 400 29px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
    cursor: pointer;
    transition: background .15s ease;
}
.dmc-e2c-lightbox__button:hover { background: rgba(255,255,255,.21); }
.dmc-e2c-lightbox__button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.dmc-e2c-lightbox__button[hidden] { display: none; }
.dmc-e2c-lightbox__close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
}
.dmc-e2c-lightbox__stage { padding-top: 48px; }
@media (max-width: 600px) {
    .dmc-e2c-lightbox { padding: 8px; }
    .dmc-e2c-lightbox__close { top: 2px; right: 2px; }
    .dmc-e2c-lightbox__footer { min-height: 60px; gap: 10px; }
    .dmc-e2c-lightbox__caption { max-width: 45vw; }
    .dmc-e2c-lightbox__button { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .dmc-e2c-lightbox__button { transition: none; }
}
