/* ============================ */
/*        MENU MOBILE HORIZON   */
/* ============================ */

/* ---------- HEADER ---------- */
.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  position: relative;
  z-index: 11000;
}

.mobile-header-left,
.mobile-header-right {
  display: flex;
  align-items: center;
  flex: 1;
}

.mobile-header-left { justify-content: flex-start; }
.mobile-header-right { justify-content: flex-end; }

/* ---------- ICON BUTTONS ---------- */
.hamburger-wrapper,
.mobile-location,
.mobile-nav-close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hamburger-wrapper:hover,
.mobile-location:hover,
.mobile-nav-close:hover {
  background-color: rgba(19, 125, 139, 0.05);
  color: var(--color-hover);
  transform: translateY(-1px);
}

/* ---------- ICONA HAMBURGER ---------- */
.hamburger-wrapper {
  flex-direction: column;
}
.hamburger-wrapper .bar {
  width: 22px;
  height: 2px;
  background-color: var(--color-primary);
  margin: 3px 0;
  border-radius: 2px;
}

/* ---------- ICONA POSIZIONE ---------- */
.mobile-location {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}
.mobile-location:hover {
  background-color: rgba(19, 125, 139, 0.05);
  color: var(--color-hover);
  transform: translateY(-1px);
}
.mobile-location svg {
  width: 24px;
  height: 24px;
  color: currentColor;
}

/* ---------- MENU OVERLAY ---------- */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #1f2c32 0%, #2b6777 70%, #16242b 100%);
  z-index: 11003;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto; /* Scroll interno attivo */
  -webkit-overflow-scrolling: touch;
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  padding-bottom: 3rem;
  backdrop-filter: blur(3px);
}

.mobile-nav-overlay.active {
  transform: translateX(0);
  opacity: 1;
}

/* Blocca lo scroll del sito sotto */
body.menu-open {
  overflow: hidden;
  height: 100vh;
}

/* ---------- SWITCH LINGUE ---------- */
.mobile-nav-topbar {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1.2rem;
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: var(--fw-bold);
  font-family: var(--font-base);
  background: var(--color-primary);
  color: var(--color-white);
  z-index: 11005;
}

.mobile-nav-topbar a {
  color: var(--color-white) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}
.mobile-nav-topbar a:hover { color: var(--color-accent) !important; }

/* ---------- ICONA CHIUDI (X) ---------- */
.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.mobile-nav-close::before,
.mobile-nav-close::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
}
.mobile-nav-close::before { transform: rotate(45deg); }
.mobile-nav-close::after  { transform: rotate(-45deg); }

/* ---------- LOGO ---------- */
.mobile-overlay-logo {
  margin-bottom: 2.5rem;
  text-align: center;
  margin-top: -1rem;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeSlideIn 0.6s ease forwards 0.2s;
}
.mobile-overlay-logo img {
  width: 9rem;
	padding-top:20px;
  height: auto;
  display: inline-block;
}

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

/* ---------- CONTENUTO MENU ---------- */
.mobile-nav-overlay-content {
  width: 100%;
  padding: 2rem 1rem 3rem;
  text-align: center;
  animation: fadeMenu 0.6s ease forwards 0.3s;
  opacity: 0;
}
@keyframes fadeMenu {
  to { opacity: 1; }
}

/* ---------- MENU PRINCIPALE ---------- */
.mobile-nav-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-menu ul > li {
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUpLink 0.5s ease forwards;
}
.mobile-nav-menu ul > li:nth-child(1) { animation-delay: 0.4s; }
.mobile-nav-menu ul > li:nth-child(2) { animation-delay: 0.5s; }
.mobile-nav-menu ul > li:nth-child(3) { animation-delay: 0.6s; }
.mobile-nav-menu ul > li:nth-child(4) { animation-delay: 0.7s; }
.mobile-nav-menu ul > li:nth-child(5) { animation-delay: 0.8s; }
.mobile-nav-menu ul > li:nth-child(6) { animation-delay: 0.9s; }
.mobile-nav-menu ul > li:nth-child(7) { animation-delay: 1.0s; }

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

.mobile-nav-menu ul > li > a {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: var(--fw-black);
  color: var(--color-white);
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease, transform 0.3s ease;
}
.mobile-nav-menu ul > li > a:hover {
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- SOTTO MENU ---------- */
.mobile-nav-menu li.menu-item-has-children > a::after {
  content: " ›";
  color: var(--color-accent);
  font-size: 1rem;
  margin-left: 0.4rem;
}
.mobile-nav-menu ul.sub-menu {
  margin-top: 0.5rem;
  display: none;
}
.mobile-nav-menu li.open > ul.sub-menu {
  display: block;
}
.mobile-nav-menu ul.sub-menu li a {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  font-weight: var(--fw-medium);
  color: var(--color-white);
  text-decoration: none;
  display: block;
  margin: 0.3rem 0;
  transition: transform 0.3s ease, color 0.3s ease;
}
.mobile-nav-menu ul.sub-menu li a:hover {
  color: var(--color-accent);
  transform: translateX(5px);
}

/* ---------- CTA BUTTONS ---------- */
.mobile-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
.mobile-nav-buttons .btn-light-compact {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

/* ---------- SOCIAL ICONS ---------- */
.mobile-social-icons {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}
.mobile-social-icons .social-icons {
  justify-content: center;
  gap: 16px;
}
.mobile-social-icons .social-icons a {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, transform 0.3s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}
.mobile-social-icons .social-icons svg {
  width: 24px;
  height: 24px;
  color: var(--color-white);
}
.mobile-social-icons .social-icons a:hover {
  background: var(--color-hover);
  transform: translateY(-1px);
}

/* ---------- NASCONDI SU DESKTOP ---------- */
@media screen and (min-width: 981px) {
  .mobile-header,
  .mobile-nav-overlay {
    display: none !important;
  }
}

/* ---------- RESPONSIVE PICCOLI DEVICE ---------- */
@media (max-height: 750px), (max-width: 480px) {
  .mobile-nav-menu ul > li > a {
    font-size: clamp(1rem, 4vw, 1.2rem);
    margin-bottom: 0.8rem;
  }
  .mobile-overlay-logo img {
    width: 8rem;
  }
  .mobile-nav-buttons {
    margin-top: 1rem;
  }
  .mobile-social-icons .social-icons a {
    width: 40px;
    height: 40px;
  }
  .mobile-social-icons .social-icons svg {
    width: 20px;
    height: 20px;
  }
}