/* =================== GLOBAL =================== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background: #f3f3f3;
}

.wrapper {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative; /* wichtig für Wasserzeichen */
    background: #d0d0d0; /* Hintergrund hinter dem Wasserzeichen dunkler machen */
}

/* =================== WASSERZEICHEN =================== */
.wrapper::before {
    content: "";
    position: fixed; /* fixiert im Hintergrund */
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    background-image: url('images/mckw-logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

/* =================== HEADER =================== */
header {
    background: #222;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
}

header img {
    width: 60px;
    height: 60px;
}

header h1 {
    text-align: center;
    flex-grow: 1;
    margin: 0;
    font-size: 26px;
}

/* =================== BURGER =================== */
.burger {
    display: none;           /* nur auf mobilen Geräten sichtbar */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;

    position: absolute;      /* relativ zum Header */
    top: 50%;                /* vertikal mittig */
    right: 10px;             /* rechts in Header-Ecke */
    transform: translateY(-50%);
    z-index: 10010;          /* über Wasserzeichen und Main */
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
}

/* =================== NAVIGATION =================== */
nav {
    background: #333;
    display: flex;
    flex-wrap: wrap;
    transition: max-height 0.3s ease;
    position: relative;
    z-index: 1001;
}

nav a {
    padding: 12px;
    color: white;
    text-decoration: none;
    flex-grow: 1;
    text-align: center;
    border-right: 1px solid #444;
}

nav a:last-child {
    border-right: none;
}

nav a:hover {
    background: #444;
}

/* =================== MAIN =================== */
main {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

main::-webkit-scrollbar {
    display: none;
}

.content {
    padding: 20px;
}

/* =================== GALLERY =================== */
.gallery {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    max-width: 750px;  /* Galerie ein wenig schmaler machen */
    margin: 0 auto;    /* Zentriert die Galerie */
}

.thumb-box {
    text-align: center;
}

.thumb-box img {
    width: 100%;
    height: auto;
    cursor: pointer;
    border-radius: 20px;
    transition: transform 0.2s;
}

.thumb-box img:hover {
    transform: scale(1.05);
}

.thumb-caption {
    margin-top: 5px;
    font-size: 14px;
    color: #444;
}

/* =================== FOOTER =================== */
footer {
    background: #222;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 1000;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* =================== LIGHTBOX =================== */
#lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

#lightbox img {
    max-width: 90%;
    max-height: 70%;
    border-radius: 4px;
    margin-bottom: 15px;
}

#lightbox-caption {
    color: white;
    font-size: 18px;
    text-align: center;
    margin-top: 10px;
    max-width: 90%;
}

#lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.arrow {
    position: absolute;
    top: 50%;
    font-size: 60px;
    color: white;
    cursor: pointer;
    transform: translateY(-50%);
}

.arrow.left { left: 30px; }
.arrow.right { right: 30px; }

/* =================== RESPONSIVE =================== */
@media (max-width: 768px) {

    /* Burger sichtbar machen */
    .burger {
        display: flex;
    }

    /* Navigation anpassen */
    nav {
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        position: fixed;   /* über Watermark und Main */
        top: 60px;         /* unter Header/Burger */
        right: 0;
        left: 0;
        background: #333;
        z-index: 10005;    /* unter Burger */
    }

    nav.show {
        max-height: 500px;
    }

    nav a {
        border-right: none;
        border-bottom: 1px solid #444;
    }

    /* Rechtes Logo etwas nach links rücken, damit es neben Burger sichtbar ist */
    header > a:last-of-type {
        margin-right: 50px;  /* Abstand zum Burger, anpassen nach Bedarf */
    }
}