/* Home template – Very Hosting (UPDATED + single background + identical buttons + HERO ART tuned) */

html, body{
  background:#070A12;
}

/* sposta qui il blocco anti-scroll orizzontale */
html, body { overflow-x: hidden; }


/* lascia la home senza overflow che rompe sticky */
.vh-home { overflow: visible; }  /* o almeno elimina overflow-x */

/* ===== GLOBAL VARS ===== */
:root{
  --vh-header-h: 50px;   /* altezza header */
  --vh-hero-gap: 18px;   /* pochissimo spazio sotto header */
  --vh-last-gap: 18px;   /* pochissimo spazio prima del footer */

  /* bottoni IDENTICI */
  --vh-btn-pad-y: 10px;
  --vh-btn-pad-x: 14px;
  --vh-btn-radius: 12px;
  --vh-btn-bg: rgba(11,54,198,.18);
  --vh-btn-bg-hover: rgba(11,54,198,.24);
  --vh-btn-border: rgba(11,54,198,.26);
  --vh-btn-text: rgba(255,255,255,.92);

  /* HERO ART SCALE (tuned) */
  --vh-hero-art-scale-desktop: 1.35;
  --vh-hero-art-scale-tablet: 1.20;
  --vh-hero-art-scale-mobile: 1.15;
}

/* HOME */
.vh-home{
  position: relative;
  overflow-y: visible;
  color: #fff;

  /* spazio/gradienti */
  background:
    radial-gradient(900px 480px at 20% 10%, rgba(48, 86, 255, .25), transparent 60%),
    radial-gradient(700px 420px at 80% 30%, rgba(11, 54, 198, .22), transparent 60%),
    radial-gradient(900px 600px at 50% 90%, rgba(0,0,0,.75), transparent 60%),
    linear-gradient(#070A12, #05060C);
}

/* contenuto sopra ai layer */
.vh-home > *{
  position: relative;
  z-index: 1;
}

/* ===== BACKGROUND IMAGE (single) ===== */
.vh-home::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  opacity: .55; /* regola se vuoi più/meno */
  background-image: url("../img/home/clouds.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

/* =========================
   BOTTONI IDENTICI (TUTTI)
   ========================= */
.vh-btn,
.vh-card__link,
.vh-splitcard__link{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: var(--vh-btn-text);
  text-decoration: none;

  font-weight: 500;
  font-size: 14px;

  padding: var(--vh-btn-pad-y) var(--vh-btn-pad-x);
  border-radius: var(--vh-btn-radius);

  background: var(--vh-btn-bg);
  border: 1px solid var(--vh-btn-border);

  width: fit-content;
}

/* elimina differenze tra varianti */
.vh-btn--primary{
  background: var(--vh-btn-bg);
  border: 1px solid var(--vh-btn-border);
  box-shadow: none;
}

.vh-btn:hover,
.vh-card__link:hover,
.vh-splitcard__link:hover{
  background: var(--vh-btn-bg-hover);
}

/* little arrow used in buttons/links (inherits currentColor) */
.vh-arrow{
  width: 10px;
  height: 10px;
  display:inline-block;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

/* HERO */
.vh-hero{
  padding-top: 140px;
  padding-bottom: 26px;
}

@media screen and(max-width:990px){
.vh-hero{
  padding-top: 40px;
}
}

.vh-hero__inner{
  display: grid;
  grid-template-columns: 1fr 1fr; /* bilanciato desktop */
  gap: 28px;
  align-items: center;
}

.vh-hero__title{
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.8px;
  font-weight: 800;
}

.vh-hero__lead{
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,.78);
  max-width: 640px;
}

.vh-hero__cta{
  display: flex;
  align-items: center;
  gap: 14px;
}

/* HERO ART */
.vh-hero__art{
  width: 100%;
  border-radius: 18px;

  background: transparent;
  border: 0;
  overflow: visible !important; /* NON taglia scie/glow */

  transform: scale(var(--vh-hero-art-scale-desktop));
  transform-origin: center center;
  justify-self: end;
  margin-right: 14px;
}

.vh-hero__art img{
  width: 100%;
  height: auto;
  display: block;
}

/* SECTION */
.vh-section{
  padding: 28px 0 30px;
}

.vh-section__head{
  text-align: center;
  margin: 0 auto 22px;
  max-width: 820px;
}

.vh-section__title{
  font-size: clamp(26px, 3.2vw, 40px);
  margin: 0 0 10px;
  letter-spacing: -0.6px;
  font-weight: 850;
}

.vh-section__subtitle{
  margin: 0;
  color: rgba(255,255,255,.72);
  line-height: 1.6;
}

/* small kicker */
.vh-kicker{
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
  font-weight: 800;
}

/* CARDS */
.vh-cards{
  display: grid;
  gap: 16px;
}

.vh-cards--2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vh-cards--3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vh-cards--4{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vh-card{
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 22px 60px rgba(0,0,0,.35);
  overflow: hidden;
  padding: 16px;
  backdrop-filter: blur(6px);

  display: flex;
  flex-direction: column;
}

.vh-card__media{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.28);
}

.vh-card__media img{
  width: 100%;
  height: auto;
  display: block;
}

.vh-card__title{
  margin: 14px 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.vh-card__text{
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,.72);
}

/* Link “bottone” card: identico + sempre in fondo */
.vh-card__link{
  margin-top: auto;
}

/* partner logos section */
.vh-partners{
  padding-top: 10px;
}

.vh-partners__head{
  text-align: center;
  margin-bottom: 12px;
}

/* logos row (desktop: centered + wrap clean, no odd single wrap) */
.vh-logos{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  /* meno gap tra loghi */
  column-gap: 56px;
  row-gap: 18px;

  margin-top: 40px;
  opacity: .92;
}

.vh-logos img{
  height: 26px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.35));
  opacity: .88;

  /* IMPORTANTISSIMO: niente margin-top */
  margin: 0;
  display: block;
}

.vh-logos .vh-logo--whm{
  transform: scale(0.7);
  transform-origin: center;
}

/* mobile: 2 colonne con gap più stretto */
@media (max-width: 520px){
  .vh-logos{
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-items: center;

    column-gap: 40px; /* meno gap colonne */
    row-gap: 18px;    /* meno gap righe */
    margin-top:35px;
    margin-left:-20px;
  }

  .vh-logos img{
    height: 22px;
    justify-self: center;
  }
}

/* split cards (2 big info blocks) */
.vh-split__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.vh-splitcard{
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 22px 60px rgba(0,0,0,.35);
  padding: 18px;
  backdrop-filter: blur(6px);
}

.vh-splitcard__title{
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.2px;
}

.vh-splitcard__text{
  margin: 0 0 14px;
  color: rgba(255,255,255,.74);
  line-height: 1.7;
  font-size: 14.5px;
}

/* WordPress feature block */
.vh-wp__inner{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 20px;
  align-items: center;
}

.vh-wp__title{
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -0.6px;
  font-weight: 900;
}

.vh-wp__text{
  margin: 0;
  color: rgba(255,255,255,.74);
  line-height: 1.75;
  font-size: 14.5px;
  max-width: 640px;
}

.vh-wp__art{
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

.vh-wp__art img{
  width: 100%;
  height: auto;
  display: block;
}

/* PERFORMANCE + SSL (2 cards) */
.vh-two{
  padding-top: 10px;
  padding-bottom: 10px; /* elimina extra gap verso la sezione successiva */
}

/* 2 LARGE INFO BLOCKS */
.vh-split{
  padding-top: 10px; /* elimina extra gap dalla sezione precedente */
}

/* LONG SECTION (ultima): meno spazio prima del footer */
.vh-long{
  padding: 34px 0 var(--vh-last-gap);
}

.vh-long__inner{
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 22px;
  align-items: start;
}

/* STICKY CONTAINER: deve essere visibile e senza interferenze */
.vh-long__aside{
  align-self: start;
  overflow: visible;
  position: relative;
  min-height: 100%;
}

/* Brand sticky box (TOP 50px requested) */
.vh-brand{
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 22px 60px rgba(0,0,0,.35);
  padding: 18px;

  /* default: NON sticky (tablet+mobile) */
  position: static;
  height: fit-content;
}

.vh-long__title{
  margin: 0 0 12px;
  font-size: clamp(22px, 2.8vw, 34px);
  letter-spacing: -0.4px;
  font-weight: 850;
}

.vh-long__text p{
  margin: 0 0 12px;
  color: rgba(255,255,255,.74);
  line-height: 1.75;
  font-size: 14.5px;
}

.vh-long__cta{
  margin-top: 18px;
}

.vh-brand__logo{
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display:block;
  margin-bottom: 10px;
}

.vh-brand__name{
  font-weight: 900;
  letter-spacing: -0.3px;
  font-size: 18px;
}

/* Fix: elimina il "buco" tra la 4-card e la 2-card */
.vh-included{ padding-bottom: 10px; }

/* Sticky robusto (desktop) */
@media (min-width: 1025px){
  .vh-long,
  .vh-long__inner,
  .vh-long__aside{
    overflow: visible !important;
    transform: none !important;
  }

  .vh-long__inner{
    align-items: start;
  }

  .vh-long__aside{
    min-height: calc(100vh - 60px);
  }

  .vh-brand{
    position: sticky;
    top: 80px;
    align-self: start;
  }
}

/* RESPONSIVE */
@media (max-width: 1024px){
  .vh-hero__inner{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* mantiene poco spazio sotto header anche su tablet */
  .vh-hero{
    padding-top: calc(var(--vh-header-h) + 14px);
  }

  /* HERO ART: centrata e non a destra */
  .vh-hero__art{
    transform: scale(var(--vh-hero-art-scale-tablet));
    transform-origin: center center;
    justify-self: center;
    margin: 0 auto;
    max-width: 520px;
  }

  .vh-cards--4,
  .vh-cards--3,
  .vh-cards--2{ grid-template-columns: 1fr; }

  .vh-split__grid{ grid-template-columns: 1fr; }
  .vh-wp__inner{ grid-template-columns: 1fr; }
  .vh-long__inner{ grid-template-columns: 1fr; }
  .vh-brand{ position: static; }

  /* bottoni a piena larghezza su mobile/tablet */
  .vh-btn,
  .vh-card__link,
  .vh-splitcard__link{
    width: 100%;
    justify-content: center;
  }
}

/* QUICK LINKS (PILLS) responsive */
.vh-mini-links{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
  align-items: stretch;
}

.vh-mini-links .vh-card__link{
  width: 100%;
  justify-content: center; /* testo centrato */
  text-align: center;
}

@media (max-width: 520px){
  .vh-hero__lead{ font-size: 15px; }

  /* loghi ancora più compatti su mobile */

  /* ancora meno gap sotto header su mobile */
  .vh-hero{
    padding-top: calc(var(--vh-header-h) + 10px);
  }

  /* HERO ART: mobile centrata */
  .vh-hero__art{
    transform: scale(var(--vh-hero-art-scale-mobile));
    transform-origin: center center;
    justify-self: center;
    margin: 0 auto;
    max-width: 420px;
  }

  /* sfondo su mobile: resta cover */
  .vh-home::before{
    background-position: center top;
    background-size: cover;
  }
}

/* =========================
   MOBILE: TUTTO CENTRATO
   ========================= */
@media (max-width: 520px){

  /* testi centrati ovunque */
  .vh-hero__copy,
  .vh-section__head,
  .vh-card,
  .vh-splitcard,
  .vh-wp__copy,
  .vh-long__copy,
  .vh-brand{
    text-align: center;
  }

  /* CTA e gruppi di bottoni centrati */
  .vh-hero__cta,
  .vh-long__cta{
    justify-content: center;
  }

  /* bottoni/link centrati (anche se full-width) */
  .vh-btn,
  .vh-card__link,
  .vh-splitcard__link{
    justify-content: center;
    text-align: center;
  }

  /* dentro le card: centra il contenuto */
  .vh-card{
    align-items: center;
  }

  /* ma tieni le immagini “piene” e belle */
  .vh-card__media,
  .vh-wp__art{
    width: 100%;
  }

  /* quick links: sempre centrati */
  .vh-mini-links{
    justify-items: center;
  }
  .vh-mini-links .vh-card__link{
    justify-content: center;
  }

  /* BRAND: centra bene anche il custom logo WP (se presente) */
  .vh-brand{
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .vh-brand__logo-wrap,
  .vh-brand__logo-wrap .custom-logo-link{
    display: inline-flex;
    justify-content: center;
  }

  .vh-brand__logo-wrap .custom-logo,
  .vh-brand__logo{
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}



/* =========================================
   VH-LONG: 1 colonna su mobile + brand più largo + sticky top 20px
   (metti in fondo al file)
   ========================================= */

/* Sticky: evita che parent con overflow/transform lo rompa */
@media (min-width: 1025px){
  .vh-long,
  .vh-long .vh-wrap,
  .vh-long__inner,
  .vh-long__aside{
    overflow: visible !important;
    transform: none !important;
  }
}

/* DESKTOP: colonna destra più larga + box brand più “lungo” */
@media (min-width: 1025px){
  .vh-long__inner{
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: start;
  }

  .vh-long__aside{
    justify-self: stretch; /* prende tutta la larghezza della colonna */
    align-self: start;
    min-height: calc(100vh - 20px); /* aiuta sticky a comportarsi bene */
  }


}

/* MOBILE/TABLET: una sola colonna (non due) + niente overflow */
@media (max-width: 1024px){
  .vh-long__inner{
    grid-template-columns: 1fr;
  }

  .vh-long__aside{
    width: 100%;
  }

  .vh-brand{
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: static; /* su mobile non sticky */
  }
}

/* Custom logo WP dentro al box brand: NON deve diventare enorme */
.vh-brand .custom-logo-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.vh-brand .custom-logo{
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

/* mobile: logo leggermente più piccolo */
@media (max-width: 520px){
  .vh-brand .custom-logo{
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
  }
}

