.menu {
    min-height: 55px;
    background-color: #CF1F25;
    color: white;
    display: flex;
    justify-content: center;
    position: relative;
}

.menu__list {
    display: grid;
    grid-template-columns: min-content repeat(6, minmax(max-content, 1fr)) min-content;
    grid-template-rows: 1fr;

    width: 1038px;

    position: unset;
    transform: unset;
    transition: unset;
}

.menu__item {
    position: relative;
    border-left: 1px solid #fff;
}

.menu__item:last-of-type {
    border-right: 1px solid #fff;
}

.menu__link {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 100%;
    padding: 0 10px;

    text-decoration: none;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
}

.menu__link:hover {
    background-color: #860404;
}

.menu__icon {
    width: 35px;
    height: auto;
}

.submenu {
    /*position: relative;*/
    /*border-left: 1px solid #fff;*/
}

.submenu__open {
    justify-content: space-evenly;
}

.submenu__open:hover + .submenu__list {
    max-height: 1000px;

    padding-top: 3px;

    border-left: 1px solid #ef494d;
    border-right: 1px solid #ef494d;
    border-bottom: 1px solid #ef494d;
}

.submenu__open:after {
    content: '\f107';
    font-weight: 900;
    font-family: 'Font Awesome 5 Free', serif;
    color: white;
    display: block;
    font-size: 1.5em;
    padding-left: 7px;
}


.submenu__open:hover {
    background-color: #860404;
}

.submenu__open:hover:after {
    content: '\f106';
}

.submenu__list {
    display: grid;
    min-width: 100%;
    width: max-content;

    max-height: 0;
    overflow: hidden;

    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 3px;

    background-color: #fff;
}

.submenu__list:hover {
    max-height: 1000px;

    padding-top: 3px;

    border-left: 1px solid #ef494d;
    border-right: 1px solid #ef494d;
    border-bottom: 1px solid #ef494d;
}

.submenu__list:hover ~ .submenu__open:after {
    content: '\f106';
}

.submenu__item {

}

.submenu__link {
    display: flex;
    align-items: center;
    justify-content: start;

    height: 100%;
    padding: 15px 10px;

    text-decoration: none;
    cursor: pointer;

    text-transform: unset;
    color: #333;
}


.submenu__declaration__link {
    content: url("../images/icon/caret-right-fill .svg");
    width: 15px;
    margin-left: 10px;

}

.submenu__declaration__link:hover + .declaration_signatories {
    display: block;
    background-color: #099ae4;
}

.declaration_signatories {
    display:none;
}

.submenu__link:hover {
    background-color: #860404;
    color: #fff;
}

.burger {
    display: none;
    align-self: center;
    z-index: 1;
    padding-left: 10px;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease-in;
}

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

    .menu {
        justify-content: start;
    }

    .menu__list {
        grid-template-columns: 1fr;
        grid-template-rows: unset;
        grid-auto-rows: max-content;
        row-gap: 10px;

        position: absolute;
        top: 100%;
        left: 0;

        min-height: 65vh;
        width: 70vw;
        padding-bottom: 25px;

        transform: translateX(-100%);
        transition: transform 0.5s ease-in;

        background-color: #CF1F25;
    }

    .menu__item {
        opacity: 0;
        border-left: none;
    }

    .menu__link {
        justify-content: space-between;
        padding: 15px 20px;
        height: unset;
    }

    .menu__link:after {
        content: '\f061';
        font-weight: 900;
        font-family: 'Font Awesome 5 Free', serif;
        color: white;
        display: block;
        font-size: 1.3em;
        padding-left: 7px;
    }

    .menu__item:first-of-type {
        align-self: center;
    }

    .menu__item:first-of-type .menu__link {
        justify-content: center;
        padding: 5px 0;
    }

    .menu__item:first-of-type .menu__link:after {
        content: unset;
    }

    .menu__item:first-of-type .menu__link .menu__icon {
        width: 45px;
    }

    .menu__item:last-of-type {
        border-right: none;
    }

    .submenu {
        opacity: 0;
    }

    .submenu__open:after {
        content: '\f107';
        font-size: 1.5em;
    }

    .submenu__list {
        position: initial;
        transform: translateX(0);

        border: none;
    }

    .submenu__item {
        opacity: 0;
    }

    .burger {
        display: block;
    }
}

/****************
States
*****************/

.menu__list.open {
    transform: translateY(0);
}

.submenu__open.active {
    background-color: #ef494d;
}

.submenu__open.inactive {
    background-color: #CF1F25;
}

.submenu__open.active:after {
    content: '\f106';
}

.submenu__open.active + .submenu__list {

    max-height: 1000px;

    padding-top: 3px;

    border-left: 2px solid #ef494d;
    border-right: 2px solid #ef494d;
    border-bottom: 2px solid #ef494d;
}

.submenu__open.inactive + .submenu__list {
    display: none;
}

.submenu__open.inactive:after {
    content: '\f107';
}

/****************
using classes that are added by django-cms menu
*****************/

.selected > .menu__link,
.ancestor > .submenu__open,
.selected > .submenu__link {
    background-color: #860404;
    color: white;
}


.menu-social {
    display: grid;
    grid-auto-flow: column;
    column-gap: 5px;

    height: 100%;
    padding: 0 10px;
}

.menu-social__link {
    display: flex;
    align-items: center;
}

.menu-social__icon {
    width: 35px;
    height: auto;
}

.menu-social__icon:hover {
    background-color: #860404;
    border-radius: 50%;
}


@media screen and (max-width: 880px) {
    .menu-social {
        justify-content: space-between;
        column-gap: 15px;
        padding: 0 20px;
    }

    .menu-social__icon {
        width: 40px;
        height: auto;
    }
}

/*==========================*/

/*         ANIMATION        */
/*==========================*/

/*======== added from java ==========*/
.nav-active {
    transform: translateY(0);
}

/*======== added from java ==========*/
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/*======== .toggle added from java ==========*/
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/*============ custom fontawesome icon ============*/

.fa-angle-down-span {
    font-size: 22px;
    padding-left: 10px;
}
