﻿.gallery-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    aspect-ratio: 4/3;
    cursor: pointer; /* Zeigt dass man klicken kann */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .gallery-item:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

.gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.gallery-item:hover .placeholder-image {
    transform: scale(1.1);
}

.gallery-card {
    background-size: cover;
    background-position: center;
    height: 220px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.masonry-section {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    font-weight: 600;
    color: #333;
}

.masonry-grid {
    column-count: 3;
    column-gap: 15px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 15px;
    position: relative;
}

    .masonry-item img {
        width: 100%;
        height: 250px; /* Einheitliche Höhe für alle Bilder */
        object-fit: cover; /* Schneidet sanft zu */
        border-radius: 10px;
        display: block;
    }

.masonry-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.45);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    backdrop-filter: blur(3px);
}

/* Lightbox mobile */
.lightbox-prev,
.lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 24px;
}

.lightbox-close,
.lightbox-fullscreen {
    width: 50px;
    height: 50px;
    top: 10px;
}

.lightbox-close {
    right: 10px;
    font-size: 40px;
}

.lightbox-fullscreen {
    right: 70px;
}

    .lightbox-fullscreen svg {
        width: 22px;
        height: 22px;
    }

.lightbox {
    display: none; /* Versteckt standardmäßig */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

    .lightbox.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    text-align: center;
}

    .lightbox-content img {
        max-width: 100%;
        max-height: 85vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    }

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--white);
    font-size: 50px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

    .lightbox-close:hover,
    .lightbox-close:focus {
        transform: rotate(90deg);
        background: rgba(255, 255, 255, 0.2);
    }

.lightbox-fullscreen {
    position: absolute;
    top: 20px;
    right: 110px; /* Links neben dem Schließen-Button */
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

    .lightbox-fullscreen:hover,
    .lightbox-fullscreen:focus {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

    .lightbox-fullscreen svg {
        width: 28px;
        height: 28px;
    }

/* Fullscreen Modus aktiv */
.lightbox:fullscreen {
    background: rgba(0, 0, 0, 1); /* Komplett schwarz im Fullscreen */
}

.lightbox:-webkit-full-screen {
    background: rgba(0, 0, 0, 1);
}

.lightbox:-moz-full-screen {
    background: rgba(0, 0, 0, 1);
}

.lightbox:-ms-fullscreen {
    background: rgba(0, 0, 0, 1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

    .lightbox-prev:hover,
    .lightbox-next:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-50%) scale(1.1);
    }

    .lightbox-prev:active,
    .lightbox-next:active {
        transform: translateY(-50%) scale(0.95);
    }

.lightbox-caption {
    color: var(--white);
    font-size: 18px;
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    display: inline-block;
}

.lightbox-counter {
    color: var(--white);
    font-size: 16px;
    margin-top: 10px;
    opacity: 0.8;
}

