/* Allgemeine Stile */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: url('images/hintergrund3.svg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh; /* Mindestens die Höhe des Viewports abdecken */
    color: #333;
}

header {
    background-color: rgba(51, 51, 51, 0.4);
    color: #fff;
    padding: 1em;
    text-align: center;
    position: relative; /* Notwendig für die Buttons im Header */
}

header .logo {
    margin-right: 100px;
}

header .logo img {
    max-height: 80px; /* Passe die Höhe nach Bedarf an */
    background-color: transparent; /* Stellt sicher, dass der Hintergrund transparent ist */
}


header h1 {
    margin: 0;
}

header .header-buttons {
    margin-top: 1em; /* Abstand zwischen Überschrift und Buttons */
}

header button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
    margin: 0.5em; /* Abstand zwischen Buttons */
}

header button:hover {
    background-color: #555;
}

main {
    padding: 2em;
    background-color: rgba(255, 255, 255, 0.4); /* Transparenz erhöht */
    border-radius: 10px;
    max-width: 1200px;
    margin: 2em auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

footer {
    background-color: rgba(51, 51, 51, 0.4);
    color: #fff;
    text-align: center;
    padding: 1em;
    position: relative;
    width: 100%;
    bottom: 0;
}

/* Gallery Styles */
#gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    justify-content: center;
    margin-top: 4em; /* Abstand nach oben, um Platz für den Titel zu schaffen */
}

.gallery-header {
    position: absolute;
    top: -3em; /* Verändert den Abstand nach Bedarf */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5em 1em;
    border-radius: 5px;
}

.gallery-header h2 {
    color: #fff;
    margin: 0;
}

.artwork {
    background-color: rgba(255, 255, 255, 0.4); /* Transparenz erhöht */
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1em;
    width: calc(33.333% - 2em);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden; /* Damit das vergrößerte Bild nicht über das Artwork hinausgeht */
}

.artwork img {
    max-width: 100%;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1em;
    cursor: pointer; /* Zeigt an, dass das Bild anklickbar ist */
    transition: transform 0.3s ease; /* Weiche Übergänge für das Vergrößern/Verkleinern */
}

.artwork img.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.9); /* Dunkler Hintergrund für besseren Kontrast */
    cursor: zoom-out; /* Zeigt an, dass das Bild verkleinert werden kann */
}

.artwork h3 {
    margin-top: 0;
}

button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background-color: #555;
}

/* Gallery Item Styles */  
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}


.gallery-item {
    background: rgba(255, 255, 255, 0.4);
    padding: 10px;
    border-radius: 10px;
    width: calc(33.333% - 20px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 20px;
}

.gallery-item .title {
    font-size: 24px;
    margin-bottom: 10px;
}

.gallery-item img {
    max-width: 100%;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img.enlarged {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: contain; /* Ensures the entire image is visible without distortion */
    z-index: 1000;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.8); /* Dark background to highlight the image */
}

.gallery-item img.enlarged:focus {
    outline: none; /* Remove focus outline */
}

.gallery-item h2 {
    font-size: 24px;
    margin: 10px 0;
}

.gallery-item p {
    font-size: 16px;
    margin: 5px 0;
}

/* Media Queries für mobile Geräte  @media (max-width: 768px) {   */
@media (max-width: 1020px) {
    body {
        background-size: cover; /* Sicherstellen, dass das Hintergrundbild auf kleinen Bildschirmen gut skaliert */
    }

    main {
        padding: 1em;
        margin: 1em;
    }

    .gallery-header {
        position: static;
        margin-bottom: 1em;
        text-align: center;
    }

    #gallery {
        flex-direction: column;
        align-items: center;
    }

    .artwork {
        width: 100%;
        margin-bottom: 1em;
    }

    .artwork img {
        max-height: 300px;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    header {
        text-align: center;
        padding: 1em;
    }

    .header-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 1em;
    }

    .gallery-item {
        width: 100%; /* Vollständige Breite für kleine Bildschirme */
    }

    .gallery-item .title {
        font-size: 20px;
    }

    .gallery-item p {
        font-size: 14px;
    }

    button {
        padding: 0.5em 0.8em;
    }

    .artwork {
        width: 100%; /* Vollständige Breite für kleine Bildschirme */
    }
}
