/*
|--------------------------------------------------------------------------
| Media - Galerie
|--------------------------------------------------------------------------
*/

.public-media-section {
    padding: 4rem 1.25rem;
}

.public-media-container {
    max-width: 1400px;
    margin: 0 auto;
}

/*
|--------------------------------------------------------------------------
| Media - Filter
|--------------------------------------------------------------------------
*/

.public-media-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 2rem 0;
}

.public-media-filter {
    padding: 0.6rem 1rem;
    border: 1px solid currentColor;
    border-radius: 999px;

    background: transparent;
    color: inherit;

    cursor: pointer;
}

.public-media-filter.is-active {
    background: #222;
    color: #fff;
    border-color: #222;
}

/*
|--------------------------------------------------------------------------
| Media - Galerie Raster
|--------------------------------------------------------------------------
*/

.public-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

/*
|--------------------------------------------------------------------------
| Media - Galerie Bilder
|--------------------------------------------------------------------------
*/

.public-media-item {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;

    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.06);

    cursor: zoom-in;
    overflow: hidden;
    box-sizing: border-box;
}

.public-media-item img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;
}

/*
|--------------------------------------------------------------------------
| Media - Versteckte Elemente
|--------------------------------------------------------------------------
*/

.public-media-item[hidden],
.public-media-empty[hidden],
.public-media-lightbox[hidden] {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| Media - Lightbox
|--------------------------------------------------------------------------
*/

.public-media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;

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

    padding: 3rem 4rem;

    background: rgba(0, 0, 0, 0.94);
    color: #fff;
}

.public-media-lightbox figure {
    max-width: 100%;
    margin: 0;
    text-align: center;
}

.public-media-lightbox figure img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;

    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;
}

.public-media-lightbox figcaption {
    margin-top: 1rem;
}

/*
|--------------------------------------------------------------------------
| Media - Lightbox Buttons
|--------------------------------------------------------------------------
*/

.public-media-lightbox button {
    position: absolute;

    border: 0;
    background: transparent;
    color: #fff;

    font-size: 2rem;
    cursor: pointer;
}

.public-media-lightbox-close {
    top: 1rem;
    right: 1.5rem;
}

.public-media-lightbox-prev {
    left: 1rem;
}

.public-media-lightbox-next {
    right: 1rem;
}

/*
|--------------------------------------------------------------------------
| Media - Video Hero (Webflow Original)
|--------------------------------------------------------------------------
*/

.media-video-hero {
    position: relative;
    width: 100%;
    height: 68vh;

    overflow: hidden;
    background-color: #161616;
}

.media-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/*
|--------------------------------------------------------------------------
| Media - Unscharfes Hintergrundvideo
|--------------------------------------------------------------------------
*/

.media-video-blur {
    position: absolute;
    inset: 0;
    z-index: 1;

    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    filter: blur(5px);

    transform: scale(1.02);
    pointer-events: none;
}

/*
|--------------------------------------------------------------------------
| Media - Scharfes Video in der Mitte
|--------------------------------------------------------------------------
*/

.media-video-foreground {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;

    display: block;
    width: 30vw;
    height: 100%;

    object-fit: cover;
    transform: translate(-50%, -50%);

    pointer-events: none;
}

/*
|--------------------------------------------------------------------------
| Media - Hintergrund
|--------------------------------------------------------------------------
*/

.public-media-section {
    color: #fff;
    background-color: #161616;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.5),
            rgba(0, 0, 0, 0.5)
        ),
        var(--media-background-image, none);

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.public-media-section h1 {
    color: #fff;
}

/*
|--------------------------------------------------------------------------
| Media - Responsive Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 991px) {

    .media-video-hero {
        height: 55vh;
    }

    .media-video-foreground {
        width: 30vw;
    }
}

@media (max-width: 800px) {

    .public-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/*
|--------------------------------------------------------------------------
| Media - Responsive Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 767px) {

    .media-video-foreground {
        width: 60vw;
    }

    .public-media-section {
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }
}

@media (max-width: 500px) {

    .public-media-grid {
        grid-template-columns: 1fr;
    }

    .public-media-lightbox {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 479px) {

    .media-video-foreground {
        width: 85vw;
    }
}