:root {
    --mfg-focus-ring: var(--focus-ring, #ffbf47);
    --mfg-focus-ring-shadow: transparent;
    --mfg-hover-border: var(--pink-700, #a00044);
}

.mfg-gallery {
    --mfg-columns: 6;
    --mfg-focus-ring: var(--focus-ring, #ffbf47);
    --mfg-focus-ring-shadow: transparent;
    --mfg-hover-border: var(--pink-700, #a00044);
    display: grid;
    grid-template-columns: repeat(var(--mfg-columns), minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.mfg-gallery__item {
    margin: 0;
}

.mfg-gallery__link {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #f3f4f6;
    text-decoration: none;
}

.mfg-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center center;
    transition: transform 180ms ease;
}

.mfg-gallery__link:hover .mfg-gallery__image,
.mfg-gallery__link:focus .mfg-gallery__image {
    transform: scale(1.03);
}

.mfg-gallery__caption {
    margin-top: 8px;
    font-size: 0.925rem;
    line-height: 1.4;
    color: currentColor;
    opacity: 0.86;
}

.mfg-gallery__caption-title,
.mfg-gallery__caption-text {
    display: block;
}

.mfg-gallery__caption-title + .mfg-gallery__caption-text {
    margin-top: 2px;
}

.mfg-notice {
    padding: 12px 14px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.mfg-gallery-list-wrap {
    scroll-margin-top: 190px;
    margin: 44px 0 28px;
    padding-top: 14px;
}

.mfg-gallery-detail {
    scroll-margin-top: 190px;
    margin: 0 0 34px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.02);
}

.mfg-gallery-detail__header {
    margin: 0 0 22px;
}

.mfg-gallery-detail__title {
    margin: 0 0 10px;
    color: inherit;
    font-size: clamp(1.15rem, 1.6vw, 1.55rem);
    line-height: 1.25;
}

.mfg-gallery-detail__description {
    width: 100%;
    max-width: none;
    margin: 0;
    color: inherit;
    font-size: 1rem;
    line-height: 1.65;
    text-align: left;
    opacity: 0.9;
}

.mfg-gallery-detail__description p,
.mfg-gallery-detail__description div,
.mfg-gallery-detail__description blockquote,
.mfg-gallery-detail__description ul,
.mfg-gallery-detail__description ol {
    max-width: none;
}

.mfg-gallery-detail__description blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 4px solid currentColor;
}

.mfg-gallery-detail__description hr {
    border: 0;
    border-top: 1px solid currentColor;
    margin: 1em 0;
    opacity: 0.35;
}

.mfg-gallery-detail__back {
    margin: 26px 0 0;
}

.mfg-gallery-detail__back--bottom {
    padding-top: 12px;
}

.mfg-gallery-detail__back a,
.mfg-gallery-detail__back a:link,
.mfg-gallery-detail__back a:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid #155DB8;
    border-radius: 999px;
    background: #155DB8;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: 0 8px 22px rgba(21, 93, 184, 0.22);
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.mfg-gallery-detail__back a:hover,
.mfg-gallery-detail__back a:focus {
    transform: translateY(-2px);
    border-color: var(--mfg-hover-border, var(--pink-700, #a00044));
    background: var(--mfg-hover-border, var(--pink-700, #a00044));
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 12px 28px rgba(160, 0, 68, 0.22);
}

.mfg-gallery-detail__back a:focus-visible {
    outline: 3px solid var(--mfg-focus-ring, var(--focus-ring, #ffbf47));
    outline-offset: 3px;
}

.mfg-gallery-list {
    --mfg-list-columns: 5;
    display: grid;
    grid-template-columns: repeat(var(--mfg-list-columns), minmax(0, 1fr));
    gap: 18px;
    margin-top: 6px;
}

.mfg-gallery-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100%;
    border: 2px solid var(--mfg-card-border, var(--border, #d9e3f2));
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mfg-gallery-card:hover {
    transform: translateY(-4px);
    border-color: var(--mfg-hover-border, var(--pink-700, #a00044));
    box-shadow: 0 16px 36px rgba(160, 0, 68, 0.14);
}

.mfg-gallery-card:focus-within {
    transform: translateY(-4px);
    border-color: var(--mfg-hover-border, var(--pink-700, #a00044));
    box-shadow: 0 0 0 4px var(--mfg-focus-ring, var(--focus-ring, #ffbf47));
}

.mfg-gallery-card__link,
.mfg-gallery-card__link:link,
.mfg-gallery-card__link:visited,
.mfg-gallery-card__link:hover,
.mfg-gallery-card__link:focus,
.mfg-gallery-card__link:active {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 100%;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    text-decoration: none !important;
    text-shadow: none !important;
}

.mfg-gallery-card__link:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.mfg-gallery-card__thumb {
    display: block;
    overflow: hidden;
    background: #f3f4f6;
    text-decoration: none;
}

.mfg-gallery-card__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 180ms ease;
}

.mfg-gallery-card:hover .mfg-gallery-card__image,
.mfg-gallery-card:focus-within .mfg-gallery-card__image {
    transform: scale(1.04);
}

.mfg-gallery-card__placeholder {
    display: grid;
    place-items: center;
    min-height: 180px;
    color: #666;
}

.mfg-gallery-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.mfg-gallery-card__date {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    line-height: 1.3;
    opacity: 0.72;
}

.mfg-gallery-card__title {
    display: block;
    margin: 0 0 8px;
    color: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.mfg-gallery-card__description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.45;
    opacity: 0.82;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

/* Režim pro slabozraké zapíná pouze frontend JS přes třídu mfg-a11y-mode. */
html.mfg-a11y-mode .mfg-gallery-card,
body.mfg-a11y-mode .mfg-gallery-card {
    background: #fff !important;
    border: 2px solid #000 !important;
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    box-shadow: none !important;
}

html.mfg-a11y-mode .mfg-gallery-card:hover,
html.mfg-a11y-mode .mfg-gallery-card:focus-within,
body.mfg-a11y-mode .mfg-gallery-card:hover,
body.mfg-a11y-mode .mfg-gallery-card:focus-within {
    transform: translateY(-3px);
    border-color: #000 !important;
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px #000 !important;
}

html.mfg-a11y-mode .mfg-gallery-card__link,
html.mfg-a11y-mode .mfg-gallery-card__link:link,
html.mfg-a11y-mode .mfg-gallery-card__link:visited,
html.mfg-a11y-mode .mfg-gallery-card__link:hover,
html.mfg-a11y-mode .mfg-gallery-card__link:focus,
html.mfg-a11y-mode .mfg-gallery-card__link:active,
body.mfg-a11y-mode .mfg-gallery-card__link,
body.mfg-a11y-mode .mfg-gallery-card__link:link,
body.mfg-a11y-mode .mfg-gallery-card__link:visited,
body.mfg-a11y-mode .mfg-gallery-card__link:hover,
body.mfg-a11y-mode .mfg-gallery-card__link:focus,
body.mfg-a11y-mode .mfg-gallery-card__link:active {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    text-decoration: none !important;
}

html.mfg-a11y-mode .mfg-gallery-card__date,
body.mfg-a11y-mode .mfg-gallery-card__date {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 7px;
    border-radius: 4px;
    background: #000 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 1 !important;
}

html.mfg-a11y-mode .mfg-gallery-card__title,
html.mfg-a11y-mode .mfg-gallery-card__description,
body.mfg-a11y-mode .mfg-gallery-card__title,
body.mfg-a11y-mode .mfg-gallery-card__description {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    opacity: 1 !important;
}

html.mfg-a11y-mode .mfg-gallery-card__link:focus-visible,
body.mfg-a11y-mode .mfg-gallery-card__link:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

html.mfg-a11y-mode .mfg-gallery-detail__description,
body.mfg-a11y-mode .mfg-gallery-detail__description {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    opacity: 1 !important;
}

html.mfg-a11y-mode .mfg-gallery-detail__back a,
html.mfg-a11y-mode .mfg-gallery-detail__back a:link,
html.mfg-a11y-mode .mfg-gallery-detail__back a:visited,
body.mfg-a11y-mode .mfg-gallery-detail__back a,
body.mfg-a11y-mode .mfg-gallery-detail__back a:link,
body.mfg-a11y-mode .mfg-gallery-detail__back a:visited {
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: none !important;
}

html.mfg-a11y-mode .mfg-gallery-detail__back a:hover,
html.mfg-a11y-mode .mfg-gallery-detail__back a:focus,
body.mfg-a11y-mode .mfg-gallery-detail__back a:hover,
body.mfg-a11y-mode .mfg-gallery-detail__back a:focus {
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px #000 !important;
}

.mfg-gallery-pagination {
    margin-top: 28px;
}

.mfg-gallery-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mfg-gallery-pagination a,
.mfg-gallery-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 11px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 999px;
    background: #fff;
    color: #111 !important;
    text-decoration: none !important;
    text-shadow: none !important;
}

.mfg-gallery-pagination .current {
    font-weight: 700;
    background: #155DB8;
    border-color: #155DB8;
    color: #fff !important;
}

.mfg-gallery-pagination__disabled,
.mfg-gallery-pagination__dots {
    opacity: 0.42;
}

.mfg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 42px 24px;
    background: rgba(0, 0, 0, 0.78);
}

html.mfg-lightbox-open,
body.mfg-lightbox-open {
    overflow: hidden !important;
}

.mfg-lightbox.is-open {
    display: flex;
}

.mfg-lightbox__frame {
    position: relative;
    box-sizing: border-box;
    width: auto;
    max-width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 84px);
    padding: 8px 8px 0;
    border: 0;
    background: #fff;
    color: #222;
    box-shadow: 0 16px 55px rgba(0, 0, 0, 0.45);
}

.mfg-lightbox__image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.mfg-lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(1164px, calc(100vw - 64px));
    max-height: calc(100vh - 148px);
    margin: 0 auto;
    object-fit: contain;
    object-position: center center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.mfg-lightbox__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    min-height: 42px;
    padding: 6px 0 8px;
    background: #fff;
    color: #555;
    line-height: 1.15;
    text-align: left;
}

.mfg-lightbox__meta {
    min-width: 0;
    padding-left: 2px;
}

.mfg-lightbox__title {
    overflow: hidden;
    max-width: 70vw;
    color: #555;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mfg-lightbox__count {
    margin-top: 1px;
    color: #777;
    font-size: 11px;
    line-height: 1.1;
}

.mfg-lightbox__nav,
.mfg-lightbox__close {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #606060 !important;
    -webkit-text-fill-color: #606060 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    text-decoration: none !important;
    text-shadow: none !important;
}

.mfg-lightbox__nav:hover,
.mfg-lightbox__nav:focus,
.mfg-lightbox__close:hover,
.mfg-lightbox__close:focus {
    background: #fff !important;
    color: #222 !important;
    -webkit-text-fill-color: #222 !important;
}

.mfg-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    min-width: 96px;
    min-height: 36px;
    padding: 9px 12px;
    font-size: 12px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, background-color 180ms ease, color 180ms ease;
}

.mfg-lightbox__image-wrap:hover .mfg-lightbox__nav,
.mfg-lightbox__image-wrap:focus-within .mfg-lightbox__nav,
.mfg-lightbox__nav:focus {
    opacity: 1;
    pointer-events: auto;
    transition-duration: 700ms, 180ms, 180ms;
}

.mfg-lightbox__prev {
    left: 0;
}

.mfg-lightbox__next {
    right: 0;
}

.mfg-lightbox__close {
    flex: 0 0 auto;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent !important;
    box-shadow: none;
    font-size: 12px;
    line-height: 1;
}

.mfg-lightbox__close span {
    color: #606060 !important;
    -webkit-text-fill-color: #606060 !important;
    font-size: 24px;
    line-height: 0.8;
}



/* Základní čitelnost detailu a karet i při zásazích šablony / tmavém režimu. */
.mfg-gallery-detail {
    background: #fff;
    border-color: #d9e3f2;
    color: #1f2937;
    box-shadow: none;
}

.mfg-gallery-detail__title {
    color: #1f3b74;
    font-size: clamp(1.15rem, 1.6vw, 1.55rem);
}

.mfg-gallery-detail__description,
.mfg-gallery-detail__description p,
.mfg-gallery-detail__description div,
.mfg-gallery-detail__description span,
.mfg-gallery-detail__description li {
    color: #334155;
    -webkit-text-fill-color: currentColor;
    opacity: 1;
}

.mfg-gallery-card {
    color: #1f2937;
}

.mfg-gallery-card__date {
    color: #64748b;
    opacity: 1;
}

.mfg-gallery-card__title {
    color: #1f3b74;
}

.mfg-gallery-card__description {
    color: #475569;
    opacity: 1;
}

html[data-theme="dark"] .mfg-gallery-detail,
body[data-theme="dark"] .mfg-gallery-detail,
html.dark-mode .mfg-gallery-detail,
body.dark-mode .mfg-gallery-detail,
html.theme-dark .mfg-gallery-detail,
body.theme-dark .mfg-gallery-detail,
html.is-dark-theme .mfg-gallery-detail,
body.is-dark-theme .mfg-gallery-detail {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: none;
}

html[data-theme="dark"] .mfg-gallery-detail__title,
body[data-theme="dark"] .mfg-gallery-detail__title,
html.dark-mode .mfg-gallery-detail__title,
body.dark-mode .mfg-gallery-detail__title,
html.theme-dark .mfg-gallery-detail__title,
body.theme-dark .mfg-gallery-detail__title,
html.is-dark-theme .mfg-gallery-detail__title,
body.is-dark-theme .mfg-gallery-detail__title {
    color: #fff;
}

html[data-theme="dark"] .mfg-gallery-detail__description,
html[data-theme="dark"] .mfg-gallery-detail__description p,
html[data-theme="dark"] .mfg-gallery-detail__description div,
html[data-theme="dark"] .mfg-gallery-detail__description span,
html[data-theme="dark"] .mfg-gallery-detail__description li,
body[data-theme="dark"] .mfg-gallery-detail__description,
body[data-theme="dark"] .mfg-gallery-detail__description p,
body[data-theme="dark"] .mfg-gallery-detail__description div,
body[data-theme="dark"] .mfg-gallery-detail__description span,
body[data-theme="dark"] .mfg-gallery-detail__description li,
html.dark-mode .mfg-gallery-detail__description,
html.dark-mode .mfg-gallery-detail__description p,
html.dark-mode .mfg-gallery-detail__description div,
html.dark-mode .mfg-gallery-detail__description span,
html.dark-mode .mfg-gallery-detail__description li,
body.dark-mode .mfg-gallery-detail__description,
body.dark-mode .mfg-gallery-detail__description p,
body.dark-mode .mfg-gallery-detail__description div,
body.dark-mode .mfg-gallery-detail__description span,
body.dark-mode .mfg-gallery-detail__description li,
html.theme-dark .mfg-gallery-detail__description,
html.theme-dark .mfg-gallery-detail__description p,
html.theme-dark .mfg-gallery-detail__description div,
html.theme-dark .mfg-gallery-detail__description span,
html.theme-dark .mfg-gallery-detail__description li,
body.theme-dark .mfg-gallery-detail__description,
body.theme-dark .mfg-gallery-detail__description p,
body.theme-dark .mfg-gallery-detail__description div,
body.theme-dark .mfg-gallery-detail__description span,
body.theme-dark .mfg-gallery-detail__description li,
html.is-dark-theme .mfg-gallery-detail__description,
html.is-dark-theme .mfg-gallery-detail__description p,
html.is-dark-theme .mfg-gallery-detail__description div,
html.is-dark-theme .mfg-gallery-detail__description span,
html.is-dark-theme .mfg-gallery-detail__description li,
body.is-dark-theme .mfg-gallery-detail__description,
body.is-dark-theme .mfg-gallery-detail__description p,
body.is-dark-theme .mfg-gallery-detail__description div,
body.is-dark-theme .mfg-gallery-detail__description span,
body.is-dark-theme .mfg-gallery-detail__description li {
    color: rgba(255, 255, 255, 0.94) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.94) !important;
}

@media (max-width: 900px) {
    .mfg-gallery {
        grid-template-columns: repeat(min(var(--mfg-columns), 2), minmax(0, 1fr));
    }

    .mfg-gallery-list {
        grid-template-columns: repeat(min(var(--mfg-list-columns), 2), minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .mfg-gallery,
    .mfg-gallery-list {
        grid-template-columns: 1fr;
    }

    .mfg-gallery-detail {
        padding: 14px;
    }

    .mfg-lightbox {
        padding: 18px 10px;
    }

    .mfg-lightbox__frame {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 36px);
    }

    .mfg-lightbox__image {
        max-width: calc(100vw - 36px);
        max-height: calc(100vh - 108px);
    }

    .mfg-lightbox__footer {
        gap: 10px;
    }

    .mfg-lightbox__title {
        max-width: 55vw;
    }

    .mfg-lightbox__nav {
        min-width: 84px;
        min-height: 32px;
        padding: 7px 8px;
        font-size: 11px;
    }

    .mfg-lightbox__prev {
        left: 0;
    }

    .mfg-lightbox__next {
        right: 0;
    }
}

@media (hover: none) {
    .mfg-lightbox__nav {
        opacity: 1;
        pointer-events: auto;
    }
}


/* Firelight / Easy FancyBox doplněk: větší klikací zóny a české šipky. */
#fancybox-left,
#fancybox-right {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 42px !important;
    width: 50% !important;
    height: auto !important;
    background: transparent !important;
    cursor: pointer !important;
}

#fancybox-left {
    left: 0 !important;
}

#fancybox-right {
    right: 0 !important;
}

#fancybox-left-ico,
#fancybox-right-ico,
#fancybox-left span,
#fancybox-right span {
    top: 42% !important;
    margin-top: 0 !important;
    min-width: 82px !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 10px !important;
    border-radius: 2px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #606060 !important;
    -webkit-text-fill-color: #606060 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-indent: 0 !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16) !important;
    opacity: 0 !important;
    transition: opacity 160ms ease !important;
}

#fancybox-left-ico,
#fancybox-left span {
    left: 0 !important;
    margin-left: 0 !important;
}

#fancybox-right-ico,
#fancybox-right span {
    right: 0 !important;
    left: auto !important;
    margin-left: 0 !important;
}

#fancybox-content:hover #fancybox-left-ico,
#fancybox-content:hover #fancybox-right-ico,
#fancybox-left:hover #fancybox-left-ico,
#fancybox-right:hover #fancybox-right-ico,
#fancybox-left:focus #fancybox-left-ico,
#fancybox-right:focus #fancybox-right-ico,
#fancybox-left:hover span,
#fancybox-right:hover span,
#fancybox-left:focus span,
#fancybox-right:focus span {
    opacity: 1 !important;
    transition-duration: 700ms !important;
}

@media (hover: none) {
    #fancybox-left-ico,
    #fancybox-right-ico,
    #fancybox-left span,
    #fancybox-right span {
        opacity: 1 !important;
    }
}


/* Datumové štítky v režimu pro slabozraké – i mimo samotnou fotogalerii. */
html.mfg-a11y-mode [class*="date"][class*="badge"],
html.mfg-a11y-mode [class*="date"][class*="box"],
html.mfg-a11y-mode [class*="date"][class*="label"],
html.mfg-a11y-mode [class*="post-date"],
html.mfg-a11y-mode [class*="event-date"],
html.mfg-a11y-mode .entry-date,
body.mfg-a11y-mode [class*="date"][class*="badge"],
body.mfg-a11y-mode [class*="date"][class*="box"],
body.mfg-a11y-mode [class*="date"][class*="label"],
body.mfg-a11y-mode [class*="post-date"],
body.mfg-a11y-mode [class*="event-date"],
body.mfg-a11y-mode .entry-date {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border-color: #000 !important;
    text-shadow: none !important;
}

html.mfg-a11y-mode [class*="date"][class*="badge"] *,
html.mfg-a11y-mode [class*="date"][class*="box"] *,
html.mfg-a11y-mode [class*="date"][class*="label"] *,
html.mfg-a11y-mode [class*="post-date"] *,
html.mfg-a11y-mode [class*="event-date"] *,
html.mfg-a11y-mode .entry-date *,
body.mfg-a11y-mode [class*="date"][class*="badge"] *,
body.mfg-a11y-mode [class*="date"][class*="box"] *,
body.mfg-a11y-mode [class*="date"][class*="label"] *,
body.mfg-a11y-mode [class*="post-date"] *,
body.mfg-a11y-mode [class*="event-date"] *,
body.mfg-a11y-mode .entry-date * {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
}


@media (forced-colors: active) {
    .mfg-gallery-card:focus-within {
        border-color: Highlight !important;
        box-shadow: none !important;
    }

    .mfg-gallery-card__link:focus-visible,
    html.mfg-a11y-mode .mfg-gallery-card__link:focus-visible,
    body.mfg-a11y-mode .mfg-gallery-card__link:focus-visible,
    .mfg-lightbox__nav:focus,
    .mfg-lightbox__close:focus {
        outline: 3px solid Highlight !important;
        outline-offset: 3px !important;
        box-shadow: none !important;
    }
}

/* === v2.3.5 Lightbox: kliknutí na levou/pravou polovinu fotografie === */
#fancybox-left,
#fancybox-right {
    z-index: 1102 !important;
    pointer-events: auto !important;
}

#fancybox-left:focus-visible,
#fancybox-right:focus-visible,
.slb_prev:focus-visible,
.slb_next:focus-visible,
.featherlight-previous:focus-visible,
.featherlight-next:focus-visible {
    outline: 3px solid var(--mfg-focus-ring, var(--focus-ring, #ffbf47)) !important;
    outline-offset: -6px !important;
}

.mfg-lightbox__image,
.fancybox-image,
.fancybox__image,
#fancybox-img,
.slb_viewer_wrap img,
.featherlight-image {
    cursor: pointer;
}


/* 2.3.9: Detail otevřené galerie v tmavém / kontrastním režimu: černé pozadí, bílý text. */
html.mfg-a11y-mode .mfg-gallery-detail,
body.mfg-a11y-mode .mfg-gallery-detail,
html[data-theme="dark"] .mfg-gallery-detail,
body[data-theme="dark"] .mfg-gallery-detail,
html.dark-mode .mfg-gallery-detail,
body.dark-mode .mfg-gallery-detail,
html.theme-dark .mfg-gallery-detail,
body.theme-dark .mfg-gallery-detail,
html.is-dark-theme .mfg-gallery-detail,
body.is-dark-theme .mfg-gallery-detail,
html.tmavy-rezim .mfg-gallery-detail,
body.tmavy-rezim .mfg-gallery-detail,
html.dark-active .mfg-gallery-detail,
body.dark-active .mfg-gallery-detail,
html.high-contrast .mfg-gallery-detail,
body.high-contrast .mfg-gallery-detail,
html.contrast-active .mfg-gallery-detail,
body.contrast-active .mfg-gallery-detail,
html.is-contrast .mfg-gallery-detail,
body.is-contrast .mfg-gallery-detail,
html.accessibility-contrast .mfg-gallery-detail,
body.accessibility-contrast .mfg-gallery-detail {
    background: #000 !important;
    background-color: #000 !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: none !important;
}

html.mfg-a11y-mode .mfg-gallery-detail__title,
body.mfg-a11y-mode .mfg-gallery-detail__title,
html.mfg-a11y-mode .mfg-gallery-detail__description,
body.mfg-a11y-mode .mfg-gallery-detail__description,
html.mfg-a11y-mode .mfg-gallery-detail__description *,
body.mfg-a11y-mode .mfg-gallery-detail__description *,
html.mfg-a11y-mode .mfg-gallery-detail .mfg-gallery__caption,
body.mfg-a11y-mode .mfg-gallery-detail .mfg-gallery__caption,
html.mfg-a11y-mode .mfg-gallery-detail .mfg-gallery__caption *,
body.mfg-a11y-mode .mfg-gallery-detail .mfg-gallery__caption *,
html[data-theme="dark"] .mfg-gallery-detail__title,
body[data-theme="dark"] .mfg-gallery-detail__title,
html[data-theme="dark"] .mfg-gallery-detail__description,
body[data-theme="dark"] .mfg-gallery-detail__description,
html[data-theme="dark"] .mfg-gallery-detail__description *,
body[data-theme="dark"] .mfg-gallery-detail__description *,
html[data-theme="dark"] .mfg-gallery-detail .mfg-gallery__caption,
body[data-theme="dark"] .mfg-gallery-detail .mfg-gallery__caption,
html[data-theme="dark"] .mfg-gallery-detail .mfg-gallery__caption *,
body[data-theme="dark"] .mfg-gallery-detail .mfg-gallery__caption *,
html.dark-mode .mfg-gallery-detail__title,
body.dark-mode .mfg-gallery-detail__title,
html.dark-mode .mfg-gallery-detail__description,
body.dark-mode .mfg-gallery-detail__description,
html.dark-mode .mfg-gallery-detail__description *,
body.dark-mode .mfg-gallery-detail__description *,
html.dark-mode .mfg-gallery-detail .mfg-gallery__caption,
body.dark-mode .mfg-gallery-detail .mfg-gallery__caption,
html.dark-mode .mfg-gallery-detail .mfg-gallery__caption *,
body.dark-mode .mfg-gallery-detail .mfg-gallery__caption *,
html.theme-dark .mfg-gallery-detail__title,
body.theme-dark .mfg-gallery-detail__title,
html.theme-dark .mfg-gallery-detail__description,
body.theme-dark .mfg-gallery-detail__description,
html.theme-dark .mfg-gallery-detail__description *,
body.theme-dark .mfg-gallery-detail__description *,
html.theme-dark .mfg-gallery-detail .mfg-gallery__caption,
body.theme-dark .mfg-gallery-detail .mfg-gallery__caption,
html.theme-dark .mfg-gallery-detail .mfg-gallery__caption *,
body.theme-dark .mfg-gallery-detail .mfg-gallery__caption *,
html.is-dark-theme .mfg-gallery-detail__title,
body.is-dark-theme .mfg-gallery-detail__title,
html.is-dark-theme .mfg-gallery-detail__description,
body.is-dark-theme .mfg-gallery-detail__description,
html.is-dark-theme .mfg-gallery-detail__description *,
body.is-dark-theme .mfg-gallery-detail__description *,
html.is-dark-theme .mfg-gallery-detail .mfg-gallery__caption,
body.is-dark-theme .mfg-gallery-detail .mfg-gallery__caption,
html.is-dark-theme .mfg-gallery-detail .mfg-gallery__caption *,
body.is-dark-theme .mfg-gallery-detail .mfg-gallery__caption *,
html.tmavy-rezim .mfg-gallery-detail__title,
body.tmavy-rezim .mfg-gallery-detail__title,
html.tmavy-rezim .mfg-gallery-detail__description,
body.tmavy-rezim .mfg-gallery-detail__description,
html.tmavy-rezim .mfg-gallery-detail__description *,
body.tmavy-rezim .mfg-gallery-detail__description *,
html.tmavy-rezim .mfg-gallery-detail .mfg-gallery__caption,
body.tmavy-rezim .mfg-gallery-detail .mfg-gallery__caption,
html.tmavy-rezim .mfg-gallery-detail .mfg-gallery__caption *,
body.tmavy-rezim .mfg-gallery-detail .mfg-gallery__caption *,
html.dark-active .mfg-gallery-detail__title,
body.dark-active .mfg-gallery-detail__title,
html.dark-active .mfg-gallery-detail__description,
body.dark-active .mfg-gallery-detail__description,
html.dark-active .mfg-gallery-detail__description *,
body.dark-active .mfg-gallery-detail__description *,
html.dark-active .mfg-gallery-detail .mfg-gallery__caption,
body.dark-active .mfg-gallery-detail .mfg-gallery__caption,
html.dark-active .mfg-gallery-detail .mfg-gallery__caption *,
body.dark-active .mfg-gallery-detail .mfg-gallery__caption *,
html.high-contrast .mfg-gallery-detail__title,
body.high-contrast .mfg-gallery-detail__title,
html.high-contrast .mfg-gallery-detail__description,
body.high-contrast .mfg-gallery-detail__description,
html.high-contrast .mfg-gallery-detail__description *,
body.high-contrast .mfg-gallery-detail__description *,
html.high-contrast .mfg-gallery-detail .mfg-gallery__caption,
body.high-contrast .mfg-gallery-detail .mfg-gallery__caption,
html.high-contrast .mfg-gallery-detail .mfg-gallery__caption *,
body.high-contrast .mfg-gallery-detail .mfg-gallery__caption *,
html.contrast-active .mfg-gallery-detail__title,
body.contrast-active .mfg-gallery-detail__title,
html.contrast-active .mfg-gallery-detail__description,
body.contrast-active .mfg-gallery-detail__description,
html.contrast-active .mfg-gallery-detail__description *,
body.contrast-active .mfg-gallery-detail__description *,
html.contrast-active .mfg-gallery-detail .mfg-gallery__caption,
body.contrast-active .mfg-gallery-detail .mfg-gallery__caption,
html.contrast-active .mfg-gallery-detail .mfg-gallery__caption *,
body.contrast-active .mfg-gallery-detail .mfg-gallery__caption *,
html.is-contrast .mfg-gallery-detail__title,
body.is-contrast .mfg-gallery-detail__title,
html.is-contrast .mfg-gallery-detail__description,
body.is-contrast .mfg-gallery-detail__description,
html.is-contrast .mfg-gallery-detail__description *,
body.is-contrast .mfg-gallery-detail__description *,
html.is-contrast .mfg-gallery-detail .mfg-gallery__caption,
body.is-contrast .mfg-gallery-detail .mfg-gallery__caption,
html.is-contrast .mfg-gallery-detail .mfg-gallery__caption *,
body.is-contrast .mfg-gallery-detail .mfg-gallery__caption *,
html.accessibility-contrast .mfg-gallery-detail__title,
body.accessibility-contrast .mfg-gallery-detail__title,
html.accessibility-contrast .mfg-gallery-detail__description,
body.accessibility-contrast .mfg-gallery-detail__description,
html.accessibility-contrast .mfg-gallery-detail__description *,
body.accessibility-contrast .mfg-gallery-detail__description *,
html.accessibility-contrast .mfg-gallery-detail .mfg-gallery__caption,
body.accessibility-contrast .mfg-gallery-detail .mfg-gallery__caption,
html.accessibility-contrast .mfg-gallery-detail .mfg-gallery__caption *,
body.accessibility-contrast .mfg-gallery-detail .mfg-gallery__caption * {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html.mfg-a11y-mode .mfg-gallery-detail__title,
body.mfg-a11y-mode .mfg-gallery-detail__title,
html[data-theme="dark"] .mfg-gallery-detail__title,
body[data-theme="dark"] .mfg-gallery-detail__title,
html.dark-mode .mfg-gallery-detail__title,
body.dark-mode .mfg-gallery-detail__title,
html.theme-dark .mfg-gallery-detail__title,
body.theme-dark .mfg-gallery-detail__title,
html.is-dark-theme .mfg-gallery-detail__title,
body.is-dark-theme .mfg-gallery-detail__title,
html.tmavy-rezim .mfg-gallery-detail__title,
body.tmavy-rezim .mfg-gallery-detail__title,
html.dark-active .mfg-gallery-detail__title,
body.dark-active .mfg-gallery-detail__title,
html.high-contrast .mfg-gallery-detail__title,
body.high-contrast .mfg-gallery-detail__title,
html.contrast-active .mfg-gallery-detail__title,
body.contrast-active .mfg-gallery-detail__title,
html.is-contrast .mfg-gallery-detail__title,
body.is-contrast .mfg-gallery-detail__title,
html.accessibility-contrast .mfg-gallery-detail__title,
body.accessibility-contrast .mfg-gallery-detail__title {
    display: block !important;
    margin-bottom: 12px !important;
    font-size: clamp(1.25rem, 1.9vw, 1.6rem) !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
}

html.mfg-a11y-mode .mfg-gallery-detail .mfg-gallery__caption,
body.mfg-a11y-mode .mfg-gallery-detail .mfg-gallery__caption,
html[data-theme="dark"] .mfg-gallery-detail .mfg-gallery__caption,
body[data-theme="dark"] .mfg-gallery-detail .mfg-gallery__caption,
html.dark-mode .mfg-gallery-detail .mfg-gallery__caption,
body.dark-mode .mfg-gallery-detail .mfg-gallery__caption,
html.theme-dark .mfg-gallery-detail .mfg-gallery__caption,
body.theme-dark .mfg-gallery-detail .mfg-gallery__caption,
html.is-dark-theme .mfg-gallery-detail .mfg-gallery__caption,
body.is-dark-theme .mfg-gallery-detail .mfg-gallery__caption,
html.tmavy-rezim .mfg-gallery-detail .mfg-gallery__caption,
body.tmavy-rezim .mfg-gallery-detail .mfg-gallery__caption,
html.dark-active .mfg-gallery-detail .mfg-gallery__caption,
body.dark-active .mfg-gallery-detail .mfg-gallery__caption,
html.high-contrast .mfg-gallery-detail .mfg-gallery__caption,
body.high-contrast .mfg-gallery-detail .mfg-gallery__caption,
html.contrast-active .mfg-gallery-detail .mfg-gallery__caption,
body.contrast-active .mfg-gallery-detail .mfg-gallery__caption,
html.is-contrast .mfg-gallery-detail .mfg-gallery__caption,
body.is-contrast .mfg-gallery-detail .mfg-gallery__caption,
html.accessibility-contrast .mfg-gallery-detail .mfg-gallery__caption,
body.accessibility-contrast .mfg-gallery-detail .mfg-gallery__caption {
    margin-top: 9px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}


/* Formátovaný krátký popis galerie z WYSIWYG editoru. */
.mfg-gallery-detail__description > :first-child {
    margin-top: 0;
}

.mfg-gallery-detail__description > :last-child {
    margin-bottom: 0;
}

.mfg-gallery-detail__description p,
.mfg-gallery-detail__description ul,
.mfg-gallery-detail__description ol {
    margin: 0 0 0.85em;
}

.mfg-gallery-detail__description ul,
.mfg-gallery-detail__description ol {
    padding-left: 1.5em;
}

.mfg-gallery-detail__description a {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

/* Krátký popis detailu galerie se necentruje natvrdo.
   Výchozí zarovnání je vlevo, ale inline zarovnání uložené z editoru má na výstupu prioritu. */
.mfg-gallery-detail__header,
.mfg-gallery-detail__description {
    text-align: left !important;
}

.mfg-gallery-detail__description [style*="text-align: left"] {
    text-align: left !important;
}

.mfg-gallery-detail__description [style*="text-align: center"] {
    text-align: center !important;
}

.mfg-gallery-detail__description [style*="text-align: right"] {
    text-align: right !important;
}

.mfg-gallery-detail__description [style*="text-align: justify"] {
    text-align: justify !important;
}


/* Styly uložené z editoru krátkého popisu mají v běžném režimu přednost před výchozí barvou pluginu. */
.mfg-gallery-detail__description [style*="color"] {
    -webkit-text-fill-color: currentColor;
}

.mfg-gallery-detail__description [style*="background-color"] {
    padding: 0.05em 0.15em;
    border-radius: 0.18em;
}

/* 2.5.7: accessible, quiet lock marker overlay on the cover, not an oversized text badge. */
.mfg-gallery-card__thumb{position:relative;isolation:isolate}
.mfg-gallery-card__lock{position:absolute;right:9px;bottom:9px;display:flex;align-items:center;justify-content:center;width:31px;height:31px;border-radius:9px;background:#d4394f;color:#fff;box-shadow:0 4px 12px rgba(143,18,39,.26);border:1px solid #ab2539;z-index:1}
.mfg-gallery-card__lock svg{display:block;width:19px;height:19px;flex:none;stroke:currentColor;fill:none}
.mfg-protected-label{display:block;margin-top:5px;font-size:.81rem;line-height:1.45;color:#4b5866;font-weight:500}
.mfg-gallery-detail{background:#fff;border-color:#cbd7e2}
@media (forced-colors:active){.mfg-gallery-card__lock{background:Canvas;color:CanvasText;border:2px solid CanvasText}}

/* Access state: authenticated gallery */
.mfg-gallery-card__lock--open{background:#20884a;color:#fff;border-color:#176938;box-shadow:0 4px 12px rgba(19,96,49,.24)}

/* 2.5.14 – uložené formátování WYSIWYG v detailu galerie. */
.mfg-gallery-detail .mfg-gallery-detail__description :is(h1,h2,h3,h4,h5,h6) {
  font-weight:700; line-height:1.3; margin:.6em 0 .35em; opacity:1;
}
.mfg-gallery-detail .mfg-gallery-detail__description h1 { font-size:2rem; }
.mfg-gallery-detail .mfg-gallery-detail__description h2 { font-size:1.75rem; }
.mfg-gallery-detail .mfg-gallery-detail__description h3 { font-size:1.5rem; }
.mfg-gallery-detail .mfg-gallery-detail__description h4 { font-size:1.3rem; }
.mfg-gallery-detail .mfg-gallery-detail__description h5 { font-size:1.15rem; }
.mfg-gallery-detail .mfg-gallery-detail__description h6 { font-size:1.05rem; }
.mfg-gallery-detail__description [style*="text-align:center"],
.mfg-gallery-detail__description [style*="text-align: center"] { text-align:center!important; }
.mfg-gallery-detail__description [style*="text-align:right"],
.mfg-gallery-detail__description [style*="text-align: right"] { text-align:right!important; }
.mfg-gallery-detail__description [style*="text-align:justify"],
.mfg-gallery-detail__description [style*="text-align: justify"] { text-align:justify!important; }
/* Nezasahovat do velikostí uložených inline; při vysokém kontrastu zůstává rozhodující čitelnost. */

/* Zarovnání vygenerované TinyMCE (class=aligncenter/alignright). */
.mfg-gallery-detail__description .aligncenter { text-align:center!important; }
.mfg-gallery-detail__description .alignright { text-align:right!important; }
.mfg-gallery-detail__description .alignleft { text-align:left!important; }
.mfg-gallery-detail__description .alignjustify { text-align:justify!important; }

/* 2.5.49: visible keyboard focus on each individual photograph. */
.mfg-gallery .mfg-gallery__item > a.mfg-gallery__link {display:block;position:relative;border-radius:12px;}
.mfg-gallery .mfg-gallery__item > a.mfg-gallery__link:focus-visible {outline:3px solid var(--focus-ring,#ffbf47)!important;outline-offset:3px!important;box-shadow:0 0 0 3px var(--focus-ring-shadow,rgba(31,41,55,.95))!important;z-index:2;}
:is(body.high-contrast,html.zsams-high-contrast-early body) .mfg-gallery .mfg-gallery__item > a.mfg-gallery__link:focus-visible {outline:3px solid #ffff00!important;outline-offset:3px!important;box-shadow:0 0 0 3px #000!important;}
@media(forced-colors:active) {.mfg-gallery .mfg-gallery__item > a.mfg-gallery__link:focus-visible {outline:3px solid Highlight!important;box-shadow:none!important;}}

.mfg-gallery-card__lock{background:#23394d;color:#fff;border-color:#23394d}
.mfg-gallery-card__lock[hidden],.mfg-gallery-card__lock--open{display:none!important}

/* 2.5.62: compact logout next to the title of an opened protected gallery. */
.mfg-gallery-detail__title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.mfg-gallery-detail__title-row .mfg-parent-session{margin-left:auto;flex:none}
.mfg-gallery-detail__title-row .mfg-parent-session[hidden],.mfg-gallery-detail__title-row .mfg-parent-session [hidden]{display:none!important}
.mfg-gallery-detail__title-row .mfg-parent-logout{margin:0;display:flex}
.mfg-gallery-detail__title-row .mfg-parent-logout button{background:#b91c35!important;color:#fff!important;border:1px solid #b91c35!important;border-radius:9px;min-height:36px;padding:6px 12px;font-size:.875rem;font-weight:700;cursor:pointer}
@media(hover:hover){.mfg-gallery-detail__title-row .mfg-parent-logout button:hover{background:#88132a!important;border-color:#88132a!important;color:#fff!important;text-decoration:underline}}
.mfg-gallery-detail__title-row .mfg-parent-logout button:focus-visible{outline:3px solid #ffbf47!important;outline-offset:2px;box-shadow:0 0 0 2px #1f2937!important}
:is(body.high-contrast,html.zsams-high-contrast-early body) .mfg-gallery-detail__title-row .mfg-parent-logout button{background:#000!important;color:#fff!important;border-color:#fff!important}
:is(body.high-contrast,html.zsams-high-contrast-early body) .mfg-gallery-detail__title-row .mfg-parent-logout button:hover{background:#ff0!important;color:#000!important;border-color:#ff0!important}
:is(body.high-contrast,html.zsams-high-contrast-early body) .mfg-gallery-detail__title-row .mfg-parent-logout button:focus-visible{outline-color:#ff0!important}
