.custom-atelier-menu {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    font-family: inherit; 
    background-color: #f8f4e8; 
    box-sizing: border-box;
    padding: 10px 20px; 
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: black;
    flex-shrink: 0; 
    margin-right: 20px;
    transition: opacity 0.3s;
}

.brand-container:hover {
    opacity: 0.8;
}

.brand-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #91AD80;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    background-image: url(https://arteateliercreativo.eu/wp-content/uploads/2026/04/sfondo-canvas.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateY(-2px) translateX(2px);
}

.brand-title {
    font-size: 32px; 
    font-family: 'Comforter'; 
    font-weight: 500;
    white-space: nowrap; 
    color: black;
    font-style: italic;
}

.menu-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

.custom-atelier-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0; 
    flex-wrap: nowrap; 
    justify-content: center;
}

/* --- REGOLE PER IL DROPDOWN DESKTOP --- */
.custom-atelier-menu ul li {
    flex-shrink: 0; 
    position: relative; /* Necessario per posizionare il sottomenu */
}

ul.desktop-submenu {
    display: none; /* Nascosto di default */
    position: absolute;
    top: 100%; /* Sotto al parent */
    left: 0;
    background-color: #f8f4e8;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    flex-direction: column;
}

/* Mostra il sottomenu all'hover del li genitore */
.custom-atelier-menu ul li:hover > ul.desktop-submenu {
    display: flex;
}

ul.desktop-submenu a {
    width: 100%; 
    min-width: 180px;
    text-align: left;
    justify-content: flex-start; /* Allinea il testo a sinistra */
    padding: 10px 20px;
    height: auto;
    box-sizing: border-box;
}
/* -------------------------------------- */

.custom-atelier-menu ul a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 160px; 
    height: 48px; 
    box-sizing: border-box;
    background-color: #f8f4e8;
    color: black;
    text-decoration: none;
    padding: 5px 10px; 
    border-radius: 0; 
    font-weight: 600; 
    text-transform: uppercase; 
    font-size: 13px;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease-in-out; 
}

.custom-atelier-menu ul a:hover {
    background-color: #91ad80;
    color: white;
}

.custom-atelier-menu ul a.active-link {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1000;
    margin-left: 20px;
    flex-shrink: 0;
}

.hamburger-btn div {
    width: 35px;
    height: 4px;
    background-color: black;
    border-radius: 0;
    transition: all 0.3s;
}

.menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -320px; 
    width: 300px;
    height: 100vh;
    background-color: #f8f4e8; 
    z-index: 9999;
    transition: right 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    overflow-y: auto;
}

.side-menu.open {
    right: 0; 
}

.close-btn {
    display: block;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    cursor: pointer;
    color: black;
    line-height: 1;
}

.side-menu ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0 20px;
    box-sizing: border-box;
}

/* --- REGOLE PER IL SOTTOMENU LATERALE --- */
.side-menu-item-container {
    display: flex;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.side-menu-item-container a {
    width: 100%; 
    height: 50px;
    justify-content: flex-start; 
    flex-grow: 1;
}

.submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 14px;
    background-color: transparent;
    transition: background-color 0.3s;
}

.submenu-toggle:hover {
    background-color: #91ad80;
    color: white;
}

ul.side-submenu {
    display: none; 
    flex-direction: column;
    background-color: transparent; 
    width: 100%;
    padding: 0; 
}

ul.side-submenu.open {
    display: flex;
}

ul.side-submenu a {
    width: 100%; 
    justify-content: flex-start;
    padding-left: 30px; /* Indenta le sottopagine per far capire che sono figlie */
    height: 45px;
    font-size: 12px;
    box-sizing: border-box;
}
/* ---------------------------------------- */