/* ============================================================
   ANIMIERTER HINTERGRUND
   ============================================================ */
@keyframes logoPulse {
    0% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(1.05); }
    100% { opacity: 0.15; transform: scale(1); }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    /* PFAD-CHECK: Falls das Bild nicht erscheint, nutze 'logo2.png' direkt */
    background-image: url('../images/logo2.png'); 
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    animation: logoPulse 12s infinite ease-in-out;
    pointer-events: none;
}

/* ============================================================
   1. ALLGEMEINE SETTINGS
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
}

.gallery-section {
    padding: 40px 0;
    text-align: center;
}

.gallery-title {
    margin-bottom: 30px;
    font-size: 2rem;
    color: #39ff14;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* ============================================================
   2. KATEGORIEN & NAVIGATION
   ============================================================ */
.category-bar {
    display: flex;
    justify-content: center;
    gap: 15px; /* Etwas mehr Luft zwischen den Buttons */
    flex-wrap: wrap;
    margin-bottom: 50px;
    padding: 0 20px;
}

.cat-btn {
    background: #111; /* Etwas dunkler für mehr Kontrast */
    color: #fff;
    border: 1px solid #222;
    padding: 12px 24px;
    border-radius: 50px; /* Voll abgerundet wirkt sportlicher, wie Fahrzeug-Kurven */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* "Snappy" Animation */
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Der Hover-Effekt: Dezentes Leuchten */
.cat-btn:hover {
    border-color: #39ff14;
    color: #39ff14;
    background: rgba(57, 255, 20, 0.05); /* Ganz leichter Grünschimmer im Hintergrund */
    transform: translateY(-2px); /* Button hebt sich leicht ab */
}

/* Der Aktive Zustand mit starkem Glow */
.cat-btn.active {
    background: #39ff14 !important;
    color: #000 !important;
    border-color: #39ff14;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4); /* Das markante Leuchten */
}

/* Für Mobilgeräte: Buttons etwas kleiner machen */
@media (max-width: 600px) {
    .cat-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    .category-bar {
        gap: 8px;
    }
}

/* ============================================================
   3. GALERIE GRID (Masonry Style) & WASSERZEICHEN
   ============================================================ */
.gallery-grid {
    column-count: 3;
    column-gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-item {
    position: relative; /* Wichtig für das Wasserzeichen-Overlay */
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #000; /* Schwarzer Hintergrund für Tiefe */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover-Effekt für das gesamte Item */
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Grundzustand: Bilder und Videos dezent abdunkeln */
.gallery-item img, 
.gallery-item video,
.ba-slider {
    width: 100%;
    display: block;
    object-fit: cover;
    filter: brightness(0.80); /* 20% dunkler */
    transition: filter 0.4s ease, transform 0.4s ease;
}

/* Hover-Effekt: Volle Helligkeit und leichter Zoom */
.gallery-item:hover img, 
.gallery-item:hover video,
.gallery-item:hover .ba-slider {
    filter: brightness(1.0);
    transform: scale(1.03);
}

/* DAS WASSERZEICHEN */




/* ============================================================
   4. LIGHTBOX (WICHTIG: Klassen-Namen angepasst)
   ============================================================ */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none; /* Wird über JS zu 'flex' */
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

/* Container in der Lightbox */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Der Slider speziell in der Lightbox */
.lightbox-ba {
    width: 100%;
    height: auto;
    max-width: 1200px; /* Begrenzung für sehr große Bildschirme */
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/* Styling für den Slider innerhalb der Lightbox */
.lightbox-content .ba-slider {
    width: 80vw;   /* 80% der Bildschirmbreite */
    height: 80vh;  /* 80% der Bildschirmhöhe */
    max-width: 1200px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content .ba-slider img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Verhindert Verzerrung */
}

.lightbox-ba .img-before, 
.lightbox-ba .img-after {
    max-height: 80vh;
    object-fit: contain; /* Damit das ganze Auto sichtbar bleibt */
}

#lightboxImage, #lightboxVideo {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.close-lightbox {
    position: fixed;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5200;
    transition: 0.3s;
}

.prev, .next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 70px;
    padding: 0 30px;
    cursor: pointer;
    z-index: 5200;
    transition: 0.3s;
}

.prev { left: 0; }
.next { right: 0; }

.close-lightbox:hover, .prev:hover, .next:hover { 
    color: #39ff14; 
}

/* ============================================================
   5. LOAD MORE & RESPONSIVE
   ============================================================ */
.load-more-container {
    margin-top: 40px;
}

.load-more-btn {
    background: transparent;
    color: #39ff14;
    border: 2px solid #39ff14;
    padding: 12px 35px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 1px;
    transition: 0.3s;
}

.load-more-btn:hover {
    background: #39ff14;
    color: #000;
}

@media (max-width: 1024px) {
    .gallery-grid { column-count: 2; }
}

@media (max-width: 600px) {
    .gallery-grid { column-count: 1; } /* Einspaltig auf dem Handy sieht sauberer aus */
    .prev, .next { font-size: 40px; }
}

/* Grund-Einstellungen */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: #000; color: #fff; font-family: sans-serif; }

/* Sticky Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid #39ff14;
    text-align: center;
}

.gallery-title { color: #39ff14; font-size: 1.4rem; letter-spacing: 2px; margin-bottom: 15px; }

/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Gemeinsames Button Design */
.nav-btn-link, .cat-btn, .dropdown-toggle {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.3s;
}

.cat-btn.active { background: #39ff14 !important; color: #000 !important; border-color: #39ff14; }

/* Dropdown Logik */
.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #000;
    border: 1px solid #39ff14;
    min-width: 180px;
    z-index: 3000;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-item {
    width: 100%; padding: 12px; background: none; border: none;
    color: #fff; text-align: left; cursor: pointer; border-bottom: 1px solid #1a1a1a;
}
.dropdown-item:hover { background: #39ff14; color: #000; }

/* Galerie Gitter */
.gallery-grid { column-count: 3; column-gap: 15px; max-width: 1400px; margin: 20px auto; padding: 0 15px; }
.gallery-item { break-inside: avoid; margin-bottom: 15px; border-radius: 10px; overflow: hidden; }
.gallery-item img, .gallery-item video { width: 100%; display: block; }

/* Lightbox - Pfeile am Rand */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); display: none; justify-content: center; align-items: center; z-index: 5000; }
.close-lightbox { position: fixed; top: 20px; right: 20px; font-size: 50px; color: #fff; cursor: pointer; z-index: 5100; }
.nav-btn { position: fixed; top: 50%; transform: translateY(-50%); color: #fff; font-size: 60px; background: none; border: none; cursor: pointer; z-index: 5100; padding: 20px; }
.prev { left: 5px; }
.next { right: 5px; }

/* Responsive / Handy & Tablet */
@media (max-width: 768px) {
    .gallery-grid { column-count: 2; }
    .nav-container { gap: 5px; }
    .nav-btn-link, .cat-btn, .dropdown-toggle { padding: 8px 10px; font-size: 0.75rem; }
}

/* Verhindert Icons und graue Balken in der Grid-Vorschau */
.grid-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none; /* Klick wird vom gallery-item abgefangen */
}

/* Entfernt den "Download"-Button in der Lightbox (optional) */
video::-internal-media-controls-download-button { display:none; }
video::-webkit-media-controls-enclosure { overflow:hidden; }
video::-webkit-media-controls-panel { width: calc(100% + 30px); }

/* Container für den Vorher/Nachher Slider */
.ba-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    line-height: 0;
}

.ba-slider img {
    pointer-events: none; /* Das Bild selbst ignoriert Klicks, das 'div' dahinter fängt sie ab */
    user-select: none;
    -webkit-user-drag: none;
}

.ba-after-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%; /* Startposition */
    overflow: hidden;
    border-right: 2px solid #39ff14;
}

.ba-after-overlay img {
    height: 100%;
    width: 100%; /* Hinzufügen */
    min-width: 300px; /* Hinzufügen, damit es einen Initialwert hat */
    object-fit: cover;
    max-width: none !important;
    display: block;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 40px;
    margin-left: -20px;
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Der Schieber muss natürlich weiterhin reagieren */
    z-index: 30;
}

.ba-handle::before {
    content: '';
    width: 4px;
    height: 100%;
    background: #39ff14;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
}

.ba-after-overlay {
    pointer-events: none; /* Auch das Overlay darf den Klick nicht blockieren */
}

/* 1. HEADER & TITEL-BILD */
.gallery-header {
    text-align: center;
    padding: 0px 0 30px 0;
}

.project-title-img {
    max-width: 400px; /* <--- HIER änderst du die Größe am PC */
    width: 90%;      /* Sorgt dafür, dass es am Handy nicht übersteht */
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(57, 255, 20, 0.3)); /* Dein grüner Glow */
}

/* --- Bereich für Mobilgeräte (Smartphone) --- */
@media (max-width: 768px) {

    /* Den Projekttitel am Handy verkleinern */
    .project-title-img {
        max-width: 280px; /* Hier kannst du den Wert verkleinern (z.B. 180px), wenn es noch zu groß ist */
        width: 70%;       /* Nimmt nur noch 70% der Bildschirmbreite ein */
    }

    /* Optional: Den Abstand oben/unten am Handy etwas reduzieren */
    .gallery-header {
        padding: 20px 0 10px 0;
    }
}

footer {
    width: 100%;
    background-color: #0a0a0a; /* Passend zu deinem dunklen Design */
    padding: 20px 0;           /* Abstand oben und unten */
    border-top: 1px solid #222; /* Dezente Trennlinie */
}

.copyright {
    text-align: center;        /* Zentriert den Text horizontal */
    width: 100%;
    color: #888;               /* Etwas dezenteres Grau */
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1px;
}