.fgm-gallery {
    --fgm-blue: #12ABE3;
    --fgm-green: #2CA84D;
    --fgm-dark: #222;
    width: 100%;
    margin: 18px 0 28px;
}

.fgm-gallery,
.fgm-gallery * {
    box-sizing: border-box;
}

.fgm-gallery__header,
.fgm-gallery__eyebrow,
.fgm-gallery__title {
    display: none !important;
}

.fgm-gallery__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
}

.fgm-gallery__tab {
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #222;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 15px;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.fgm-gallery__tab:hover {
    border-color: var(--fgm-blue);
    color: var(--fgm-blue);
}

.fgm-gallery__tab.is-active {
    background: linear-gradient(110deg, var(--fgm-blue) 0%, var(--fgm-green) 100%);
    border-color: transparent;
    color: #fff;
}

.fgm-gallery__tab.is-active:hover {
    color: #fff;
}

.fgm-gallery__tab span {
    display: none;
}

.fgm-gallery__panel {
    display: none;
}

.fgm-gallery__panel.is-active {
    display: block;
}

.fgm-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.fgm-gallery__item,
.fgm-gallery__item:hover,
.fgm-gallery__item:focus,
.fgm-gallery__item:active,
.fgm-gallery__item:focus-visible {
    display: block !important;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent !important;
}

.fgm-gallery__item::before,
.fgm-gallery__item::after,
.fgm-gallery__item:hover::before,
.fgm-gallery__item:hover::after {
    display: none !important;
    content: none !important;
}

.fgm-gallery__item img,
.fgm-gallery__item:hover img,
.fgm-gallery__item:focus img,
.fgm-gallery__item:active img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
}

.fgm-gallery__item.is-hidden {
    display: none !important;
}

.fgm-gallery__load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 26px 0 4px;
}

.fgm-gallery__load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0 !important;
    background: linear-gradient(110deg, #12ABE3 0%, #2CA84D 100%) !important;
    color: #fff !important;
    border-radius: 999px !important;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 12px 24px !important;
    font-weight: 800 !important;
    font-size: 15px;
    text-decoration: none;
    box-shadow: none !important;
    outline: none !important;
}

.fgm-gallery__load-more:hover,
.fgm-gallery__load-more:focus,
.fgm-gallery__load-more:active {
    background: linear-gradient(110deg, #12ABE3 0%, #2CA84D 100%) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

.fgm-gallery__load-more span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.24) !important;
    color: #fff !important;
    font-size: 12px;
    font-weight: 900;
}

/* Lightbox */
.fgm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    background: rgba(0, 0, 0, .94);
    color: #fff;
}

.fgm-lightbox.is-open {
    display: grid;
    grid-template-rows: auto 1fr;
}

.fgm-lightbox,
.fgm-lightbox * {
    box-sizing: border-box;
}

.fgm-lightbox__top {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
}

.fgm-lightbox__counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.88);
    white-space: nowrap;
}

.fgm-lightbox__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.fgm-lightbox__btn,
.fgm-lightbox__download,
.fgm-lightbox__nav {
    display: inline-grid !important;
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.08) !important;
    color: #fff !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    transform: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.fgm-lightbox__btn:hover,
.fgm-lightbox__download:hover,
.fgm-lightbox__nav:hover {
    background: rgba(255,255,255,.16) !important;
    border-color: rgba(255,255,255,.28) !important;
    color: #fff !important;
    text-decoration: none !important;
}

.fgm-lightbox__download {
    width: auto;
    grid-auto-flow: column;
    gap: 9px;
    padding: 0 16px !important;
}

.fgm-lightbox__download-label {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.fgm-lightbox__btn svg,
.fgm-lightbox__download svg,
.fgm-lightbox__nav svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    fill: currentColor;
    transform: none !important;
}

.fgm-lightbox__stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 10px 90px 24px;
}

.fgm-lightbox__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.fgm-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 130px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.fgm-lightbox__caption {
    display: none !important;
}

/* Desktop: Pfeile links/rechts am Bild */
.fgm-lightbox__nav--mobile {
    display: none !important;
}

.fgm-lightbox__nav--desktop {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 54px !important;
    min-width: 54px !important;
    height: 54px !important;
    min-height: 54px !important;
    z-index: 3;
}

.fgm-lightbox__nav--desktop.fgm-lightbox__nav--prev {
    left: 22px !important;
    right: auto !important;
}

.fgm-lightbox__nav--desktop.fgm-lightbox__nav--next {
    right: 22px !important;
    left: auto !important;
}

.fgm-lightbox__nav--desktop svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
}

body.fgm-lightbox-open {
    overflow: hidden;
}

.fgm-error {
    padding: 14px 16px;
    border-left: 4px solid #d63638;
    background: #fff5f5;
    color: #7a0000;
}

@media (max-width: 1180px) {
    .fgm-gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .fgm-gallery__tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .fgm-gallery__tab {
        width: 100%;
        text-align: center;
    }

    .fgm-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .fgm-lightbox.is-open {
        grid-template-rows: auto 1fr;
    }

    .fgm-lightbox__top {
        padding: 12px;
        gap: 8px;
    }

    .fgm-lightbox__actions {
        gap: 7px;
    }

    .fgm-lightbox__counter {
        height: 34px;
        padding: 0 11px;
        font-size: 12px;
    }

    .fgm-lightbox__stage {
        padding: 8px 10px 14px;
    }

    .fgm-lightbox__image {
        max-height: calc(100vh - 92px);
    }

    .fgm-lightbox__nav--desktop {
        display: none !important;
    }

    .fgm-lightbox__nav--mobile {
        display: inline-grid !important;
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
    }

    .fgm-lightbox__download,
    .fgm-lightbox__btn {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
    }

    .fgm-lightbox__download-label {
        display: none !important;
    }

    .fgm-lightbox__nav svg,
    .fgm-lightbox__download svg,
    .fgm-lightbox__btn svg {
        width: 19px !important;
        height: 19px !important;
        min-width: 19px !important;
        min-height: 19px !important;
    }
}

@media (max-width: 470px) {
    .fgm-gallery__grid {
        grid-template-columns: 1fr;
    }
}
