/* =====================================
   Kompakte Galerie
===================================== */

.works-container[data-works-gallery] {
    position: relative;
    isolation: isolate;

    background:
        radial-gradient(circle at 10% 12%, rgba(40, 200, 64, .1), transparent 30%),
        radial-gradient(circle at 92% 82%, rgba(40, 200, 64, .06), transparent 32%),
        rgba(0, 0, 0, .08);
}

.works-container[data-works-gallery]::before,
.works-container[data-works-gallery]::after {
    content: "";

    position: absolute;
    z-index: -1;

    width: 280px;
    height: 280px;

    border: 1px solid rgba(212, 192, 138, .1);
    border-radius: 50%;

    box-shadow:
        0 0 0 28px rgba(40, 200, 64, .018),
        0 0 0 56px rgba(212, 192, 138, .015);

    pointer-events: none;
}

.works-container[data-works-gallery]::before {
    top: -170px;
    right: -100px;
}

.works-container[data-works-gallery]::after {
    bottom: -190px;
    left: -120px;
}

.works-container[data-works-gallery] .works__intro {
    margin-bottom: 30px;
}

.works__eyebrow {
    display: block;

    margin-bottom: 10px;

    color: #E8E4DA;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.4;
    text-align: center;
    text-transform: uppercase;
}

.works-gallery__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;

    margin-bottom: 26px;
}

.works-gallery__filter {
    min-height: 42px;
    padding: 8px 17px;

    border: 1px solid rgba(212, 192, 138, .38);
    border-radius: 999px;

    color: #E8E4DA;
    background: rgba(0, 0, 0, .2);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 700;

    transition:
        color .25s ease,
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease,
        transform .25s ease;

    cursor: pointer;
}

.works-gallery__filter:hover,
.works-gallery__filter:focus-visible {
    border-color: #28C840;
    box-shadow: 0 0 18px rgba(40, 200, 64, .14);
    outline: none;
    transform: translateY(-1px);
}

.works-gallery__filter[aria-pressed="true"] {
    color: #041007;
    border-color: #68E97B;
    background: linear-gradient(180deg, #68E97B, #28C840);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .25),
        0 0 22px rgba(40, 200, 64, .2);
}

.works-gallery__stage {
    --works-gallery-height: clamp(440px, 39vw, 560px);

    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(150px, 14vw, 190px);
    gap: 16px;

    height: var(--works-gallery-height);
}

.works-gallery__main {
    position: relative;

    min-width: 0;
    height: var(--works-gallery-height);
    margin: 0;

    overflow: hidden;

    border: 1px solid rgba(212, 192, 138, .42);
    border-radius: 22px;

    background:
        radial-gradient(circle at 50% 45%, rgba(40, 200, 64, .07), transparent 55%),
        rgba(0, 7, 3, .9);

    box-shadow:
        0 18px 48px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .025);
}

.works-gallery__open {
    display: block;

    width: 100%;
    height: 100%;
    padding: 0;

    border: 0;

    color: inherit;
    background: transparent;

    cursor: zoom-in;
}

.works-gallery__open:focus-visible {
    outline: 2px solid #28C840;
    outline-offset: -5px;
}

.works-gallery__main-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    opacity: 1;

    transition:
        opacity .18s ease,
        transform .42s ease;
}

.works-gallery__main-image.is-changing {
    opacity: .16;
    transform: scale(.992);
}

.works-gallery__open:hover .works-gallery__main-image {
    transform: scale(1.008);
}

.works-gallery__caption {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;

    padding: 54px 20px 17px;

    color: #E8E4DA;
    background: linear-gradient(transparent, rgba(0, 0, 0, .9));

    pointer-events: none;
}

.works-gallery__caption-copy {
    min-width: 0;
}

.works-gallery__category {
    display: block;

    margin-bottom: 4px;

    color: #61E875;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.works-gallery__caption-title {
    display: block;

    overflow: hidden;

    color: #E8E4DA;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.works-gallery__counter {
    flex: 0 0 auto;

    color: #E8E4DA;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.works-gallery__arrow {
    position: absolute;
    z-index: 3;
    top: 50%;

    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;
    padding: 0 0 3px;

    border: 1px solid rgba(212, 192, 138, .62);
    border-radius: 50%;

    color: #E8E4DA;
    background: rgba(0, 8, 4, .78);

    box-shadow: 0 8px 20px rgba(0, 0, 0, .24);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    line-height: 1;

    transform: translateY(-50%);
    transition:
        color .25s ease,
        border-color .25s ease,
        background .25s ease,
        transform .25s ease;

    cursor: pointer;
}

.works-gallery__arrow--previous {
    left: 16px;
}

.works-gallery__arrow--next {
    right: 16px;
}

.works-gallery__arrow:hover,
.works-gallery__arrow:focus-visible {
    color: #68E97B;
    border-color: #28C840;
    background: rgba(0, 16, 7, .92);
    outline: none;
    transform: translateY(-50%) scale(1.04);
}

.works-gallery__rail {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 11px;

    height: var(--works-gallery-height);
}

.works-gallery__preview,
.works-gallery__thumbnail {
    position: relative;

    display: block;

    min-width: 0;
    padding: 0;

    overflow: hidden;

    border: 1px solid rgba(212, 192, 138, .34);

    background: rgba(0, 8, 4, .82);

    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease;

    cursor: pointer;
}

.works-gallery__preview {
    min-height: 0;
    border-radius: 17px;
}

.works-gallery__preview img,
.works-gallery__thumbnail img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .3s ease;
}

.works-gallery__preview:hover,
.works-gallery__preview:focus-visible,
.works-gallery__thumbnail:hover,
.works-gallery__thumbnail:focus-visible {
    border-color: #28C840;
    box-shadow: 0 0 18px rgba(40, 200, 64, .15);
    outline: none;
    transform: translateY(-1px);
}

.works-gallery__preview:hover img,
.works-gallery__preview:focus-visible img,
.works-gallery__thumbnail:hover img,
.works-gallery__thumbnail:focus-visible img {
    transform: scale(1.035);
}

.works-gallery__strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;

    margin-top: 13px;
}

.works-gallery__thumbnail {
    aspect-ratio: 4 / 3;
    border-radius: 13px;
}

.works-gallery__thumbnail[aria-current="true"] {
    border-color: #68E97B;
    box-shadow:
        0 0 0 1px #28C840,
        0 0 20px rgba(40, 200, 64, .2);
}

.works-gallery__hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin: 18px 0 0;

    color: #E8E4DA;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.works-gallery__hint span {
    color: #61E875;
}

.works-container[data-works-gallery] .works__instagram {
    margin-top: 28px;
}

.works-gallery--single .works-gallery__stage {
    grid-template-columns: minmax(0, 1fr);
}

.works-gallery--single .works-gallery__main {
    width: min(100%, 920px);
    margin-inline: auto;
}

.works-gallery--single .works-gallery__rail,
.works-gallery--single .works-gallery__strip,
.works-gallery--single .works-gallery__arrow {
    display: none;
}

/* =====================================
   Galerie-Lightbox
===================================== */

body.works-gallery-lightbox-open {
    overflow: hidden;
}

.works-gallery-lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 62px 76px 76px;

    border: 0;

    color: #E8E4DA;
    background: rgba(0, 6, 3, .94);
}

.works-gallery-lightbox::backdrop {
    background: rgba(0, 0, 0, .88);
    backdrop-filter: blur(6px);
}

.works-gallery-lightbox__frame {
    width: 100%;
    height: 100%;
}

.works-gallery-lightbox__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.works-gallery-lightbox__close,
.works-gallery-lightbox__arrow {
    position: fixed;
    z-index: 2;

    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;
    padding: 0;

    border: 1px solid rgba(212, 192, 138, .62);
    border-radius: 50%;

    color: #E8E4DA;
    background: rgba(0, 8, 4, .84);

    cursor: pointer;
}

.works-gallery-lightbox__close:hover,
.works-gallery-lightbox__close:focus-visible,
.works-gallery-lightbox__arrow:hover,
.works-gallery-lightbox__arrow:focus-visible {
    color: #68E97B;
    border-color: #28C840;
    outline: none;
}

.works-gallery-lightbox__close {
    top: 18px;
    right: 22px;

    font-size: 30px;
    line-height: 1;
}

.works-gallery-lightbox__arrow {
    top: 50%;

    padding-bottom: 3px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 31px;
    line-height: 1;

    transform: translateY(-50%);
}

.works-gallery-lightbox__arrow--previous {
    left: 18px;
}

.works-gallery-lightbox__arrow--next {
    right: 18px;
}

.works-gallery-lightbox__caption {
    position: fixed;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    min-height: 62px;
    padding: 12px 74px;

    color: #E8E4DA;
    background: linear-gradient(transparent, rgba(0, 0, 0, .92) 40%);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    text-align: center;
}

.works-gallery-lightbox__category {
    color: #61E875;
    font-weight: 700;
}

.works-gallery-lightbox__counter {
    color: #E8E4DA;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1024px) {
    .works-gallery__stage {
        --works-gallery-height: 440px;

        grid-template-columns: minmax(0, 1fr) 138px;
    }

    .works-gallery__caption-title {
        max-width: 440px;
    }
}

@media (max-width: 767px) {
    .works-container[data-works-gallery] .works__intro {
        margin-bottom: 25px;
    }

    .works__eyebrow {
        margin-bottom: 8px;

        font-size: 11px;
        letter-spacing: .1em;
    }

    .works-gallery__filters {
        gap: 7px;
        margin-bottom: 22px;
    }

    .works-gallery__filter {
        min-height: 38px;
        padding: 7px 12px;

        font-size: 14px;
    }

    .works-gallery__stage {
        --works-gallery-height: 370px;

        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }

    .works-gallery__rail {
        grid-template-rows: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));

        height: auto;
    }

    .works-gallery__preview {
        aspect-ratio: 1 / 1;
        border-radius: 14px;
    }

    .works-gallery__strip {
        display: none;
    }

    .works-gallery__arrow {
        width: 42px;
        height: 42px;

        font-size: 27px;
    }

    .works-gallery__arrow--previous {
        left: 11px;
    }

    .works-gallery__arrow--next {
        right: 11px;
    }

    .works-gallery__caption {
        gap: 10px;
        padding: 46px 14px 13px;
    }

    .works-gallery__caption-title {
        max-width: 210px;

        font-size: 15px;
    }

    .works-gallery__category,
    .works-gallery__counter {
        font-size: 12px;
    }

    .works-gallery__hint {
        margin-top: 15px;
        font-size: 13px;
    }

    .works-gallery-lightbox {
        padding: 58px 12px 74px;
    }

    .works-gallery-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .works-gallery-lightbox__arrow {
        width: 42px;
        height: 42px;
    }

    .works-gallery-lightbox__arrow--previous {
        left: 7px;
    }

    .works-gallery-lightbox__arrow--next {
        right: 7px;
    }

    .works-gallery-lightbox__caption {
        flex-wrap: wrap;
        gap: 4px 10px;

        min-height: 68px;
        padding: 14px 52px;

        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .works-gallery__stage {
        --works-gallery-height: 315px;
    }

    .works-gallery__caption-title {
        max-width: 155px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .works-gallery__main-image,
    .works-gallery__filter,
    .works-gallery__arrow,
    .works-gallery__preview,
    .works-gallery__thumbnail,
    .works-gallery__preview img,
    .works-gallery__thumbnail img {
        transition-duration: .01ms !important;
    }
}

