:root { --mm-accent: #10CCAE; }

.logo-bg { background-color: #0B0B0B; }

.wood-coatings-page { --mm-accent: #009DDF; }
.wood-coatings-page .logo-bg { background-color: #009DDF; }

.industrial-coatings-page { --mm-accent: #DA291C; }
.industrial-coatings-page .logo-bg { background-color: #DA291C; }

.plastic-coatings-page { --mm-accent: #DA291C; }
.plastic-coatings-page .logo-bg { background-color: #DA291C; }

/* =========================
   VISIBILITY / STATES
   ========================= */
.mm-mobile,
.mm-overlay { display: none; }

.mm-mobile.is-open { display: flex !important; }
.mm-overlay.is-open { display: block !important; }

@media (min-width:1025px) {
  .mm-mobile,
  .mm-overlay { display: none !important; }
}

/* =========================
   WPML / LANG VISIBILITY
   ========================= */
.footer-col a { color: #fff !important; }

.wpml-ls-item a.elementor-item,
.wpml-ls-item a.elementor-item:hover { padding: 0 !important; }

.wpml-ls-first-item { margin-left: 0 !important; }

[data-lang] { display: none; }

html[lang="it-IT"] [data-lang="it"],
html[lang="en-US"] [data-lang="en"],
html[lang="fr-FR"] [data-lang="fr"],
html[lang="de-DE"] [data-lang="de"],
html[lang="es-ES"] [data-lang="es"] { display: inline; }

/* =========================
   HEADER MENU (Elementor) CLEANUP
   ========================= */
.menu26 .elementor-nav-menu .elementor-item { margin-top: 4px; }

.elementor-nav-menu--main li[class*="mm-"] > .elementor-nav-menu--dropdown,
.elementor-nav-menu--main li[class*="mm-"] > .sub-arrow,
.e-n-menu li[class*="mm-"] .e-n-menu__dropdown,
.e-n-menu li[class*="mm-"] .e-n-menu__toggle {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (hover:none), (pointer:coarse) {
  .elementor-nav-menu--main li.mm-profile > a,
  .elementor-nav-menu--main li.mm-gamme > a,
  .elementor-nav-menu--main li.mm-contatti > a,
  .e-n-menu li.mm-profile > a,
  .e-n-menu li.mm-gamme > a,
  .e-n-menu li.mm-contatti > a {
    pointer-events: auto !important;
  }
}

/* =========================
   MEGAMENU (DESKTOP / GENERALE)
   ========================= */
.mrc-megamenu a {
  text-decoration: none !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.mrc-megamenu .mm-submenu a {
  display: block !important;
  margin: 0 !important;
  padding: 5px 0 !important;
  line-height: 1em !important;
  font-family: "Bodoni Moda", Sans-serif !important;
}

.mrc-megamenu .mm-l3 > a {
  font-size: 1.1rem;
  letter-spacing: -0.03em !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  opacity: .95;
  padding-left: 10px !important;
  margin-top: 0 !important;
}

.mrc-megamenu .mm-l4 > a {
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  color: #b0b0b5 !important;
  opacity: .95 !important;
  padding-left: 25px !important;
  font-family: "Fira Sans Condensed", Sans-serif !important;
}

.mrc-megamenu .mm-submenu a:hover { color: var(--mm-accent) !important; }

.mrc-megamenu .mm-col-title {
  font-size: 1.8rem;
  letter-spacing: -0.03em !important;
  line-height: 1em !important;
  text-transform: none;
  color: #fff !important;
  margin: 0 0 8px !important;
  font-family: "Bodoni Moda", Sans-serif !important;
  padding-top: 20px;
}
.mrc-megamenu .mm-col-title a { color: inherit !important; }

.mrc-megamenu .mm-submenu.mm-cols {
  display: flex !important;
  gap: 28px !important;
}

.mrc-megamenu .mm-submenu.mm-cols > .mm-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  min-width: 0;
  flex: 1 1 0;
}

.mrc-megamenu .mm-submenu.mm-cols > .mm-col + .mm-col {
  border-left: 1px solid rgba(255,255,255,.08) !important;
  padding-left: 24px !important;
}

.mrc-megamenu .mm-block + .mm-block {
  border-top: 1px solid rgba(255,255,255,.08) !important;
  margin-top: 8px !important;
  padding-top: 6px !important;
}

.mm-block { text-align: left; }

/* =========================
   FOOTER MENU
   ========================= */
.footer-mega { display: grid; gap: 30px; }
.footer-mega.footer-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.footer-col { min-width: 0; }

.footer-col .footer-col-title {
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  margin-bottom: 8px;
  border-bottom: 1px solid #fff;
}

.footer-col-title.footer-col-title--item { margin-top: 16px; }

.footer-title a {
  font-size: .8rem;
  display: block;
  color: #fff;
  font-weight: 400;
  text-decoration: none;
  line-height: 1.2;
  padding: 4px 0;
}

.footer-title a:hover { color: var(--mm-accent); }

.footer-col-title a { color: inherit; text-decoration: none; }
.footer-col-title a:hover { color: var(--mm-accent); }

@media (max-width:767px) {
  .footer-mega { grid-template-columns: 1fr !important; }
}

/* =========================
   MOBILE OVERLAY + PANEL
   ========================= */
@media (max-width:1024px) {
  .mm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
    z-index: 10040;
    height: 100dvh;
    width: 100vw;
  }

  .mm-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .mm-mobile {
    position: fixed;
    inset: 0;
    background: #0b0b0b;
    color: #fff;
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 10060;

    display: flex;
    flex-direction: column;
    overflow: hidden;

    font-family: "Bodoni Moda", Sans-serif !important;

    height: 100dvh;
    width: 100vw;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);

    overscroll-behavior: contain;
  }

  .mm-mobile * { font-family: inherit !important; }

  .mm-mobile.is-open { transform: translateX(0); }

  .mm-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 2;
    background: #0b0b0b;
    padding-top: max(env(safe-area-inset-top), 0px);
  }

  .mm-topbar .mm-back,
  .mm-topbar .mm-close {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
  }

  .mm-topbar .mm-back svg,
  .mm-topbar .mm-close svg {
    min-width: 32px !important;
    height: 32px !important;
    display: block !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    opacity: 1 !important;
  }

  .mm-back::before { content: none !important; }

  .mm-screen {
    position: absolute;
    inset: 0;
    top: 64px;
    bottom: 0;

    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    padding: 16px 30px;
    transform: translateX(100%);
    transition: transform .25s ease;
  }

  .mm-screen.is-active { transform: translateX(0); }

  /* Overflow / min-width safety */
  .mrc-megamenu,
  .mrc-megamenu * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* L1 */
  .mm-l1 .mm-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 8px 0 0;
  }

  .mm-l1 .mm-item,
  .mm-l1 a.mm-item {
    text-transform: none !important;
    display: block !important;
    width: 100% !important;
    background: transparent !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 14px 0 !important;
    color: #fff !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    letter-spacing: .08em !important;
    text-align: left !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
  }

  button.mm-item.mm-entry,
  a.mm-item.mm-item-direct.mm-entry {
    font-size: 2.5rem !important;
    letter-spacing: -0.03em !important;
  }

  /* Language switcher */
  .mm-lang { margin: 0; display: flex; justify-content: left; }
  .mm-lang ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
  .mm-lang a { color: #a1a1a6; text-decoration: none; font-weight: 500; font-size: .95rem; }
  .mm-lang a:hover { color: var(--mm-accent); }
  .mm-lang .wpml-ls-current-language { display: none !important; }
  .mm-lang img.wpml-ls-flag { width: 36px; height: auto; display: inline-block; }

  .mm-mobile .mm-lang { margin-top: 30px; }
  .mm-mobile a.wpml-ls-link { padding: 0 25px 0 0 !important; }

  /* L2 */
  .mm-l2 .mm-l2-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 0;
  }

  button.mm-subitem {
    background: transparent !important;
    border: 0 !important;
    color: #fff;
    padding: 0;
    text-align: left;
    font-size: 2.5rem;
    letter-spacing: -0.03em !important;
    font-weight: 700;
  }

  .mm-subitem:hover { color: var(--mm-accent); }

  /* L3 (generato dal JS): .mm-screen.mm-l3 > .mrc-megamenu > .mm-col */
  .mm-screen.mm-l3 .mrc-megamenu {
    display: flex !important;
    gap: 16px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 12px !important;
  }

  .mm-screen.mm-l3 .mrc-megamenu > .mm-col {
    flex: 0 0 92% !important;
    scroll-snap-align: start !important;
    border-left: 0 !important;
    padding-left: 0 !important;
    min-width: 0 !important;
  }

  .mm-screen.mm-l3 .mrc-megamenu .mm-col-title {
    margin: 0 0 15px !important;
    font-size: 2.5rem !important;
    letter-spacing: -0.03em !important;
    font-weight: 700 !important;
  }

  .mm-screen.mm-l3 .mm-l3 > a {
    font-size: 1.4rem !important;
    font-weight: 400 !important;
    line-height: 2em;
    font-family: "Fira Sans Condensed", Sans-serif !important;
  }

  .mm-screen.mm-l3 .mm-l4 > a {
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    line-height: 1.6em;
    opacity: .98 !important;
    font-family: "Fira Sans Condensed", Sans-serif !important;
  }

  /* Blocca eventuali popup mentre nav mobile è aperta */
  [id^="elementor-popup-modal-"] { display: none !important; }
}

/* =========================
   BODY LOCK (NO touch-action none)
   ========================= */
html.mm-open,
body.mm-open { overflow: hidden; }

/* =========================
   NASCONDI MENU NATIVO QUANDO MM È OPEN (mobile)
   ========================= */
@media (max-width:1024px) {
  .mm-scope-main--open .elementor-menu-toggle,
  .mm-scope-main--open .e-n-menu__toggle { display: none !important; }

  .mm-scope-main--open .elementor-nav-menu--dropdown,
  .mm-scope-main--open .e-n-menu__dropdown {
    display: none !important;
    visibility: hidden !important;
  }

  .elementor-nav-menu--dropdown,
  .e-n-menu__dropdown {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* =========================
   TABLET (768–1024)
   Centra contenuti menu (L1 + L2 + L3)
   ========================= */
@media (min-width:768px) and (max-width:1024px){

  /* ===== L1 ===== */
  .mm-screen.mm-l1.is-active{
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  .mm-screen.mm-l1 .mm-list{ align-items: center !important; }

  .mm-screen.mm-l1 .mm-item,
  .mm-screen.mm-l1 a.mm-item{ text-align: center !important; }

  .mm-screen.mm-l1 .mm-lang{ justify-content: center !important; }

  /* ===== L2 ===== */
  .mm-screen.mm-l2.is-active{
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  .mm-l2 .mm-l2-list{ align-items: center !important; }

  .mm-l2 button.mm-subitem{ text-align: center !important; }

  /* WPML: su tablet azzera/normalizza padding */
  .mm-mobile a.wpml-ls-link{ padding: 0 12px !important; }

  /* respiro laterale */
  .mm-screen{
    padding-left: 30px !important;
    padding-right: 30px !important;
  }

  /* ===== L3 (solo tablet) ===== */
  .mm-screen.mm-l3.is-active{
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* contenitore L3 (nel tuo JS è .mrc-megamenu > .mm-col) */
  .mm-screen.mm-l3 .mrc-megamenu{
    justify-content: center !important;
  }

  .mm-screen.mm-l3 .mm-col{ align-items: center !important; }

  .mm-screen.mm-l3 .mm-block{ text-align: center !important; }

  .mm-screen.mm-l3 .mm-col-title{ text-align: center !important; }

  .mm-screen.mm-l3 .mm-l3 > a,
  .mm-screen.mm-l3 .mm-l4 > a{
    text-align: center !important;
    padding-left: 0 !important;
  }
}

/* =========================
   FIX MOBILE (≤1024)
   Forza stile subitem L2 su mobile
   ========================= */
@media (max-width:1024px){
  .mm-mobile .mm-screen.mm-l2 button.mm-subitem{
    text-transform: none !important;
    font-size: 2.5rem !important;
    letter-spacing: -0.03em !important;
    padding: 0 !important;
    text-align: left !important;
  }
}

/* =========================
   PHONE ONLY (≤767)
   Se vuoi essere SICURA che L3 non venga centrato su phone,
   puoi forzare qui l’allineamento a sinistra
   ========================= */
@media (max-width:767px){
  .mm-screen.mm-l3.is-active{
    display: block !important;
    text-align: left !important;
  }
  .mm-screen.mm-l3 .mm-block{ text-align: left !important; }
  .mm-screen.mm-l3 .mm-l3 > a,
  .mm-screen.mm-l3 .mm-l4 > a{
    text-align: left !important;
    padding-left: 10px !important; /* o 0, come preferisci */
  }
}