/* Regole comuni a tutte le pagine (header interno con menu a tendina sotto i 1280px, accessibilita) */
:focus-visible { outline: 1px solid #A08B6C; outline-offset: 3px; }
.sh { position: sticky; top: 0; z-index: 70; }
#sh-burger { display: none; background: none; border: 0; padding: 10px 0; cursor: pointer; width: 30px; margin-left: auto; }
#sh-burger span { display: block; width: 30px; height: 1px; background: #F4F0EA; transition: transform 350ms ease, opacity 350ms ease; }
#sh-burger span + span { margin-top: 8px; }
#sh-burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
#sh-burger[aria-expanded="true"] span + span { transform: translateY(-4.5px) rotate(-45deg); }
@media (max-width: 1279px) {
  #sh-nav { flex-wrap: wrap !important; }
  #sh-burger { display: block; }
  #sh-links { order: 3; width: 100%; flex-direction: column !important; gap: 0 !important; max-height: 0; overflow: hidden; transition: max-height 450ms cubic-bezier(.16,1,.3,1); }
  #sh-links a { padding: 15px 0; border-top: 1px solid rgba(244,240,234,.1); }
  #sh-nav.aperto #sh-links { max-height: 640px; }
  #sh-nav > a[href^="tel:"] { padding: 11px 14px !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
/* Menu desktop delle pagine interne: 10 voci su una riga sola */
@media (min-width: 1280px) {
  #sh-nav { flex-wrap: nowrap !important; }
  #sh-links { flex-wrap: nowrap !important; gap: 12px clamp(14px, 1.45vw, 30px) !important; letter-spacing: .18em !important; white-space: nowrap; }
}

/* =========================================================================
   OTTIMIZZAZIONE MOBILE
   ========================================================================= */
/* Menu a tendina: una sola colonna anche mentre si apre (senza nowrap le voci
   finivano in colonne affiancate fuori dallo schermo) */
@media (max-width: 1279px) { #sh-links { flex-wrap: nowrap !important; } }

/* Barra contatti fissa in basso: chiamare o farsi portare in atelier con un pollice */
.mbar { display: none; }
@media (max-width: 719px) {
  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr;
          background: rgba(11,11,11,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
          border-top: 1px solid rgba(244,240,234,.16); padding-bottom: env(safe-area-inset-bottom); }
  .mbar a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; font-size: 11px; letter-spacing: .24em; color: #F4F0EA; }
  .mbar a + a { border-left: 1px solid rgba(244,240,234,.16); }
  .mbar a:first-child { background: #F4F0EA; color: #0B0B0B; }
  .mbar svg { width: 15px; height: 15px; flex: 0 0 auto; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

  /* L'apertura col video finisce sopra la barra contatti, non sotto */
  #top { height: calc(100svh - 56px - env(safe-area-inset-bottom)) !important; min-height: 520px !important; }

  /* Header compatto: piu' spazio alle foto */
  #sh-nav { padding: 10px 20px !important; gap: 0 14px !important; }
  #sh-nav > a:first-child img { width: 58px !important; }
  #sh-nav > a[href^="tel:"] { font-size: 11px !important; letter-spacing: .12em !important; padding: 12px 12px !important; }
  #sh-nav > a:first-child { padding: 4px 0; }
  #sh-burger { width: 44px; height: 44px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  #sh-links { max-height: 0; }
  #sh-nav.aperto #sh-links { max-height: calc(100svh - 140px); overflow-y: auto; }
  #sh-links a { padding: 16px 0 !important; font-size: 12px; }
  #diva-header { padding: 14px 20px !important; }
  #diva-logo-head { width: 58px !important; }
  #diva-burger { padding: 14px 8px !important; margin-right: -8px; }
  #diva-menu a[data-menu-item] { padding: 4px 0; }

  /* Testi minimi leggibili: le etichette da 8-10px del design salgono a 11px */
  [style*="font-size:10px"], [style*="font-size:9px"], [style*="font-size:8px"],
  [style*="font-size: 10px"], [style*="font-size: 9px"], [style*="font-size: 8px"],
  .pg-eyebrow, .pg-meta, .pg-crumb, .bl-meta { font-size: 11px !important; }

  /* Aree di tocco di almeno 44px per i link in elenco */
  footer [style*="flex-direction:column"] { gap: 0 !important; }
  footer a { display: inline-block; padding: 12px 0; }
  nav[aria-label="Percorso"] a { display: inline-block; padding: 12px 0; }
  .pg-faq summary { padding-top: 20px; padding-bottom: 20px; }

  /* Pulsanti a tutta larghezza: piu' facili da toccare */
  .pg-btns { width: 100%; }
  .pg-btns .pg-btn { flex: 1 1 100%; justify-content: center; }
}
@media (hover: none) { .pg-btn, .bl-img img { transition: none; } }
