/* PRELOADER */
#preloader {
    position: fixed;
    width: 100%;
    height: 100vh;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#logo {
    width: 120px; /* vorher: 100; */
    animation: fadeIn 1s ease-in-out infinite alternate;
}

.progress-container {
    width: 150px; /* vorher: 50%; */
    height: 6px; /* vorher: 10px; */
    background: #333;
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #e94446;
    animation: loading 1s linear forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0.5; transform: scale(1);
    }
    to {
        opacity: 1; transform: scale(1.1);
    }
}

@keyframes loading {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.hidden {
    display: none;
}



/* Globale Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #1b1b1b;
    color: #333;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 2rem;
    background-color: #1b1b1b;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Logo und Text */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    text-decoration: none; /* Entfernt den Unterstrich vom Link */
    color: inherit; /* Behält die normale Schriftfarbe bei */
}

.logo:hover {
    transform: scale(1.05); /* Logo wird um 5% größer */
    transition: transform 0.3s ease-in-out;
}

.logo-img {
    width: 50px;
    height: auto;
    object-fit: contain;
}

/* Navigation */
.navbar {
    display: flex;
    align-items: center;

    justify-content: space-between;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

/* Fügen wir den mobilen Zustand für das Burger-Menü hinzu */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;  /* Stelle sicher, dass es unter der Navbar erscheint */
    left: 0;
    background-color: #fff;
    width: 100%;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    margin-top: 0; /* Abstand der aktivierten burger navbar nach oben */
}

.nav-links li a {
    text-decoration: none;
    color: #ccc;
    font-weight: bold;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
}

.nav-links li a:hover {
    background-color: #e94446;
    color: white;
}

.burger-menu {
    display:none;
    flex-direction: column;
    cursor: pointer;
}

.burger-menu .line {
    width: 25px;
    height: 3px;
    background-color: #ccc;
    margin: 3px 0;
    transition: transform 0.4s ease, opacity 0.4s ease, width 0.3s ease; /* Hinzufügen von Breiten- und Transformations-Animationen */
    border-radius: 4px; /* Runde Ecken für die Linien */
}

/* Burger-Menü in X-Form beim Öffnen */
.burger-menu.active .line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 5px); /* Besseres Verschieben */
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Sanftere Easing-Funktion */
}

.burger-menu.active .line:nth-child(2) {
    opacity: 0; /* Die mittlere Linie wird unsichtbar */
    transition: opacity 0.4s ease; /* Einfache Fade-Transition */
}

.burger-menu.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -5px); /* Besseres Verschieben */
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Sanftere Easing-Funktion */
}

/* Hero Bereich */
#hero {
    background: #fff;
    padding: 0.1rem 0.175rem; /* vorher padding: 0.4rem 0.5rem; */
    border-radius: 10px;
}

.hero-banner {
    position: relative;
    height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

.hero-text h2 {
    margin: 0 auto;
    padding: 0 10px;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    font-size: 2.5rem;
}

.hero-text {
    margin: 0;
    overflow: hidden;
}

/* Standard-Slides ausblenden */
.slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 0s linear 1s;
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide h2 {
    margin-top: 9rem; /* anpassen damit text weiter nach unten bei den slider-bildern */
}

.slide h2, .slide p {
    cursor: default;
    text-shadow: 
        1px 1px 0px black,  
        -1px -1px 0px black,  
        1px -1px 0px black,  
        -1px 1px 0px black; /* Schwarze Umrandung */
}

/* Aktives Slide anzeigen */
.slide.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease-in-out, visibility 0s linear;
}

/* Hintergrundbilder festlegen */
.slide:nth-child(1) {
    background-image: url("assets/images/banner1.jpg");
}

.slide:nth-child(2) {
    background-image: url("assets/images/banner2.jpg");
}

button.prev, button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

button.prev {
    left: 10px;
    border-radius: 4px;
}

button.next {
    right: 10px;
    border-radius: 4px;
}

section {
    text-align: center;
    margin: 3.5px 0; /* vorher: 7px 0; */
    padding: 2rem 1rem;
    border-radius: 10px;
    background-color: #1b1b1b;
}

/* Über-Mich Bereich */

#ueber-mich {
    margin: 5rem auto;
}

#ueber-mich h2 {
    color: #fff;
}

#ueber-mich p {
    color: #ccc;
}

#ueber-mich img {
    border-radius: 10px;
}

/* Dienstleistungen Bereich */

#dienstleistungen {
    margin: 5rem auto;
    background-color: #e94446;
}

#dienstleistungen h2 {
    color: #fff;
}

#dienstleistungen p {
    color: #ccc;
}


/* CARDS */
.card-container {
    display: flex; /* Flexbox aktiviert */
    justify-content: center; /* Zentriert die Karten */
    gap: 1rem; /* Abstand zwischen den Karten */
}

.card {
    margin: 5rem 0;
    padding: 1.5em;
    width: 300px;
    background: #333;
    text-align: center;
    border-radius: 50px;
}

.card h3 {
    color: #fff;
}

.card p {
    color: #fff;
}

.card img {
    width: 100%;
    border-radius: 10px;
}

/* Nächster Dienstleistungen Bereich */

#dienst {
    margin: 40px 0;
    background-color: #e94446;
    padding: 40px 0;
}

.dienst-article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 50px auto;
    padding: 20px;
    max-width: 1200px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dienst-image-left, .dienst-image-right {
    width: 30%; /* Einheitliche Größe für alle Bilder */
    height: auto;
    max-height: 250px; /* Begrenzung der Bildhöhe für Konsistenz */
    object-fit: cover; /* Bilder werden gleichmäßig beschnitten */
    border-radius: 10px;
}

.dienst-text-right, .dienst-text-left {
    width: 65%;
    text-align: left;
}

.dienst-text-right h3, .dienst-text-left h3 {
    margin-bottom: 10px;
    color: #111;
    font-size: 1.8em;
}

.dienst-text-right p, .dienst-text-left p {
    color: #222 !important;
    line-height: 1.6;
    font-size: 1.1em;
}

/* Nächster Dienstleistungen Bereich (Referenzen) */

#referenzen {
    margin: 40px 0;
    background-color: #e94446;
    padding: 40px 0;
}

#referenzen h2 {
    color: #fff;
}

#referenzen p {
    color: #fff;
}


/* Infinity Scroll */
.wrapper {
    width: 90%;
    max-width: 1536px;
    margin-inline: auto;
    position: relative;
    height: 100px;
    margin-top: 5rem;
    overflow: hidden;
    mask-image: linear-gradient(
        to right,
        rgba(0,0,0,0),
        rgba(0,0,0,1) 20%,
        rgba(0,0,0,1) 80%,
        rgba(0,0,0,0)
    );
}

@keyframes scrollleft {
    to {
        left: -200px;
    }
}

.item {
    width: 200px;
    height: 100px;
    background-color: none;
    border-radius: 6px;
    position: absolute;
    left: max(calc(200px * 9), 100%);
    animation-name: scrollleft;
    animation-duration: 30s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    /* animation-delay: -15s; */
}

.item1 {
    animation-delay: calc(30s / 9 * (9 - 1) * -1);
}

.item2 {
    animation-delay: calc(30s / 9 * (9 - 2) * -1);
}

.item3 {
    animation-delay: calc(30s / 9 * (9 - 3) * -1);
}

.item4 {
    animation-delay: calc(30s / 9 * (9 - 4) * -1);
}

.item5 {
    animation-delay: calc(30s / 9 * (9 - 5) * -1);
}

.item6 {
    animation-delay: calc(30s / 9 * (9 - 6) * -1);
}

.item7 {
    animation-delay: calc(30s / 9 * (9 - 7) * -1);
}

.item8 {
    animation-delay: calc(30s / 9 * (9 - 8) * -1);
}

.item9 {
    animation-delay: calc(30s / 9 * (9 - 9) * -1);
}


/* Galerie Bereich */
#galerie {
    margin: 40px 0;
    padding: 40px 0;
}

#galerie h2 {
    color: #fff;
}

#galerie p {
    color: #fff !important;
}

/* Grid-Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    padding: 20px;
}

/* Einzelne Bilder */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    /* height: 270px; */ /* Feste Höhe für alle Bilder */
}

.gallery-item img {
    width: 100%;
    height: auto;
    /* object-fit: cover; */ /* Schneidet das Bild passend zurecht */
    transition: transform 0.3s ease-in-out;
}

/* Hover-Effekt */
.gallery-item:hover img {
    transform: scale(1.1);
}


/* Kontakt Bereich */
#kontakt {
    margin: 40px 0;
    padding: 40px 0;
    background-color: #e94446;
}

#kontakt h2 {
    color: #fff;
}

#kontakt p {
    color: #fff !important;
}


/* Footer-Bereich */

footer {
    background-color: #1b1b1b;
    color: white;
    padding: 20px;
    text-align: center;
}

footer .footer-content p {
    cursor: default;
}

footer .footer-content ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: inline-flex;
    gap: 15px;
}

footer .footer-content ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

footer .social-media {
    margin-top: 10px;
}

footer .social-media a {
    text-decoration: none;
    margin: 0 10px;
    color: white;
    font-size: 20px;
    transition: color 0.3s;
}

footer .social-media a:hover {
    color: #007bff;
}

/* Responsives Design */

@media (max-width: 768px) {
    .hero-text h2{
        font-size: 2rem;
    }

    .hero-text{
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .nav-links {
        display: none;
        flex-direction: column;

        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: white;
        width: 100%;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .burger-menu {
        display: flex;
    }

    .nav-links.active {
        display: flex;
        position: absolute;
        top: 100%;
        right: 0;
        background: #1b1b1b; /* farbe von burgermenu hintergrund */
        box-shadow: 0 2px 5px rgba(0, 0, 0.1);
    }

    .card-container {
        flex-direction: column; /* Karten untereinander */
        gap: 0.1rem; /* Reduziere den Abstand zwischen den Karten */
        align-items: center; /* Karten zentrieren */
    }

    .card, .card2, .card3 {
        width: 90%; /* Breite der Karten für Mobilgeräte anpassen */
        margin-bottom: 0.1rem; /* Etwas Abstand zwischen den Karten */
    }

    .dienst-article {
        flex-direction: column;
        text-align: center;
    }
    .dienst-image-left, .dienst-image-right {
        width: 80%;
        margin: 0 auto 20px;
    }
    .dienst-text-right, .dienst-text-left {
        width: 90%;
    }

}


/* Scroll-Animation */
@keyframes appear {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Anfangszustand für die Animation */
.block {
    opacity: 0; 
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform; /* Performance-Optimierung */
}

/* Klasse, die beim Scrollen hinzugefügt wird */
.block.visible {
    opacity: 1;
    transform: translateX(0);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
  }

  .gallery img {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
  }

  .gallery img:hover {
    transform: scale(1.05);
  }

  .lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }

  .lightbox.active {
    display: flex;
  }

  .lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
  }

  .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
  }


.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    align-items: start;
}

.gallery-item video,
.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-item.video-large {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 768px) {
    .gallery-item.video-large {
        grid-column: span 1;
        grid-row: span 1;
    }
}


.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* quadratische Kästchen */
    overflow: hidden;
    border-radius: 12px; /* optional für abgerundete Ecken */
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 12px; /* gleiche Rundungen wie Container */
}

