
/* RESET BASE */
body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/* HEADER */
.site-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background-color: #2c3e50;
  color: white;
  padding: 10px 20px;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img {
  height: 40px;
}

/* MENU DESKTOP */
.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding-right: 60px; /* Sposta le voci verso sinistra */
}


/* HAMBURGER BASE */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;

  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
}
.hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* MENU MOBILE */
.mobile-navbar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  display: none;

  z-index: 1000;
}
.mobile-navbar.active {
  display: block;
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background-color: #fff;
  z-index: 999;
  overflow-y: auto;

  z-index: 1000;
}
.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu > li {
  border-bottom: 1px solid #ddd;
}
.mobile-menu a,
.submenu-toggle {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #111;
  font-weight: bold;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.arrow {
  float: right;
}
.submenu-content {
  display: none;
  background: #f9f9f9;
}
.submenu-toggle.active + .submenu-content {
  display: block;
}

/* RESPONSIVE RULES */
@media (max-width: 768px) {
  .hamburger { margin-left: auto; margin-right: 20px; 
  z-index: 1001;
}
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex !important;
  
  z-index: 1001;
}
}
@media (min-width: 769px) {
  .mobile-navbar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
    display: none !important;
  
  z-index: 1000;
}
}


/* STILE DROPDOWN MENU DESKTOP */
.nav-links li {
  position: relative;
}

.nav-links .submenu {
  display: none;
  position: absolute;
  background-color: #ffffff;
  color: #000000;
  list-style: none;
  padding: 0;
  margin: 0;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 1000;
  box-shadow: none !important;
}

.nav-links .submenu li a {
  color: #111;
  padding: 10px 15px;
  display: block;
  font-weight: normal;
}

.nav-links li:hover > .submenu {
  display: block;
}

/* MENU MOBILE RAFFINATO E ARIOSO */
.mobile-menu a,
.submenu-toggle {
  font-family: 'Segoe UI', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #333;
  background-color: #ffffff;
  padding: 16px 24px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-radius: 4px;
}

.mobile-menu a:hover,
.submenu-toggle:hover {
  background-color: #f2f2f2;
  color: #005a9e;
}

.mobile-menu > li {
  border-bottom: 1px solid #eee;
  padding: 4px 0;
}

.submenu-content {
  background-color: #fafafa;
  
  margin-left: 10px;
  border-radius: 4px;
  padding: 4px 0;
}

.submenu-content li a {
  font-size: 0.95rem;
  padding-left: 32px;
  color: #555;
}

.submenu-content li a:hover {
  background-color: #f0f0f0;
  color: #005a9e;
}

.mobile-menu a:hover,
.submenu-toggle:hover {
  background-color: #f4f4f4;
}

.mobile-menu > li {
  border-bottom: 1px solid #f4f4f4;
}

.mobile-menu a:hover,
.submenu-toggle:hover {
  background-color: #f8f8f8;
}

.mobile-menu > li {
  border-bottom: 1px solid #f0f0f0;
}


/* Rimuove i puntini dei sottomenu mobile */
.submenu-content,
.submenu-content li {
  list-style: none;
}

/* Rimuove l'ombra dei sottomenu mobile */
.submenu-content {
  box-shadow: none !important;
}


.nav-links a {
  position: relative;
  color: white;
  text-decoration: none;
  padding: 8px 6px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #aad4ff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: #aad4ff;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* BLOCCO SCROLL ORIZZONTALE TOTALE */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* BLOCCO SCROLL ORIZZONTALE NEL MENU MOBILE */
.mobile-navbar {
  box-sizing: border-box;
}
.mobile-navbar.active {
  overflow-x: hidden;
}

/* BLOCCO SCROLL VERTICALE QUANDO IL MENU È ATTIVO */
body.no-scroll {
  position: fixed;
  width: 100%;
  overflow: hidden;
  overflow-x: hidden;
}

/* Rispetta lo stato 'hidden' per nav e sottomenu in mobile */
.mobile-navbar[hidden],
.mobile-navbar .submenu-content[hidden] {
  display: none !important;
}

/* Evidenziazione link attivo — desktop */
.nav-links li > a.active {
  color: #aad4ff;
  font-weight: 600;
}
.nav-links li > a.active::after {
  width: 100%;
}

/* Evidenziazione link attivo — mobile */
.mobile-menu a.active {
  color: #005a9e;
  font-weight: 600;
}
