#main-menu,
#top-menu,
#footer-menu {
    text-decoration: none;
    padding: 0 1rem;
    margin: 0 auto;
    text-align: center;
    justify-content: space-between;
}

#top-menu {
    background-color: #fff;
    padding: 0.5rem 0;
    background-image: url(../img/border-horizontal.png);
    background-position: bottom center;
    background-repeat: repeat-x;
    background-size: auto 0.2rem;
    position: relative;
}

#main-menu {
    background: url(../img/brush-yellow.gif);
    background-size: 100% 100%;
    padding: 0.5rem;
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;

}

#footer-menu ul li {
    display: inline-block;
    padding: 0 1rem;
}

.menu-item-has-children {
    position: relative;
}

.menu-item-has-children:after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 0.4rem solid transparent;
    border-right: 0.4rem solid transparent;
    border-top: 0.4rem solid #000;
    top: 50%;
    margin-top: -0.2rem;
    right: 0;
    z-index: 1000;
    position: absolute;
}

@media only screen and (min-width: 769px) {

    #main-menu ul li {
        position: relative;
    }

    #main-menu ul li:hover ul {
        opacity: 1;
    }



    #main-menu ul li ul li {
        display: block;
        padding: 0.5rem;
        background-color: #ffd207;
    }

    #main-menu ul li ul li a {
        white-space: nowrap;

    }

    #main-menu ul li ul li:first-of-type {
        padding-top: 1rem;
    }

    .sub-menu {
        z-index: 999;
        display: block;
        position: absolute;
        overflow: hidden;
        text-align: left;
        opacity: 0;
        transition: all 0.3s ease-in-out;
        -webkit-transition: all 0.3s ease-in-out;
        -moz-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;

    }

    .sub-menu:after {
        content: "";
        width: 150%;
        height: 2.3rem;
        background: url(../img/paint-drop.gif) bottom left no-repeat;
        background-size: 100% auto;
        display: block;
    }

    #main-menu ul {
        display: block !important;
    }
}

@media only screen and (max-width:768px) {
    #main-menu ul li {
        display: block;
        padding: 1rem;
        background-color: #ffd207;
    }

    #main-menu ul {
        display: none;
    }

    .sub-menu {
        display: none;
    }

    .sub-open:before {
        border-left: none !important;
        border-right: none !important;
        border-top: 0.2rem solid #000 !important;
        width: 0.7rem !important;
        right: 0.7rem;
    }

    #hamburger {
        display: block;
        width: 100%;
        height: 2rem;
        background: url(../img/brush-yellow.gif);
        background-size: 100% 100%;
        vertical-align: middle;
        text-align: center;
        line-height: 1.9rem;
        cursor: pointer;
    }

    .hambi-open:after {
        border-top: solid 0.1rem black !important;
        border-bottom: solid 0.1rem black !important;
    }

    #hamburger:before {
        content: "Menü";
        display: inline-block;
        vertical-align: middle;
        text-transform: uppercase;
        font-weight: bold;
    }

    #hamburger:after {
        content: "";
        display: inline-block;
        width: 1rem;
        height: 0.5rem;
        vertical-align: middle;
        margin-left: 0.5rem;
        border-top: 0.3rem double #000;
        border-bottom: 0.15rem solid #000;
        line-height: normal;
        transition: all 0.3s ease-in-out;
        -webkit-transition: all 0.3s ease-in-out;
        -moz-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;
    }

    .menu-item-has-children:after {
        content: none;
        /*kiütjük, mert túl kicsi lesz katintási területnek*/
    }

    .open-sub {
        display: block;
        position: absolute;
        width: 2rem;
        height: 2rem;
        cursor: pointer;
        top: 0;
        right: 0;
        vertical-align: middle;
        z-index: 1002;
    }

    .open-sub:before {
        content: "";
        display: block;
        width: 0;
        height: 0;
        border-left: 0.4rem solid transparent;
        border-right: 0.4rem solid transparent;
        border-top: 0.4rem solid #000;
        top: 50%;
        left: 50%;
        margin-top: -0.2rem;
        margin-left: -0.4rem;
        z-index: 1000;
        position: absolute;
    }

}

@media only screen and (max-width:535px) {

    #top-menu ul li,
    #main-menu ul li,
    #footer-menu ul li {
        display: block;
        padding: 1rem;
    }
