/* Adattamento a telefono e tablet del sito vetrina.
   Le pagine hanno gli stili scritti riga per riga (pensati per computer). Qui ci sono SOLO
   regole che si applicano sotto i 900 pixel di larghezza: su computer il sito resta
   identico. Le classi m-… sono aggiunte agli elementi in base al loro ruolo:
   m-px spaziatura laterale · m-pt/m-pb spaziatura verticale grande · m-wrap righe che
   vanno a capo · m-grid griglie a più colonne · m-fluid larghezze fisse · m-deco sfondi
   decorativi · m-fs… titoli grandi · m-navlinks/m-burger/m-solo-desktop menu. */
.m-burger { display: none; }

@media (max-width: 900px) {
  .m-px { padding-left: 24px !important; padding-right: 24px !important; }
  .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 640px) {
  body { overflow-wrap: break-word; }
  .m-px { padding-left: 18px !important; padding-right: 18px !important; }
  .m-pt { padding-top: 48px !important; }
  .m-pb { padding-bottom: 56px !important; }
  .m-wrap { flex-wrap: wrap !important; }
  /* le colonne affiancate a larghezza flessibile (flex: 1) vanno una sotto l'altra */
  .m-wrap > [style*="flex: 1"] { flex: 1 1 100% !important; min-width: 0 !important; }
  .m-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .m-fluid { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
  .m-deco { display: none !important; }
  .m-fs44 { font-size: 34px !important; }
  .m-fs34 { font-size: 28px !important; }
  .m-fs26 { font-size: 22px !important; }
  img, .m-img { max-width: 100% !important; height: auto !important; }
  table { font-size: 12.5px !important; }

  /* Menu: logo, "Accedi" sempre visibile, ☰ per le altre voci */
  #nav-principale { position: relative; flex-wrap: nowrap !important; padding-top: 14px !important; padding-bottom: 14px !important; }
  #nav-principale .m-navlinks { display: none !important; }
  #nav-principale .m-solo-desktop { display: none !important; }
  #nav-principale .m-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border: 1px solid #e4e0ef; border-radius: 8px; background: #fff; font-size: 18px; color: #2e2545; cursor: pointer; margin-left: 10px; }
  #nav-principale.aperto .m-navlinks { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 0 !important;
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid #f1eef9;
    box-shadow: 0 12px 24px rgba(24,18,43,0.08); z-index: 50; padding: 6px 18px 12px; }
  #nav-principale.aperto .m-navlinks a { padding: 13px 4px; border-bottom: 1px solid #f5f3fa; font-size: 15px !important; }
  #nav-principale.aperto .m-navlinks::after { content: none; }
}

/* Menu a tendina "Funzionalità" con le 8 aree (ottobre 2026) */
.m-menu-aree { position: relative; }
.m-menu-aree::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; }
.m-freccia { font-size: 10px; margin-left: 2px; opacity: .6; }
.m-tendina { display: none; position: absolute; top: calc(100% + 12px); left: -18px; z-index: 60; min-width: 290px;
  background: #fff; border: 1px solid #ece8f5; border-radius: 14px; box-shadow: 0 22px 48px -20px rgba(24,18,43,.28); padding: 8px; }
.m-menu-aree:hover .m-tendina, .m-menu-aree:focus-within .m-tendina { display: block; }
.m-tendina a { display: block; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: #2e2545; white-space: nowrap; }
.m-tendina a:hover, .m-tendina a:focus { background: #f5f3ff; color: #6d28d9; }
.m-tendina .m-tutte { margin-top: 4px; border-top: 1px solid #f1eef9; border-radius: 0 0 9px 9px; font-weight: 700; color: #6d28d9; }
@media (max-width: 900px) {
  /* Su telefono, dentro il menu ☰: le aree come elenco rientrato sotto "Funzionalità" */
  #nav-principale.aperto .m-menu-aree { display: flex; flex-direction: column; }
  #nav-principale.aperto .m-tendina { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; }
  #nav-principale.aperto .m-tendina a { padding: 10px 4px !important; font-size: 14px !important; border-bottom: 1px solid #f5f3fa; white-space: normal; }
  #nav-principale.aperto .m-freccia { display: none; }
  .m-menu-aree::after { display: none; }
}

/* Ingrandimento delle immagini dell'app (ottobre 2026) */
img.nx-zoomabile { cursor: zoom-in; }
.nx-zoom { position: fixed; inset: 0; z-index: 1000; background: rgba(18,14,32,.86); display: flex; align-items: center; justify-content: center;
  padding: 56px 24px 24px; cursor: zoom-out; animation: nxz .15s ease-out; }
.nx-zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.45); background: #fff; cursor: zoom-out; }
.nx-zoom button { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #18122b;
  font-size: 20px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.nx-zoom .nx-didascalia { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #e9e5f5; font-size: 13px; padding: 0 60px; }
.nx-zoom-scorri { overflow: auto; align-items: flex-start; justify-content: flex-start; }  /* da sinistra: centrato, la parte sinistra non si raggiungerebbe */
.nx-zoom-scorri img { max-width: none !important; max-height: none; width: min(1400px, 200vw); height: auto !important; }  /* !important: vince la regola generale delle immagini su telefono */
.nx-zoom-lunga { overflow-y: auto; align-items: flex-start; padding: 64px 24px 40px; }
.nx-zoom-lunga img { max-height: none; max-width: none; height: auto; flex-shrink: 0; margin: 0 auto; cursor: default; }
.nx-zoom-lunga button { position: fixed; z-index: 2; }
.nx-zoom-lunga .nx-didascalia { position: fixed; top: 22px; bottom: auto; padding: 0 70px; }
.nx-scorri-avviso { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); background: #fff; color: #18122b; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 20px; box-shadow: 0 6px 20px rgba(0,0,0,.3); pointer-events: none; animation: nxs 4s forwards; }
@keyframes nxs { 0%, 70% { opacity: 1 } 100% { opacity: 0 } }
@keyframes nxz { from { opacity: 0 } to { opacity: 1 } }

/* Domande frequenti apribili (ottobre 2026) */
.nx-faq { background: #fff; border: 1px solid #ece8f5; border-radius: 12px; }
.nx-faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 20px; font-size: 15.5px; font-weight: 700; color: #18122b; position: relative; }
.nx-faq summary::-webkit-details-marker { display: none; }
.nx-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: #6d28d9; }
.nx-faq[open] summary::after { content: "–"; }
.nx-faq[open] { border-color: #ddd6fe; box-shadow: 0 10px 30px -18px rgba(24,18,43,.25); }
.nx-faq-risposta { padding: 0 20px 18px; font-size: 14.5px; line-height: 1.65; color: #4a4360; }
.nx-faq-risposta a { color: #6d28d9; font-weight: 600; }

/* Chi siamo: telefono sovrapposto alla schermata; su telefono va sotto, centrato */
@media (max-width: 900px) {
  .nx-telefono-chisiamo { position: static !important; display: block; margin: 18px auto 0; width: 150px !important; }
  .nx-schermata-chisiamo { margin-right: 0 !important; }
  .nx-visuale-chisiamo { min-height: 0 !important; }
}
