* {
    scroll-behavior: smooth;
}

html {
    --bg-color: #111;
    --width1: 80vw;
    --width2: 50vw;
    --width3: 600px;
    background-image: url(bg.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    font-family: sans-serif;
}

html::before {
    content: ' ';
    display: block;
    /*hier den Pfad zu deinem Hintergrundbild einsetzen*/
    background-image: url('bg.jpg');
    background-color: rgba(0, 0, 0, 0.6);
    background-blend-mode: darken;
    background-position: center;
    background-size: cover;
    height: 100vh;
    width: 100vw;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    position: fixed;
    z-index: -10;
    /* Das hier ist sehr wichtig! */
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
}

.centered {
    text-align: center;
}

.titelimg {
    margin: 1vh auto;
    max-width: var(--width1);
}

article {
    display: grid;
    place-items: center center;
    max-width: 100%;
    row-gap: 5vh;
    column-gap: 2vw;
    margin: 0 auto;
    padding: 0 1vw;
}

img {
    border: 2px solid var(--bg-color);
    border-radius: 5px;
    max-width: 100%;
}

img:hover {
    border: 2px solid gold;
}

h1, h2, footer {
    background-color: rgba(0, 0, 0, 0.6);
    text-align: center;
    padding: 2vh 4vw;
    margin:1vh auto;
}

h1 {
    margin: 0;
    color: gold;
    position: sticky;
    top: 0;
}

h2 {
    color: white;
    width: calc(var(--width1) - 8vw);
    border-radius: 5px;
}

h2 span {
    font-size: 75%;
    font-weight: 200;
    display: block;
    margin: 20px 0;
}

a{
    color: gold;
}

section {
    display: grid;
    place-items: center center;
}

section img {
    max-width: var(--width1);
    margin: 1vh auto;
}

hr {
    max-width: var(--width1);
    border-color: gold !important; 
    margin: 3vh auto;

}

footer {
    color: gold;
    margin-bottom: 0;
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-around;
}

@media screen and (min-width: 576px) {
    article {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 992px) {
    article {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .titelimg {
        max-width: var(--width2);
    }
    
    h2 {
        max-width: calc(var(--width2) - 8vw);
    }
    
    hr {
        max-width: var(--width2);
    }
    
    section {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
        gap: 5vw;
        margin: 0 auto;
    }

    section img {
        max-width: 25vw;
    }
}

@media screen and (min-width: 1200px) {
    article {
        grid-template-columns: repeat(4, 1fr);
    }

    section {
        max-width: 1440px;
    }

    section img {
        max-width: 100%;
    }

    .titelimg {
        max-width: var(--width3);
    } 
    
    h2 {
        max-width: calc(var(--width3) - 8vw);
    }

    hr {
        max-width: var(--width3);
    }
}

@media screen and (min-width: 1600px) {
    article {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1800px;
    }
}

/* Background overlay */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Entry animation */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Image container */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;

    /* Zoom animation */
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

/* Main image */
.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: #6366f1;
    transform: rotate(90deg);
}

/* Navigation buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-nav:hover {
    background: #6366f1;
}