nav {
      display: flex;
      justify-content: space-between;
      align-items: center; /* centra verticalmente il contenuto */
      background: linear-gradient(90deg, #3b82f6, #2563eb);
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      border-radius: 0 0 12px 12px;
      min-height: 64px; /* altezza barra */
    }

    .logo-container {
      display: flex;
      align-items: center;
      /* gap: 1rem; */
      color: white;
     /* padding: 1rem 2rem; */
    }

    .logo-container a { display: flex; align-items: center; height: 100%; }
    .logo-container img {
      height: 100%; /* alto quanto la navbar */
      width: auto;
      display: block;
    }

    .logo-container h1 {
      font-size: 1.4rem;
      font-weight: 600;
      margin: 0;
    }

    .main-nav {
      display: flex;
      align-items: stretch;
      width: 100%;
    }

    nav ul {
      display: flex;
      align-items: center; /* allinea al centro in verticale */
      list-style: none;
      gap: 3rem;
      margin: 0;
      padding: 0 2rem; /* niente padding verticale, segue l'altezza della navbar */
      flex-grow: 1;
      height: 100%;
    }

    nav li {
      color: white;
    }
    
   
    .menu-group {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }

    .menu-title {
      font-weight: 600;
      font-size: 1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.3rem;
      cursor: default;
    }

    .menu-subitems {
      display: flex;
      gap: 1rem;
    }

    .menu-subitem {
      font-size: 0.9rem;
      color: #e0f2fe;
      display: flex;
      align-items: center;
      gap: 0.2rem;
      text-decoration: none;
    }

    .menu-subitem:hover {
      text-decoration: underline;
    }

    .menu-title i,
    .menu-subitem i {
      min-width: 16px;
      text-align: center;
    }

    .user-menu-wrapper {
      display: flex;
      align-items: center;
      background-color: rgba(255, 255, 255, 0.15);
      padding: 0 2rem; /* niente padding verticale */
      height: 100%;
    }

    .separator {
      height: 100%;
      width: 1px;
      background-color: rgba(255, 255, 255, 0.4);
      margin-right: 1rem;
    }

    .user-menu {
      color: white;
      font-size: 0.95rem;
    }

    .user-info {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .logout-link {
      color: #e0f2fe;
      text-decoration: none;
      font-size: 0.9rem;
      margin-top: 0.2rem;
      display: inline-block;
    }

    .logout-link:hover {
      text-decoration: underline;
    }
