/*!
 * Tagoo Giardino & Casa — Home 2026
 * tagoo-home/css/tagoo-home.css · v1.0.4 · 2026-11-26
 *
 * Si carica solo nella home (lo decide tagoo-home.php). Ogni regola parte da body.tg-home,
 * così non tocca le altre pagine del sito.
 *
 * CLASSI DA SCRIVERE IN DIVI (Avanzate › ID e classi CSS › Classe CSS)
 *   Sezioni:  tg-s  +  tg-hero | tg-intro | tg-outdoor | tg-progetto | tg-indoor | tg-decor |
 *             tg-marchi | tg-natale | tg-showroom          (es. «tg-s tg-outdoor»)
 *   Moduli:   tg-link        pulsante che diventa link di testo con freccia
 *             tg-parallax    immagine con un lieve movimento allo scorrimento
 *             tg-didascalia  testo piccolo sotto una foto
 *             tg-no-anim     modulo che non deve comparire con l'entrata animata
 * Righe e colonne non hanno classi: le prende la sezione. Colori, spaziature e caratteri
 * NON vanno impostati nel builder: lasciali ai valori di base, li dà questo file.
 * La mappa completa di sezioni, righe e moduli è in LEGGIMI.md.
 */

/* ------------------------------------------------------------------ carattere */
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ token */
body.tg-home {
  --tg-crema: #f4f0e8;
  --tg-crema-2: #ebe5d9;
  --tg-inchiostro: #1a1814;
  --tg-inchiostro-2: #5c5549;
  --tg-nero: #0e0d0b;
  --tg-bruno: #1d1a16;
  --tg-abete: #17261d;
  --tg-bronzo: #8a6c42;        /* pulsanti su chiaro: testo bianco 4,9:1 */
  --tg-bronzo-scuro: #6f5631;  /* link su crema 6:1 */
  --tg-oro: #c9a45c;           /* pulsanti e link su scuro 8,3:1 */
  --tg-oro-chiaro: #dcc28e;
  --tg-chiaro: #f4f0e8;
  --tg-chiaro-2: #bdb6a9;

  --tg-font: "Jost", "Helvetica Neue", Arial, sans-serif;
  /* misure in px: non cambiano se il tema o un plugin toccano la dimensione di base dell'html */
  --tg-h1: clamp(36px, 17.6px + 5.3vw, 96px);
  --tg-h2: clamp(30px, 18.4px + 2.45vw, 52px);
  --tg-h3: clamp(20px, 17.9px + .45vw, 24px);
  --tg-testo: clamp(16px, 15.2px + .22vw, 18px);
  --tg-piccolo: 15px;

  --tg-max: 1366px;            /* larghezza massima del contenuto */
  --tg-larghezza: 90;          /* larghezza del contenuto in % della finestra, come le righe Divi */
  --tg-contenuto: min(var(--tg-max), calc(var(--tg-larghezza) * 1%));
  --tg-bordo: calc((100% - var(--tg-contenuto)) / 2);
  --tg-margine: clamp(20px, 3.4vw, 48px);
  --tg-sez: clamp(88px, 10.5vw, 168px);
  --tg-header: 80px;           /* altezza dell'header Divi: correggila se è diversa */
  --tg-ease: cubic-bezier(.2, .7, .2, 1);

  /* focus visibile: cambia qui colore, spessore e distanza (o metti 0 come spessore per toglierlo dai mouse con :focus-visible) */
  --tg-focus-colore: currentColor;
  --tg-focus-spessore: 2px;
  --tg-focus-distanza: 4px;
}

/* ------------------------------------------------------------------ sezioni */
body.tg-home .tg-s.et_pb_section {
  --tg-campo: var(--tg-crema);
  --tg-titolo-colore: var(--tg-inchiostro);
  --tg-testo-colore: var(--tg-inchiostro);
  --tg-link-colore: var(--tg-bronzo-scuro);
  --tg-accento: var(--tg-bronzo);
  --tg-btn-fondo: var(--tg-bronzo);
  --tg-btn-fondo-hover: var(--tg-bronzo-scuro);
  --tg-btn-testo: #fff;
  position: relative;
  padding: var(--tg-sez) 0;
  background-color: var(--tg-campo);
  color: var(--tg-testo-colore);
  font-family: var(--tg-font);
  overflow-x: clip;
}
/* Sezioni copiate dalla home vecchia: colori, sfumature, immagini di sfondo, bordi, ombre e divisori
   impostati nel builder non devono passare. Lo sfondo è solo il campo di colore (la hero tiene il suo). */
body.tg-home .tg-s.et_pb_section:not(.tg-hero) {
  background: var(--tg-campo) !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.tg-home .tg-s.et_pb_section:not(.tg-hero) > .et_parallax_bg_wrap,
body.tg-home .tg-s.et_pb_section:not(.tg-hero) > .et_pb_section_video_bg,
body.tg-home .tg-s.et_pb_section:not(.tg-hero) > .et_pb_background_pattern,
body.tg-home .tg-s.et_pb_section:not(.tg-hero) > .et_pb_background_mask,
body.tg-home .tg-s .et_pb_top_inside_divider,
body.tg-home .tg-s .et_pb_bottom_inside_divider { display: none !important; }
body.tg-home .tg-s > .et_pb_row,
body.tg-home .tg-s > .et_pb_row > .et_pb_column {
  background-color: transparent !important;
  background-image: none !important;
}

/* campi scuri */
body.tg-home .tg-outdoor.et_pb_section,
body.tg-home .tg-indoor.et_pb_section,
body.tg-home .tg-marchi.et_pb_section,
body.tg-home .tg-natale.et_pb_section,
body.tg-home .tg-hero.et_pb_section {
  --tg-titolo-colore: var(--tg-chiaro);
  --tg-testo-colore: rgba(244, 240, 232, .86);
  --tg-link-colore: var(--tg-oro);
  --tg-accento: var(--tg-oro);
  --tg-btn-fondo: var(--tg-oro);
  --tg-btn-fondo-hover: var(--tg-oro-chiaro);
  --tg-btn-testo: var(--tg-nero);
}
body.tg-home .tg-outdoor.et_pb_section { --tg-campo: var(--tg-nero); }
body.tg-home .tg-indoor.et_pb_section  { --tg-campo: var(--tg-bruno); }
body.tg-home .tg-marchi.et_pb_section  { --tg-campo: var(--tg-nero); }
body.tg-home .tg-natale.et_pb_section  { --tg-campo: var(--tg-abete); }
body.tg-home .tg-progetto.et_pb_section { --tg-campo: var(--tg-crema-2); }

/* Divi mette overflow-y: hidden su #page-container e così position: sticky non funziona.
   Solo nella home lo riportiamo a visibile, tagliando comunque l'eventuale sbordo orizzontale. */
body.tg-home #page-container { overflow: visible !important; overflow-x: clip !important; }

/* ------------------------------------------------------------------ righe e colonne (griglia al posto delle colonne Divi) */
body.tg-home .tg-s > .et_pb_row {
  width: var(--tg-contenuto);
  max-width: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: clamp(32px, 6vw, 104px);
  row-gap: 48px;
  align-items: start;
}
body.tg-home .tg-s > .et_pb_row::after,
body.tg-home .tg-s > .et_pb_row::before { display: none; }
body.tg-home .tg-s > .et_pb_row + .et_pb_row { margin-top: clamp(48px, 6vw, 96px); }
body.tg-home .tg-s > .et_pb_row > .et_pb_column {
  width: auto !important;
  margin: 0 !important;
  float: none;
  min-width: 0;
  position: relative;
}

/* ------------------------------------------------------------------ moduli */
body.tg-home .tg-s .et_pb_column .et_pb_module { margin-bottom: 28px; }
body.tg-home .tg-s .et_pb_column .et_pb_image:has(+ .tg-didascalia) { margin-bottom: 14px; }
body.tg-home .tg-s .et_pb_column > .et_pb_module:last-child { margin-bottom: 0; }

/* I titoli hanno !important sui caratteri: così vincono sulle impostazioni dei moduli e dei preset di Divi,
   anche se nel builder è rimasta una dimensione impostata. */
body.tg-home .tg-s h1,
body.tg-home .tg-s h2,
body.tg-home .tg-s h3 {
  font-family: var(--tg-font) !important;
  font-weight: 600 !important;
  font-style: normal !important;
  color: var(--tg-titolo-colore) !important;
  text-transform: none !important;
  letter-spacing: -.012em !important;
  line-height: 1.06 !important;
  padding: 0;
  margin: 0 0 .6em;
  text-wrap: balance;
}
body.tg-home .tg-s h1 { font-size: var(--tg-h1) !important; line-height: 1 !important; letter-spacing: -.02em !important; }
body.tg-home .tg-s h2 { font-size: var(--tg-h2) !important; }
body.tg-home .tg-s h3 { font-size: var(--tg-h3) !important; font-weight: 400 !important; line-height: 1.25 !important; letter-spacing: 0 !important; margin-bottom: .5em; }
body.tg-home .tg-s h2:last-child,
body.tg-home .tg-s h3:last-child { margin-bottom: 0; }

body.tg-home .tg-s p,
body.tg-home .tg-s li {
  font-family: var(--tg-font);
  font-size: var(--tg-testo);
  font-weight: 400;
  line-height: 1.65;
  color: var(--tg-testo-colore);
}
body.tg-home .tg-s p { padding: 0; margin: 0 0 1em; max-width: 64ch; }
body.tg-home .tg-s p:last-child { margin-bottom: 0; }
body.tg-home .tg-s strong,
body.tg-home .tg-s b { font-weight: 600; color: inherit; }

body.tg-home .tg-s .et_pb_text a:not(.et_pb_button) {
  color: var(--tg-link-colore);
  text-decoration: underline;
  text-underline-offset: .2em;
}

body.tg-home .tg-s .tg-didascalia p {
  font-size: var(--tg-piccolo);
  line-height: 1.5;
  color: var(--tg-inchiostro-2);
}

/* immagini: angoli vivi, sempre piene */
body.tg-home .tg-s .et_pb_image { line-height: 0; max-width: none; width: 100%; }
body.tg-home .tg-s .et_pb_image .et_pb_image_wrap { display: block; width: 100%; }
body.tg-home .tg-s .et_pb_image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: cover;
}
body.tg-home .tg-parallax .et_pb_image_wrap { overflow: hidden; }
body.tg-home .tg-parallax img {
  transform: translate3d(0, calc(var(--tg-y, 0) * 26px), 0) scale(1.09);
  will-change: transform;
}

/* ------------------------------------------------------------------ pulsanti (modulo Pulsante di Divi) */
body.tg-home .tg-s .et_pb_column .et_pb_button_module_wrapper {
  display: inline-block;
  vertical-align: middle;
  margin: 12px 28px 0 0;
}
body.tg-home .tg-s .et_pb_column .et_pb_button_module_wrapper + .et_pb_text { margin-top: 28px; }
body.tg-home .tg-s .et_pb_button,
body.tg-home .tg-s .et_pb_button:hover {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 15px 28px !important;
  font-family: var(--tg-font) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: .01em;
  text-transform: none !important;
  color: var(--tg-btn-testo) !important;
  background: var(--tg-btn-fondo) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transition: background-color .25s var(--tg-ease), color .25s var(--tg-ease), transform .25s var(--tg-ease);
}
body.tg-home .tg-s .et_pb_button:hover { background: var(--tg-btn-fondo-hover) !important; }
body.tg-home .tg-s .et_pb_button:active { transform: translateY(1px); }
body.tg-home .tg-s .et_pb_button::before { display: none !important; }
body.tg-home .tg-s .et_pb_button::after { display: none !important; }

/* tg-link: pulsante come link di testo con freccia (Divi mette la classe sul link o sul contenitore) */
body.tg-home .tg-s .et_pb_button.tg-link,
body.tg-home .tg-s .tg-link .et_pb_button,
body.tg-home .tg-s .et_pb_button.tg-link:hover,
body.tg-home .tg-s .tg-link .et_pb_button:hover {
  padding: 13px 0 !important;
  background: transparent !important;
  color: var(--tg-link-colore) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: .35em;
}
body.tg-home .tg-s .et_pb_button.tg-link::after,
body.tg-home .tg-s .tg-link .et_pb_button::after {
  content: "" !important;
  display: inline-block !important;
  position: static !important;
  width: 22px;
  height: 11px;
  margin: 0 !important;
  opacity: 1 !important;
  font-size: 0 !important;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 6h22M17 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 6h22M17 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s var(--tg-ease);
}
body.tg-home .tg-s .et_pb_button.tg-link:hover::after,
body.tg-home .tg-s .tg-link .et_pb_button:hover::after { transform: translateX(5px); }

/* focus visibile */
body.tg-home .tg-s a:focus-visible,
body.tg-home .tg-s button:focus-visible {
  outline: var(--tg-focus-spessore) solid var(--tg-focus-colore) !important;
  outline-offset: var(--tg-focus-distanza);
}

/* ------------------------------------------------------------------ elenco delle sottopagine [tg_sottomenu] */
body.tg-home .tg-sublinks { margin-top: 8px; }
body.tg-home .tg-s .tg-sublinks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
body.tg-home .tg-s .tg-sublinks li { list-style: none; margin: 0; padding: 0; line-height: 1.3; }
body.tg-home .tg-s .tg-sublinks a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 10px 0;
  font-size: var(--tg-testo);
  font-weight: 400;
  color: var(--tg-titolo-colore);
  text-decoration: none;
  transition: color .25s var(--tg-ease);
}
body.tg-home .tg-s .tg-sublinks a::after {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 10px;
  background: var(--tg-accento);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 6h22M17 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 6h22M17 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s var(--tg-ease);
}
body.tg-home .tg-s .tg-sublinks a:hover { color: var(--tg-accento); }
body.tg-home .tg-s .tg-sublinks a:hover::after { transform: translateX(5px); }

/* ================================================================== 1. HERO */
body.tg-home .tg-hero.et_pb_section {
  min-height: calc(100svh - var(--tg-header));
  display: flex;
  align-items: flex-end;
  padding: 120px 0 clamp(44px, 8vh, 96px);
  overflow: hidden;
  background-color: var(--tg-nero);
  clip-path: inset(0 calc(var(--tg-p, 0) * var(--tg-bordo)) calc(var(--tg-p, 0) * 12vh) calc(var(--tg-p, 0) * var(--tg-bordo)));
}
/* velo scuro sotto il testo: z-index alto per stare sopra a qualunque sfondo messo da Divi (foto, video, parallasse) */
body.tg-home .tg-hero.et_pb_section::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 0;
  z-index: 50;
  opacity: 1;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(10, 9, 7, .82) 0%, rgba(10, 9, 7, .42) 42%, rgba(10, 9, 7, 0) 72%),
    linear-gradient(90deg, rgba(10, 9, 7, .5) 0%, rgba(10, 9, 7, 0) 62%);
}
body.tg-home .tg-hero .et_pb_section_video_bg {
  transform: scale(calc(1.06 - var(--tg-p, 0) * .06));
  transform-origin: 50% 70%;
}
body.tg-home .tg-hero > .et_pb_row {
  position: relative;
  z-index: 60;
  display: block;
  transform: translate3d(0, calc(var(--tg-p, 0) * -56px), 0);
  opacity: calc(1 - var(--tg-p, 0) * 1.5);
}
/* la colonna del testo prende tutta la riga, anche se nel builder la riga ha due colonne o il modulo una larghezza */
body.tg-home .tg-hero > .et_pb_row > .et_pb_column { width: 100% !important; max-width: none !important; }
body.tg-home .tg-hero > .et_pb_row > .et_pb_column_empty { display: none !important; }
body.tg-home .tg-hero .et_pb_text { width: auto !important; max-width: none !important; }
body.tg-home .tg-hero h1 { max-width: 11.5em; margin-bottom: .32em; }
/* sottotitolo grande; l'ultima riga (lo showroom) piccola. Se la riga dello showroom è in un modulo a sé, classe tg-nota */
body.tg-home .tg-hero p {
  font-size: clamp(18px, 16px + .55vw, 24px) !important;
  line-height: 1.4 !important;
  color: #fff !important;
  max-width: 30em;
}
body.tg-home .tg-hero p:empty { display: none; }
body.tg-home .tg-hero p:last-child:not(:first-of-type),
body.tg-home .tg-hero .tg-nota p {
  margin-top: .9em;
  font-size: var(--tg-piccolo) !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, .8) !important;
}
body.tg-home .tg-hero .et_pb_button.tg-link,
body.tg-home .tg-hero .tg-link .et_pb_button { color: #fff !important; }
html.tg-js body.tg-home .tg-hero .et_pb_text,
html.tg-js body.tg-home .tg-hero .et_pb_button_module_wrapper {
  animation: tg-sali 1.2s var(--tg-ease) both;
}
html.tg-js body.tg-home .tg-hero .et_pb_button_module_wrapper { animation-delay: .25s; }
html.tg-js body.tg-home .tg-hero .et_pb_button_module_wrapper + .et_pb_button_module_wrapper { animation-delay: .35s; }
@keyframes tg-sali {
  from { opacity: 0; transform: translate3d(0, 28px, 0); }
  to   { opacity: 1; transform: none; }
}

/* ================================================================== 2. INTRO */
body.tg-home .tg-intro > .et_pb_row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-auto-flow: row; }
body.tg-home .tg-intro > .et_pb_row > .et_pb_column:last-child {
  margin-top: calc(-1 * clamp(0px, 7vw, 128px) - var(--tg-sez)) !important;
  z-index: 3;
}
body.tg-home .tg-intro .et_pb_image img { aspect-ratio: 4 / 5; object-position: 35% 50%; }

/* ================================================================== 3. OUTDOOR (colonna ferma a sinistra, testo che scorre) */
body.tg-home .tg-outdoor > .et_pb_row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-auto-flow: row; }
body.tg-home .tg-outdoor > .et_pb_row > .et_pb_column:first-child {
  position: sticky;
  top: calc(var(--tg-header) + 40px);
}
body.tg-home .tg-outdoor .et_pb_image img { height: min(50vh, 460px); }
body.tg-home .tg-outdoor > .et_pb_row > .et_pb_column:last-child { padding-top: 8px; }

/* ================================================================== 4. PROGETTAZIONE (percorso in quattro passi) */
body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) { display: block; text-align: center; }
body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) h2 { max-width: 18em; margin-left: auto; margin-right: auto; }
body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) .et_pb_column .et_pb_button_module_wrapper { margin-right: 0; }
/* Divi mette text-align: left sul modulo Testo e sul Pulsante: qui il titolo e il link vanno centrati */
body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) .et_pb_module,
body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) .et_pb_text_inner,
body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) h2 { text-align: center !important; }
body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) .et_pb_button_module_wrapper { display: block; }
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row;
  column-gap: clamp(24px, 3vw, 48px);
  position: relative;
}
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row::before,
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  width: auto;              /* il clearfix di Divi mette width: 0 e visibility: hidden su ::after */
  visibility: visible;
  clear: none;
  line-height: normal;
  background: rgba(26, 24, 20, .12);
}
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row::after {
  background: var(--tg-bronzo);
  transform-origin: 0 50%;
  transform: scaleX(var(--tg-bar, 1));
}
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row > .et_pb_column { padding-top: 52px; }
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row > .et_pb_column::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 16px;
  height: 16px;
  z-index: 1;
  background: var(--tg-bronzo);
  transition: background-color .4s var(--tg-ease), transform .4s var(--tg-ease);
}
html.tg-js body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row > .et_pb_column:not(.is-on)::before {
  background: #a89f90;
  transform: scale(.7);
}
/* a capo forzati rimasti nei testi copiati: qui non servono e spezzano le righe nel punto sbagliato */
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row p br,
body.tg-home .tg-hero p br,
body.tg-home .tg-didascalia p br { display: none; }
body.tg-home .tg-progetto h3 { margin-bottom: .55em; }
body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row p { font-size: 16px; }

/* ================================================================== 5. INDOOR (foto che esce dal bordo destro) */
body.tg-home .tg-indoor > .et_pb_row { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); grid-auto-flow: row; align-items: center; }
body.tg-home .tg-indoor > .et_pb_row > .et_pb_column:last-child {
  margin-right: calc((100vw - min(var(--tg-max), var(--tg-larghezza) * 1vw)) / -2) !important;
}
body.tg-home .tg-indoor .et_pb_image img { aspect-ratio: 4 / 3; object-position: 40% 50%; }

/* ================================================================== 6. DECOR (foto che esce dal bordo sinistro) */
body.tg-home .tg-decor > .et_pb_row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-auto-flow: row; align-items: stretch; }
body.tg-home .tg-decor > .et_pb_row > .et_pb_column:first-child {
  margin-left: calc((100vw - min(var(--tg-max), var(--tg-larghezza) * 1vw)) / -2) !important;
}
body.tg-home .tg-decor > .et_pb_row > .et_pb_column:first-child .et_pb_image,
body.tg-home .tg-decor > .et_pb_row > .et_pb_column:first-child .et_pb_image_wrap { height: 100%; }
body.tg-home .tg-decor .et_pb_image img { height: 100%; min-height: 560px; }
body.tg-home .tg-decor > .et_pb_row > .et_pb_column:last-child { align-self: center; }

/* ================================================================== 7. MARCHI (nomi che scorrono, [tg_marchi]) */
body.tg-home .tg-marchi > .et_pb_row:not(.et_pb_row ~ .et_pb_row) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-auto-flow: row; align-items: end; }
body.tg-home .tg-marchi > .et_pb_row ~ .et_pb_row { width: 100%; display: block; }
body.tg-home .tg-marquee { position: relative; }
/* ogni riga di nomi va da bordo a bordo della finestra, qualunque sia la larghezza della riga Divi */
body.tg-home .tg-marquee__riga { overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); }
body.tg-home .tg-marquee__riga + .tg-marquee__riga { margin-top: 6px; }
body.tg-home .tg-marquee__track {
  display: flex;
  width: max-content;
  animation: tg-scorri var(--tg-dur, 70s) linear infinite;
}
body.tg-home .tg-marquee__riga--inversa .tg-marquee__track { animation-direction: reverse; }
body.tg-home .tg-s .tg-marquee__list {
  display: flex;
  gap: clamp(36px, 4.5vw, 72px);
  padding: 0 clamp(36px, 4.5vw, 72px) 0 0;
  margin: 0;
  list-style: none;
}
body.tg-home .tg-s .tg-marquee__list li {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: clamp(36px, 20.8px + 3.6vw, 80px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.015em;
  white-space: nowrap;
  color: var(--tg-chiaro);
}
body.tg-home .tg-s .tg-marquee__list li:nth-child(even) { color: var(--tg-chiaro-2); }
body.tg-home .tg-marquee:hover .tg-marquee__track,
body.tg-home .tg-marquee.is-ferma .tg-marquee__track { animation-play-state: paused; }
body.tg-home .tg-s .tg-marquee__pausa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 24px var(--tg-bordo) 0 auto;
  padding: 8px 0;
  font: 400 var(--tg-piccolo) / 1.2 var(--tg-font);
  color: var(--tg-chiaro);
  background: none;
  border: 0;
  cursor: pointer;
  float: right;
}
body.tg-home .tg-s .tg-marquee__pausa[hidden] { display: none; }
body.tg-home .tg-marquee__pausa svg { width: 16px; height: 16px; }
body.tg-home .tg-marquee::after { content: ""; display: block; clear: both; }
@keyframes tg-scorri { to { transform: translate3d(-50%, 0, 0); } }

/* ================================================================== 8. NATALE (foto ferma a destra) */
body.tg-home .tg-natale > .et_pb_row { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-auto-flow: row; }
body.tg-home .tg-natale > .et_pb_row > .et_pb_column:last-child {
  position: sticky;
  top: calc(var(--tg-header) + 40px);
}
body.tg-home .tg-natale .et_pb_image img { aspect-ratio: 4 / 5; max-height: calc(100vh - var(--tg-header) - 80px); }

/* stagione natalizia: il Villaggio sale al terzo posto, subito dopo la presentazione.
   La classe sull'html la mette lo script in testa alla pagina (date in tagoo-home.php). */
html.tg-stagione-natale body.tg-home .et_builder_inner_content { display: flex; flex-direction: column; }
html.tg-stagione-natale body.tg-home .et_builder_inner_content > .tg-hero  { order: -3; }
html.tg-stagione-natale body.tg-home .et_builder_inner_content > .tg-intro { order: -2; }
html.tg-stagione-natale body.tg-home .et_builder_inner_content > .tg-natale { order: -1; }

/* ================================================================== 9. SHOWROOM */
body.tg-home .tg-showroom > .et_pb_row:not(.et_pb_row ~ .et_pb_row) { display: block; }
body.tg-home .tg-showroom > .et_pb_row:not(.et_pb_row ~ .et_pb_row) h2 { max-width: 15em; font-size: clamp(32px, 17.6px + 3.4vw, 68px) !important; line-height: 1.02 !important; }
body.tg-home .tg-showroom > .et_pb_row ~ .et_pb_row { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); grid-auto-flow: row; }
body.tg-home .tg-showroom .et_pb_image img { aspect-ratio: 4 / 3; }
body.tg-home .tg-showroom > .et_pb_row ~ .et_pb_row > .et_pb_column:last-child .et_pb_button_module_wrapper { display: block; margin: 0 0 8px; }

/* ------------------------------------------------------------------ entrate allo scorrimento (classi messe da tagoo-home.js) */
html.tg-js body.tg-home .tg-rv {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .9s var(--tg-ease), transform .9s var(--tg-ease);
  transition-delay: calc(var(--tg-i, 0) * 90ms);
}
html.tg-js body.tg-home .tg-rv.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ tablet (Divi: fino a 980 px) */
@media (max-width: 980px) {
  body.tg-home .tg-s > .et_pb_row,
  body.tg-home .tg-intro > .et_pb_row,
  body.tg-home .tg-outdoor > .et_pb_row,
  body.tg-home .tg-indoor > .et_pb_row,
  body.tg-home .tg-decor > .et_pb_row,
  body.tg-home .tg-natale > .et_pb_row,
  body.tg-home .tg-marchi > .et_pb_row:not(.et_pb_row ~ .et_pb_row),
  body.tg-home .tg-showroom > .et_pb_row ~ .et_pb_row {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    row-gap: 40px;
  }
  body.tg-home .tg-intro > .et_pb_row > .et_pb_column:last-child { margin-top: 0 !important; }
  body.tg-home .tg-intro .et_pb_image img { aspect-ratio: 3 / 2; }

  body.tg-home .tg-outdoor > .et_pb_row > .et_pb_column:first-child { display: contents; position: static; }
  body.tg-home .tg-outdoor > .et_pb_row > .et_pb_column:first-child > .et_pb_module { margin: 0; }
  body.tg-home .tg-outdoor > .et_pb_row > .et_pb_column:first-child > .et_pb_module:first-child { order: 1; }
  body.tg-home .tg-outdoor > .et_pb_row > .et_pb_column:last-child { order: 2; padding-top: 0; }
  body.tg-home .tg-outdoor > .et_pb_row > .et_pb_column:first-child > .et_pb_module:not(:first-child) { order: 3; }
  body.tg-home .tg-outdoor > .et_pb_row { row-gap: 32px; }
  body.tg-home .tg-outdoor .et_pb_image img { height: auto; aspect-ratio: 3 / 2; }

  body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row::before,
  body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row::after { display: none; }
  body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row > .et_pb_column { padding-top: 32px; }
  body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row > .et_pb_column::before { top: 0; }
  html.tg-js body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row > .et_pb_column:not(.is-on)::before { background: var(--tg-bronzo); transform: none; }

  body.tg-home .tg-indoor > .et_pb_row > .et_pb_column:last-child,
  body.tg-home .tg-decor > .et_pb_row > .et_pb_column:first-child { margin-left: 0 !important; margin-right: 0 !important; }
  body.tg-home .tg-indoor .et_pb_image img,
  body.tg-home .tg-decor .et_pb_image img { min-height: 0; height: auto; aspect-ratio: 3 / 2; }
  body.tg-home .tg-decor > .et_pb_row > .et_pb_column:first-child .et_pb_image,
  body.tg-home .tg-decor > .et_pb_row > .et_pb_column:first-child .et_pb_image_wrap { height: auto; }
  body.tg-home .tg-decor > .et_pb_row > .et_pb_column:last-child { order: -1; }

  body.tg-home .tg-natale > .et_pb_row > .et_pb_column:last-child { position: static; }
  body.tg-home .tg-natale .et_pb_image img { aspect-ratio: 4 / 3; max-height: none; }
}

/* ------------------------------------------------------------------ telefono (Divi: fino a 767 px) */
@media (max-width: 767px) {
  body.tg-home .tg-hero.et_pb_section { padding-top: 96px; }
  /* con la barra di contatto in basso la hero si ferma sopra la barra */
  body.tg-home.tg-con-barra .tg-hero.et_pb_section { min-height: calc(100svh - var(--tg-header) - 64px); }
  body.tg-home .tg-s .et_pb_column .et_pb_button_module_wrapper { margin-right: 20px; }
  body.tg-home .tg-s .tg-sublinks ul { grid-template-columns: minmax(0, 1fr); }
  body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) { text-align: left; }
  body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) .et_pb_module,
  body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) .et_pb_text_inner,
  body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) h2 { text-align: left !important; }
  body.tg-home .tg-progetto > .et_pb_row:not(.et_pb_row ~ .et_pb_row) h2 { margin-left: 0; }
  body.tg-home .tg-progetto > .et_pb_row ~ .et_pb_row { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  body.tg-home .tg-s .tg-marquee__pausa { float: none; margin-left: var(--tg-bordo); }
}

/* ------------------------------------------------------------------ movimento ridotto e stampa */
@media (prefers-reduced-motion: reduce) {
  body.tg-home .tg-hero.et_pb_section { clip-path: none; }
  body.tg-home .tg-hero > .et_pb_row,
  body.tg-home .tg-hero .et_pb_section_video_bg,
  body.tg-home .tg-parallax img { transform: none; opacity: 1; }
  html.tg-js body.tg-home .tg-hero .et_pb_text,
  html.tg-js body.tg-home .tg-hero .et_pb_button_module_wrapper { animation: none; }
  html.tg-js body.tg-home .tg-rv { opacity: 1; transform: none; transition: none; }
  body.tg-home .tg-marquee__track { animation: none; width: auto; }
  body.tg-home .tg-s .tg-marquee__list { flex-wrap: wrap; row-gap: .1em; padding: 0 var(--tg-bordo); }
  body.tg-home .tg-marquee__list[aria-hidden="true"] { display: none; }
  body.tg-home .tg-s .tg-marquee__pausa { display: none; }
}
@media print {
  html.tg-js body.tg-home .tg-rv { opacity: 1; transform: none; }
  body.tg-home .tg-hero.et_pb_section { clip-path: none; }
}

/* testo solo per i lettori di schermo */
body.tg-home .tg-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
