/* =================================
   DER SPIEGEL – GALERIE
================================= */

.gallery-section {
    padding: 90px 20px;
    background: #171717;
    color: #fff;
}

.gallery-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}


/* Überschrift */

.gallery-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 45px;
}

.gallery-subtitle {
    display: block;
    margin-bottom: 10px;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 13px;
    font-weight: 700;
}

.gallery-heading h2 {
    margin: 0 0 15px;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
}

.gallery-heading p {
    margin: 0;
    color: #bbb;
    line-height: 1.7;
}


/* Filter */

.gallery-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    border: 1px solid #444;
    background: transparent;
    color: #fff;
    padding: 11px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: .3s;
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    background: #c9a227;
    border-color: #c9a227;
    color: #111;
}



.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #222;
    cursor: pointer;
}


.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* statt cover */
    object-position: center;
    background: #222;
    transition: transform .4s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}



/* Overlay */

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    padding: 50px;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.85),
            rgba(0,0,0,0)
        );

    opacity: 0;
    transition: .3s;
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    font-size: 15px;
    font-weight: 600;
}

.gallery-overlay i {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.6);
    border-radius: 50%;

    font-style: normal;
    font-size: 24px;
}


/* =================================
   LIGHTBOX
================================= */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,.95);
    padding: 30px;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 20px 70px rgba(0,0,0,.7);
}

.lightbox-caption {
    margin-top: 15px;
    color: #fff;
    font-size: 15px;
}


/* Buttons */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    border: 0;
    background: rgba(255,255,255,.1);
    color: #fff;

    cursor: pointer;

    transition: .25s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #c9a227;
    color: #111;
}

.lightbox-close {
    top: 25px;
    right: 30px;

    width: 48px;
    height: 48px;

    border-radius: 50%;
    font-size: 32px;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);

    width: 52px;
    height: 52px;

    border-radius: 50%;
    font-size: 25px;
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}


/* =================================
   RESPONSIVE
================================= */

@media (max-width: 1000px) {

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width: 700px) {

    .gallery-section {
        padding: 65px 15px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-overlay {
        opacity: 1;
        padding: 12px;
    }

    .gallery-overlay span {
        font-size: 12px;
    }

    .gallery-overlay i {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

}

@media (max-width: 450px) {

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item,
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(6) {
        aspect-ratio: 16 / 10;
    }

    .gallery-filter {
        gap: 7px;
    }

    .filter-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

}