
/* =====================================================
   GLEIBERG ROCKS – GALERIEN
===================================================== */

.gr-galerie {
    position: relative;
    width: 100%;
    margin: 0 0 60px;
}

/* Jahresüberschrift */

.gr-galerie-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.gr-galerie-title {
    margin: 0 !important;
    padding: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

/* Horizontaler Slider */

.gr-slider {
    position: relative;
    width: 100%;
}

.gr-track {
    display: flex;
    gap: 15px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0 15px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.gr-track::-webkit-scrollbar {
    display: none;
}

/* Einzelbilder */

.gr-slide {
    flex: 0 0 260px;
    width: 260px;
    scroll-snap-align: start;
}

.gr-slide a {
    display: block;
    overflow: hidden;
    cursor: zoom-in;
}

.gr-slide img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform .35s ease;
}

.gr-slide a:hover img {
    transform: scale(1.05);
}

/* Slider-Pfeile */

.gr-arrow {
    position: absolute;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

.gr-arrow:hover {
    background: #000;
    transform: translateY(-50%) scale(1.08);
}

.gr-prev {
    left: 10px;
}

.gr-next {
    right: 10px;
}

.gr-arrow[hidden] {
    display: none !important;
}

/* =====================================================
   LIGHTBOX
===================================================== */

.gr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px;
    background: rgba(0, 0, 0, .97);
}

.gr-lightbox.gr-open {
    display: flex;
}

.gr-lightbox-image {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* Schließen */

.gr-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 45px;
    line-height: 1;
    cursor: pointer;
}

/* Lightbox-Pfeile */

.gr-lightbox-prev,
.gr-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 65px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}

.gr-lightbox-prev:hover,
.gr-lightbox-next:hover {
    background: rgba(255, 255, 255, .28);
}

.gr-lightbox-prev {
    left: 20px;
}

.gr-lightbox-next {
    right: 20px;
}

/* Bildzähler */

.gr-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    color: #fff;
    text-align: center;
    font-size: 14px;
}

/* =====================================================
   MOBILANSICHT
===================================================== */

@media (max-width: 767px) {

    .gr-galerie {
        margin-bottom: 40px;
    }

    .gr-galerie-title {
        font-size: 24px;
    }

    .gr-track {
        gap: 12px;
    }

    .gr-slide {
        flex: 0 0 78%;
        width: 78%;
    }

    .gr-slide img {
        height: 210px;
    }

    .gr-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .gr-prev {
        left: 5px;
    }

    .gr-next {
        right: 5px;
    }

    .gr-lightbox {
        padding: 15px;
    }

    .gr-lightbox-image {
        max-width: 95vw;
        max-height: 78vh;
    }

    .gr-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
    }

    .gr-lightbox-prev,
    .gr-lightbox-next {
        width: 38px;
        height: 48px;
        font-size: 24px;
    }

    .gr-lightbox-prev {
        left: 5px;
    }

    .gr-lightbox-next {
        right: 5px;
    }
}

@media (max-width: 400px) {

    .gr-slide {
        flex: 0 0 85%;
        width: 85%;
    }

    .gr-slide img {
        height: 180px;
    }
}
