section#cookie-banner{
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #222;
    color: white;
    padding: 35px 25px;
    z-index: 101;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);

    & > div{
        width: 100%;
        max-width: 1000px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        margin: 0 auto;

        & > div.text{
            flex: 1;
            padding-right: 20px;
        }

        & > div.action{
            display: flex;
            gap: 10px;
            margin-top: 15px;

            & > button{
                cursor: pointer;
                padding: 10px 20px;
                border: none;
                border-radius: 4px;
                color: var(--white-text);
            }
        }
    }
}


header.navigazione{
    width: 100%;
    height: 50px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: var(--bg-menu);

    & > div.maxwidth{
        height: 100%;
        display: flex;
        flex-wrap: nowrap;
        padding: 0 25px;

        & > div.logo{
            height: 100%;
            width: auto;

            & > a{
                width: auto;
                height: 100%;
                display: block;
                padding: 12px 0;

                & > img{
                    position: relative;
                    width: auto;
                    height: 100%;
                    z-index: 101;
                }
            }
        }

        & > nav{
            width: 100%;
            
            & > ul{
                width: 100%;
                height: 100%;
                display: flex;
                flex-wrap: nowrap;
                justify-content: center;
                gap: 10px;
                list-style: none;

                & > li{
                    height: 100%;

                    & > a{
                        height: 100%;
                        display: flex;
                        align-items: center;
                        color: var(--white-text);
                    }

                    &.dropdown-menu{
                        display: flex;
                        flex-direction: column;

                        & > button{
                            display: flex;
                            flex-wrap: nowrap;
                            align-items: center;
                            gap: 5px;
                            background-color: transparent;
                            border: none;
                            color: var(--white-text);
                            cursor: pointer;
                            font-size: 1em;

                            & > span.icon-chevron-down{
                                position: relative;
                                top: -2px;
                                font-size: 0.9em;
                            }
                        }

                        & > ul{
                            display: flex;
                            flex-direction: column;
                            gap: 10px;
                            background-color: var(--bg-menu-hover);
                            color: var(--white-text);

                            & > li{
                                padding: 10px;

                                & > a{
                                    padding: 15px 0;
                                    color: var(--white-text);
                                }
                            }
                        }
                    }
                }
            }

            /* generico */
            ul li > a[aria-current="page"]{
                color: var(--orange-text) !important;
                font-weight: 600;
            }
        }
    }
}

@media (min-width: 551px){
    header.navigazione{

        & > div.maxwidth{
            justify-content: center;

            & > button.hamb-ico{
                display: none;
            }

            & > nav{
                width: auto;
                padding-left: 25px;

                & > ul{
                    align-items: center;
                    justify-content: flex-end;

                    & > li > a{
                        padding: 0 10px;

                        &:hover{
                            background-color: var(--bg-menu-hover);
                        }
                    }

                    & > li > a > span{
                        display: none;
                    }

                    & > li.dropdown-menu{
                        position: relative;
                        display: flex;
                        align-items: center;

                        &:hover{
                            background-color: var(--bg-menu-hover);
                        }

                        & > button{
                            height: 100%;
                            background-color: transparent;
                            border: none;
                            padding: 0 10px;

                            & > :first-child{
                                display: none;
                            }
                        }

                        & > button:has(+ ul:not([hidden])){
                            background-color: var(--bg-menu-hover);
                        }

                        & > ul{
                            width: 100%;
                            position: absolute;
                            top: 100%;
                            left: 0;;
                            list-style: disc;
                            list-style-position: inside;

                            & > li{
                                padding-left: 15px;
                                
                                &:hover{
                                    background-color: var(--bg-menu);
                                }
                            }
                        }
                        & > ul[hidden]{
                            display: none;
                        }
                    }

                }
            }
        }
    }
}

@media (max-width: 550px){
header.navigazione{

        & > div.maxwidth{
            position: relative;
            justify-content: space-between;
            padding-right: 15px;

            & > button.hamb-ico{
                align-items: center;
                border: none;
                background-color: var(--bg-menu);
                z-index: 101;

                & > svg.ico{
                    cursor: pointer;
                    -webkit-tap-highlight-color: transparent;
                    transition: transform 400ms;
                    -moz-user-select: none;
                    -webkit-user-select: none;
                    -ms-user-select: none;
                    user-select: none;

                    & > path.line{
                        fill:none;
                        transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
                        stroke: white;
                        stroke-width:5.5;
                        stroke-linecap:round;

                        &.top{
                            stroke-dasharray: 41 172;
                        }
                        &.middle{
                            stroke-dasharray: 41 111;
                        }
                        &.bottom{
                            stroke-dasharray: 41 172;
                        }
                    }

                    &.active{
                        & > path.line.top{
                            stroke-dashoffset: -132px;
                        }
                        & > path.line.middle{
                            stroke-dashoffset: -71px;
                        }
                        & > path.line.bottom{
                            stroke-dashoffset: -132px;
                        }
                    }
                }
            }

            & > nav{
                position: fixed;
                top: 50px;
                left: 0;
                width: 100%;
                height: auto;
                max-height: 0;
                background-color: var(--bg-menu);
                visibility: hidden;
                transition: all 0.4s ease-in-out, visibility 0.4s;
                box-shadow: 0 10px 15px rgba(0,0,0,0.1);
                overflow-y: hidden;
                z-index: 99;

                & > ul{
                    width: 100%;
                    display: flex;
                    flex-direction: column;
                    align-items: flex-end;
                    padding: 30px;
                    gap: 10px;

                    & > li > a{
                        align-items: flex-start;
                        padding: 13px 0;
                        gap: 5px;

                        & > span{
                            margin-left: 10px;
                            padding-left: 10px;
                            border-left: 1px solid var(--blu-logo-chiaro);
                            padding-right: 10px;
                            margin-right: 10px;
                        }
                    }
                    & > li.dropdown-menu{
                        width: 100%;

                        & > button{
                            padding: 13px 0;
                            flex-direction: row-reverse;

                            & > span:first-of-type{
                                margin-left: 10px;
                                padding-left: 10px;
                                border-left: 1px solid var(--blu-logo-chiaro);
                                padding-right: 10px;
                                margin-right: 10px;
                            }
                        }

                        & > ul{
                            text-align: right;
                            padding-top: 20px;
                            list-style: none;

                            & > li{
                                padding-right: 35px;
                            }
                        }
                        & > ul[hidden]{
                            display: none;
                        }

                        & > button[aria-expanded="true"] + ul{
                            background-color: var(--bg-menu-hover);
                            padding: 10px 0;
                            margin-top: 5px;
                            border-bottom: 1px solid var(--blu-logo-chiaro);
                        }
                    }

                }
            }
        }

        /* APERTURA MENU AL CLICK BUTTON */
        & > div.maxwidth:has( > button[aria-expanded="true"]){
            border-bottom: 1px solid var(--blu-logo-chiaro);

            & > nav{
                max-height: calc(100dvh - 50px);
                visibility: visible;
            }
        }
    }
}

@media (max-width: 600px){
    section#cookie-banner > div{
        flex-direction: column;
        padding-bottom: 20px;
    }
}