/* GrindItaly Home Fit - CSS */

/* Evita leak orizzontale */
html, body { overflow-x: hidden; }

/* Home: nessuno scroll verticale iniziale (puoi disattivare se hai contenuti più lunghi) */
body.home { overflow-y: hidden; }

/* Contenitore fullscreen centrato */
.gi-home-fullscreen {
  min-height: calc(var(--vh, 1vh) * 100);
  height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
}

/* Se vuoi sfondo immagine che copra */
.gi-home-fullscreen.cover {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Media interni non devono sforare */
.gi-home-fullscreen img,
.gi-home-fullscreen video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Container del tema non devono stringere */
.gi-home-fullscreen [class*="container"],
.gi-home-fullscreen [class*="wrap"],
.gi-home-fullscreen [class*="inner"] {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Se hai header/footer fissi, imposta queste custom properties via inline style o aggiungile qui */
:root { --gi-header-h: 0px; --gi-footer-h: 0px; --gi-adminbar-h: 0px; }
body.admin-bar { --gi-adminbar-h: 32px; }
.gi-home-fullscreen.has-chrome {
  height: calc((var(--vh, 1vh) * 100) - var(--gi-header-h) - var(--gi-footer-h) - var(--gi-adminbar-h));
}

/* Modalità "fit to screen" (scala il wrapper interno senza far comparire scroll) */
.gi-fit-wrapper {
  transform-origin: center center;
  will-change: transform;
}