/* ========== NAVBAR DESKTOP ========== */

/* Contenitore wrapper della navbar */
#menu {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: clamp(5px, 2vw, 15px);
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    background: transparent;
    z-index: 1000;
    padding: 0;
}

/* Navbar desktop */
.navbar {
    position: relative;
    height: 90px;
    width: 100%;
    max-width: 1200px;
    background-image: linear-gradient(-180deg, #f8f9fa 10%, #fbfbfb 100%);
    border: 1px solid purple;
    border-bottom: 2px solid purple;
    border-radius: 8px;
    backdrop-filter: blur(1px);
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

/* Logo brand */
.navbar-brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar-brand .logo {
    height: 60px;
    width: auto;
}

/* Bottone toggle (visibile anche su desktop) */
#navbar-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #701c91;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

/* Animazione navbar */
.navbar-animate {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-60px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.navbar-animate.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.navbar-animate.minimized {
    transform: translateY(-90%);
    opacity: 0;
    pointer-events: none;
}

.navbar-animate.minimized #navbar-toggle i {
    transform: rotate(180deg);
}

/* Responsive per schermi molto grandi */
@media (min-width: 1800px) {
    .navbar {
        height: 110px;
        max-width: 1400px;
        padding: 15px 30px;
        border-radius: 12px;
    }

    .navbar:hover {
        transform: scale(1.05);
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
    }
}

#navbar-handle {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    height: 20px;
    background: #f8f9fa;
    border: 1px solid purple;
    border-bottom: none;
    border-radius: 0 0 8px 8px;
    z-index: 1002;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

#navbar-handle i {
    font-size: 14px;
    color: #701c91;
}

/* Su 4K: estende la maniglia come la navbar */
@media (min-width: 1800px) {
    #navbar-handle {
        max-width: 1400px;
        border-radius: 0 0 12px 12px;
    }
}



.navbar-menu {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0 0 0 32px;
  padding: 0;
  align-items: center;
}

.navbar-menu li a {
  color: #701c91;
  font-weight: 700;
  font-size: 1.06em;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 7px;
  transition: background 0.18s, color 0.16s;
  display: block;
}
.navbar-menu li a:hover,
.navbar-menu li.active a {
  background: #f3ecfa;
  color: #5a1773;
}
