/* ======================================
   GALLERY V2 – KONSOLIDIERTE VERSION
   Gilt nur innerhalb von .gallery-v2-area
   Alte Live-Galerien bleiben unberührt
====================================== */

.gallery-v2-area {
    width: 100%;
    padding: 0;
    background: #ffffff;
}

.gallery-v2-area > .container2 {
    width: 100%;
    max-width: 98rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}


/* ======================================
   GALLERY V2 – BASIS
====================================== */

.gallery-v2-area .irishdog-gallery-v2 {
    position: relative;

    width: 100%;
    margin: 0;
    padding: 0 !important;

    overflow: hidden;

    background: #f5f5f5;
    border: 0;
    border-radius: 10px;
}

.gallery-v2-area .irishdog-gallery-v2__viewport {
    position: relative;

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;

    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;

    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
    -ms-overflow-style: none;

    outline: none;
}

.gallery-v2-area .irishdog-gallery-v2__viewport::-webkit-scrollbar {
    display: none;
}

.gallery-v2-area .irishdog-gallery-v2__track {
    display: flex;

    width: 100%;
    margin: 0;
    padding: 0;

    list-style: none;
}

.gallery-v2-area .irishdog-gallery-v2__slide {
    position: relative;

    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;

    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.gallery-v2-area .irishdog-gallery-v2__figure {
    position: relative;

    width: 100%;
    margin: 0;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #e9ece7;
}

.gallery-v2-area .irishdog-gallery-v2__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position:
        var(--gallery-focus-x, 50%)
        var(--gallery-focus-y-desktop, 50%);
}


/* ======================================
   GALLERY V2 – ZOOM BUTTON
====================================== */

.gallery-v2-area .irishdog-gallery-v2__zoom {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 4;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 3.6rem;
    height: 3.6rem;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    color: #ffffff;
    background: rgba(65, 88, 61, 0.76);

    cursor: pointer;

    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.2s ease,
        opacity 0.2s ease;
}

.gallery-v2-area .irishdog-gallery-v2__zoom-icon {
    display: block;

    width: 1.8rem;
    height: 1.8rem;

    pointer-events: none;
}

.gallery-v2-area .irishdog-gallery-v2__zoom:hover {
    background: rgba(65, 88, 61, 0.94);
}

.gallery-v2-area .irishdog-gallery-v2__zoom:focus-visible {
    outline: 3px solid #a7c957;
    outline-offset: 2px;
}

.gallery-v2-area .irishdog-gallery-v2__zoom:active {
    opacity: 0.8;
}


/* ======================================
   GALLERY V2 – CAPTION
====================================== */

.gallery-v2-area .irishdog-gallery-v2 span {
    display: inline;
    margin: 0;
    font-size: inherit;
}

.gallery-v2-area .irishdog-gallery-v2__caption {
    position: absolute;

    right: 0;
    bottom: 0;
    left: 0;

    z-index: 2;

    padding: 5rem 2rem 1.6rem;

    color: #ffffff;

    background:
        linear-gradient(
            to top,
            rgba(35, 48, 35, 0.88) 0%,
            rgba(35, 48, 35, 0.54) 55%,
            rgba(35, 48, 35, 0) 100%
        );

    pointer-events: none;
}

.gallery-v2-area .irishdog-gallery-v2__title {
    max-width: calc(100% - 8rem);

    margin: 0;

    color: #ffffff;

    font-family: 'Nunito', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.25;

    text-transform: none;
}

.gallery-v2-area .irishdog-gallery-v2__description {
    max-width: calc(100% - 8rem);

    margin: 0.5rem 0 0;

    color: #ffffff;

    font-size: 1.4rem;
    line-height: 1.4;
}


/* ======================================
   GALLERY V2 – NORMALE NAVIGATION
====================================== */

.gallery-v2-area .irishdog-gallery-v2__button {
    position: absolute;
    top: 50%;
    z-index: 5;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 3.6rem;
    height: 3.6rem;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    color: #ffffff;
    background: rgba(65, 88, 61, 0.76);

    font-family: Arial, sans-serif;
    font-size: 2.3rem;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

    transform: translateY(-50%);

    appearance: none;
    -webkit-appearance: none;
}

.gallery-v2-area .irishdog-gallery-v2__button > span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    font-size: 2.2rem;
    line-height: 1;

    transform: translateY(-0.1rem);
}

.gallery-v2-area .irishdog-gallery-v2__button:hover {
    background: rgba(65, 88, 61, 0.94);
}

.gallery-v2-area .irishdog-gallery-v2__button:focus-visible {
    outline: 3px solid #a7c957;
    outline-offset: 2px;
}

.gallery-v2-area .irishdog-gallery-v2__button:disabled {
    opacity: 0.35;
    cursor: default;
}

.gallery-v2-area .irishdog-gallery-v2__button--prev {
    left: 1.2rem;
}

.gallery-v2-area .irishdog-gallery-v2__button--next {
    right: 1.2rem;
}


/* ======================================
   GALLERY V2 – FOOTER / DOTS
====================================== */

.gallery-v2-area .irishdog-gallery-v2__footer {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    align-items: center;

    min-height: 4.6rem;

    padding: 0.8rem 1.4rem;

    color: #535353;
    background: #f5f5f5;

    border-top: 0;
}

.gallery-v2-area .irishdog-gallery-v2__counter {
    display: flex;
    align-items: center;
    gap: 0.4rem;

    width: 6rem;

    font-size: 1.3rem;
    line-height: 1;

    text-align: left;
    font-variant-numeric: tabular-nums;
}

.gallery-v2-area .irishdog-gallery-v2__counter-current {
    color: #a7c957;
    font-weight: 700;
}

.gallery-v2-area .irishdog-gallery-v2__counter-separator,
.gallery-v2-area .irishdog-gallery-v2__counter-total {
    color: #535353;
}

.gallery-v2-area .irishdog-gallery-v2__dots {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    min-width: 0;

    gap: 0.8rem;
}

.gallery-v2-area .irishdog-gallery-v2__dot {
    flex: 0 0 0.9rem;

    width: 0.9rem;
    height: 0.9rem;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #c7cbc4;

    cursor: pointer;

    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

    appearance: none;
    -webkit-appearance: none;
}

.gallery-v2-area .irishdog-gallery-v2__dot.is-active,
.gallery-v2-area .irishdog-gallery-v2__dot[aria-current="true"] {
    background: #a7c957;
    transform: scale(1.2);
}


/* ======================================
   GALLERY V2 – MOBILE
====================================== */

@media (max-width: 767px) {

    .gallery-v2-area .irishdog-gallery-v2__figure {
        aspect-ratio: 4 / 3;
    }

    .gallery-v2-area .irishdog-gallery-v2__image {
        object-position:
            var(--gallery-focus-x, 50%)
            var(--gallery-focus-y-mobile, 50%);
    }

    .gallery-v2-area .irishdog-gallery-v2__caption {
        padding: 4rem 1.4rem 1.2rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__title {
        max-width: calc(100% - 7rem);

        font-size: 1.6rem;
        line-height: 1.25;
    }

    .gallery-v2-area .irishdog-gallery-v2__description {
        display: none;
    }

    .gallery-v2-area .irishdog-gallery-v2__button {
        width: 3.2rem;
        height: 3.2rem;

        font-size: 2rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__button > span {
        font-size: 2rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__button--prev {
        left: 0.8rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__button--next {
        right: 0.8rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__footer {
        grid-template-columns: 5rem minmax(0, 1fr);

        min-height: 4.2rem;

        padding: 0.7rem 1rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__counter {
        width: 5rem;
        font-size: 1.2rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__dots {
        gap: 0.65rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__dot {
        flex-basis: 0.8rem;

        width: 0.8rem;
        height: 0.8rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__zoom {
        top: 0.8rem;
        right: 0.8rem;

        width: 3.2rem;
        height: 3.2rem;
    }

    .gallery-v2-area .irishdog-gallery-v2__zoom-icon {
        width: 1.6rem;
        height: 1.6rem;
    }
}


/* =========================================================
   GALLERY V2 – LIGHTBOX
   Vollständig isoliert von der normalen Galerie
========================================================= */

.gallery-v2-area .irishdog-gallery-v2-lightbox[hidden] {
    display: none !important;
}

html.irishdog-lightbox-open,
body.irishdog-lightbox-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483000;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    overflow: hidden;

    padding:
        max(1.6rem, env(safe-area-inset-top))
        max(1.6rem, env(safe-area-inset-right))
        max(1.6rem, env(safe-area-inset-bottom))
        max(1.6rem, env(safe-area-inset-left));

    isolation: isolate;
    overscroll-behavior: none;

    box-sizing: border-box;
}


/* Hintergrund */

.gallery-v2-area .irishdog-gallery-v2-lightbox__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;

    background: rgba(24, 30, 25, 0.96);
}


/* ======================================
   LIGHTBOX – LAYOUT
====================================== */

.gallery-v2-area .irishdog-gallery-v2-lightbox__dialog {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    overflow: hidden;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__figure {
    display: inline-flex;
    flex-direction: column;

    flex: 0 1 auto;

    width: fit-content;
    height: auto;

    max-width: calc(100dvw - 14rem);
    max-height: calc(100dvh - 3.2rem);

    margin: 0;

    overflow: hidden;

    background: transparent;
    border-radius: 8px;

    box-sizing: border-box;
}


/* ======================================
   LIGHTBOX – BILD
====================================== */

.gallery-v2-area .irishdog-gallery-v2-lightbox__image {
    display: block;

    flex: 0 1 auto;

    width: auto;
    height: auto;

    min-width: 0;
    min-height: 0;

    max-width: calc(100dvw - 14rem);
    max-height: calc(100dvh - 13rem);

    margin: 0 auto;

    object-fit: contain;

    background: transparent;
}


/* ======================================
   LIGHTBOX – TEXT
====================================== */

.gallery-v2-area .irishdog-gallery-v2-lightbox__caption {
    flex: 0 0 auto;

    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 1.3rem 1.6rem 1.4rem;

    box-sizing: border-box;

    color: #ffffff;
    background: #3f4f3c;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__title {
    margin: 0;

    color: #ffffff;

    font-family: 'Nunito', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.3;

    text-transform: none;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__description {
    margin: 0.5rem 0 0;

    color: #ffffff;

    font-size: 1.4rem;
    line-height: 1.4;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__counter {
    margin-top: 0.7rem;

    color: #c7cbc4;

    font-size: 1.25rem;
    line-height: 1;

    font-variant-numeric: tabular-nums;
}


/* ======================================
   LIGHTBOX – NAVIGATION
   Keine Kreise
   Keine Animation
   Feste Position im Viewport
====================================== */

.gallery-v2-area .irishdog-gallery-v2-lightbox__close,
.gallery-v2-area .irishdog-gallery-v2-lightbox__prev,
.gallery-v2-area .irishdog-gallery-v2-lightbox__next {
    position: absolute;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    color: rgba(255, 255, 255, 0.88);
    background: transparent;

    box-shadow: none;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition: none;

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__prev,
.gallery-v2-area .irishdog-gallery-v2-lightbox__next {
    top: 50%;

    width: 5.6rem;
    height: 8rem;

    transform: translateY(-50%);
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__prev {
    left: 0.4rem;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__next {
    right: 0.4rem;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__close {
    top: 0.6rem;
    right: 0.6rem;

    width: 5rem;
    height: 5rem;
}


/* SVGs */

.gallery-v2-area .irishdog-gallery-v2-lightbox__control-icon {
    display: block;
    flex: 0 0 auto;

    width: 3rem;
    height: 3rem;

    pointer-events: none;
}

.gallery-v2-area
.irishdog-gallery-v2-lightbox__close
.irishdog-gallery-v2-lightbox__control-icon {
    width: 2.5rem;
    height: 2.5rem;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__close:hover,
.gallery-v2-area .irishdog-gallery-v2-lightbox__prev:hover,
.gallery-v2-area .irishdog-gallery-v2-lightbox__next:hover {
    color: #ffffff;
    background: transparent;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__close:focus-visible,
.gallery-v2-area .irishdog-gallery-v2-lightbox__prev:focus-visible,
.gallery-v2-area .irishdog-gallery-v2-lightbox__next:focus-visible {
    outline: 2px solid #a7c957;
    outline-offset: -4px;
}

.gallery-v2-area .irishdog-gallery-v2-lightbox__close:active,
.gallery-v2-area .irishdog-gallery-v2-lightbox__prev:active,
.gallery-v2-area .irishdog-gallery-v2-lightbox__next:active {
    color: #ffffff;
    background: transparent;
}


/* =========================================================
   LIGHTBOX – MOBILE PORTRAIT
========================================================= */

@media (max-width: 767px) {

    .gallery-v2-area .irishdog-gallery-v2-lightbox {
        padding:
            max(0.8rem, env(safe-area-inset-top))
            max(0.8rem, env(safe-area-inset-right))
            max(0.8rem, env(safe-area-inset-bottom))
            max(0.8rem, env(safe-area-inset-left));
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__dialog {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 100%;
        height: 100%;

        max-width: none;
        max-height: none;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__figure {
        width: fit-content;

        max-width: calc(100dvw - 1.6rem);
        max-height: calc(100dvh - 1.6rem);

        margin: 0 auto;

        border-radius: 7px;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__image {
        width: auto;
        height: auto;

        max-width: calc(100dvw - 1.6rem);
        max-height: calc(100dvh - 10.5rem);

        margin: 0 auto;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__caption {
        padding: 0.9rem 1.1rem 1rem;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__title {
        padding: 0;

        font-size: 1.5rem;
        line-height: 1.3;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__description {
        display: none;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__counter {
        margin-top: 0.5rem;

        font-size: 1.15rem;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__close,
    .gallery-v2-area .irishdog-gallery-v2-lightbox__prev,
    .gallery-v2-area .irishdog-gallery-v2-lightbox__next {
        color: #ffffff;
        background: transparent;
        border-radius: 0;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__prev,
    .gallery-v2-area .irishdog-gallery-v2-lightbox__next {
        width: 5.2rem;
        height: 8rem;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__prev {
        left: 0;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__next {
        right: 0;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__close {
        top: max(0.2rem, env(safe-area-inset-top));
        right: max(0.2rem, env(safe-area-inset-right));

        width: 4.8rem;
        height: 4.8rem;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__control-icon {
        width: 2.8rem;
        height: 2.8rem;
    }

    .gallery-v2-area
    .irishdog-gallery-v2-lightbox__close
    .irishdog-gallery-v2-lightbox__control-icon {
        width: 2.3rem;
        height: 2.3rem;
    }
}


/* =========================================================
   LIGHTBOX – MOBILE LANDSCAPE / KLEINE TABLETS
========================================================= */

@media (max-width: 900px) and (orientation: landscape) {

    .gallery-v2-area .irishdog-gallery-v2-lightbox {
        padding:
            max(0.5rem, env(safe-area-inset-top))
            max(0.8rem, env(safe-area-inset-right))
            max(0.5rem, env(safe-area-inset-bottom))
            max(0.8rem, env(safe-area-inset-left));
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__dialog {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 100%;
        height: 100%;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__figure {
        width: fit-content;

        max-width: calc(100dvw - 10rem);
        max-height: calc(100dvh - 1rem);

        margin: 0 auto;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__image {
        width: auto;
        height: auto;

        max-width: calc(100dvw - 10rem);
        max-height: calc(100dvh - 6.8rem);

        margin: 0 auto;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__caption {
        padding: 0.6rem 0.9rem 0.7rem;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__title {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__description {
        display: none;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__counter {
        margin-top: 0.35rem;

        font-size: 1.05rem;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__prev,
    .gallery-v2-area .irishdog-gallery-v2-lightbox__next {
        width: 5rem;
        height: 7rem;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__prev {
        left: 0;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__next {
        right: 0;
    }

    .gallery-v2-area .irishdog-gallery-v2-lightbox__control-icon {
        width: 2.7rem;
        height: 2.7rem;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-v2-area .irishdog-gallery-v2-lightbox__close,
    .gallery-v2-area .irishdog-gallery-v2-lightbox__prev,
    .gallery-v2-area .irishdog-gallery-v2-lightbox__next {
        transition: none;
    }
}