.gmmag-gallery-swiper {
    --gallery-gap: clamp(0.75rem, 1.2vw, 1.5rem);
    --gallery-slide-width: clamp(17rem, 32vw, 38rem);
    --gallery-radius: clamp(1.25rem, 2vw, 2rem);
    --gallery-arrow-size: 3rem;

    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw); /* echte Full-Bleed-Bühne */
    padding-block: clamp(1rem, 2vw, 2rem);
    overflow: hidden;
}

.gmmag-gallery-swiper__header {
    width: min(100% - 2rem, 82rem);
    margin-inline: auto;
    margin-block-end: clamp(1rem, 2vw, 2rem);
    padding-inline: 1rem;
}

.gmmag-gallery-swiper__header h2 {
    margin: 0;
}

.gmmag-gallery-swiper__viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gmmag-gallery-swiper__track {
    display: flex;
    align-items: center;
    gap: var(--gallery-gap);
    width: max-content;
    padding-block: 0.25rem 0.75rem;

    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    will-change: transform;
}

.gmmag-gallery-swiper__track.is-dragging {
    cursor: grabbing;
}

.gmmag-gallery-swiper__slide {
    flex: 0 0 var(--gallery-slide-width);
    min-width: 0;
    overflow: hidden;
    border-radius: var(--gallery-radius);
    background: #e5e7eb;
    box-shadow: 0 0 1rem rgb(0 0 0 / 12%);
}

.gmmag-gallery-swiper__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    pointer-events: none;
}

/* Pfeile */

.gmmag-gallery-swiper__button {
    position: absolute;
    z-index: 2;
    top: 50%;

    display: grid;
    place-items: center;

    width: var(--gallery-arrow-size);
    height: var(--gallery-arrow-size);

    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgb(18 39 70 / 86%);
    box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 18%);

    font: 2rem / 1 Arial, sans-serif;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 160ms ease, transform 160ms ease;
}

.gmmag-gallery-swiper__button:hover {
    background: #122746;
    transform: translateY(-50%) scale(1.06);
}

.gmmag-gallery-swiper__button:focus-visible,
.gmmag-gallery-swiper__dot:focus-visible {
    outline: 3px solid #f3b33d;
    outline-offset: 4px;
}

.gmmag-gallery-swiper__button--previous {
    left: 1rem;
}

.gmmag-gallery-swiper__button--next {
    right: 1rem;
}

/* Pagination */

.gmmag-gallery-swiper__pagination {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-block-start: 1rem;
}

.gmmag-gallery-swiper__dot {
    width: 0.75rem;
    height: 0.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c7d2df;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.gmmag-gallery-swiper__dot.is-active {
    background: #122746;
    transform: scale(1.25);
}

/* Mobile: 1 Bild mit angeschnittenen Nachbarn */

@media (max-width: 767px) {
    .gmmag-gallery-swiper {
        --gallery-gap: 0.75rem;
        --gallery-slide-width: 78vw; /* sorgt für die angeschnittenen Nachbarn */
        --gallery-radius: 1.25rem;
        --gallery-arrow-size: 2.5rem;
        padding-block: 0.5rem 1rem;
    }

    .gmmag-gallery-swiper__header {
        padding-inline: 1rem;
    }

    .gmmag-gallery-swiper__track {
        padding-block-end: 0.5rem;
    }

    /* Pfeile auf Mobil verstecken, Swipe reicht */
    .gmmag-gallery-swiper__button {
        display: none;
    }

    .gmmag-gallery-swiper__image {
        aspect-ratio: 4 / 3;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .gmmag-gallery-swiper__track,
    .gmmag-gallery-swiper__button,
    .gmmag-gallery-swiper__dot {
        transition: none !important;
    }
}

/* //BACKEND */

.gmmag-gallery-swiper-backend__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.gmmag-gallery-swiper-backend__item {
    text-align: center;
    font-size: 11px;
    color: #555;
}

.gmmag-gallery-swiper-backend__label {
    display: inline-block;
    margin-top: 0.15rem;
}

.gmmag-gallery-swiper-backend__footer {
    color: #777;
}