
/* =========================
   NAV (desktop) — nero + fino (coerente con layout)
   - menu centrale + contattaci a destra
   - niente "sbiancamenti" su hover
   ========================= */

/* forzo il peso e il colore anche se il template li imposta su UL/LI */
.manga-desktop-nav,
.manga-desktop-nav *,
.manga-topbar__actions .nav-contact{
  color: #111 !important;
  font-weight: 300 !important;
}

/* Contattaci: puntini (editoriale) + hover che schiarisce solo i puntini */
.manga-topbar__actions .nav-contact{
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(17,17,17,0.35);
}
.manga-topbar__actions .nav-contact:hover,
.manga-topbar__actions .nav-contact:focus{
  color: #111 !important;
  text-decoration-color: rgba(17,17,17,0.18);
}

/* Small social icon next to Contattaci */
.manga-topbar__actions .nav-social{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 10px;
  border-radius: 999px;
  text-decoration: none;
}
.manga-topbar__actions .nav-social img{
  width: 20px;
  height: 20px;
  display: block;
  filter: none;
}
.manga-topbar__actions .nav-social{
  color: var(--c-text, #4a4a4a);
}
.manga-topbar__actions .nav-social:hover{
  background: var(--fum-bg, #F4F7FB);
  color: var(--fum-primary, #4F79A8);
}
.manga-topbar__actions .nav-social img{
  /* make svg follow currentColor */
  fill: currentColor;
}

/* =========================
   CONTACT OVERLAY (desktop + mobile)
   ========================= */

/* FIX: link hover should not turn white on light bg */
.site-nav a:hover,
.site-nav a:focus{
  color: inherit;
}
.contact-overlay{
  position:absolute;
  left:0;
  right:0;
  top:0;
  z-index:1000;
}

.contact-overlay.is-open{
  display:block !important;
}

.contact-backdrop{
  position: absolute;
  inset: 0;
  /* keep dimming visible even if other CSS overrides */
  background: rgba(0,0,0,.45) !important;
}

/* Desktop overlay centrato su colonna layout */
.contact-card{
  position:absolute;
  top:70px;
  left:50%;
  transform:translateX(-50%);
  width:420px;
  max-width:90%;
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
  z-index:1001;
}

/* Mobile: center the card (more readable + avoids the “white full-screen” feel) */
@media (max-width: 760px){
  .contact-overlay.is-open{
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .contact-card{
  position:absolute;
  top:70px;
  left:50%;
  transform:translateX(-50%);
  width:420px;
  max-width:90%;
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
  z-index:1001;
}
}

.contact-close{
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 36px;
  cursor: pointer;
  color: var(--c-text, #4a4a4a);
}

.contact-row{
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 12px;
}
.contact-row:hover{
  background: var(--fum-bg, #F4F7FB);
}
.contact-svg{
  width: 20px;
  height: 20px;
  opacity: 0.9;
  color: var(--fum-primary, #4F79A8);
}
.contact-link{
  color: var(--c-text, #4a4a4a);
  text-decoration: none;
  font-weight: 600;
}
.contact-row:hover .contact-link{
  color: var(--fum-primary, #4F79A8);
}

.contact-row-primary{
  border: 1px solid color-mix(in srgb, var(--fum-primary, #4F79A8), #000 10%);
}

/* Mobile: keep a centered "card" (coherent with desktop) */
@media (max-width: 736px){
  .contact-card{
    top: 96px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(420px, 92vw);
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--c-border, #E5E7EB);
    padding-top: 16px;
  }
  .contact-close{
    top: 8px;
    right: 10px;
  }
}

/* Topbar links should not inherit the template dotted underline */
.manga-topbar a{ border-bottom: none; }

/* Ensure hamburger reads on mobile */
.manga-burger{ color:#111 !important; opacity:1 !important; }
.manga-burger span{ background:#111 !important; opacity:1 !important; }

/* NAV hierarchy tuning */
.manga-topbar__actions .nav-contact{
  font-weight: 500; /* not bold */
}

.manga-topbar nav a{
  font-weight: 400; /* lower hierarchy */
  color: #777777;
}

.manga-topbar nav a:hover{
  color: var(--fum-primary, #4F79A8);
}

/* NAV color consistency: Contattaci same gray as others */
.manga-topbar__actions .nav-contact{
  color: #777777; /* same as menu */
}

/* Dropdown menu styling */
.manga-topbar nav ul li ul{
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}

.manga-topbar nav ul li ul li a{
  font-weight: 400;
  color: #777777;
  padding: 8px 16px;
  display: block;
}

.manga-topbar nav ul li ul li a:hover{
  background: #F4F7FB;
  color: var(--fum-primary, #4F79A8);
}


/* =========================
   DESKTOP NAV dropdowns (tendine)
   ========================= */
.manga-desktop-nav .nav-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 26px;
  align-items: center;
}
.manga-desktop-nav .nav-list > li{
  position: relative;
}
.manga-desktop-nav .nav-list > li > a{
  font-weight: 400;
  color: #777777;
  text-decoration: none;
}
.manga-desktop-nav .nav-list > li > a:hover{
  color: var(--fum-primary, #4F79A8);
}

.has-submenu .submenu{
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  z-index: 10000;
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu{
  display: block;
}

.submenu li{
  list-style: none;
}
.submenu li a{
  display: block;
  padding: 8px 16px;
  font-weight: 400;
  color: #777777;
  text-decoration: none;
  white-space: nowrap;
}
.submenu li a:hover{
  background: var(--fum-bg, #F4F7FB);
  color: var(--fum-primary, #4F79A8);
}

/* Right-aligned submenu for social */
.submenu-right{
  left: auto;
  right: 0;
}

/* Social wrapper */
.nav-social-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-social-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Prevent old 'nav ul li ul' styles from missing */

/* Long dropdown safety (e.g., Chi siamo bios) */
.has-submenu .submenu{
  max-height: 70vh;
  overflow: auto;
}


/* Nested submenu (second level) */
.submenu .has-submenu{ position: relative; }
.submenu .has-submenu > .submenu{
  top: 0;
  left: calc(100% + 8px);
}
/* small caret indicator */
.submenu .has-submenu > a::after{
  content: "›";
  float: right;
  opacity: .55;
}

/* CONTATTACI — stile finale desktop */
.manga-topbar .nav-contact{
  color:#111 !important;
  font-weight:300 !important;
  text-decoration:underline;
  text-decoration-style:dotted;
  text-underline-offset:6px;
  text-decoration-thickness:1px;
  text-decoration-color:rgba(17,17,17,0.35);
}

.manga-topbar .nav-contact:hover,
.manga-topbar .nav-contact:focus{
  color:#111 !important;
  text-decoration-color:rgba(17,17,17,0.18);
}


/* =====================================================
   OVERRIDE NAV — finale (nero + fino) + Contattaci puntini
   + Mobile menu con struttura desktop (liste)
   ===================================================== */

/* Desktop: testo nero e più fino */
@media (min-width: 981px){
  .manga-desktop-nav .nav-list > li > a,
  .manga-desktop-nav .submenu li a,
  .nav-contact{
    color:#111 !important;
    font-weight:300 !important;
  }
}

/* Contattaci: puntini grigi, hover schiarisce SOLO puntini */
.manga-topbar .nav-contact{
  color:#111 !important;
  font-weight:300 !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(17,17,17,0.35);
}
.manga-topbar .nav-contact:hover,
.manga-topbar .nav-contact:focus{
  color:#111 !important;
  text-decoration-color: rgba(17,17,17,0.18);
}

/* Mobile menu: usa la stessa struttura <ul class="nav-list"> del desktop */
@media (max-width: 980px){
  .manga-mobile-menu .inner{
    max-width: 520px;
    margin: 0 auto;
    padding: 26px 18px 32px;
  }

  .manga-mobile-menu ul{
    list-style:none;
    margin:0;
    padding:0;
  }

  .manga-mobile-menu .nav-list{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:14px;
  }

  .manga-mobile-menu .nav-list > li{
    width:100%;
    text-align:center;
  }

  .manga-mobile-menu .nav-list > li > a{
    display:inline-block;
    padding:8px 0;
    color:#111;
    font-weight:400;
    text-decoration:none;
    border-bottom:0;
  }

  /* Submenu come lista, sempre visibili */
  .manga-mobile-menu .submenu{
    display:block !important;
    position:static !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:6px 0 0 !important;
    margin:6px 0 0 14px !important;
    min-width:0 !important;
    border-radius:0 !important;
  }

  .manga-mobile-menu .submenu a{
    display:block;
    padding:6px 0;
    color:#111;
    font-weight:400;
    text-decoration:none;
  }

  /* terzo livello più indentato */
  .manga-mobile-menu .submenu .submenu{
    margin-left:14px !important;
  }
}
/* ===========================
   MOBILE MENU — GRAFICA/GERARCHIA
   =========================== */
@media (max-width: 980px){

  /* pannello */
  .manga-mobile-menu{
    background: rgba(255,255,255,0.98);
  }

  /* contenitore interno */
  .manga-mobile-menu .inner{
    max-width: 420px;
    margin: 0 auto;
    padding: 22px 18px 26px;
    align-items: stretch; /* non centrato */
  }

  /* lista principale: allineata a sinistra */
  .manga-mobile-menu .nav-list{
    gap: 10px;
    align-items: stretch;
  }

  .manga-mobile-menu .nav-list > li{
    text-align: left;
  }

  /* voci principali */
  .manga-mobile-menu .nav-list > li > a{
    display: block;
    padding: 10px 10px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 400;
    color: #111;
  }

  /* separazione visiva tra sezioni */
  .manga-mobile-menu .nav-list > li + li{
    margin-top: 4px;
  }

  /* submenu: indent + più piccolo + grigio */
  .manga-mobile-menu .submenu{
    margin: 6px 0 0 14px;
    padding: 6px 0 0;
  }

  .manga-mobile-menu .submenu a{
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 300;
    color: #666;
  }

  /* terzo livello ancora più indentato */
  .manga-mobile-menu .submenu .submenu{
    margin-left: 14px;
    padding-top: 4px;
  }

  /* hover/tap feedback */
  .manga-mobile-menu a:hover,
  .manga-mobile-menu a:focus{
    background: rgba(0,0,0,0.04);
    outline: none;
  }
}
@media (max-width: 980px){

  /* pannello tipo sidebar SRF */
  .manga-mobile-menu{
    background: rgba(255,255,255,0.98);
  }

  .manga-mobile-menu .inner{
    max-width: 420px;
    margin: 0 auto;
    padding: 18px 18px 22px;
    align-items: stretch;
  }

  .manga-mobile-menu .nav-list{
    width: 100%;
    align-items: stretch;
    gap: 0;
  }

  .manga-mobile-menu .nav-list > li{
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  /* livello 1 = “sezioni” (bold nero) */
  .manga-mobile-menu .nav-list > li > a{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    border-radius: 0;
  }

  /* sub menu: chiuso di default */
  .manga-mobile-menu .submenu{
    display: none;
    padding: 6px 0 14px 14px;
  }

  /* quando aperto */
  .manga-mobile-menu li.is-open > .submenu{
    display: block;
  }

  /* livello 2 */
  .manga-mobile-menu .submenu a{
    display: block;
    padding: 10px 6px;
    font-size: 15px;
    font-weight: 400;
    color: #666;
  }

  /* livello 3 */
  .manga-mobile-menu .submenu .submenu{
    padding-left: 14px;
  }

  /* feedback tap */
  .manga-mobile-menu a:active{
    background: rgba(0,0,0,0.04);
  }
}

/* === REFINEMENTS — overlay typography consistency === */

/* Keep overlay links consistent with nav (not heavy) */
.contact-overlay .contact-link{
  font-weight: 400;
  color: #111;
}

/* Previously primary row could be too bold */
.contact-overlay .contact-row-primary .contact-link{
  font-weight: 400;
}

/* Contattaci dotted underline + hover only lightens dots (defensive override) */
.manga-topbar .nav-contact{
  color:#111 !important;
  font-weight:300 !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(17,17,17,0.35);
}
.manga-topbar .nav-contact:hover,
.manga-topbar .nav-contact:focus{
  color:#111 !important;
  text-decoration-color: rgba(17,17,17,0.18);
}



/* === FONT THIN OVERRIDE (USER REQUEST) === */
.manga-desktop-nav,
.manga-desktop-nav *,
.manga-mobile-menu,
.manga-mobile-menu *,
.manga-topbar .nav-contact,
.contact-overlay,
.contact-overlay *{
  font-weight:300 !important;
}

/* === Overlay contatti: icone DISATTIVATE (desktop + mobile) === */
.contact-svg{ display:none !important; }

/* Se la riga usa grid con colonna icona, torna a 1 colonna */
.contact-row{
  grid-template-columns: 1fr !important;
}
