
/* ============================================================
   HOME V12 — DESKTOP
   Menu orizzontale in alto.
   Box fotografico 19:12.
   Dimensione limitata anche dall'altezza della viewport,
   così l'immagine resta sempre interamente visibile.
   Solo la homepage desktop viene modificata.
   ============================================================ */

@media (min-width: 851px) {

  /* Header un po' più compatto SOLO in Home. */
  body.home-page > header {
    height: 76px !important;
  }

  body.home-page > header .wrap {
    padding-left: 58px !important;
    padding-right: 58px !important;
  }

  body.home-page .brand {
    font-family: "Manrope", sans-serif !important;
    font-size: 21px !important;
    letter-spacing: .12em !important;
    font-weight: 300 !important;
  }

  body.home-page nav,
  body.home-page .lang {
    font-family: "Manrope", sans-serif !important;
    font-weight: 300 !important;
  }

  body.home-page nav {
    gap: 28px !important;
    font-size: 12px !important;
  }

  body.home-page .lang {
    font-size: 11px !important;
  }

  /* Area fotografica più compatta. */
  body.home-page .home-v9 {
    width: 100% !important;
    min-height: auto !important;
    padding: 10px 36px 24px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  body.home-page .home-v9 .hero-slideshow-v9 {
    position: relative !important;

    /*
      Tre limiti contemporanei:
      1. max 1360 px
      2. larghezza disponibile della finestra
      3. altezza disponibile della finestra convertita in 19:12

      Con header 76 px e margini verticali, il box non può uscire sotto.
    */
    width: min(
      1360px,
      calc(100vw - 112px),
      calc((100vh - 124px) * 19 / 12)
    ) !important;

    height: auto !important;
    aspect-ratio: 19 / 12 !important;
    min-height: 0 !important;
    max-height: calc(100vh - 124px) !important;
    max-width: none !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  body.home-page .home-v9 .hero-picture {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    transition: opacity 2.4s ease-in-out !important;
  }

  body.home-page .home-v9 .hero-picture.active {
    opacity: 1 !important;
  }

  body.home-page .home-v9 .hero-picture img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
  }
}

/* ============================================================
   MOBILE
   Mantiene la soluzione precedente: immagine verticale 3:4.
   ============================================================ */
@media (max-width: 850px) {

  .home-v9 {
    width: 100% !important;
    min-height: auto !important;
    padding: 10px 14px 18px !important;
    display: block !important;
  }

  .home-v9 .hero-slideshow-v9 {
    position: relative !important;
    width: min(calc(100vw - 28px), 600px) !important;
    height: auto !important;
    aspect-ratio: 3 / 4 !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 8px auto 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .home-v9 .hero-picture {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    transition: opacity 2.4s ease-in-out !important;
  }

  .home-v9 .hero-picture.active {
    opacity: 1 !important;
  }

  .home-v9 .hero-picture img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
}
