.container_menu {
    width: 100%;
    border-top:3rem solid var(--white);
    max-width: 185.5rem;
    margin: auto;
        position: relative;
}

@media(max-width:1064px) {
    .container_menu {
        border-top:1.5rem solid var(--white);
    }
}

.menu a {
  text-decoration: none;
  color: var(--black);
  font-weight: 400;
}

.menu a:before {
    content: attr(data-text);
    font-weight: bold;
    display: block;
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

.menu a:hover,
.menu a:focus,
.menu a.active {
    font-weight: 700;
}

a.cta-menu {
    display: flex;
    background-color: var(--blu);
    height: auto;
    color: var(--white);
    text-transform: uppercase;
}

/* DROPDOWN */
.ico_down {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 0.8rem;

    & .ico_down_top,
    & .ico_down_bottom {
        position: absolute;
        left: 0;
        width: 14px;
        height: 2px;
        background-color: var(--light);
        border-radius: 2px;
        transform-origin: left center; /* rotazione dal margine sinistro */
        transition: transform 0.3s ease;
    }

    & .ico_down_top {
        top: 1px;
    }

    & .ico_down_bottom {
        top: 10px; /* barre più distanti tra loro */
    }
}

/* Stato aperto: le due barre ruotano a 45° dal loro margine sinistro */
/* vale sia per il dropdown desktop sia per l'accordion della sidenav mobile */
.dropdown.open .ico_down .ico_down_top,
.toggle.open .ico_down .ico_down_top {
    transform: rotate(45deg);
}

.dropdown.open .ico_down .ico_down_bottom,
.toggle.open .ico_down .ico_down_bottom {
    transform: rotate(-45deg);
}

/* position:static -> il pannello si ancora alla .fascia_menu (full width) */
.dropdown {
  display: inline-block;
  margin: 0;
  position: static;
}

/* Pannello full width che scende dal bordo inferiore della fascia (slideToggle) */
.dropdown .dropdown-content {
    position: absolute;
    z-index: 200;
    left: 0;
    top: 100%;
    width: 100%;
    display: none;
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.15);
}

.dropdown .dd-panel {
    padding: 5rem 4% 8rem;
}

/* Testata: linea blu + titolo + bottoncino tondo */
.dropdown .dd-head {
    margin: 0 0 2.5rem;
}

.dropdown .dd-head h3 {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    font-size: 3.2rem;
    color: var(--black);
    text-transform: none;
}

.dropdown .dd-head .dd-more {
    display: inline-flex;
    width: 3.4rem;
    height: 3.4rem;
    padding: 0;
    margin-left: 1.2rem;
    vertical-align: middle;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 6l6 6-6 6' stroke='%232B303A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.6rem;
    box-shadow: 0 0 7px 0px rgba(0, 0, 0, 0.2);
}

.dropdown .dd-head .dd-more::after {
    display: none;
}

/* Voci: griglia che riempie per colonna (3 righe), come da immagine */
.dropdown .sub-nav {
    display: grid;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    column-gap: 4rem;
    row-gap: 1.6rem;
    margin: 0 0 7rem;
}

.dropdown .sub-nav li {
    display: block;
}

.dropdown .sub-nav li a {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    height: auto;
    padding: 0;
    line-height: 1.2;
    color: var(--black);
    font-weight: 700;
    text-transform: none;
}

.dropdown .sub-nav li a::before {
    content: "";
    flex: 0 0 auto;
    width: 5rem;
    height: 4rem;
    border-radius: 2rem;
    background-color: var(--blu);
    background-image: url("/assets/images/right-arrow.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.6rem;
    transition: transform 0.3s ease;
}

.dropdown .sub-nav li a::after {
    display: none;
}

.dropdown .sub-nav li a:hover {
    transform: translateX(15px);
}

/* Tre immagini in riga */
.dropdown .dd-imgs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.dropdown .dd-imgs img {
    display: block;
    width: 100%;
    height: 26rem;
    object-fit: cover;
    border-radius: 6px;
}

/* Fascia azzurra di fondo */
.dropdown .dd-band {
    height: 8rem;
    background-color: var(--blu-light);
}


/* RESPONSIVE */
.menuresponsive {
  display: flex;
  width: calc(100% - 21rem);
  justify-content: flex-end;
  align-items: center;

  & .toggle {
    position:relative;
    width: 4.2rem;
    height: 4.2rem;
    aspect-ratio: 1/1;
    border-radius: 4px;
    background-color: var(--light-blue);
    display: flex;
    justify-content: center;
    align-items: center;
  }

   & .toggle:before {
        content:'';
        display:block;
        top: -14px;
        right: -15px;
        position:absolute;
        width: 20px;
        height: 20px;
        background: #fff;
            mask-image: radial-gradient(circle at bottom left, transparent 0, transparent 20px, black 20px);
            -webkit-mask-image: radial-gradient(circle at bottom left, transparent 0, transparent 20px, black 20px);
    
        @media screen and (max-width:300px) {
            display: none;
        }
  }

  @media screen and (max-width:1064px) {
    width: auto;
    padding: 1.4rem 3rem;
  }

  @media screen and (min-width: 1065px) {
    display: none;
    padding-right: 0;
  }

  & img {
      width: 2.4rem;
      height: 2.4rem;
  }


}

/* TOGGLE */
ul.accordion {
    .inner {
        overflow: hidden;
        display: none;
        padding: 1rem 0;
    }
}

.rotate {
  rotate: 180deg;
}

.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 900;
    top: 0;
    overflow-x: hidden;
    transition: 0.5s;
    right: 0;
    overflow-y: scroll;
    backdrop-filter: blur(5px);

    .closebtn {
        position: absolute;
        top: 2rem;
        color: var(--black);
        font-size: 2.6rem;
        background: var(--white);
        border-radius: 5px;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        justify-content: center;
        align-items: center;
        line-height: 1;
        right: 2rem;
        z-index: 9;
        background: transparent;
    }

    .flexnav {
        display: flex;
        position: relative;

        .bgcolor {
            position: fixed;
            background-color: var(--dark);
            opacity: 0.95;
            width: 0;
            min-height: 100vh;
            transition-timing-function: cubic-bezier(1.28, 0.89, 0.32, 0.18);
            left: 0;
            top: 0;
            position: absolute;
            height: 100%;

            @media screen and (min-width:400px) {
                width: 10%;
            }
        }

        .bgblue {
            background-color: var(--blu);
            opacity: 0.95;
            min-height: 100vh;
            height: 100%;
            padding: 10rem 2rem;
            padding: 3rem 4%;
            width: 100%;
            
            @media screen and (min-width:400px) {
                margin-left: 10%;
                width: 90%;
                padding: 3rem;
            }

            & a {
                font-size: 1.6rem;
                color: var(--white);
                font-weight: 400;
                text-transform: uppercase;

                @media screen and (min-width:400px) {
                    font-size: 2rem;
                }
            }

            & a:hover,
            & a:focus,
            & a.active {
                font-weight: 600;
            }
        }
    }
}

.sidenav {
    .logo-resp {
        margin: 0 0 2rem;

        & img {
            width: 14rem;
            height: auto;
            aspect-ratio: 170 / 82;
            object-fit: contain;
        }
    }
}


#myBtn {
  opacity: 0;
  visibility: hidden;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  transition: all 0.3s;
  background: var(--black);
  border-radius: 10rem;
  height: 3.5rem;
  width: 3.5rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.5);

    & img {
        width: 2.5rem;
        height: 2.5rem;
    }

    &.arrow-visible {
        opacity: 1;
        visibility: visible;
    }
}

.fascia_menu {
    z-index: 900;
    padding: 0rem 0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .flex {
        align-items: flex-start;
        justify-content: space-between;
    }

    .flex:after {
        content:'';
        position:absolute;
        bottom:-1.9rem;
        left:3.2rem;
        width: 20px;
        height: 20px;
        background: #fff;
        mask-image: radial-gradient(circle at bottom right, transparent 0, transparent 20px, black 20px);
        -webkit-mask-image: radial-gradient(circle at bottom right, transparent 0, transparent 20px, black 20px);

        @media screen and (max-width:300px) {
            display: none;
        }
    }

    @media screen and (max-width:1064px) {
        .flex:after {
            left:1.5rem;
        }
    }

    .nav-flex-menu {
        padding: 0 0 0 3.2rem;
        background-color: var(--white);
        display: flex;
        position: relative;
    }

    @media screen and (max-width:1064px) {
        .nav-flex-menu {
           padding: 0 0 0 1.5rem;
        }
    }

    .menu {
        padding: 0 6rem;
    }
    
    & img.logo {
        width: 17rem;
        height: auto;
        aspect-ratio: 170 / 87;
        object-fit: contain;
        max-width: 100%;
        margin-top:-1.5rem;
    }

    & nav {
        display: none;
        
        @media screen and (min-width:1065px) {
            display: block;
        }

        & ul {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            height: 100%;

            & li {
                height: 100%;
                display: flex;
                align-items: center;

                & a {
                    text-transform: uppercase;
                    height: 100%;
                    display: inline-block;
                    position: relative;
                    padding: 1rem;
                    
                    @media screen and (min-width:1170px) {
                        padding: 1rem 2rem;
                    }

                }
            }
        }
    }

    & .cta-menu {
        padding: 0 3.2rem 2.5rem 2.5rem;
        background-color: var(--white);
        border-bottom-left-radius: 20px;
        position: relative;
        

        &.btn {
            background-color: var(--blu);
            color: var(--white);
            height: auto;
            transition: all 0.3s;
        
        }
        

        @media screen and (max-width:1064px) {
               display:none;
            }

        & span.cta-text {
            display: none;

            @media screen and (min-width:1065px) {
                display: inline-block;
            }
        }
    }
    & .cta-menu:after,
    & .cta-menu:before {
        content:'';
        position:absolute;
        width: 20px;
        height: 20px;
        background: #fff;
            mask-image: radial-gradient(circle at bottom left, transparent 0, transparent 20px, black 20px);
            -webkit-mask-image: radial-gradient(circle at bottom left, transparent 0, transparent 20px, black 20px);
    }
    & .cta-menu:after {
        bottom:-2rem;
        right:3.2rem;
    }

    & .cta-menu:before {
        top: 0;
        left: -20px;
    }

}


