/* Shared site navbar: canonical values from home.html */
nav {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 20, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  height: 90px;
  padding: 0 100px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 176, 1, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid transparent;
  background-clip: padding-box;
}

nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 176, 1, 0.1) 25%, rgba(243, 109, 38, 0.1) 75%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

nav::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #ffb001 25%, #f36d26 75%, transparent 100%);
  z-index: 1;
}

nav .logo {
  position: relative;
  z-index: 2;
  transform: perspective(1000px) rotateX(5deg);
  transition: all 0.3s ease;
}

nav .logo:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-2px);
}

nav .logo img {
  height: 7.5rem;
  filter: drop-shadow(0 8px 16px rgba(255, 176, 1, 0.3));
  transition: all 0.3s ease;
}

nav .logo:hover img {
  filter: drop-shadow(0 12px 24px rgba(255, 176, 1, 0.5));
  transform: scale(1.05);
}

nav .nav-items {
  display: flex;
  flex: 1;
  padding: 0 0 0 40px;
  gap: normal !important;
  justify-content: normal !important;
}

nav .nav-items li {
  list-style: none;
  padding: 0 35px;
}

nav .nav-items li a {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: normal !important;
  text-decoration: none;
  position: relative;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  transform: perspective(1000px) rotateX(0deg);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

nav .nav-items li a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 176, 1, 0.1), rgba(243, 109, 38, 0.1));
  border-radius: 8px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: -1;
}

nav .nav-items li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffb001, #f36d26);
  transition: all 0.3s ease;
  border-radius: 1px;
}

nav .nav-items li a:hover {
  color: #ffb001;
  transform: perspective(1000px) rotateX(-5deg) translateY(-2px);
  text-shadow: 0 4px 8px rgba(255, 176, 1, 0.3);
}

nav .nav-items li a:hover::before {
  opacity: 1;
  transform: scale(1.05);
}

nav .nav-items li a:hover::after {
  width: 100%;
  box-shadow: 0 0 10px rgba(255, 176, 1, 0.5);
}

nav .menu-icon,
nav .cancel-icon,
nav .search-icon {
  width: 40px;
  text-align: center;
  margin: 0 50px;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  display: none;
  position: relative;
  z-index: 2;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  transform: perspective(1000px) rotateX(0deg);
}

nav .menu-icon:hover,
nav .cancel-icon:hover,
nav .search-icon:hover {
  color: #ffb001;
  transform: perspective(1000px) rotateX(-5deg) translateY(-2px);
  background: rgba(255, 176, 1, 0.1);
  box-shadow: 0 4px 12px rgba(255, 176, 1, 0.3);
}

nav .menu-icon span,
nav .cancel-icon,
nav .search-icon {
  display: none;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f4f4;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lang-btn .flag-icon {
  width: 24px;
  height: 16px;
  display: inline-block;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  background-size: cover;
  background-position: center;
}

.lang-btn[data-lang='it'] .flag-icon {
  background-image: linear-gradient(90deg, #009246 0 33%, #ffffff 33% 66%, #ce2b37 66% 100%);
}

.lang-btn[data-lang='fr'] .flag-icon {
  background-image: linear-gradient(90deg, #0055a4 0 33%, #ffffff 33% 66%, #ef4135 66% 100%);
}

.lang-btn[data-lang='en'] .flag-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect width='60' height='30' fill='%23012169'/%3E%3Cpath d='M0 0 L60 30 M60 0 L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0 L60 30 M60 0 L0 30' stroke='%23c8102e' stroke-width='4'/%3E%3Crect x='24' y='0' width='12' height='30' fill='%23fff'/%3E%3Crect x='0' y='9' width='60' height='12' fill='%23fff'/%3E%3Crect x='26' y='0' width='8' height='30' fill='%23c8102e'/%3E%3Crect x='0' y='11' width='60' height='8' fill='%23c8102e'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.lang-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.lang-btn.active {
  background: #ffb001;
  color: #000;
  border-color: #ffb001;
}

@media (max-width: 1245px) {
  nav { padding: 0 50px; }
}

@media (max-width: 1140px) {
  nav {
    padding: 0 20px;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  nav .logo { flex: 1; text-align: left; }
  nav .logo img { height: 50px; }

  nav .nav-items {
    position: fixed;
    z-index: 999;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  nav .nav-items.active { transform: translateX(0); }
  nav .nav-items li { margin: 1rem 0; padding: 0; }

  nav .nav-items li a {
    font-size: 1.8rem;
    padding: 1rem 2rem;
    display: block;
    color: white;
    border-radius: 10px;
  }

  nav .nav-items li a:hover {
    background: rgba(255, 176, 1, 0.1);
    color: #ffb001;
  }

  nav .menu-icon { display: block; }
  nav .menu-icon span { display: block; }
  nav .cancel-icon.show { display: block; }

  .lang-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
    width: 100%;
  }

  .lang-btn {
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: 8px;
  }
}

@media (min-width: 1141px) {
  nav .menu-icon,
  nav .cancel-icon,
  nav .search-icon {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 350px) {
  nav .menu-icon,
  nav .cancel-icon,
  nav .search-icon {
    margin: 0 10px;
    font-size: 16px;
  }
}

/* Keep page-specific styles from changing the canonical navbar dimensions. */
nav {
  box-sizing: border-box !important;
  gap: normal !important;
  height: 90px !important;
  padding: 0 100px !important;
}

nav .logo img {
  height: 75px !important;
}

@media (max-width: 1245px) {
  nav { padding: 0 50px !important; }
}

@media (max-width: 1140px) {
  nav {
    height: 70px !important;
    padding: 0 20px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
  }

  nav .logo img {
    height: 50px !important;
    max-height: 50px !important;
    width: auto !important;
  }

  nav .menu-icon,
  nav .cancel-icon {
    width: 40px !important;
    margin: 0 !important;
    padding: 8px !important;
    font-size: 1.5rem !important;
  }

  nav .nav-items { top: 70px !important; height: calc(100vh - 70px) !important; }
}
