header {
    display: flex;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 80px;
    justify-content: space-between;
    align-items: center;
    background-color: var(--tertiary);
    justify-content: center;
    font-family: sans-serif;

    .header-content-mobile{
        width: 100%;
        height: 80px;
        justify-content: space-between;
        align-items: center;

        display: none;

        a:not(.menu a) {
            height: 100%;
            display: flex;
            align-items: center;
            z-index: 72;
        }
    
        img {
            padding: 24px;
            z-index: inherit;
            width: 190px;
        }

        .mobile-menu {


            .mobile-menu-icon {
                position: relative;
                z-index: 9999999;
                user-select: none;
                display: flex;
                flex-direction: column;
                gap: 0.4rem;
                margin-right: 20px;
                cursor: pointer;

                .icon-bar {
                    z-index: 9999999;
                    position: relative;
                    user-select: none;
                    height: 0.2rem;
                    background-color: white;
                    width: 2rem;
                    border-radius: 5px;
                    transition: transform 0.4s, opacity 0.2s;
                }   
            }

            .mobile-screen-menu {
                .menu-main-container {
                    opacity: 0;
                    transform: translateX(100px);
                    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
                }
                
                height: 0px;
                opacity: 0;
                pointer-events: none;
                width: 100vw;
                position: absolute;
                transition: height 0.4s ease-in-out;
                overflow: hidden;
                display: flex;
                flex-direction: column;
                align-items: center;
                cursor: default;

                h2 {
                    margin-top: 5vh;
                    font-size: clamp(1.5rem, 6vw, 7rem);
                    margin-bottom: 10px;
                }

                .navigation-underline {
                    height: 10px;
                    width: 0px;
                    border-radius: 10px;
                    background-color: var(--secondary);

                    transition: width 0.3s ease-in-out;
                    transition-delay: 0.3s; 
                }
            }
        }

    }

    .mobile-menu-open {
        .mobile-menu {

            transition: all 0.4s ease-in-out;
            user-select: none;

            .mobile-menu-icon {
                .icon-bar1 {
                    transform: rotate(45deg) translateY(0.4rem) translateX(0.4rem);
                }

                .icon-bar2 {
                    transform: translateX(-10px);
                    opacity: 0;
                }

                .icon-bar3 {
                    transform: rotate(-45deg) translateY(-0.5rem) translateX(0.4rem);
                }
            }

            .mobile-screen-menu {
                height: calc(100vh - 80px);
                opacity: 1;
                pointer-events: all;
                position: absolute;
                z-index: 70;
                left: 0;
                top: 80px;
                width: 100vw;
                background-color: var(--tertiary);

                .menu-main-container {
                    opacity: 1;
                    transform: translateX(0px);
                }

                .navigation-underline {
                    width: 70%;
                }
            }
        }
    }

    .header-content-desktop {
        display: flex;
        width: 100%;
        height: 80px;
        max-width: calc(var(--wp--style--layout--wide-size) + 200px);
        justify-content: space-between;
        align-items: center;
        background-color: var(--tertiary);
        font-family: sans-serif;


        a:not(.menu a) {
            height: 100%;
            display: flex;
            align-items: center;
        }
    
        img {
            padding: 24px;
            width: 190px;
        }
    
        .menu-telefactory-container {
            width: 25%;
        }
    
        .menu {
            display: flex;
            gap: 24px;
            margin-right: 24px;
            align-items: center;
            width: 100%;
            
            .yellow-btn {
                background-color: var(--secondary);
                border-radius: 10px;
                padding: 12px 20px;
    
                a {
                    color: black;
                    padding: 0px;
                    font-weight: 600;
                }
            }
    
            .nav-menu-dropdown-button {
                >a {
                    user-select: none;
                }
                >a:after {
                    content: "";
                    display: inline-block;
                    vertical-align: middle;
                    width: 20px;
                    height: 20px;
                    margin-left: 6px;
                    background: url('/wp-content/themes/telefactory/images/icons/arrow-down-icon.png') no-repeat center center / contain;
                    filter: invert();
                    transform: rotate(0deg);
                    transition: transform 0.2s;
                }
            }
    
            li {
                position: relative;
                list-style: none;
    
                a {
                    color: white;
                    padding-bottom: 10px;
                    padding: 12px 16px;
                    text-decoration: none;
                }    
    
                ul {
                    opacity: 0;
                    pointer-events: none;
                    max-height: 0;
                    overflow: hidden;
                    position: absolute;
                    display: flex;
                    justify-content: center;
                    text-align: center;
                    flex-direction: column;
                    gap: 15px;
                    padding: 15px 15px 15px 15px;
                    margin-top: 20px;
                    transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
                    border: 0px;
                    border-radius: 5px;
                    background-color: var(--tertiary);
                    border: 2px solid var(--primary);
                    transform: translateX(10%);
    
                    a {
                        color: white;
                        padding: 0px;
                        text-wrap: nowrap;
                    }
    
                    a:hover {
                        text-decoration: underline;
                    }
                }
            }

            li.current-menu-item a:not(.yellow-btn a) {
                color: #e2ff65;
            }
    
            .nav-menu-dropdown-open {
                >a:after {
                    transform: rotate(-180deg);
                }
    
                    ul {
                        opacity: 1;
                        pointer-events: all;
                        max-height: 500px;
                    }
            }
        }
    }


}

@media only screen and (max-width: 850px) {
    header {
        .header-content-desktop {
            display: none;
        }  

        .header-content-mobile {
            display: flex;

            .mobile-menu {
                .mobile-screen-menu {
                    pointer-events: all;
                    .menu-main-container {
                        width: 70%;
                        padding: 15px;
                        ul:not(li ul) {
                            margin-top: 30px;
                            list-style: none;
                            display: flex;
                            flex-direction: column;
                            gap: 40px;

                            .nav-menu-dropdown-button {

                                >a {
                                    user-select: none;
                                }
                                >a:after {
                                    content: "";
                                    display: inline-block;
                                    vertical-align: middle;
                                    width: 30px;
                                    height: 30px;
                                    margin-left: 10px;
                                    background: url('/wp-content/themes/telefactory/images/icons/arrow-down-icon.png') no-repeat center center / contain;
                                    filter: invert();
                                    transform: rotate(0deg);
                                    transition: transform 0.2s;
                                }

                                .sub-menu {
                                    width: auto;
                                    max-height: 0;
                                    transform: translateX(30px);
                                    overflow: hidden;
                                    transition: max-height 0.5s, transform 0.5s;
                                }
                                
                            }
                            
                            .nav-menu-dropdown-open {
                                .sub-menu {
                                    max-height: 600px;
                                    transform: translateX(0px);
                                }

                                >a:after {
                                    transform: rotate(-180deg);
                                }


                            }

                            li {
                                a:not(.sub-menu a) {
                                    color: white;
                                    font-size: clamp(0.6rem, 5vw, 1.8rem);
                                    font-weight: bold;
                                    text-decoration: underline;
                                }

                                ul {
                                    margin-left: 30px;
                                    list-style: none;

                                    li {

                                        margin-top: 20px;

                                        a {
                                            color: white;
                                            text-decoration: none;
                                            font-size: clamp(0.5rem, 4vw, 1.6rem);
                                            margin-top: 10px;
                                        }

                                        a:before {
                                            content: "- ";
                                        }
                                    }
                                }

                            }

                            .menu-item-has-children {
                                z-index: 76;
                                a {
                                    text-decoration: none !important;
                                }
                            }

                        } 
                    }
                }
            }
        }
    }
}


@media only screen and (max-width: 400px) {
    header {
        img {
            padding: 0;
        }
    }
}