/* Grundlegende Zurücksetzung und Schriftart */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Ink Free', 'Caveat', cursive, sans-serif; 
    line-height: 1.6;
    background-color: #f4f4f4; /* Haupt-Hintergrundfarbe */
    color: #333;
}

/* ########################################### */
/* 1. HERO-SEKTION / TITELBILD */
/* ########################################### */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover; 
    background-position: center;
    z-index: 1;
    filter: brightness(0.8); 
}

/* Fotografenname, Hero-Content, Scroll-Down (Unverändert) */
.photographer-name {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    color: white;
    font-size: 1.1em;
    letter-spacing: 2px;
    font-weight: 300;
}
.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 20px;
}
.hero-content h1 {
    font-size: 3em; 
    font-weight: 300; 
    letter-spacing: 3px;
}

/* Scroll-Indikator */
.scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    text-decoration: none;
    font-size: 2em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-10px) translateX(-50%);}
    60% {transform: translateY(-5px) translateX(-50%);}
}

/* ########################################### */
/* 2. HIGHLIGHT BILD */
/* ########################################### */
.highlight-section {
    /* Weißer Abstand zum Titelbild */
    margin-top: 50px; 
    
    /* Reduziert auf Galerie-Breite (1200px) und zentriert */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; 
    
    position: relative;
    width: 100%;
    /* Höhe: 67.5% der Breite des Containers */
    padding-bottom: 67.5%; 
    height: 0;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 5px; 
    margin-bottom: 40px;
}

.highlight-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* ########################################### */
/* 3. TEXT SEKTION */
/* ########################################### */
.text-section {
    /* Hintergrundfarbe der Galerie */
    background-color: #ebebeb; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; 
    padding: 80px 20px;
    margin-bottom: 40px;
    text-align: center;
}

.text-content {
    /* Maximalbreite auf Galerie-Breite reduzieren und zentrieren */
    max-width: 1200px; 
    margin: 0 auto; 
    
    line-height: 2;
    font-size: 1.5em; /* Basisgröße */
    color: #444;
}

/* ########################################## */
/* 4. HAUPTGALERIE (RESPONSIVES GRID) */
/* ########################################## */
.gallery-container {
    background-color: #ebebeb; 
    padding: 40px 20px;
    max-width: 1200px; 
    margin: 0 auto;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr)); 
    gap: 15px; 
}

.gallery-item {
    overflow: hidden;
    position: relative;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding-bottom: 71.43%; 
    height: 0;
    cursor: pointer;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.3s ease-in-out;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* ########################################### */
/* 5. RESPONSIVE ANPASSUNGEN (Media Queries) */
/* ########################################### */

/* Tablet-Ansicht (größer als 600px) */
@media (min-width: 600px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content h1 {
        font-size: 4em;
        letter-spacing: 5px;
    }
}

/* Desktop-Ansicht (größer als 992px) */
@media (min-width: 992px) {
    .photo-gallery {
        grid-template-columns: repeat(3, 1fr); 
    }
}

/* Handy-Optimierung (kleiner als 600px) */
@media (max-width: 599px) { 
    .text-content {
        font-size: 1.25em; 
        line-height: 1.7;
    }
    .text-section {
        padding: 50px 10px; 
    }
}


/* ########################### */
/* 6. FOOTER */
/* ########################### */

footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    font-size: 0.9em;
    margin-top: 40px;
}

/* ########################### */
/* 7. LIGHTBOX STYLING (KORRIGIERT & WIEDERHERGESTELLT) */
/* ########################### */

/* Das Haupt-Lightbox-Overlay (schwarzer Hintergrund) */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 60px; /* Platz für die obere Leiste */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9); /* Der schwarze, transparente Hintergrund */
}

/* Der Container für das Bild und die Pfeile */
.lightbox-content {
    position: relative; 
    margin: auto;
    display: flex;
    align-items: center; 
    justify-content: center;
    width: 90%;
    max-width: 1100px;
}

/* Das eigentliche Bild (wird von JS mit Inhalt gefüllt) */
#lightbox-img {
    width: auto;
    max-width: 100%; /* Begrenzt auf 100% der Breite des Containers */
    max-height: 85vh; /* Begrenzt auf 85% der Viewporthöhe */
    display: block;
    border-radius: 5px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

/* Schließen-Button (X) */
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1001;
}

/* Navigationspfeile (Zurück/Weiter) */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.4);
}

.prev-btn {
    left: 0;
    border-radius: 3px 0 0 3px;
    margin-left: 10px;
}

.next-btn {
    right: 0;
    border-radius: 0 3px 3px 0;
    margin-right: 10px;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Zähler (1 von 15) */
#image-counter {
    color: #f2f2f2;
    font-size: 14px;
    padding: 8px 12px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

/* Zoom-Animation beim Öffnen */
@keyframes zoom {
    from {transform:scale(0.8)} 
    to {transform:scale(1)}
}