/*  HEADER ANFANG  -------------------------------------------------------------------------------------------------------------------------  */

.header-mobile-buttons {
    background: var(--background);
}

nav {
    display: block;
}

header p {
    margin: 0;
    padding: 0;
}  

.menueleiste {
    position: relative;
    background: transparent;
}

.menueleiste nav ul {
    list-style: none;
    padding-left: 0;
}

@media (min-width: 992px) {

    .mobil-menu-button {
        display: none;
    }

    .menueleiste nav > ul {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    header {
        position: fixed;
        top: 0;
        z-index: 1200;
        width: 100%;
        overflow: visible !important;
        background: linear-gradient(to bottom, #0000002b 0%, transparent 100%);
        transition: all 0.5s ease-in-out;
    } 

    header .logo {
        position: inherit;
        opacity: 1;
        padding: 2rem 0;
        height: 100%;
        max-height: 120px;
    }

    header .menueleiste nav {
        height: 100%;
    }    
        
    nav ul {
        margin: 0 auto;
        padding-left: 0;
    }

    nav ul li {
        display: block;
        float: left;
        line-height: 70px;
        position: relative;
    }

    header nav ul > li > ul > li {
        float: none;
        display: block;
        border-right: none;
    }

    nav ul li ul li.menu-item-has-children > a:after {
        content: "\e258";
        float: right;
        color: inherit;
        font-size: 1.4rem;
        font-family: "Glyphicons Halflings";
    }

    .maplink:before {
        content: "\e062";
        font-weight: 400;
        font-size: inherit;
        margin-right: 3px;
        text-decoration: none;
        font-family: 'Glyphicons Halflings';
        color: inherit;
    }

    header #logo {
        height: 100%;
        align-items: center;
        display: flex;
    }

    #menueleisten-id .telefonlink {
        display: none;
    }
        
    .header {
        display: flex;
        height: 15rem;
        align-content: center;
        justify-content: space-between;
        align-items: center;
    }

    .header:before, .header:after  {
        display: none;
    }

    header .current-menu-item > a, header .current-menu-parent > a, header .current-page-parent > a {
        background: transparent;
        color: var(--text-invert);
    }

    nav > ul > li > a:before {
        content: "";
        position: absolute;
        z-index: -1;
        left: 51%;
        right: 51%;
        bottom: 0;
        background: var(--primary-color);
        height: 3px;
        -webkit-transition-property: left,right;
        transition-property: left,right;
        -webkit-transition-duration: 0.15s;
        transition-duration: 0.15s;
        -webkit-transition-timing-function: ease-out;
        transition-timing-function: ease-out;
    }
    
    header .current-menu-item > a:before, header .current-menu-parent > a:before,  header .current-menu-ancestor > a:before, header .current-page-parent > a:before, nav ul li a:hover:before {
        left: 0;
        right: 0;
    }    

    nav ul li a:hover {
        color: var(--text-invert);
    }

    .mobil-menu-button-bg {
            display: none;    
    } 

    nav ul.sub-menu > li > a {
        display: block;
        padding: 0.8rem;
        width: auto;
        line-height: 2rem;
        color: var(--text-color);
        background: var(--background-transparent);
        -moz-transition: none;
        -o-transition: none;
        -webkit-transition: none;
        transition: none;
    } 

    nav ul li a {
        display: block;
        padding: 0rem 1.4rem 0;
        width: auto;
        margin-top: 0px;
        color: var(--text-invert);
        font-weight: 400;
        font-size: 1.6rem;
        -moz-transition: all .1s ease-in;
        -o-transition: all .1s ease-in;
        -webkit-transition: all .1s ease-in;
        transition: all .1s ease-in;
    }
        
    nav ul li:hover ul {
        display: block;
    }

    nav ul li ul {
        display: none;
        top: 100%;
        width: 30rem;
        height: auto;
        position: absolute;
        margin: 0 0 0 0;
        padding: 0 0 0 0;
        background: transparent;
        box-shadow: 0 0.2rem 12px var(--background-dark);
    }

    nav ul.sub-menu > li:hover > a {
        background: var(--secondary-transparent);
        color: var(--text-invert);
    }

    .sub-menu .current-page-parent > a  {
        background: var(--secondary-transparent);
        color: var(--text-invert);
    }

    nav > ul > li > ul > li > ul.sub-menu {
        display: none;
    }

    nav > ul > li > ul > li:hover > ul.sub-menu {
        display: block;
        position: absolute;
        right: 100%;
        top: 0;
        z-index: 20;
    }

    .sub-menu .current-menu-item > a {
        background: var(--secondary-transparent);
        color: var(--text-invert);
    } 

    .socialicon {
        display: none;
    }

    header nav > ul > li:last-of-type a {
        line-height: 20px;
        margin-left: 1.4rem;
    }

    /* Buttons Anfang -----------------------------------------------------------------------------------------------*/

header  nav > ul > li:last-of-type a {
    display: flex;
    align-items: center;
    padding: 1rem 3rem;
    border-radius: 10rem;
    color: var(--text-invert);
    font-size: 1.6rem;
    font-weight: 300;
    border: 1px solid var(--primary-color);
    letter-spacing: 1px;
    transition: all .3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    width: fit-content;
    background: var(--farbverlauf);
}

header  nav > ul > li:last-of-type a:hover {
    color: var(--text-color);
}

header  nav > ul > li:last-of-type a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--secondary-color);
    transition: all .3s;
    border-radius: 10rem;
    z-index: -1;
}

header  nav > ul > li:last-of-type a:after {
    background-image: url(/wp-content/themes/zahnarzt-hannover/images/pfeil-icon.png);
    display: inline-block;
    background-size: 20px;
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
    content: '';
    margin: 0.5rem;
    transition: all 0.3s;
}

header  nav > ul > li:last-of-type a:hover:after {
    background-image: url(/wp-content/themes/zahnarzt-hannover/images/pfeil-icon-grau.png);
}

header  nav > ul > li:last-of-type a:hover:before {
    width: 100%;
}

header  nav > ul > li:last-of-type a img {
    width: 24px;
    vertical-align: bottom;
    margin-left: 1rem;
    transition: all 0.4s ease;
}

/* Buttons Ende -----------------------------------------------------------------------------------------------*/

}

@media (min-width: 992px) and (max-width: 1399px) {
    header .logo {
        max-height: 95px;
    }
}

@media (max-width: 991px) {

    .menueleiste {
        position: fixed;
        top: 5rem;
        right: -100%;
        height: 100vh;
        z-index: 300;
        background: var(--farbverlauf);
        width: 100%;
    }
      
    .menueleiste nav {
        width: 100vw;
        margin-top: 5rem;
    }

    .mobil-menu-button {
        position: relative;
        width: 70px;
        background: transparent;
        top: 0;
        height: 5rem;
        z-index: 50;
        float: right;
    }
    
    .mobil-menu-button-bg {
        position: fixed;
        z-index: 5;
        width: 100%;
        background: var(--farbverlauf);
    }
    
    .mobil-menu-button span {
        float: right;
        width: 30px;
        top: 1rem;
        height: 0.2rem;
        background: white;
        margin-top: 25px;
        margin-right: 15px;
    }
    
    .mobil-menu-button.menu-open span {
        height: 0px;
    }
    
    .mobil-menu-button.menu-open span:before {
        width: 3rem;
        height: 0.2rem;
        background: white;
        transition: 0.3s;
        right: 15px;
        position: absolute;
        top: 1.3rem;
        content: '';
        transform: rotate3d(0, 0, 1, 45deg);
    }
    
    .mobil-menu-button span:before {
        width: 3rem;
        height: 0.2rem;
        background: white;
        transition: 0.3s;
        right: 15px;
        position: absolute;
        top: 1.7rem;
        content: '';
        -webkit-transform-origin: 0.001rem center;
        transform-origin: 0.005rem center;
    }
    
    .mobil-menu-button.menu-open span:after {
        width: 3rem;
        height: 0.2rem;
        background: white;
        transition: 0.3s;
        right: 15px;
        position: absolute;
        top: 34px;
        content: '';
        transform: rotate3d(0, 0, 1, -45deg);
    }
    
    .mobil-menu-button span:after {
        width: 3rem;
        height: 0.2rem;
        background: white;
        transition: 0.3s;
        right: 15px;
        position: absolute;
        top: 3.3rem;
        content: '';
        -webkit-transform-origin: 0.001rem center;
        transform-origin: 0.005rem center;
    }
    
    nav ul li {
        text-align: left;
        padding-left: 1.5rem;
        list-style: none;
        position: relative;
        border-bottom: 1px solid var(--background);
    }

    nav ul li ul {
        display: none;
        top: 0;
        left: 0;
        width: 100%;
        height: auto!important;
        position: relative;
        margin: 0 0 0 0;
        padding: 0 0 0 0;
        background: transparent;
    }

    nav ul li ul>li {
        animation-name: animateli;
        animation-duration: 350ms;
        animation-delay: calc(var(--animation-order) * 100ms);
        animation-fill-mode: both;
        animation-timing-function: ease-in-out;
    }

    nav ul>li ul li:nth-of-type(1) {
        --animation-order: 1;
    }

    nav ul>li ul li:nth-of-type(2) {
        --animation-order: 2;
    }

    nav ul>li ul li:nth-of-type(3) {
        --animation-order: 3;
    }

    nav ul>li ul li:nth-of-type(4) {
        --animation-order: 4;
    }

    nav ul>li ul li:nth-of-type(5) {
        --animation-order: 5;
    }

    nav ul>li ul li:nth-of-type(6) {
        --animation-order: 6;
    }

    nav ul>li ul li:nth-of-type(7) {
        --animation-order: 7;
    }

    nav ul>li ul li:nth-of-type(8) {
        --animation-order: 8;
    }

    @keyframes animateli{
        0%{
            opacity:0;transform:scale(.8) translateY(-8px)
        }
        100%{opacity:1}
    }
    
    nav ul li ul li {
        float: none;
        display: block;
        border: none;
    }
    
    .derbutton {
        color: var(--text-invert);
        right: 2rem;
        top: 1.5rem;
        position: absolute;
        transition: all .2s ease;
    }

    .derbutton:before {
        transition: all .2s ease;
        font-size: 2rem;
    }
    
    .derbutton.drehen:before {
        -webkit-transform: rotate(-90deg);
        -moz-transform: rotate(-90deg);
        -o-transform: rotate(-90deg);
        -ms-transform: rotate(-90deg);
        transform: rotate(-90deg);
        display: block;
    }
    
    .drehen + .sub-menu {                           
        display: block !important;
    }
    
    .header #logo {
        display: none;
    }

    nav + .telefonlink {
        display: none;
    } 

    nav ul li a {
        color: var(--text-invert);
        display: block;
        font-weight: 400;
        line-height: 3;
    }

    nav ul li ul {
        display: none;
        transition: all 0.2s ease-out;
        -webkit-transition: all 0.2s ease-out;
        -moz-transition: all 0.2s ease-out;
        -o-transition: all 0.2s ease-out;
        -ms-transition: all 0.2s ease-out;
    }

    .header-mobile-block {
        position: absolute;
        bottom: 2.5rem;
        margin-left: 1.5rem;
    }

    .mobil-menu-button-bg .telefonlink {
        color: var(--text-invert);
        margin-top: 1.2rem;
        position: absolute;
        margin-left: 2rem;
    }

    .header-mobile-buttons img {
        width: 90%;
        max-width: 400px;
        display: block;
        margin: 3rem auto;
    }

    .header-mobile-buttons p {
        text-align: center; 
    }

    .header-mobile-buttons .more-link {
        margin: 2rem auto;
        width: 80%;
        justify-content: center;
    }

    .header-mobile-buttons .btn {
        background: #eee;
        color: #fff;
    }

    .header-mobile-buttons a:hover {
        text-decoration: none;
        font-weight: normal;
        text-decoration: none;
        color: #000;
    }

    .header-mobile-buttons a:focus {
        text-decoration: none;
        font-weight: normal;
        text-decoration: none;
    }

    .socialicon img {
        max-width: 50px;
        padding: 1rem;
    }

    header nav > ul > li:last-of-type a {
        background: transparent;
    }
}

/*  HEADER ENDE  ---------------------------------------------------------------------------------------------------------------------------  */