/* Barra inferiore e menu: nascosti sul computer */
[data-mnav] { display: none; }

/* ===== VERSIONE CELLULARE (solo schermi piccoli; il computer non cambia) ===== */
@media (max-width: 700px) {
  /* Schede sempre almeno 2 per riga (come nel computer, in piccolo) */
  [data-mcar] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  [data-mcar] > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  [data-mcar] > * { min-width: 0; }
  [data-mcar] > div, [data-mcar] > figure, [data-mcar] > a { padding: 14px !important; }
  [data-mcar] > [data-tile], [data-mcar] > a[data-tile] { padding: 0 !important; min-height: 230px !important; height: auto !important; }
  [data-mcar] [data-tile] > div:last-child { padding: 14px !important; gap: 6px !important; position: relative !important; }
  [data-mcar] [data-tile] p { display: none !important; }
  [data-mcar] > div[style*="height: 320px"] { height: 200px !important; padding: 0 !important; }
  [data-mcar] h3 { font-size: 18px !important; line-height: 1.05 !important; }
  [data-mcar] p, [data-mcar] blockquote { font-size: 13px !important; line-height: 1.45 !important; text-align: left !important; hyphens: auto; }
  [data-mcar] span[style*="font-size: 40px"] { font-size: 26px !important; }
  [data-mcar] span[style*="font-size: 96px"] { font-size: 60px !important; height: 26px !important; }
  [data-mcar] a[style*="background: rgb(200, 16, 46)"], [data-mcar] span[style*="background: rgb(200, 16, 46)"][style*="padding"] { font-size: 12px !important; padding: 8px 10px !important; }
  [data-mcar] img[src*="icons/step"] { width: 34px !important; height: 34px !important; }
  [data-mcar] div[style*="width: 84px"] { width: 56px !important; height: 56px !important; }

  /* Griglie a 2 colonne per gli elementi piccoli */
  [data-m2] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }

  /* Meno spazio vuoto tra le sezioni */
  [data-msec] { padding-top: 56px !important; padding-bottom: 56px !important; }

  /* Titoli e testi delle intestazioni (hero) più contenuti */
  section h1 { font-size: 40px !important; line-height: 1 !important; }
  section[data-screen-label$="Intestazione"] { min-height: 0 !important; }
  section[data-screen-label$="Intestazione"] p, section[data-screen-label="Home · Hero"] p { font-size: 16px !important; line-height: 1.5 !important; }

  /* Team: foto della squadra intera (senza tagli) */
  [data-msq] { height: auto !important; aspect-ratio: 4 / 3; }
  [data-msq] img { object-position: center top !important; }

  /* ===== ESPERIENZA APP ===== */
  /* Barra inferiore fissa (Home · Servizi · WhatsApp · Galleria · Contatti) */
  [data-mnav] { display: grid !important; }
  [data-wa-fab] { display: none !important; }
  footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  div[style*="position: fixed"][style*="bottom: 16px"] { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }

  /* Menu a tutto schermo: voci bianche che entrano una dopo l'altra */
  [data-mmenu] { animation: mmFade .35s ease both; }
  [data-mmenu] > div:last-child { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  [data-mm-link]:not([style*="rgb(200, 16, 46)"]) { color: #FFFFFF !important; }
  [data-mm-link] { animation: mmIn .5s cubic-bezier(.2,.7,.2,1) both; }
  [data-mm-link]:nth-child(1) { animation-delay: .05s; } [data-mm-link]:nth-child(2) { animation-delay: .1s; }
  [data-mm-link]:nth-child(3) { animation-delay: .15s; } [data-mm-link]:nth-child(4) { animation-delay: .2s; }
  [data-mm-link]:nth-child(5) { animation-delay: .25s; } [data-mm-link]:nth-child(6) { animation-delay: .3s; }
  [data-mm-link]:nth-child(7) { animation-delay: .35s; } [data-mm-link]:nth-child(8) { animation-delay: .4s; }

  /* Risposta al tocco: pulsanti e schede si "premono" come in un'app */
  a, button, [data-tile], [data-press] { -webkit-tap-highlight-color: transparent; transition: transform .18s cubic-bezier(.34,1.56,.64,1); }
  a:active, button:active, [data-tile]:active, [data-mcar] > *:active { transform: scale(0.96); }
}

@keyframes mmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mmIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
