#home {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #ffffff;
}

/* Oberer Bereich */
#home .header-top {
    height: 45px;
    opacity: 1;
    overflow: hidden;

    transition:
        height 0.3s ease,
        opacity 0.2s ease;
}

/* Logo normal */
#home .logo {
    width: 75%;
    height: auto;
    transition: width 0.3s ease;
}

/* Navigation */
#home .navbar-brand {
    height: 100px;
    transition: height 0.3s ease;
}

#home .navbar-nav > li > a {
    padding-top: 38px;
    padding-bottom: 38px;

    transition:
        padding-top 0.3s ease,
        padding-bottom 0.3s ease;
}


/* ==================================
   GESCROLLTER ZUSTAND
================================== */

#home.scrolled .header-top {
    height: 0;
    opacity: 0;
}

#home.scrolled .logo {
    width: 50%;
}

#home.scrolled .navbar-brand {
    height: 70px;
}

#home.scrolled .navbar-nav > li > a {
    padding-top: 25px;
    padding-bottom: 25px;
}

#home.scrolled {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}




/* =====================================================
   DESKTOP
   ===================================================== */

@media screen and (min-width: 768px) {

    #home .navbar-header {
        height: auto !important;
    }

    #home .navbar-brand {
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    #home .navbar-brand a img.logo {
        width: 240px !important;
        height: auto !important;
        max-width: 240px !important;
        max-height: none !important;
    }

    /* Navigation wieder horizontal */
    #home .navbar-nav {
        float: right !important;
    }

    #home .navbar-nav > li {
        float: left !important;
        width: auto !important;
    }

    #home .navbar-collapse {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }


    /* Nach dem Scrollen */

    #home.scrolled .navbar-brand a img.logo {
        width: 130px !important;
        height: auto !important;
        max-width: 130px !important;
    }

}



/* =====================================================
   SMARTPHONE
   ===================================================== */

@media screen and (max-width: 767px) {

    /* Header normal */
    #home .container_top,
    #home .header-bottom,
    #home .navbar {
        height: auto !important;
        min-height: 120px !important;
    }

    #home .navbar-header {
        height: 120px !important;
        min-height: 120px !important;
    }


    /* Logo-Bereich */
    #home .navbar-brand {
        position: static !important;
        float: left !important;

        width: 150px !important;
        height: 120px !important;

        margin: 0 !important;
        padding: 5px 10px !important;

        overflow: hidden !important;
    }

    #home .navbar-brand a {
        display: flex !important;
        align-items: center !important;

        width: 100% !important;
        height: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    /* Großes Logo oben */
    #home .navbar-brand a img.logo {
        position: static !important;

        width: 110px !important;
        height: 110px !important;

        max-width: 110px !important;
        max-height: 110px !important;

        margin: 0 !important;
        padding: 0 !important;

        transform: none !important;
        object-fit: contain !important;
    }


    /* Hamburger */
    #home .navbar-toggle {
        display: block !important;
        float: right !important;

        margin-top: 40px !important;
        margin-right: 20px !important;
    }


    /* Aufklapp-Menü */
    #home .navbar-collapse {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;

        clear: both !important;
        overflow: hidden;
        background: #ffffff;
    }

    #home .navbar-collapse.in {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }


    /* Menü untereinander */
    #home .navbar-nav {
        float: none !important;
        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    #home .navbar-nav > li {
        float: none !important;
        width: 100% !important;
    }

    #home .navbar-nav > li > a {
        padding: 14px 20px !important;
    }


    /* ======================================
       SMARTPHONE NACH DEM SCROLLEN
       ====================================== */

    #home.scrolled .navbar-header {
        height: 70px !important;
        min-height: 70px !important;
    }

    #home.scrolled .container_top,
    #home.scrolled .header-bottom,
    #home.scrolled .navbar {
        min-height: 70px !important;
        height: auto !important;
    }

    #home.scrolled .navbar-brand {
        width: 100px !important;
        height: 70px !important;
    }

    #home.scrolled .navbar-brand a img.logo {
        width: 60px !important;
        height: 60px !important;

        max-width: 60px !important;
        max-height: 60px !important;
    }

    #home.scrolled .navbar-toggle {
        margin-top: 17px !important;
    }

}


/* =========================================
   OBERER BLAUER KONTAKTBALKEN
   ========================================= */

#home .header-top .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

#home .header-top .icon {
    float: none !important;
    width: auto !important;
}

#home .header-top .icon ul {
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 !important;
    padding: 0 !important;
}

#home .header-top .icon ul li {
    float: none !important;
    display: flex;
    align-items: center;
}


/* =====================================================
   HEADER KOMPAKTER - DESKTOP
   ===================================================== */

@media screen and (min-width: 768px) {

    /* Blauer Balken oben */
    #home .header-top {
        height: 30px !important;
        min-height: 30px !important;
        line-height: 30px !important;
        padding: 0 !important;
    }

    #home .header-top .container {
        height: 30px !important;
        min-height: 30px !important;
    }

    #home .header-top ul {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }


    /* Weißer Bereich mit Logo + Navigation */
    #home .container_top,
    #home .header-bottom,
    #home .navbar {
         height: 110px !important;
        min-height: 110px !important;
        margin-bottom: 0 !important;
    }


    /* Logo-Container */
    #home .navbar-brand {
       position: relative !important;
        width: 250px !important;
        height: 110px !important;
        padding: 0 !important;
        overflow: visible !important;
    }


    /* Logo */
    #home .navbar-brand a img.logo {
       position: absolute !important;

        width: 220px !important;
        height: 220px !important;

        max-width: 220px !important;
        max-height: 220px !important;

        left: 5px !important;
        top: 60% !important;

        transform: translateY(-50%) !important;

        object-fit: contain !important;

        z-index: 100 !important;

        transition:
            width 0.3s ease,
            height 0.3s ease !important;
    }


    /* Menü vertikal zentrieren */
    #home .navbar-nav > li > a {
       padding-top: 44px !important;
        padding-bottom: 44px !important;
    }


    /* =====================================
       NACH DEM SCROLLEN
       ===================================== */

    #home.scrolled .header-top {
        height: 0 !important;
        min-height: 0 !important;
        opacity: 0;
        overflow: hidden;
    }

    #home.scrolled .header-top .container {
        height: 0 !important;
        min-height: 0 !important;
    }

    #home.scrolled .container_top,
    #home.scrolled .header-bottom,
    #home.scrolled .navbar {
        height: 70px !important;
        min-height: 70px !important;
    }

    #home.scrolled .navbar-brand {
        height: 70px !important;
       width: 125px;
    }

    #home.scrolled .navbar-brand a img.logo {
          width: 105px !important;
        height: 105px !important;

        max-width: 105px !important;
        max-height: 105px !important;

        left: 10px !important;
    }

    #home.scrolled .navbar-nav > li > a {
        padding-top: 21px !important;
        padding-bottom: 21px !important;
    }

}
 
 
 
