
/* =====================================================================
   ART IMAGE — V64 ONLINE / iPHONE
   Correzioni viste sul vero iPhone:
   - il widget Google originale non compare mai
   - il selettore personalizzato "Lingua" resta in alto a sinistra
   - sfondo mobile unico e omogeneo, senza banda verticale / fixed di Safari
   - in italiano il menu usa di nuovo le immagini originali (font identico)
   - nelle altre lingue usa testo traducibile senza cambiare geometria
   ===================================================================== */

@media screen and (max-width:820px) {

  /* --- Background mobile robusto per Safari iOS --- */
  html {
    background:#000 !important;
  }

  body {
    position:relative !important;
    isolation:isolate !important;
    background:#000 !important;
    background-image:none !important;
    background-attachment:scroll !important;
  }

  body::before {
    content:"" !important;
    position:fixed !important;
    z-index:-1 !important;
    inset:0 !important;
    pointer-events:none !important;
    background-color:#000 !important;
    background-image:url("mobile-bg-v64.jpg") !important;
    background-repeat:no-repeat !important;
    background-position:center top !important;
    background-size:100% auto !important;
  }

  body.ai-home-page::before {
    background-position:center 205px !important;
  }

  #imPage,
  #imContent,
  #imContentGraphics {
    background-color:transparent !important;
    background-image:none !important;
    background-attachment:scroll !important;
  }

  /* --- Google Translate originale: sempre invisibile --- */
  #google_translate_element,
  #google_translate_element *,
  .goog-te-gadget,
  .goog-te-gadget-simple {
    max-width:1px !important;
  }

  #google_translate_element {
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    min-width:1px !important;
    min-height:1px !important;
    margin:-1px !important;
    padding:0 !important;
    overflow:hidden !important;
    clip:rect(0 0 0 0) !important;
    clip-path:inset(50%) !important;
    opacity:0 !important;
    pointer-events:none !important;
    border:0 !important;
  }

  /* Selettore personalizzato: solo "Lingua" + freccia. */
  body .ai-language-picker-mobile {
    display:inline-flex !important;
    position:fixed !important;
    z-index:60000 !important;
    top:10px !important;
    left:12px !important;
    right:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  body .ai-language-picker-mobile .ai-language-select {
    display:block !important;
    appearance:none !important;
    -webkit-appearance:none !important;
    width:auto !important;
    min-width:78px !important;
    max-width:120px !important;
    height:31px !important;
    min-height:31px !important;
    margin:0 !important;
    padding:4px 19px 4px 2px !important;
    border:0 !important;
    border-radius:0 !important;
    outline:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
    font:600 12px/1.2 Arial, Helvetica, sans-serif !important;
    text-shadow:0 1px 3px #000, 0 0 5px #000 !important;
  }

  body .ai-language-picker-mobile::after {
    content:"▾" !important;
    position:absolute !important;
    right:2px !important;
    top:7px !important;
    color:#fff !important;
    font-size:11px !important;
    pointer-events:none !important;
    text-shadow:0 1px 3px #000 !important;
  }

  body .ai-language-picker-desktop {
    display:none !important;
  }

  /* --- Menu mobile: in ITALIANO uso le immagini originali --- */
  html:not(.ai-translated) #aiMobileBottomNavV45 .ai-v45-bottom-link > img {
    display:block !important;
    position:relative !important;
    z-index:3 !important;
    width:auto !important;
    height:auto !important;
    max-width:86% !important;
    max-height:30px !important;
    margin:auto !important;
    transform:none !important;
    filter:none !important;
  }

  html:not(.ai-translated) #aiMobileBottomNavV45 .ai-v55-menu-text {
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    overflow:hidden !important;
    clip:rect(0 0 0 0) !important;
    opacity:0 !important;
    pointer-events:none !important;
  }

  html:not(.ai-translated) body.ai-home-page #aiMobileBottomNavV45 .ai-v45-home > img {
    content:url("../menu/index_c.png") !important;
  }
  html:not(.ai-translated) body.ai-gallery-page #aiMobileBottomNavV45 .ai-v45-galleria > img {
    content:url("../menu/galleria_c.png") !important;
  }
  html:not(.ai-translated) body.ai-quadri-page #aiMobileBottomNavV45 .ai-v45-quadri > img {
    content:url("../menu/quadri_c.png") !important;
  }
  html:not(.ai-translated) body.ai-shop-page #aiMobileBottomNavV45 .ai-v45-acquisti > img {
    content:url("../menu/acquisti_c.png") !important;
  }
  html:not(.ai-translated) body.ai-contact-page #aiMobileBottomNavV45 .ai-v45-contatti > img {
    content:url("../menu/contatti_c.png") !important;
  }

  /* Nelle lingue tradotte: testo vero, ma stessa identica geometria. */
  html.ai-translated #aiMobileBottomNavV45 .ai-v45-bottom-link > img {
    display:none !important;
  }

  html.ai-translated #aiMobileBottomNavV45 .ai-v55-menu-text {
    display:flex !important;
    position:relative !important;
    z-index:3 !important;
    width:100% !important;
    height:100% !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 5px !important;
    box-sizing:border-box !important;
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
    font-family:"Chalkboard SE","Noteworthy","Arial Rounded MT Bold",Arial,sans-serif !important;
    font-size:clamp(12px,3.15vw,16px) !important;
    font-weight:600 !important;
    line-height:1 !important;
    text-align:center !important;
    white-space:nowrap !important;
  }

  html.ai-translated body.ai-home-page #aiMobileBottomNavV45 .ai-v45-home .ai-v55-menu-text,
  html.ai-translated body.ai-gallery-page #aiMobileBottomNavV45 .ai-v45-galleria .ai-v55-menu-text,
  html.ai-translated body.ai-quadri-page #aiMobileBottomNavV45 .ai-v45-quadri .ai-v55-menu-text,
  html.ai-translated body.ai-shop-page #aiMobileBottomNavV45 .ai-v45-acquisti .ai-v55-menu-text,
  html.ai-translated body.ai-contact-page #aiMobileBottomNavV45 .ai-v45-contatti .ai-v55-menu-text {
    color:#ffd21a !important;
    -webkit-text-fill-color:#ffd21a !important;
  }

  /* La striscia menu resta esattamente larga quanto il viewport. */
  #aiMobileBottomNavV45 {
    left:0 !important;
    right:0 !important;
    width:auto !important;
    max-width:none !important;
  }
}

@media screen and (max-width:360px) {
  body .ai-language-picker-mobile {
    top:7px !important;
    left:9px !important;
  }
}
