html {
  font-size: 15px; /* px means "pixels": the base font size is now 10 pixels high */
  font-family:
    "Roboto", sans-serif; /* this should be the rest of the output you got from Google Fonts */
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-variation-settings: "wdth" 100;
  background-color: #ffffff;
}

/* Screen reader only - nasconde visivamente ma mantiene accessibilità e SEO */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
/* Assicurati che il body e html abbiano altezza 100% */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  max-height: 100dvh;
  min-width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: hidden;
  position: fixed;
  top: 0;
  left: 0;
}

.titolo-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center; /* CENTRA VERTICALMENTE */
  justify-content: center;
  gap: 0px; /* Spazio tra titolo e sottotitolo */
  padding: 0px 0px;
  margin: auto auto auto 0px;
}

.titolo-container-nero,
.titolo-container-bianco {
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  display: flex;
  align-items: center; /* CENTRA il testo */
  justify-content: center;
  text-align: center;
  padding: 0px;
  margin-left: 30px;
  box-sizing: content-box;
  max-height: 60px;
  height: 60px;
  max-width: 100%;
}
.logo {
  max-height: 40%;
  width: auto;
  outline: none !important;
  border: none;
  box-shadow: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.logo:hover {
  outline: none;
}
.nav-icon-left {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.titolo-container-nero {
  display: none;
}
.titolo-container-bianco {
  filter: flex;
}
.navbar:hover .titolo-container-nero,
.navbar-hover-attivo .titolo-container-nero {
  display: flex;
}
.navbar:hover .titolo-container-bianco,
.navbar-hover-attivo .titolo-container-bianco {
  display: none;
}
.sottotitolo-container {
  display: flex;
  align-items: center; /* CENTRA il testo */
  text-align: center;
  margin: 0;
  padding: 0;
  height: 100%; /* opzionale */
}

.titolo {
  font-size: 25px;
  font-weight: 600;
  color: #ffffff;
  margin: 0; /* importante per evitare margini di default */
  /*text-shadow: 0 0.5px 3px rgba(0, 0, 0, 0.5);*/
}

.sottotitolo {
  font-size: 1.3vw;
  font-weight: 500;
  color: #000000;
  margin: 0 auto; /* idem */
}

.navbar {
  position: fixed;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 0px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: rgb(17, 17, 17);
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
  height: 65px;
  border-bottom: #aeaeae5a 0.5px solid;
  z-index: 9999;
  transition: all 0.3s ease;
}

.navbar:hover,
.navbar-hover-attivo {
  background-color: #ffffff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0px;
  height: 100%;
  max-width: 50%;
  box-sizing: border-box;
}

/* Navigation Center Buttons */
.nav-center {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 10px;
  flex: 1;
  justify-content: center;
}

.nav-button {
  text-decoration: none;
  background-color: transparent;
  color: #000000;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
}

.nav-button:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.nav-button.active {
  color: #e60000;
  background-color: transparent;
}

.nav-button.active:hover {
  color: #e60000;
  background-color: transparent;
}
.nav-center-left,
.nav-center-right {
  display: flex;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}
.nav-center {
  position: absolute;
  white-space: nowrap;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  border-radius: 50px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 2px 10px;
}
.navbar:hover .nav-center {
  background-color: transparent;
  transition: background-color 0.3s ease;
}
.nav-icon-left,
.nav-icon-right {
  font-size: 15px;
  color: #ffffff;
  text-decoration: none;
  margin: 0px;
  height: 100%;
  width: 100%;
  padding: 0px 0px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  text-align: center;
  transition: color 0.3s ease;
}

.navbar:hover .nav-icon-left,
.navbar:hover .nav-icon-right,
.navbar:hover .titolo,
.navbar-hover-attivo .titolo,
.navbar-hover-attivo .nav-icon-left,
.navbar-hover-attivo .nav-icon-right {
  color: #e60000;
}

.favorites-container i {
  color: white;
  transition: color 0.3s ease;
}

.navbar:hover .favorites-container i,
.navbar-hover-attivo .favorites-container i {
  color: red;
}

.bell-container i {
  color: white;
  transition: color 0.3s ease;
}

.navbar:hover .bell-container i,
.navbar-hover-attivo .bell-container i {
  color: #717171;
}

.menu-container,
.bell-container,
.favorites-container,
.user-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  aspect-ratio: 1.2/1;
  min-width: 50px;
  margin: 0;
  padding: 0px;
}
.menu-container {
  /*border-right: #aeaeae5a 0.5px solid;
  */
}
.bell-container,
.favorites-container,
.user-container {
  /*border-left: 0.5px solid #aeaeae5a;
  */
}

.home-container {
  margin-right: 20px;
}

.menu-container:hover,
.bell-container:hover,
.favorites-container:hover,
.user-container:hover {
  /*background: radial-gradient(circle, #bdbdbd, 60%, #ffffff 100%);*/
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.1),
    rgba(179, 179, 179, 0.3)
  );
}
.menu-container:active,
.bell-container:active,
.favorites-container:active,
.user-container:active {
  background-color: #c9c9c9;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -320px; /* Slightly wider for better content */
  width: 280px;
  margin-top: 65px;
  height: calc(100dvh - 65px);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  padding: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4000;
  border: none;
  border-radius: 0;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateZ(0); /* Force hardware acceleration */
}

.side-menu.open {
  left: 0;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
  transform: translateZ(0);
}

.side-menu .close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.side-menu .close-btn:hover {
  background: transparent;
  color: white;
  transform: translateX(-3px);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.side-menu ul {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.side-menu ul li {
  margin: 0;
  padding: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInMenuItem 0.3s ease forwards;
}

.side-menu ul li:nth-child(4) {
  animation-delay: 0.1s;
}
.side-menu ul li:nth-child(5) {
  animation-delay: 0.15s;
}
.side-menu ul li:nth-child(6) {
  animation-delay: 0.2s;
}
.side-menu ul li:nth-child(7) {
  animation-delay: 0.25s;
}
.side-menu ul li:nth-child(8) {
  animation-delay: 0.3s;
}
.side-menu ul li:nth-child(9) {
  animation-delay: 0.35s;
}
.side-menu ul li:nth-child(10) {
  animation-delay: 0.4s;
}
.side-menu ul li:nth-child(11) {
  animation-delay: 0.45s;
}
.side-menu ul li:nth-child(12) {
  animation-delay: 0.5s;
}
.side-menu ul li:nth-child(13) {
  animation-delay: 0.55s;
}

@keyframes slideInMenuItem {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.side-menu ul li a {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.side-menu ul li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.side-menu ul li a:hover::before {
  left: 100%;
}

.side-menu ul li a:hover {
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.05) 0%,
    rgba(230, 0, 0, 0.02) 100%
  );
  color: #e60000;
  border-left-color: #e60000;
  transform: translateX(5px);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 0, 0.1);
}

.side-menu ul li a:active {
  transform: translateX(2px);
  transition: transform 0.1s ease;
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.1) 0%,
    rgba(230, 0, 0, 0.05) 100%
  );
}

/* Add icons to menu items */
.side-menu ul li a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.side-menu ul li a:hover i {
  opacity: 1;
  transform: scale(1.1);
  color: #e60000;
}

/* Side menu divider */
.side-menu-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.25),
    transparent
  );
  margin: 8px 24px;
  opacity: 0;
  animation: slideInMenuItem 0.3s ease forwards;
  animation-delay: 0.4s;
}

/* Side menu enterprise items */
.side-menu-enterprise-item {
  margin: 0;
  padding: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInMenuItem 0.3s ease forwards;
}

.side-menu-enterprise-item:nth-child(1) {
  animation-delay: 0.1s;
}

.side-menu-enterprise-item:nth-child(2) {
  animation-delay: 0.15s;
}

/* Stili per i link delle voci enterprise */
.side-menu-enterprise-item a {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}

.side-menu-enterprise-item a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.side-menu-enterprise-item a:hover::before {
  left: 100%;
}

.side-menu-enterprise-item a:hover {
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.05) 0%,
    rgba(230, 0, 0, 0.02) 100%
  );
  color: #e60000;
  border-left-color: #e60000;
  transform: translateX(5px);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 0, 0.1);
}

.side-menu-enterprise-item a:active {
  transform: translateX(2px);
  transition: transform 0.1s ease;
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.1) 0%,
    rgba(230, 0, 0, 0.05) 100%
  );
}

.side-menu-enterprise-item a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.side-menu-enterprise-item a:hover i {
  opacity: 1;
  transform: scale(1.1);
  color: #e60000;
}

/* Side menu user items */
.side-menu-user-item {
  margin: 0;
  padding: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInMenuItem 0.3s ease forwards;
}

.side-menu-user-item:nth-child(1) {
  animation-delay: 0.1s;
}

.side-menu-user-item:nth-child(2) {
  animation-delay: 0.15s;
}

/* Stili per i link delle voci utente */
.side-menu-user-item a {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}

.side-menu-user-item a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.side-menu-user-item a:hover::before {
  left: 100%;
}

.side-menu-user-item a:hover {
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.05) 0%,
    rgba(230, 0, 0, 0.02) 100%
  );
  color: #e60000;
  border-left-color: #e60000;
  transform: translateX(5px);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 0, 0.1);
}

.side-menu-user-item a:active {
  transform: translateX(2px);
  transition: transform 0.1s ease;
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.1) 0%,
    rgba(230, 0, 0, 0.05) 100%
  );
}

.side-menu-user-item a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.side-menu-user-item a:hover i {
  opacity: 1;
  transform: scale(1.1);
  color: #e60000;
}

/* Badge per side menu */
.side-menu-badge {
  position: absolute;
  right: 20px;
  background: #e60000;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.side-menu-enterprise-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.4),
    transparent
  );
  margin: 8px 24px;
  opacity: 0;
  animation: slideInMenuItem 0.3s ease forwards;
  animation-delay: 0.2s;
}

.side-menu-user-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.4),
    transparent
  );
  margin: 8px 24px;
  opacity: 0;
  animation: slideInMenuItem 0.3s ease forwards;
  animation-delay: 0.2s;
}

/* Menu header */
.side-menu-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #e60000 0%, #cc0000 100%);
  color: white;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.side-menu-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.side-menu.open .side-menu-header::before {
  left: 100%;
}

.side-menu-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.side-menu-header p {
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Menu footer */
.side-menu-footer {
  padding: 20px 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  background: rgba(248, 249, 250, 0.8);
}

/* Overlay for menu background */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.side-menu-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Overlay for profile menu background */
.profile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.profile-menu-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Overlay for notifications menu background */
.notifications-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.notifications-menu-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Enhanced body transition when menu is open */
body.menu-open {
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar styling for side menu */
.side-menu::-webkit-scrollbar {
  width: 6px;
}

.side-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.side-menu::-webkit-scrollbar-thumb {
  background: rgba(230, 0, 0, 0.3);
  border-radius: 3px;
}

.side-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .side-menu {
    width: 280px;
    left: -280px;
  }
  .side-menu ul {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
  }

  .side-menu ul li a {
    padding: 18px 20px;
    font-size: 1.05rem;
  }

  .side-menu-enterprise-item a {
    padding: 18px 20px;
    font-size: 1.05rem;
  }

  .side-menu-user-item a {
    padding: 18px 20px;
    font-size: 1.05rem;
  }

  .side-menu-header {
    padding: 10px 20px;
  }

  .side-menu-footer {
    padding: 18px 10px;
  }
}

@media (max-width: 480px) {
  .side-menu {
    width: 260px;
    left: -260px;
  }

  .side-menu ul li a {
    padding: 16px 18px;
  }

  .side-menu-enterprise-item a {
    padding: 16px 18px;
  }

  .side-menu-user-item a {
    padding: 16px 18px;
  }

  .side-menu-header h3 {
    font-size: 1.1rem;
  }

  .side-menu-header p {
    font-size: 0.85rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .side-menu ul li a {
    padding: 20px 24px; /* Larger touch targets */
  }

  .side-menu-enterprise-item a {
    padding: 20px 24px; /* Larger touch targets */
  }

  .side-menu-user-item a {
    padding: 20px 24px; /* Larger touch targets */
  }

  .side-menu .close-btn {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
}

.profile-menu {
  position: fixed;
  top: 60px;
  right: 0px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: none;
  border-radius: 0 0 0 5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 4000;
  min-width: 260px;
  max-width: 320px;
  padding: 0;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-menu.visible {
  display: block;
  animation: slideInProfileMenu 0.3s ease forwards;
}

@keyframes slideInProfileMenu {
  from {
    opacity: 0;
    transform: translateY(-10px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

.profile-menu .user-info {
  padding: 25px 25px 20px 25px;
  border-bottom: 2px solid #e60000;
  color: #e60000;
  font-weight: 600;
  margin-bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(230, 0, 0, 0.05) 0%,
    rgba(230, 0, 0, 0.02) 100%
  );
  font-size: 1.1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.profile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0 0 5px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100%;
}

.profile-menu ul li {
  margin: 0;
  padding: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideInProfileItem 0.4s ease forwards;
}

.profile-menu ul li:nth-child(1) {
  animation-delay: 0.05s;
}
.profile-menu ul li:nth-child(2) {
  animation-delay: 0.1s;
}
.profile-menu ul li:nth-child(3) {
  animation-delay: 0.15s;
}
.profile-menu ul li:nth-child(4) {
  animation-delay: 0.2s;
}
.profile-menu ul li:nth-child(5) {
  animation-delay: 0.25s;
}
.profile-menu ul li:nth-child(6) {
  animation-delay: 0.3s;
}
.profile-menu ul li:nth-child(7) {
  animation-delay: 0.35s;
}
.profile-menu ul li:nth-child(8) {
  animation-delay: 0.4s;
}
.profile-menu ul li:nth-child(9) {
  animation-delay: 0.45s;
}
.profile-menu ul li:nth-child(10) {
  animation-delay: 0.5s;
}

@keyframes slideInProfileItem {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-menu ul li a {
  display: flex;
  align-items: center;
  margin: 0;
  text-align: left;
  padding: 18px 28px;
  font-weight: 500;
  text-decoration: none;
  color: #333;
  width: 100%;
  border-radius: 0;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
  background: transparent;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Badge per richieste amicizia nel profile menu */
.profile-menu ul li a .friends-requests-badge {
  margin-left: 8px;
  margin-right: 0;
  background: #e60000;
  color: white;
  border-radius: 50%;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  max-height: 20px;
  font-size: 11px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0px;
  flex-shrink: 0;
  vertical-align: middle;
}

.profile-menu ul li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.profile-menu ul li a:hover::before {
  left: 100%;
}

.profile-menu ul li a:hover {
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.05) 0%,
    rgba(230, 0, 0, 0.02) 100%
  );
  color: #e60000;
  border-left-color: #e60000;
  transform: translateX(3px);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 0, 0.1);
}

.profile-menu ul li a:active {
  transform: translateX(1px);
  transition: transform 0.1s ease;
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.1) 0%,
    rgba(230, 0, 0, 0.05) 100%
  );
}

/* Stili per il menu delle notifiche */
.notifications-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 0 0 0 5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 4000;
  margin-top: 65px;
  margin-right: 0px;
  max-height: calc(100dvh - 65px);
  height: calc(100dvh - 65px);
  min-height: calc(100dvh - 65px);
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notifications-menu.visible {
  display: block;
  animation: slideInNotificationsMenu 0.3s ease forwards;
}

@keyframes slideInNotificationsMenu {
  from {
    opacity: 0;
    transform: translateY(-10px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

.notifications-header {
  margin-top: 0;
  padding: 10px 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #e60000 0%, #cc0000 100%);
  color: white;
  text-align: left;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.notifications-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.notifications-menu.visible .notifications-header::before {
  left: 100%;
}

.notifications-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: white;
  font-weight: 600;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.notifications-list {
  padding: 0;
  background: transparent;
}

.notification-item {
  padding: 15px 25px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  background: transparent;
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.notification-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 0, 0, 0.05),
    transparent
  );
  transition: left 0.5s ease;
}

.notification-item:hover::before {
  left: 100%;
}

.notification-item:hover {
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.03) 0%,
    rgba(230, 0, 0, 0.01) 100%
  );
  transform: translateX(3px);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 0, 0.1);
}

.notification-item.unread {
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.05) 0%,
    rgba(230, 0, 0, 0.02) 100%
  );
  border-left: 3px solid #e60000;
  color: #1b1b1b !important;
}
.notification-item.unread:hover {
  background: linear-gradient(
    90deg,
    rgba(230, 0, 0, 0.08) 0%,
    rgba(230, 0, 0, 0.04) 100%
  );
  transform: translateX(3px);
}

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  color: #666;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.notification-item.unread .notification-icon {
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(92, 92, 92, 0.3);
}

.notification-item:hover .notification-icon {
  transform: scale(1.1);
}

.notification-content {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.notification-title {
  font-weight: 600;
  color: #1b1b1b !important;
  margin-bottom: 4px;
  font-size: 0.95rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.notification-item.unread .notification-title {
  color: #e60000;
  font-weight: 700;
}

.notification-message {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.notification-time {
  color: #999;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Scrollbar styling for notifications menu */
.notifications-menu::-webkit-scrollbar {
  width: 6px;
}

.notifications-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.notifications-menu::-webkit-scrollbar-thumb {
  background: rgba(230, 0, 0, 0.3);
  border-radius: 3px;
}

.notifications-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 0, 0, 0.5);
}

/* Clear button styling */
#clearReadNotificationsBtn {
  font-size: 0.9em !important;
  padding: 8px 16px !important;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent !important;
  color: white !important;
  cursor: pointer;
  margin-left: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-weight: 600;
  flex-shrink: 0;
}

#clearReadNotificationsBtn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#clearReadNotificationsBtn:active {
  transform: scale(1.02);
  transition: transform 0.1s ease;
}

/* No notifications message */
.no-notifications-message {
  padding: 40px 20px;
  text-align: center;
  color: #666;
  font-style: italic;
  background: rgba(248, 249, 250, 0.8);
}

/* Stili per l'indicatore di richieste pendenti nel menu profilo */
.pending-requests-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  background-color: #ff4444;
  border-radius: 50px;
  margin-left: 5px;
  margin-bottom: 5px;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: bold;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: indicatorPop 0.3s ease-out;
}

@keyframes indicatorPop {
  0% {
    transform: scale(0);
  }
  70% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.footer-container {
  margin-top: 0px;
  /* Rimuovo flex: 1 per non forzare l'espansione */
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

/* Footer moderno ed elegante */
.modern-footer {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: #333333;
  /* Rimuovo position: relative e margin-top: auto per usare flex naturale */
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #dee2e6;
}

.modern-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.1),
    transparent
  );
}

.modern-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sezione principale del footer */
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding: 60px 0 40px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-section h4 {
  color: #333333;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 25px;
  position: relative;
}

.footer-section h4::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #e60000, #ff4444);
  border-radius: 1px;
}

/* Brand section */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  width: auto;
  height: 40px;
  object-fit: contain;
  margin-bottom: 15px;
}
.footer-brand h3 {
  color: #333333;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #333333, #666666);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  text-align: center;
  color: #666666;
  font-size: 1.4rem;
  line-height: 1.6;
  margin: 0;
  max-width: 300px;
}

/* Links sections */
.footer-section {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  box-sizing: border-box;
}
.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column !important;
  min-width: 100% !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 0;
  margin: 0;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
}

/* Forza layout a colonna unica per desktop - override mobile styles */
@media screen and (min-width: 769px) {
  .footer-section ul {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }

  .footer-section ul li {
    display: block !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    margin-right: 0 !important;
    flex: none !important;
  }
}

.footer-section ul li {
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: fit-content;
  max-height: fit-content;
  flex: 1;
}

.footer-section ul li a {
  color: #666666;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.footer-section ul li a::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #e60000, #ff4444);
  transition: width 0.3s ease;
}

.footer-section ul li a:hover {
  color: #333333;
  padding-left: 15px;
}

.footer-section ul li a:hover::before {
  width: 10px;
}

/* Social links */
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  color: #666666;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.social-link:hover {
  background: linear-gradient(135deg, #e60000, #ff4444);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230, 0, 0, 0.3);
}

.social-link i {
  font-size: 1.1rem;
}

/* Footer bottom */
.footer-bottom {
  padding: 30px 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright p {
  color: #999999;
  font-size: 0.9rem;
  margin: 0;
  margin-left: 60px;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-legal a {
  color: #666666;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: #333333;
}

.separator {
  color: #cccccc;
  font-size: 0.8rem;
}

/* Responsive design per il footer */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 0px;
    padding: 40px 0 30px 0;
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 0px;
    padding: 30px 0 20px 0;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .footer-legal {
    justify-content: center;
  }

  .footer-brand h3 {
    font-size: 1.5rem;
  }

  .footer-brand p {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-container {
    padding: 0 15px;
  }

  .footer-main {
    gap: 25px;
    padding: 25px 0 15px 0;
  }

  .social-links {
    justify-content: center;
  }

  .footer-legal {
    flex-direction: column;
    gap: 10px;
  }

  .separator {
    display: none;
  }
}

/* Mantieni gli stili del footer originale per compatibilità */
footer {
  /* Rimuovo position: relative per usare flex naturale */
  max-width: 100%;
  z-index: 2000;
  text-align: center;
  padding: 20px;
  margin-top: 0px;
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Rimuovo flex: 1 per non forzare l'espansione */
  min-height: fit-content;
}
footer a {
  color: rgb(33, 33, 33);
  text-decoration: none;
  font-weight: 400;
}
footer a:hover {
  color: rgb(0, 145, 255);
}

/* Badge delle notifiche - SOLO nel bell-container */
/* Regola molto specifica per evitare conflitti - DEVE essere dopo le regole di nascondimento */
/* Questa regola viene sovrascritta più in basso per garantire la priorità */

.bell-container .notification-badge *,
.bell-container button .notification-badge *,
#bellIcon .notification-badge *,
.notification-bell .notification-badge * {
  margin: 0;
  padding: 0;
}

/* Assicurati che il badge delle notifiche NON appaia sui bottoni delle sezioni */
/* Regole molto specifiche per nascondere il badge ovunque tranne nel bell-container */
/* IMPORTANTE: Escludi esplicitamente .bell-container per evitare conflitti */
.account-nav-buttons:not(.bell-container) .notification-badge,
.account-nav-buttons:not(.bell-container) * .notification-badge,
.account-nav-desktop-nav .notification-badge,
.account-nav-desktop-nav * .notification-badge,
.tab-button .notification-badge,
.tab-button * .notification-badge,
#business-nav-buttons .notification-badge,
#business-nav-buttons * .notification-badge,
.account-nav-actions .notification-badge,
.account-nav-actions * .notification-badge {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
  bottom: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
}

/* Proteggi esplicitamente il badge nel bell-container da qualsiasi interferenza */
.bell-container .notification-badge,
.bell-container button .notification-badge,
#bellIcon .notification-badge,
.notification-bell .notification-badge {
  /* Mantieni tutti gli stili originali - sovrascrivi qualsiasi regola precedente */
  position: absolute !important;
  bottom: 50% !important;
  left: 50% !important;
  transform: translate(-50%, 50%) !important;
  margin-left: 8px !important;
  margin-bottom: 12px !important;
  background: #e60000 !important;
  color: white !important;
  border-radius: 50% !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  z-index: 10 !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  padding: 0 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  animation: badgePop 0.3s ease-out !important;
  text-align: center !important;
  line-height: 20px !important;
  top: auto !important;
  right: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.bell-container {
  position: relative !important;
  /* Assicurati che il bell-container mantenga il suo contesto di posizionamento */
  isolation: isolate;
}

/* Proteggi il bell-container da interferenze quando vengono inseriti account-nav-buttons */
/* NOTA: Non sovrascrivere width/height/aspect-ratio per mantenere le dimensioni originali */
.nav-right .bell-container {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  /* Mantieni le dimensioni originali (height: 100%, aspect-ratio: 1.2/1, min-width: 50px) */
}

/* Animazione del badge quando appare */
@keyframes badgePop {
  0% {
    transform: scale(0);
  }
  70% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Chat Bot Styles */
.chat-bot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3001;
}

/* PERMETTI SCROLL AUTOMATICO DEL BROWSER QUANDO IL CHATBOT È IN FOCUS */
.chat-bot-input input:focus ~ *,
.chat-bot-input input:focus ~ * * {
  /* Rimuovi qualsiasi interferenza con lo scroll automatico */
  transform: none !important;
  -webkit-transform: none !important;
}

/* Assicura che il body non interferisca con lo scroll quando il chatbot è in focus */
.chat-bot-input input:focus ~ body,
.chat-bot-input input:focus ~ html {
  /* Permetti scroll naturale del browser */
  overflow: visible !important;
  position: static !important;
}

.chat-bot-button {
  width: 60px;
  height: 60px;
  background-color: #e60000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.chat-bot-button:hover {
  transform: scale(1.05);
}

.chat-bot-button i {
  color: white;
  font-size: 24px;
}

/* Badge AI sul bottone chatbot */
.chatbot-ai-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(90deg, #3a8dde 0%, #005bea 100%);
  color: white;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow:
    0 2px 8px rgba(0, 94, 234, 0.18),
    0 0 6px #3a8dde44;
  border: 2px solid white;
  z-index: 10;
  min-width: 20px;
  text-align: center;
  line-height: 1;
  animation: aiBadgePulse 2s infinite;
}

@keyframes aiBadgePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 2px 8px rgba(0, 94, 234, 0.18),
      0 0 6px #3a8dde44;
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      0 4px 16px rgba(0, 94, 234, 0.28),
      0 0 12px #3a8dde88;
  }
}

.chat-bot-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  background-color: white;
  border: 0px solid #c60000;
  border-radius: 10px;
  box-shadow: 0 0px 30px rgba(0, 0, 0, 0.248);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  /* PERMETTI SCROLL AUTOMATICO DEL BROWSER */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* MOBILE CHATBOT OVERRIDE - Forza dimensioni per mobile */
@media (max-width: 768px) {
  .chat-bot-container {
    width: 80% !important;
    min-height: 65vh !important;
    height: 65vh !important;
    bottom: 80px !important;
    right: 15px !important;
    left: auto !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
  }
  .chat-bot-header {
    padding: 12px 15px !important;
    overflow-y: visible !important;
  }

  /* Previeni che il titolo vada a capo quando c'è il badge IA */
  .chat-bot-header h3 {
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 5px 0 !important;
  }

  /* Assicura che il badge sia sulla stessa linea */
  .chat-bot-header h3 .ai-badge {
    flex-shrink: 0 !important;
    margin-left: 0 !important;
    margin-top: 2px !important;
  }

  /* PREVIENI ZOOM AUTOMATICO - Input del chatbot */
  .chat-bot-input input {
    font-size: 16px !important; /* Previene zoom su iOS */
    transform: none !important;
    -webkit-transform: none !important;
    scroll-behavior: auto !important;
    -webkit-overflow-scrolling: auto !important;
  }

  /* PERMETTI SCROLL AUTOMATICO DEL BROWSER SU MOBILE */
  .chat-bot-input input:focus {
    /* Rimuovi qualsiasi interferenza con lo scroll automatico */
    transform: none !important;
    -webkit-transform: none !important;
  }

  /* Assicura che il container non interferisca con lo scroll */
  .chat-bot-container {
    /* Mantieni position: fixed ma permetti scroll naturale */
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    /* Previeni interferenze con viewport mobile */
    -webkit-overflow-scrolling: touch !important;
  }

  /* SOLUZIONE SPECIFICA PER MOBILE: Permetti scroll automatico del browser */
  @media (max-width: 768px) {
    /* Quando l'input è in focus, rimuovi qualsiasi interferenza */
    .chat-bot-input input:focus {
      /* Forza il browser a gestire lo scroll automatico */
      transform: none !important;
      -webkit-transform: none !important;
      /* Previeni zoom ma permetti scroll */
      font-size: 16px !important;
    }

    /* Assicura che il container non blocchi lo scroll */
    .chat-bot-container.visible {
      /* Mantieni position: fixed ma permetti scroll naturale */
      transform: translateZ(0) !important;
      -webkit-transform: translateZ(0) !important;
      /* Previeni interferenze con viewport mobile */
      -webkit-overflow-scrolling: touch !important;
      /* Assicura che non interferisca con lo scroll della pagina */
      pointer-events: auto !important;
    }

    /* Rimuovi qualsiasi interferenza con il body quando il chatbot è aperto */
    body:has(.chat-bot-container.visible) {
      /* Permetti scroll naturale */
      overflow: visible !important;
      position: static !important;
      transform: none !important;
      -webkit-transform: none !important;
    }
  }
}

/* RIMOSSO: Breakpoint che forzano dimensioni del chatbot su mobile */
@media (max-width: 480px) {
  .chat-bot-container {
    min-width: 80% !important;
    height: 65vh !important;
    min-height: 65vh !important;
    bottom: 80px !important;
    right: 10px !important;
  }
}

@media (max-width: 360px) {
  .chat-bot-container {
    width: 75% !important;
    height: 65vh !important;
    min-height: 65vh !important;
    bottom: 75px !important;
    right: 8px !important;
  }
}

.chat-bot-container.visible {
  display: flex;
}

.chat-bot-header {
  padding: 15px 20px;
  background-color: #c60000;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

.chat-bot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
}

.clear-chat-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.clear-chat-btn:hover {
  transform: rotate(180deg);
}

.chat-bot-messages {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bot-message,
.user-message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  margin-bottom: 5px;
}

.bot-message {
  background-color: #f0f0f0;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.user-message {
  background-color: #c60000;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.chat-bot-input {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.chat-bot-input input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

.chat-bot-input button {
  background-color: #e60000;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.chat-bot-input button:hover {
  background-color: #c60000;
}

.chat-bot-input button i {
  font-size: 16px;
}

/* Stili per le notifiche delle richieste inviate */
.sent-request-notification {
  border-left: 3px solid #4caf50;
}

.sent-request-notification.unread {
  border-left-color: #2196f3;
}

.sent-request-notification .notification-message {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
  margin-bottom: 4px;
}

.sent-request-notification.unread .notification-message {
  color: #e60000;
  font-weight: 600;
}

/* Aggiorna gli stili esistenti delle notifiche per mantenere la coerenza */
.notification-item {
  padding: 12px 12px 6px 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notification-item:hover {
  background-color: #f5f5f5;
}

.notification-item.unread {
  background-color: #f0f7ff;
}

.notification-item.unread:hover {
  background-color: #e3f2fd;
}

.notification-icon {
  color: #666;
  font-size: 1.2em;
  min-width: 24px;
  text-align: center;
}

.notification-item.unread .notification-icon {
  color: #2196f3;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notification-title {
  font-weight: 500;
  color: #333;
}

.notification-time {
  font-size: 0.8em;
  color: #999;
}

/* Stili specifici per i tipi di notifiche */
.review-notification {
  border-left: 3px solid #ffc107;
}

.review-notification.unread {
  border-left-color: #ff9800;
}

.nav-right {
  display: flex;
  align-items: center;
}

.worker-link {
  display: none; /* Sarà mostrato via JavaScript solo quando non c'è un utente loggato */
  text-decoration: none;
  background-color: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  padding: 8px 16px;
  /*border: 2px solid #ff0101;*/
  border-radius: 10px;
  margin-right: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar:hover .worker-link,
.navbar-hover-attivo .worker-link {
  background-color: transparent;
  color: #c60000;

  transition: all 0.3s ease;
}
.worker-link:hover {
  transform: translateY(-2px);
}

.aziende-link {
  display: none; /* Sarà mostrato via JavaScript solo quando non c'è un utente loggato */
  text-decoration: none;
  background-color: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  padding: 8px 16px;
  /*border: 2px solid #ff0101;*/
  border-radius: 10px;
  margin-right: 20px;
  transition: all 0.3s ease;
}

.navbar:hover .aziende-link,
.navbar-hover-attivo .aziende-link {
  background-color: transparent;
  color: #c60000;

  transition: all 0.3s ease;
}
.aziende-link:hover {
  /*background-color: #e60000 !important;
  color: #ffffff !important;
  transform: scale(1.05);*/
  transform: translateY(-2px);
}

.about-link {
  display: none; /* Sarà mostrato via JavaScript solo quando non c'è un utente loggato */
  text-decoration: none;
  background-color: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  padding: 6px 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
  margin-right: 20px;
  cursor: pointer;
}
.navbar:hover .about-link,
.navbar-hover-attivo .about-link {
  background-color: transparent;
  color: #c60000;
}
.about-link:hover {
  transform: translateY(-2px);
}

.collaborazioni-link {
  display: none; /* Sarà mostrato via JavaScript solo quando non c'è un utente loggato */
  text-decoration: none;
  background-color: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  padding: 6px 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
  margin-right: 20px;
  cursor: pointer;
}

.navbar:hover .collaborazioni-link,
.navbar-hover-attivo .collaborazioni-link {
  background-color: transparent;
  color: #c60000;
}

.collaborazioni-link:hover {
  transform: translateY(-2px);
}

/* Mostra i link su desktop quando l'utente non è loggato */
@media (min-width: 769px) {
  body:not(.user-logged-in) .about-link,
  body:not(.user-logged-in) .worker-link,
  body:not(.user-logged-in) .aziende-link,
  body:not(.user-logged-in) .collaborazioni-link {
    display: flex !important;
  }
}

#loggedOutMenu .user-info {
  color: #202020;
}

.notification-request-band {
  border-left: 2px solid #1d8dfd;
  background-color: #eaf3fb;
}
.notification-review-band {
  border-left: 2px solid #fdac31;
  background-color: #fff4e5;
}

.notification-message-band {
  border-left: 2px solid #1890ff;
  background-color: #e6f7ff;
}
.notification-item.read {
  border-left: 2px solid #ccc !important;
  background-color: #fff !important;
  font-weight: 400 !important;
}
.notification-item.read .notification-icon,
.notification-item.read .notification-message {
  color: #6c6c6c !important;
  font-weight: 400 !important;
}

.notification-request-band .notification-icon i {
  color: #1d8dfd;
}
.notification-review-band .notification-icon i {
  color: #fdac31;
}
.notification-item.read .notification-icon i {
  color: #6c6c6c !important;
}

.ai-badge {
  display: inline-block;
  background: linear-gradient(90deg, #3a8dde 0%, #005bea 100%);
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
  padding: 3px 12px 3px 12px;
  border-radius: 999px;
  margin-left: 10px;
  letter-spacing: 1.2px;
  vertical-align: middle;
  border: 1.5px solid #fff;
  box-shadow:
    0 2px 8px rgba(0, 94, 234, 0.18),
    0 0 6px #3a8dde44;
  line-height: 1.2;
  position: relative;
  top: -1px;
  transition: box-shadow 0.2s;
}
.ai-badge:hover {
  box-shadow:
    0 4px 16px rgba(0, 94, 234, 0.28),
    0 0 12px #3a8dde88;
  cursor: pointer;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.review-item {
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #eaeaea;
  background-color: #f9f9f9;
  z-index: 1;
  position: relative;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-title {
  font-weight: 600;
  margin: 0;
  font-size: 16px;
}

.review-rating {
  color: #ffd700;
  font-size: 16px;
}

.review-date {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 500;
  font-size: 14px;
  color: #444;
  margin-bottom: 8px;
}

.review-text {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 10px;
}

.delete-review {
  position: absolute;
  bottom: 10px;
  right: 15px;
  color: #e60000;
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.delete-review:hover {
  scale: 1.1;
}
.delete-review:active {
  scale: 1;
}

/* Modal styles - Global */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 3000;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 0;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: modalSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal-header {
  background: linear-gradient(135deg, #e60000, #b00000);
  color: white;
  padding: 25px 30px 20px 30px;
  position: relative;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
}

.modal-body {
  padding: 30px;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-weight: 300;
}

.close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 2px solid #e1e5e9 !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  background: #f8f9fa !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
  color: #333 !important;
  font-family: inherit !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none !important;
  border-color: #e60000 !important;
  background: white !important;
  box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1) !important;
}

.form-group textarea {
  resize: vertical !important;
  min-height: 80px !important;
}

.form-group select option {
  background: white !important;
  color: #333 !important;
  padding: 8px !important;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999 !important;
  font-style: italic !important;
  opacity: 1 !important;
}

.form-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

.primary-button,
.secondary-button {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.primary-button {
  background: linear-gradient(135deg, #e60000, #b00000);
  color: white;
  box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 0, 0, 0.4);
}

/* Pulsante copia link specifico - grigio neutro */
#copyLinkBtn {
  background: #6c757d !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3) !important;
  white-space: nowrap !important;
}

#copyLinkBtn:hover {
  background: #5a6268 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4) !important;
}

.secondary-button {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e1e5e9;
}

.secondary-button:hover {
  background: #e9ecef;
  color: #333;
  transform: translateY(-2px);
}

/* Responsive per i modali */
@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
    margin: 20px;
  }

  .modal-header {
    padding: 20px 25px 15px 25px;
  }

  .modal-body {
    padding: 20px;
  }

  .form-buttons {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    justify-content: center;
  }

  .share-buttons {
    width: 100%;
  }
}

/* Stili specifici per i pulsanti di condivisione */
.share-buttons {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  width: 100%;
}

.share-buttons .secondary-button {
  flex: 0 0 auto;
  width: auto;
  justify-content: center;
  padding: 8px 14px;
  min-width: 55px;
  max-width: 70px;
}

.share-buttons .secondary-button i {
  font-size: 1.3rem;
}

.share-buttons .secondary-button:first-child {
  background: #25d366;
  color: white;
  border: none;
}

.share-buttons .secondary-button:first-child:hover {
  background: #128c7e;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.share-buttons .secondary-button:last-child {
  background: #007bff;
  color: white;
  border: none;
}

.share-buttons .secondary-button:last-child:hover {
  background: #0056b3;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

/* Stile per il bottone Invia in chat */
#sendInChatBtn {
  background: linear-gradient(135deg, #1a8dff, #036cdd) !important;
  box-shadow: 0 4px 15px rgba(26, 141, 255, 0.3) !important;
  white-space: nowrap !important;
}

#sendInChatBtn:hover {
  background: linear-gradient(135deg, #167ce2, #0156b6) !important;
  box-shadow: 0 8px 25px rgba(26, 141, 255, 0.4) !important;
  transform: translateY(-2px);
}

/* Responsive per i pulsanti di condivisione */
@media (max-width: 768px) {
  .share-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .share-buttons .secondary-button {
    width: auto;
    max-width: 70px;
  }
}

/* Stili specifici per il modal di segnalazione */
#report-modal .modal-content {
  max-width: 500px;
}

#report-modal .char-count {
  display: block;
  text-align: right;
  color: #666;
  font-size: 12px;
  margin-top: 5px;
}

#report-modal .report-success-msg {
  display: none;
  text-align: center;
  padding: 30px 20px;
  color: #00bc16;
  font-weight: 600;
  font-size: 1.1rem;
}

#report-modal .report-success-msg i {
  font-size: 2rem;
  margin-bottom: 15px;
  display: block;
}

/* Responsive per il modal di segnalazione */
@media (max-width: 768px) {
  #report-modal .modal-content {
    width: 95vw;
    margin: 20px;
  }

  #report-modal .form-buttons {
    flex-direction: column;
  }

  #report-modal .primary-button,
  #report-modal .secondary-button {
    width: 100%;
    justify-content: center;
  }
}

/* Stili specifici per il modal di richiesta contatto */
#requestModal .primary-button {
  background: linear-gradient(135deg, #0080f0, #0068d0) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(0, 128, 240, 0.3) !important;
}

#requestModal .primary-button:hover {
  background: linear-gradient(135deg, #0070d0, #0056b3) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 128, 240, 0.4) !important;
}

#requestModal .char-count {
  display: block;
  text-align: right;
  color: #666;
  font-size: 12px;
  margin-top: 5px;
}

/* Stili specifici per il modal di recensione */
.review-modal .primary-button {
  background: linear-gradient(135deg, #e60000, #cc0000) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3) !important;
}

.review-modal .primary-button:hover {
  background: linear-gradient(135deg, #cc0000, #b30000) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 0, 0, 0.4) !important;
}

.review-modal .char-count {
  display: block;
  text-align: right;
  color: #666;
  font-size: 12px;
  margin-top: 5px;
}

.review-modal .rating-select .star {
  transition: color 0.2s ease;
}

.review-modal .rating-select .star:hover {
  color: #ffd700 !important;
}

/* ========================================
   MOBILE OPTIMIZATIONS - SHARED.CSS
   ======================================== */

/* Base mobile optimizations */
@media (max-width: 768px) {
  /* Navbar mobile optimizations */
  .navbar {
    height: 65px !important;
    padding: 0 10px !important;
  }

  /* Hide desktop navigation links on mobile */
  .about-link,
  .worker-link,
  .aziende-link,
  .collaborazioni-link {
    display: none !important;
  }

  /* Hide navigation center buttons on mobile */
  .nav-center {
    display: none !important;
  }

  /* Adjust nav containers for mobile */
  .nav-left {
    max-width: 60% !important;
    gap: 5px !important;
  }

  .nav-right {
    max-width: 40% !important;
    gap: 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  /* Logo optimizations - only for mobile */
  .titolo-container-bianco,
  .titolo-container-nero {
    left: 12.5% !important;
  }
  .navbar .logo {
    max-height: 20px !important;
    width: auto !important;
    image-rendering: auto !important;
  }

  /* Menu container adjustments */
  .navbar .menu-container,
  .navbar .bell-container,
  .navbar .favorites-container,
  .navbar .user-container {
    height: 100% !important;
    aspect-ratio: 1/1 !important; /* Bottoni quadrati */
    min-width: 40px !important; /* Min-width per touch target */
    min-height: 40px !important; /* Min-height per touch target */
    flex-shrink: 0 !important; /* Evita che si restringano */
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Mobile nav buttons container */
  .mobile-nav-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-right: 0 !important;
    height: 100% !important;
    flex-shrink: 0 !important;
    margin-left: 0 !important;
  }

  .mobile-nav-buttons .mobile-nav-btn {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    background: transparent !important;
    position: relative !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }

  .mobile-nav-buttons .mobile-nav-btn i {
    font-size: 18px !important;
    color: white !important;
    transition: color 0.3s ease !important;
  }

  .navbar:hover .mobile-nav-buttons .mobile-nav-btn i,
  .navbar-hover-attivo .mobile-nav-buttons .mobile-nav-btn i {
    color: #717171 !important;
  }

  /* Mobile service button "Offro un servizio" */
  .mobile-service-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 12px !important;
    background: white !important;
    border: 1px solid rgba(113, 113, 113, 0.3) !important;
    border-radius: 18px !important;
    color: #000000 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    margin-right: 0px !important;
    font-family: inherit !important;
  }

  .mobile-service-btn:hover {
    background: rgba(113, 113, 113, 0.1) !important;
    border-color: rgba(113, 113, 113, 0.5) !important;
  }

  .navbar:hover .mobile-service-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #717171 !important;
    border-color: rgba(113, 113, 113, 0.3) !important;
  }

  /* Home container spacing */
  .navbar .home-container {
    margin-left: 0px !important; /* Ridotto da 10px a 5px per avvicinare il logo */
    margin-right: 10px !important;
  }

  /* Nascondi il logo quando l'utente è loggato su mobile */
  body.user-logged-in .navbar .home-container {
    display: none !important;
  }

  /* Assicura che i bottoni interni siano quadrati e centrati */
  .navbar .nav-icon-left,
  .navbar .nav-icon-right {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* Side menu mobile optimizations */
  .side-menu {
    width: 280px !important;
    margin-top: 65px !important;
  }

  .side-menu ul li a {
    padding: 16px 20px !important;
    font-size: 16px !important;
  }

  .side-menu-enterprise-item a {
    padding: 16px 20px !important;
    font-size: 16px !important;
  }

  .side-menu-user-item a {
    padding: 16px 20px !important;
    font-size: 16px !important;
  }

  .side-menu-header h3 {
    font-size: 18px !important;
  }

  .side-menu-header p {
    font-size: 14px !important;
  }

  /* Profile menu mobile */
  .profile-menu {
    width: 250px !important;
    margin-top: 65px !important;
  }

  .profile-menu ul li a {
    padding: 12px 20px !important;
    font-size: 16px !important;
  }

  /* Notifications menu mobile */
  .notifications-menu {
    width: 300px !important;
    margin-top: 65px !important;
    height: auto !important;
    min-height: auto !important;
    max-height: calc(100dvh - 65px) !important;
    overflow-y: auto !important;
    padding-bottom: 0 !important;
  }

  .notifications-header h3 {
    font-size: 16px !important;
  }

  /* Forza l'altezza massima per il menu notifications mobile */
  .notifications-menu.visible {
    min-height: calc(100dvh - 65px) !important;
    max-height: calc(100dvh - 65px) !important;
    height: calc(100dvh - 65px) !important;
    min-height: auto !important;
  }

  /* Modal mobile optimizations */
  .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    margin: 20px auto !important;
    padding: 20px !important;
  }

  .modal-header h2 {
    font-size: 18px !important;
  }

  .form-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .primary-button,
  .secondary-button {
    width: 100% !important;
    height: 45px !important;
    font-size: 16px !important;
  }

  /* Chat bot mobile */
  .chat-bot-button {
    width: 50px !important;
    height: 50px !important;
    bottom: 20px !important;
    right: 20px !important;
  }

  /* Badge AI mobile */
  .chatbot-ai-badge {
    font-size: 10px !important;
    padding: 3px 6px !important;
    top: -3px !important;
    right: -3px !important;
    border-radius: 10px !important;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .navbar {
    padding: 0 5px !important;
  }

  .navbar .nav-left {
    max-width: 65% !important;
  }

  .navbar .nav-right {
    max-width: 35% !important;
    gap: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  .navbar .logo {
    max-height: 20px !important;
    image-rendering: auto !important;
  }

  .navbar .menu-container,
  .navbar .bell-container,
  .navbar .favorites-container,
  .navbar .user-container {
    min-width: 35px !important;
  }

  .mobile-nav-buttons {
    gap: 10px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .mobile-nav-buttons .mobile-nav-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    position: relative !important;
  }

  /* Mobile service button su schermi piccoli */
  .mobile-service-btn {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.8rem !important;
    margin-right: 0px !important;
  }

  /* Badge mobile chat per schermi piccoli */
  #mobile-chat-btn .mobile-chat-badge {
    position: absolute !important;
    top: 0px !important;
    right: 0px !important;
    background: #e60000 !important;
    background-color: #e60000 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    z-index: 10 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    text-align: center !important;
    border: none !important;
    box-sizing: border-box !important;
  }

  /* Nascondi completamente il badge quando è vuoto o nascosto */
  #mobile-chat-btn .mobile-chat-badge:empty,
  #mobile-chat-btn .mobile-chat-badge[style*="display: none"],
  #mobile-chat-btn .mobile-chat-badge[style*="display:none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .navbar .home-container {
    margin-left: 0px !important;
    margin-right: 8px !important;
  }

  /* Nascondi il logo quando l'utente è loggato su mobile (schermi piccoli) */
  body.user-logged-in .navbar .home-container {
    display: none !important;
  }

  .side-menu {
    width: 260px !important;
  }

  .side-menu ul li a {
    padding: 15px 15px !important;
    font-size: 15px !important;
  }

  .side-menu-enterprise-item a {
    padding: 15px 15px !important;
    font-size: 15px !important;
  }

  .side-menu-user-item a {
    padding: 15px 15px !important;
    font-size: 15px !important;
  }

  .side-menu-header h3 {
    font-size: 16px !important;
  }

  .profile-menu {
    width: 240px !important;
  }

  .notifications-menu {
    width: 280px !important;
  }

  .footer-container {
    padding: 0 10px !important;
  }

  .footer-main {
    padding: 30px 15px !important;
  }

  .modal-content {
    width: 98% !important;
    padding: 15px !important;
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  .profile-menu {
    top: 0px !important;
    width: 280px !important;
    max-width: 90vw !important;
    max-height: calc(100vh - 65px) !important;
    border-radius: 0 0 0 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Override per main-mobile.css */
  .profile-menu[style*="top"] {
    top: 0px !important;
  }

  /* Forza il posizionamento per tutte le pagine */
  body .profile-menu,
  html .profile-menu {
    top: 0px !important;
  }

  /* Dimensioni interne del profile-menu per tutte le pagine mobile */
  .profile-menu .user-info {
    padding: 20px 20px 15px 20px !important;
    font-size: 1rem !important;
  }

  .profile-menu ul li a {
    padding: 5px 20px !important;
    font-size: 16px !important;
    min-height: 50px !important;
    display: flex;
    align-items: center !important;
    gap: 8px !important;
  }

  .profile-menu ul li a i {
    font-size: 18px !important;
    margin-right: 12px !important;
    width: 20px !important;
    text-align: center !important;
  }

  /* Badge per richieste amicizia nel profile menu mobile */
  .profile-menu ul li a .friends-requests-badge {
    margin-left: 8px !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .navbar {
    padding: 0 3px !important;
  }

  .navbar .logo {
    max-height: 20px !important;
    image-rendering: auto !important;
  }

  .navbar .menu-container,
  .navbar .bell-container,
  .navbar .favorites-container,
  .navbar .user-container {
    min-width: 30px !important;
  }

  .navbar .home-container {
    margin-left: 0px !important;
    margin-right: 5px !important;
  }

  .side-menu {
    width: 240px !important;
  }

  .side-menu ul li a {
    padding: 14px 12px !important;
    font-size: 14px !important;
  }

  .side-menu-enterprise-item a {
    padding: 14px 12px !important;
    font-size: 14px !important;
  }

  .side-menu-user-item a {
    padding: 14px 12px !important;
    font-size: 14px !important;
  }

  .profile-menu {
    width: 220px !important;
    top: 0px !important;
  }

  .notifications-menu {
    width: 260px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .navbar {
    height: 55px !important;
  }

  .side-menu,
  .profile-menu,
  .notifications-menu {
    margin-top: 55px !important;
  }

  .logo {
    max-height: 20px !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .menu-container:hover,
  .bell-container:hover,
  .favorites-container:hover,
  .user-container:hover {
    background: none !important;
  }

  .side-menu ul li a:hover {
    transform: none !important;
  }

  .profile-menu ul li a:hover {
    transform: none !important;
  }

  .chat-bot-button:hover {
    transform: none !important;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Removed problematic image-rendering rules */
}

/* ===== PROFILE MENU MOBILE OPTIMIZATIONS ===== */

/* Profile menu for very small screens */
@media (max-width: 480px) {
  .profile-menu {
    width: 260px !important;
    max-width: 95vw !important;
  }

  .profile-menu .user-info {
    padding: 15px 15px 10px 15px !important;
    font-size: 0.9rem !important;
  }

  .profile-menu ul li a {
    padding: 12px 15px !important;
    font-size: 15px !important;
    min-height: 45px !important;
  }

  .profile-menu ul li a i {
    font-size: 16px !important;
    margin-right: 10px !important;
    width: 18px !important;
  }
}

/* Profile menu landscape optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .profile-menu {
    top: 55px !important; /* Navbar più piccola in landscape */
    max-height: calc(100vh - 55px) !important;
  }
}

/* Profile menu mobile optimization */
@media (max-width: 768px) {
  .profile-menu {
    position: fixed !important;
    top: 0px !important; /* Sotto la navbar mobile */
    right: 0 !important;
    left: auto !important;
    width: 280px !important;
    max-width: 90vw !important;
    height: auto !important;
    max-height: calc(100vh - 65px) !important;
    border-radius: 0 0 0 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    z-index: 5000 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .profile-menu .user-info {
    padding: 20px 20px 15px 20px !important;
    font-size: 1rem !important;
  }

  .profile-menu ul li a {
    padding: 5px 20px !important;
    font-size: 16px !important;
    min-height: 50px !important;
    display: flex;
    align-items: center !important;
    gap: 8px !important;
  }

  .profile-menu ul li a i {
    font-size: 18px !important;
    margin-right: 12px !important;
    width: 20px !important;
    text-align: center !important;
  }

  /* Badge per richieste amicizia nel profile menu mobile */
  .profile-menu ul li a .friends-requests-badge {
    margin-left: 8px !important;
    padding: 0px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    height: 20px !important;
    width: 20px !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
  }
}

/* Footer Mobile Optimizations */
@media (max-width: 768px) {
  /* Footer moderno ottimizzato per mobile */
  .modern-footer {
    padding: 50px 0 0 0 !important; /* Aggiungo padding-top di 50px */
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important; /* Background bianco */
    /* border: 3px solid blue !important; */ /* Bordo blu per modern-footer */
  }

  .modern-footer .footer-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important; /* Rimuovo padding laterale per occupare tutto lo spazio */
    box-sizing: border-box !important;
    width: 100% !important;
    /* border: 3px solid red !important; */ /* Bordo rosso per footer-container */
  }

  /* Sezione principale del footer - layout mobile */
  .footer-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 0px !important;
    padding: 20px 15px 15px 15px !important; /* Aggiungo padding laterale qui */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }

  /* Brand section mobile */
  .footer-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin-bottom: 0px !important;
    max-width: 70% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .footer-logo {
    width: auto !important;
    height: 30px !important;
    object-fit: contain !important;
    margin-bottom: 10px !important;
  }

  .footer-brand h3 {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    line-height: 1.2 !important;
  }

  .footer-brand p {
    font-size: 1.2rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    max-width: 90% !important;
    width: 90% !important;
    padding: 0 15px !important;
    text-align: center !important;
    color: #666666 !important;
  }

  /* Footer sections mobile */
  .footer-section {
    margin-top: 0px !important;
    text-align: center !important;
    margin-bottom: 5px !important;
  }

  .footer-section h4 {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
    color: #333333 !important;
  }

  .footer-section h4::after {
    width: 25px !important;
    height: 2px !important;
    bottom: -6px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Links mobile */
  .footer-section ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    align-items: center !important;
  }

  .footer-section ul li {
    margin-bottom: 0 !important;
  }

  .footer-section ul li a {
    font-size: 1rem !important;
    color: #666666 !important;
    padding: 0px 15px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    width: auto !important;
    min-width: 120px !important;
    text-align: center !important;
    text-decoration: none !important;
    margin: 0 auto !important;
  }

  .footer-section ul li a:hover {
    background-color: transparent !important;
    color: #e60000 !important;
    transform: translateY(-1px) !important;
  }

  .footer-section ul li a::before {
    display: none !important;
  }

  /* Forza margin-bottom a 0 per tutti i li del footer mobile */
  .footer-section ul li {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
  }

  /* FORZA distanza zero tra le sezioni del footer */
  .footer-main {
    gap: 0px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .footer-section {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0px !important;
  }

  .footer-section:not(:last-child) {
    margin-bottom: 0px !important;
  }

  /* Social links mobile */
  .social-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    margin-top: 20px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .social-link {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    color: #666666 !important;
  }

  .social-link:hover {
    background: linear-gradient(135deg, #e60000, #ff4444) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3) !important;
  }

  .social-link i {
    font-size: 1rem !important;
  }

  /* Footer bottom mobile */
  .footer-bottom {
    padding: 15px 15px !important; /* Aggiungo padding laterale */
  }

  .footer-bottom-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: center !important;
  }

  .footer-copyright p {
    font-size: 0.8rem !important;
    color: #999999 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
  }

  .footer-legal {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .footer-legal a {
    font-size: 0.8rem !important;
    color: #666666 !important;
    padding: 6px 12px !important;
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    text-decoration: none !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .footer-legal a:hover {
    background-color: rgba(230, 0, 0, 0.1) !important;
    color: #e60000 !important;
  }

  .separator {
    display: none !important;
  }

  /* Footer originale mobile */
  footer {
    padding: 15px 15px !important; /* Aggiungo padding laterale */
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
  }

  /* Contenitore footer esterno (quello vuoto nell'HTML) */
  .footer-container {
    /* border: 3px solid green !important; */ /* Bordo verde per il contenitore esterno */
    background-color: transparent !important; /* Rimuovo sfondo bianco */
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important; /* Non permette al footer di ridursi */
    align-self: stretch !important; /* Occupa tutta la larghezza disponibile */
    position: relative !important; /* Assicura posizionamento corretto */
    z-index: 1 !important; /* Assicura visibilità */
    min-height: 0 !important; /* Permette riduzione se necessario */
    margin-top: 0 !important; /* Rimuove qualsiasi margine superiore */
    margin-bottom: 0 !important; /* Rimuove qualsiasi margine inferiore */
    display: block !important; /* Forza display block invece di flex */
    flex-direction: unset !important; /* Rimuove flex-direction */
  }

  footer a {
    font-size: 0.9rem !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
  }

  footer a:hover {
    background-color: rgba(0, 145, 255, 0.1) !important;
    color: rgb(0, 145, 255) !important;
  }

  /* Ottimizzazioni per schermi molto piccoli */
  @media (max-width: 360px) {
    .modern-footer .footer-container {
      padding: 0 !important; /* Mantengo senza padding */
    }

    .footer-main {
      gap: 15px !important;
      padding: 15px 10px 10px 10px !important; /* Aggiungo padding laterale ridotto */
    }

    .footer-brand h3 {
      font-size: 1.2rem !important;
    }

    .footer-brand p {
      font-size: 0.85rem !important;
      max-width: 95% !important;
      width: 95% !important;
      padding: 0 10px !important;
    }

    .footer-section h4 {
      font-size: 0.95rem !important;
      margin-bottom: 10px !important;
    }

    .footer-section ul li a {
      font-size: 0.8rem !important;
      padding: 4px 8px !important;
    }

    .social-link {
      width: 35px !important;
      height: 35px !important;
    }

    .social-link i {
      font-size: 0.9rem !important;
    }

    .footer-copyright p {
      font-size: 0.75rem !important;
    }

    .footer-legal a {
      font-size: 0.75rem !important;
      padding: 4px 8px !important;
    }

    footer {
      padding: 12px 10px !important; /* Aggiungo padding laterale */
      font-size: 0.85rem !important;
    }

    footer a {
      font-size: 0.85rem !important;
      padding: 4px 6px !important;
    }
  }

  /* Ottimizzazioni per orientamento landscape su mobile */
  @media (max-width: 768px) and (orientation: landscape) {
    .footer-main {
      flex-direction: row !important;
      flex-wrap: wrap !important;
      justify-content: space-around !important;
      gap: 15px !important;
      padding: 15px 0 10px 0 !important;
    }

    .footer-brand {
      flex: 1 !important;
      min-width: 200px !important;
      margin-bottom: 0 !important;
    }

    .footer-section {
      min-width: 150px !important;
      margin-bottom: 0 !important;
    }

    .footer-bottom-content {
      flex-direction: row !important;
      justify-content: space-between !important;
      gap: 10px !important;
    }

    .footer-legal {
      flex-direction: row !important;
      gap: 10px !important;
    }
  }
} /* Chiusura media query principale per footer mobile */

/* === STILI NAVBAR PER ACCOUNT (UTENTI E IMPRESE) - UNIFICATI === */
@media (min-width: 769px) {
  /* Container principale per bottoni account utenti */
  .account-nav-buttons {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin-right: 50px;
    z-index: 10;
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex-shrink: 0 !important;
  }

  /* Container per bottoni account imprese - centrato assolutamente in orizzontale */
  #business-nav-buttons {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    z-index: 10;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    flex-shrink: 0 !important;
  }

  /* Eccezione: account-nav-buttons in account.html (solo per business, legacy) */
  .account-nav-buttons:not(#business-nav-buttons) {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  /* Assicurati che il badge delle notifiche NON appaia nei bottoni account-nav */
  /* IMPORTANTE: Escludi esplicitamente .bell-container */
  .account-nav-buttons:not(.bell-container) .notification-badge,
  .account-nav-buttons:not(.bell-container)
    .account-nav-desktop-nav
    .notification-badge,
  .account-nav-buttons:not(.bell-container) .tab-button .notification-badge,
  #business-nav-buttons .notification-badge,
  #business-nav-buttons .account-nav-desktop-nav .notification-badge,
  #business-nav-buttons .tab-button .notification-badge {
    display: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
  }

  /* Proteggi esplicitamente il badge nel bell-container - DEVE venire dopo le regole di nascondimento */
  .bell-container .notification-badge,
  .bell-container button .notification-badge,
  #bellIcon .notification-badge,
  .notification-bell .notification-badge {
    position: absolute !important;
    bottom: 50% !important;
    left: 50% !important;
    transform: translate(-50%, 50%) !important;
    margin-left: 8px !important;
    margin-bottom: 12px !important;
    background: #e60000 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    z-index: 10 !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    animation: badgePop 0.3s ease-out !important;
    text-align: center !important;
    line-height: 20px !important;
    top: auto !important;
    right: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Container per bottoni sezioni */
  .account-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .account-nav-desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Container per action buttons (richieste, chat, home, favorites) */
  .account-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Bottoni sezioni (tab-button per utenti, nav-btn per imprese) */
  .account-nav-desktop-nav .tab-button,
  .account-nav-desktop-nav .nav-btn {
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
  }

  .navbar:hover .account-nav-desktop-nav .tab-button,
  .navbar-hover-attivo .account-nav-desktop-nav .tab-button,
  .navbar:hover .account-nav-desktop-nav .nav-btn,
  .navbar-hover-attivo .account-nav-desktop-nav .nav-btn {
    color: #000000;
  }

  .account-nav-desktop-nav .tab-button:hover,
  .account-nav-desktop-nav .nav-btn:hover {
    box-shadow: none;
  }

  .navbar:hover .account-nav-desktop-nav .tab-button:hover,
  .navbar-hover-attivo .account-nav-desktop-nav .tab-button:hover,
  .navbar:hover .account-nav-desktop-nav .nav-btn:hover,
  .navbar-hover-attivo .account-nav-desktop-nav .nav-btn:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .account-nav-desktop-nav .tab-button.active,
  .account-nav-desktop-nav .nav-btn.active {
    color: #e60000 !important;
    font-weight: 600 !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
  }

  .account-nav-desktop-nav .tab-button.active:hover,
  .account-nav-desktop-nav .nav-btn.active:hover {
    box-shadow: none !important;
    background: rgba(0, 0, 0, 0.05) !important;
    color: #e60000 !important;
  }

  .navbar:hover .account-nav-desktop-nav .tab-button.active,
  .navbar-hover-attivo .account-nav-desktop-nav .tab-button.active,
  .navbar:hover .account-nav-desktop-nav .nav-btn.active,
  .navbar-hover-attivo .account-nav-desktop-nav .nav-btn.active {
    color: #e60000 !important;
    background-color: #ffffff !important;
  }

  .navbar:hover .account-nav-desktop-nav .tab-button.active:hover,
  .navbar-hover-attivo .account-nav-desktop-nav .tab-button.active:hover,
  .navbar:hover .account-nav-desktop-nav .nav-btn.active:hover,
  .navbar-hover-attivo .account-nav-desktop-nav .nav-btn.active:hover {
    color: #e60000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
  }

  /* Container per bottoni actions */
  .account-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
  }

  .navbar:hover .account-nav-actions,
  .navbar-hover-attivo .account-nav-actions {
    border-left-color: rgba(0, 0, 0, 0.1);
  }

  /* Bottoni actions (Richieste, Chat, Home) */
  .account-nav-actions .header-action-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    box-shadow: none !important;
    transform-origin: center center !important;
  }

  .navbar:hover .account-nav-actions .header-action-btn,
  .navbar-hover-attivo .account-nav-actions .header-action-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #000000 !important;
  }

  .navbar:hover .account-nav-actions .header-action-btn i,
  .navbar-hover-attivo .account-nav-actions .header-action-btn i {
    color: #1a8dff !important;
  }

  .account-nav-actions .header-action-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1) !important;
    box-shadow: none !important;
    transform-origin: center center !important;
  }

  .account-nav-actions .header-action-btn:hover i {
    transform: none !important;
    transition: none !important;
    position: static !important;
    vertical-align: middle !important;
  }

  .navbar:hover .account-nav-actions .header-action-btn:hover,
  .navbar-hover-attivo .account-nav-actions .header-action-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    transform-origin: center center !important;
  }

  .navbar:hover .account-nav-actions .header-action-btn:hover i,
  .navbar-hover-attivo .account-nav-actions .header-action-btn:hover i {
    color: #1a8dff !important;
  }

  .account-nav-actions .header-action-btn i {
    font-size: 16px !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    transition: none !important;
    transform: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Bottone favorites bianco di default, rosso solo in hover navbar */
  .account-nav-actions .favorites-action-btn i {
    color: #ffffff !important;
  }

  .navbar:hover .account-nav-actions .favorites-action-btn i,
  .navbar-hover-attivo .account-nav-actions .favorites-action-btn i {
    color: #e60000 !important;
  }

  .account-nav-actions .favorites-action-btn:hover i {
    color: #ffffff !important;
  }

  .navbar:hover .account-nav-actions .favorites-action-btn:hover i,
  .navbar-hover-attivo .account-nav-actions .favorites-action-btn:hover i {
    color: #e60000 !important;
  }

  .account-nav-actions .favorites-action-btn:active i {
    color: #b00000 !important;
  }

  /* Badge per bottoni actions */
  .account-nav-actions .header-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e60000;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
  }

  /* Badge mobile chat - identico agli altri badge */
  #mobile-chat-btn .mobile-chat-badge {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    background: #e60000 !important;
    background-color: #e60000 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    z-index: 10 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    text-align: center !important;
    border: none !important;
    box-sizing: border-box !important;
  }

  /* Nascondi completamente il badge quando è vuoto o nascosto */
  #mobile-chat-btn .mobile-chat-badge:empty,
  #mobile-chat-btn .mobile-chat-badge[style*="display: none"],
  #mobile-chat-btn .mobile-chat-badge[style*="display:none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* Assicurati che i bottoni notifiche e user mantengano i loro stili */
@media (min-width: 769px) {
  .nav-right .bell-container {
    /* IMPORTANTE: bell-container DEVE avere position: relative per il badge delle notifiche */
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    flex-shrink: 0 !important;
  }

  .nav-right .user-container,
  .nav-right .favorites-container {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex-shrink: 0 !important;
  }
}

/* Nascondi bottoni nella navbar su mobile */
@media (max-width: 768px) {
  .account-nav-buttons,
  #business-nav-buttons {
    display: none !important;
  }
}

/* Nascondi il bottone "Offro un servizio" su desktop */
@media (min-width: 769px) {
  .mobile-service-btn {
    display: none !important;
  }
}
