/* =========================================================
   VIBROCEMENTI — CSS del tema
   Fonte: WIREFRAME HTML/styles.css (struttura) + style-guide.html
   (colori, tipografia, sistema, definitivi). Le classi sono
   prefissate vc- per non collidere col core di WordPress.
   ========================================================= */

:root {
  /* Colori: preset di theme.json con fallback letterale */
  --ink:        var(--wp--preset--color--ink, #141414);
  --ink-2:      var(--wp--preset--color--ink-2, #383838);
  --grey-1:     var(--wp--preset--color--grey-1, #6e6e6e);
  --grey-2:     var(--wp--preset--color--grey-2, #9b9b9b);
  --grey-3:     var(--wp--preset--color--grey-3, #cfcfcf);
  --grey-4:     var(--wp--preset--color--grey-4, #e6e6e4);
  --grey-5:     var(--wp--preset--color--grey-5, #f1f1ef);
  --grey-6:     var(--wp--preset--color--grey-6, #f7f7f5);
  --white:      var(--wp--preset--color--white, #ffffff);
  --bg:         var(--wp--preset--color--bg, #fbfbf9);
  --green:      var(--wp--preset--color--green, #16B051);
  --green-dark: var(--wp--preset--color--green-dark, #0E7A38);
  --green-deep: var(--wp--preset--color--green-deep, #0A5A2B);
  --green-tint: var(--wp--preset--color--green-tint, #E9F7EF);

  /* Tipografia: preset di theme.json con fallback letterale */
  --font-head: var(--wp--preset--font-family--head, "Space Grotesk", "Helvetica Neue", Arial, sans-serif);
  --font-body: var(--wp--preset--font-family--body, "Inter", "Helvetica Neue", Arial, sans-serif);

  /* Placeholder immagine (in attesa delle foto reali) */
  --ph:      #d4d4d2;
  --ph-dark: #bcbcba;

  /* Misure: nessun preset WP dietro, valori del wireframe */
  --maxw: 1600px;
  --gutter: 56px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 80px;

  --shadow-sm: 0 1px 2px rgba(20,20,20,.04), 0 2px 8px rgba(20,20,20,.04);
  --shadow:    0 4px 14px rgba(20,20,20,.06), 0 18px 40px rgba(20,20,20,.07);
  --shadow-lg: 0 10px 30px rgba(20,20,20,.10), 0 30px 60px rgba(20,20,20,.10);

  --t: 0.3s cubic-bezier(.2,.6,.2,1);
}

/* ---------- Reset mirato (non il selettore universale, tocca l'admin) ---------- */
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol, fieldset {
  margin: 0; padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wp-site-blocks img { max-width: 100%; display: block; }
.wp-site-blocks a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.vc-container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.vc-section { padding: 132px 0; }
.vc-section--tight { padding: 76px 0; }
.vc-section--grey { background: var(--grey-5); }
.vc-section--ink {
  background: var(--ink); color: var(--white);
  background-image: radial-gradient(120% 120% at 80% 0%, #232323 0%, #141414 60%);
}

.vc-num, .vc-stat .vc-num { font-family: var(--font-head); }

.vc-eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey-1); font-weight: 600; display: inline-block; margin-bottom: 22px;
}
.vc-section--ink .vc-eyebrow { color: var(--green); }

.vc-label-row {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--grey-1); font-weight: 600; margin-bottom: 28px;
}
.vc-label-row::before { content: ""; width: 36px; height: 1px; background: var(--grey-3); }
.vc-section--ink .vc-label-row { color: var(--green); }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; }

.vc-display { font-size: clamp(44px, 6.6vw, 100px); font-weight: 500; line-height: .98; letter-spacing: -.04em; }
.vc-h-xl { font-size: clamp(36px, 4.8vw, 68px); line-height: 1; letter-spacing: -.035em; font-weight: 500; }
.vc-h-lg { font-size: clamp(29px, 3.2vw, 46px); letter-spacing: -.03em; }
.vc-h-md { font-size: clamp(22px, 2.2vw, 31px); }
.vc-lead { font-size: clamp(17px, 1.4vw, 22px); color: var(--grey-1); line-height: 1.55; letter-spacing: -.01em; }
.vc-muted { color: var(--grey-1); }
.vc-section--ink .vc-muted { color: var(--grey-3); }

/* Parola accento nei titoli: <em> per restare modificabile in editor */
.vc-display em, .vc-h-xl em, .vc-h-lg em, .vc-h-md em {
  font-style: normal; font-weight: inherit; color: var(--green);
}

/* ---------- Bottoni ---------- */
.vc-btn,
.wp-block-button.vc-btn > .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 100px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--green); background: var(--green); color: var(--ink);
  cursor: pointer; transition: var(--t);
}
.wp-block-button.vc-btn > .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: var(--green-dark); color: var(--white); border-color: var(--green-dark);
}

.vc-btn--dark,
.wp-block-button.vc-btn.vc-btn--dark > .wp-block-button__link {
  background: var(--ink); color: var(--white); border-color: var(--ink);
}
.wp-block-button.vc-btn.vc-btn--dark > .wp-block-button__link:hover {
  background: var(--green); color: var(--ink); border-color: var(--green);
}

.vc-btn--ghost,
.wp-block-button.vc-btn.vc-btn--ghost > .wp-block-button__link {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.wp-block-button.vc-btn.vc-btn--ghost > .wp-block-button__link:hover {
  background: var(--ink); color: var(--white);
}

.vc-btn--light,
.wp-block-button.vc-btn.vc-btn--light > .wp-block-button__link {
  background: var(--white); color: var(--ink); border-color: var(--white);
}
.wp-block-button.vc-btn.vc-btn--light > .wp-block-button__link:hover {
  background: transparent; color: var(--white);
}

.vc-btn--outline-light,
.wp-block-button.vc-btn.vc-btn--outline-light > .wp-block-button__link {
  background: transparent; color: var(--white); border-color: rgba(255,255,255,.5);
}
.wp-block-button.vc-btn.vc-btn--outline-light > .wp-block-button__link:hover {
  background: var(--white); color: var(--ink); border-color: var(--white);
}

/* il wrapper generato da core/button non deve disegnare niente di suo */
.wp-block-button.vc-btn { background: transparent; border: 0; padding: 0; border-radius: 0; }

.vc-link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; letter-spacing: .02em; color: var(--green-dark);
  border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: var(--t);
  transform: translateY(0);
}
.vc-link-arrow:hover { transform: translateY(-3px); }
.vc-section--ink .vc-link-arrow { color: var(--green); }

/* Freccia isolata da assets/js/vibrocementi.js: si sposta a destra in hover
   sui link, segue il mouse nei bottoni (regola bottoni più sotto). */
.vc-arrow { display: inline-block; transition: transform .2s ease; }
.vc-link-arrow:hover .vc-arrow,
.vc-arrow-c:hover .vc-arrow { transform: translateX(5px); }

/* ---------- Placeholder immagine ---------- */
.vc-ph {
  background: linear-gradient(150deg, #b4b4b2 0%, #a6a6a4 55%, #9a9a98 100%);
  position: relative; overflow: hidden;
}
.vc-ph > .wp-block-image { position: absolute; inset: 0; margin: 0; height: 100%; }
.vc-ph > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.vc-ph--43 { aspect-ratio: 4/3; border-radius: var(--radius); }

/* ---------- Header ----------
   Fisso e sempre visibile su ogni pagina: sfondo bianco, bordo sotto.
   Diventa "scrolled" (classe aggiunta da assets/js/vibrocementi.js) non
   appena ci si stacca dalla cima: serve solo per il passaggio da
   trasparente a bianco in home, vedi sotto. */
.vc-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--grey-4);
  transition: border-color .3s ease;
}
/* Lo sfondo sfocato vive in uno pseudo-elemento e non sull'header stesso:
   backdrop-filter su un antenato "fixed" crea un containing block per
   ogni discendente position:fixed (il pannello del menu mobile compreso),
   che finirebbe intrappolato dentro i suoi 80px invece di coprire lo
   schermo. Il pseudo-elemento resta invisibile a questo meccanismo. */
.vc-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  transition: background .3s ease, backdrop-filter .3s ease;
}

/* ogni pagina interna comincia sotto l'header fisso */
main.wp-block-group { padding-top: var(--header-h); }
.vc-header__row { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 24px; }

.vc-header-right { display: flex; align-items: center; gap: 32px; }

.vc-brand { display: flex; align-items: center; gap: 12px; }
.vc-brand .wp-block-site-logo { margin: 0; }
.vc-brand .wp-block-site-logo img { display: block; max-height: 40px; width: auto; }

.vc-nav-links .wp-block-navigation__container { gap: 30px; }
.vc-nav-links .wp-block-navigation-item__content {
  font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink-2); transition: var(--t);
}
.vc-nav-links .wp-block-navigation-item__content:hover { color: var(--ink); }
.vc-nav-links .current-menu-item > .wp-block-navigation-item__content { color: var(--ink); }

/* voci di menu: fluttuano leggermente in su in hover */
.vc-nav-links .wp-block-navigation-item__content,
.vc-nav-links .wp-block-navigation-submenu__toggle {
  transform: translateY(0);
}
.vc-nav-links .wp-block-navigation-item__content:hover,
.vc-nav-links .wp-block-navigation-submenu__toggle:hover {
  transform: translateY(-3px);
}
/* freccina del sottomenu: segue sempre il colore del testo intorno */
.vc-nav-links .wp-block-navigation-submenu__toggle {
  color: var(--ink-2); transition: var(--t);
}
.vc-nav-links .wp-block-navigation-submenu__toggle:hover { color: var(--ink); }
.vc-nav-links .wp-block-navigation-submenu__toggle svg {
  fill: currentColor; stroke: currentColor;
}

.vc-header-cta { margin: 0; }

/* Megamenu: il sottomenu di "Manufatti" è un pannello con la griglia dei
   titoli a sinistra e un'immagine vera (assegnabile dalla Libreria media)
   a destra, invece della lista verticale stretta di default. */
@media (min-width: 721px) {
  .wp-block-navigation-item.vc-megamenu .wp-block-navigation__submenu-container {
    width: max-content;
    padding: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: var(--white);
    overflow: hidden;
  }
  /* "Business Areas" è l'ultima voce prima del bottone: il pannello si apre
     di default verso destra a partire dal bordo sinistro della voce, uscendo
     dal bordo pagina. Qui lo si ancora invece al bordo destro della voce,
     così si apre verso sinistra e resta dentro il contenitore. */
  .wp-block-navigation-item.vc-megamenu--end .wp-block-navigation__submenu-container {
    left: auto;
    right: 0;
  }
}
.vc-megamenu-panel { display: flex; gap: 28px; align-items: flex-start; padding: 26px; }
.vc-megamenu-links { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 2px 24px; flex: none; width: 320px; }
.vc-megamenu-links .wp-block-navigation-item__content { padding: 8px 0; white-space: normal; }
.vc-megamenu-image { flex: none; width: 220px; }
.vc-megamenu-image .wp-block-image { margin: 0; }
.vc-megamenu-image img { width: 220px; height: 280px; object-fit: cover; border-radius: var(--radius-sm); display: block; background: var(--grey-5); }

/* Menu mobile: non è un secondo blocco wp:navigation, ma markup statico
   (bottone hamburger + pannello a schermo intero con <details> per gli
   accordion). Il blocco Navigation di WP, riusato per un overlay come
   questo, perdeva le voci di primo livello e apriva un pannello mai a
   piena altezza: qui il markup è nostro, quindi prevedibile. Visibile
   solo sotto i 721px, la megamenu desktop resta quella di sempre sopra. */
.vc-mnav { display: none; }
@media (max-width: 720px) {
  .vc-nav-desktop { display: none; }
  .vc-mnav { display: block; }
  .vc-header-cta { display: none; }
}

.vc-mnav__toggle {
  width: 40px; height: 40px; padding: 0; border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.vc-mnav__toggle span { display: block; width: 22px; height: 2px; background: currentColor; color: var(--ink-2); }
body.home .vc-header:not(.vc-header--scrolled) .vc-mnav__toggle span { background: #fff; }

.vc-mnav__panel {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--white);
  visibility: hidden; opacity: 0;
  transition: opacity .25s ease, visibility 0s linear .25s;
  overflow-y: auto;
  padding: 24px var(--gutter) 40px;
}
.vc-mnav.is-open .vc-mnav__panel {
  visibility: visible; opacity: 1;
  transition: opacity .25s ease;
}
.vc-mnav__close {
  position: absolute; top: 22px; right: var(--gutter);
  width: 40px; height: 40px; border: 0; background: transparent;
  font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer;
}
.vc-mnav__list { display: flex; flex-direction: column; margin-top: 64px; }
.vc-mnav__list > a,
.vc-mnav__list details > summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--grey-4);
  font-family: var(--font-body); font-size: 20px; font-weight: 500; color: var(--ink);
  cursor: pointer; list-style: none;
}
.vc-mnav__list summary::-webkit-details-marker { display: none; }
.vc-mnav__list summary::after {
  content: "+"; font-family: var(--font-head); font-size: 20px; color: var(--grey-2); transition: transform .2s ease;
}
.vc-mnav__list details[open] summary::after { transform: rotate(45deg); }
.vc-mnav__sub { display: flex; flex-direction: column; padding: 4px 0 12px; }
.vc-mnav__sub a {
  padding: 12px 0; font-size: 16px; color: var(--grey-1);
}
html.vc-mnav-locked { overflow: hidden; }

/* Home: header trasparente sopra la hero scura, solo finché non si
   scrolla. Una volta passata la soglia (classe .vc-header--scrolled,
   aggiunta via JS) torna uguale alle pagine interne: sfondo bianco. */
body.home .vc-header:not(.vc-header--scrolled) {
  border-bottom: 0;
}
body.home .vc-header:not(.vc-header--scrolled)::before {
  background: transparent; backdrop-filter: none;
}
body.home .vc-header:not(.vc-header--scrolled) .wp-block-navigation-item__content,
body.home .vc-header:not(.vc-header--scrolled) .wp-block-navigation-submenu__toggle { color: #fff; }
body.home .vc-header:not(.vc-header--scrolled) .wp-block-navigation-item__content:hover,
body.home .vc-header:not(.vc-header--scrolled) .wp-block-navigation-submenu__toggle:hover { color: #fff; }

/* Home: la hero va comunque a contatto con la cima, sotto l'header fisso
   che qui è trasparente (main ha già un padding-top per le altre pagine). */
body.home main.wp-block-group { padding-top: 0; }

/* Il pannello del sottomenu ha sempre sfondo bianco, anche sull'header
   trasparente della home: il testo dentro resta sempre scuro, altrimenti
   sarebbe bianco su bianco (era il bug del megamenu invisibile). */
body.home .vc-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  color: var(--ink-2);
}
body.home .vc-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
  color: var(--ink);
}

/* ---------- Hero full-screen (home) ---------- */
.vc-hero { position: relative; min-height: 92vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.vc-hero > .vc-ph { position: absolute; inset: 0; }
.vc-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.4) 45%, rgba(0,0,0,.6) 100%);
}
.vc-hero__inner { position: relative; z-index: 2; width: 100%; padding-top: 80px; padding-bottom: 80px; }
.vc-hero h1 { max-width: 18ch; }
.vc-hero .vc-lead { color: rgba(255,255,255,.85); max-width: 52ch; margin-top: 24px; }
.vc-hero-actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Griglie ---------- */
.vc-grid { display: grid; gap: 28px; }
.vc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vc-grid-4 { grid-template-columns: repeat(4, 1fr); }

.vc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.vc-split--wide-right { grid-template-columns: .85fr 1.15fr; }
.vc-split--bottom { align-items: flex-end; }
.vc-split--top { align-items: flex-start; }

/* ---------- Card ---------- */
.vc-card {
  background: var(--white); border: 1px solid var(--grey-4);
  border-radius: var(--radius); overflow: hidden; transition: var(--t);
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.vc-card:hover { border-color: transparent; transform: translateY(-6px); box-shadow: var(--shadow); }
.vc-card .vc-ph { aspect-ratio: 4/3; }
.vc-card-body { padding: 24px; }
.vc-card-body h3 { font-size: 20px; margin-bottom: 8px; }
.vc-card-body p { color: var(--grey-1); font-size: 15px; }

.vc-p-cat { color: var(--grey-2); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

/* card categoria grande (home / prefabbricati) */
.vc-feature-card {
  position: relative; min-height: 480px; border-radius: var(--radius);
  overflow: hidden; display: flex; align-items: flex-end; color: #fff;
  box-shadow: var(--shadow-sm); transition: var(--t);
}
.vc-feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.vc-feature-card > .vc-ph { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.vc-feature-card:hover > .vc-ph { transform: scale(1.04); }
.vc-feature-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,.78) 100%);
}
.vc-fc-body { position: relative; z-index: 2; padding: 40px; }
.vc-fc-body h3 { font-size: clamp(26px,2.6vw,34px); margin-bottom: 10px; }
.vc-fc-body p { color: rgba(255,255,255,.85); max-width: 42ch; }

/* ---------- Numeri / stats ---------- */
.vc-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; }
.vc-stat { padding: 38px 30px; border-left: 1px solid var(--grey-3); }
.vc-stat:first-child { border-left: 0; padding-left: 0; }
.vc-section--ink .vc-stat { border-color: rgba(255,255,255,.2); }
.vc-stat .vc-num { font-size: clamp(40px, 4vw, 60px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.vc-stat .vc-lbl { margin-top: 12px; font-size: 14px; color: var(--grey-1); }
.vc-section--ink .vc-stat .vc-lbl { color: var(--grey-3); }

/* stat-card sovrapposta hero/sezione */
.vc-straddle { position: relative; z-index: 6; margin-top: -76px; }
.vc-stat-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden;
}
.vc-stat-card .vc-sc { padding: 34px 30px; border-left: 1px solid var(--grey-4); }
.vc-stat-card .vc-sc:first-child { border-left: 0; }
.vc-sc .vc-tile-corner {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--grey-2);
}
.vc-sc .vc-bignum {
  font-family: var(--font-head); font-weight: 500; font-size: clamp(34px, 3.4vw, 52px);
  line-height: .88; letter-spacing: -.04em; margin-top: 8px;
}
.vc-sc .vc-lbl { margin-top: 12px; font-size: 13px; color: var(--grey-1); }

/* ---------- Business areas: griglia bento, dimensioni miste ---------- */
.vc-areas { display: grid; grid-template-columns: repeat(12,1fr); gap: 20px; }
.vc-c-3 { grid-column: span 3; }
.vc-c-6 { grid-column: span 6; }
.vc-r-2 { grid-row: span 2; }

.vc-area {
  background: #fff; border: 1px solid var(--grey-4); border-radius: var(--radius);
  padding: 34px; min-height: 220px; display: flex; flex-direction: column; transition: var(--t);
}
.vc-area:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.vc-area .vc-area-no { font-size: 13px; color: var(--grey-2); font-weight: 600; }
.vc-area h3 { font-size: 24px; margin: auto 0 10px; }
.vc-area p { font-size: 14px; color: var(--grey-1); }

/* la tile in evidenza: sfondo scuro, numero grande al posto del testo */
.vc-area--fill {
  background: var(--ink); border-color: var(--ink); color: #fff;
  background-image: radial-gradient(120% 120% at 85% 10%, #242424 0%, #141414 60%);
}
.vc-area--fill .vc-area-no { color: rgba(255,255,255,.5); }
.vc-area--fill p { color: var(--grey-3); }
.vc-area--fill .vc-bignum {
  font-family: var(--font-head); font-weight: 500; color: var(--green);
  font-size: clamp(46px, 5vw, 90px); line-height: .88; letter-spacing: -.04em; margin: auto 0 14px;
}

/* ---------- Loghi / certificazioni ---------- */
.vc-logo-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 20px; align-items: center; }
.vc-logo-ph {
  height: 70px; border: 1px solid var(--grey-4); border-radius: var(--radius); background: var(--grey-6);
  display: flex; align-items: center; justify-content: center; color: var(--grey-2); font-size: 12px; letter-spacing: .1em;
}

/* ---------- Banda CTA ---------- */
.vc-cta-band { text-align: left; }
.vc-cta-band h2 { max-width: 18ch; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.vc-footer { background: var(--ink); color: #fff; padding: 90px 0 40px; }
.vc-footer .vc-muted { color: var(--grey-3); }
.vc-footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,.15); }
.vc-footer-top h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.vc-footer-top ul { list-style: none; margin: 0; padding: 0; }
.vc-footer-top li { margin-bottom: 12px; }
.vc-footer-top a { color: rgba(255,255,255,.82); font-size: 15px; transition: var(--t); }
.vc-footer-top a:hover { color: #fff; }
.vc-footer-brand p { color: rgba(255,255,255,.6); font-size: 14px; max-width: 34ch; margin-top: 16px; }
.vc-footer-mail { padding: 50px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.vc-footer-mail a {
  font-family: var(--font-head); font-size: min(5vw, 78px); font-weight: 600;
  letter-spacing: -.03em; color: #fff; white-space: nowrap;
}
.vc-footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; color: rgba(255,255,255,.5); font-size: 13px; flex-wrap: wrap; gap: 14px; }
.vc-footer-bottom a { color: rgba(255,255,255,.6); }

/* ---------- Utility ---------- */
.vc-mt-1 { margin-top: 12px; } .vc-mt-2 { margin-top: 24px; } .vc-mt-3 { margin-top: 40px; } .vc-mt-4 { margin-top: 64px; }
.vc-mb-2 { margin-bottom: 24px; } .vc-mb-3 { margin-bottom: 40px; }
.vc-maxw-40 { max-width: 40ch; } .vc-maxw-50 { max-width: 50ch; } .vc-maxw-60 { max-width: 60ch; }
.vc-flex { display: flex; } .vc-between { justify-content: space-between; } .vc-aic { align-items: center; } .vc-wrap { flex-wrap: wrap; }
.vc-gap-2 { gap: 24px; }
.vc-text-center { text-align: center; }

/* Filtri categoria dell'archivio prodotto: fascia sottile con bordo sotto */
.vc-shop-filters { padding: 30px 0; border-bottom: 1px solid var(--grey-4); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 28px; }
  .vc-grid-4 { grid-template-columns: repeat(2,1fr); }
  .vc-grid-3 { grid-template-columns: repeat(2,1fr); }
  .vc-footer-top { grid-template-columns: 1fr 1fr; }
  .vc-areas { grid-template-columns: repeat(6,1fr); }
  .vc-c-3 { grid-column: span 3; } .vc-c-6 { grid-column: span 6; } .vc-r-2 { grid-row: span 1; }
  .vc-stats { grid-template-columns: 1fr 1fr; }
  .vc-stat { border-left: 0; border-top: 1px solid var(--grey-3); padding-left: 0; }
  .vc-stat-card { grid-template-columns: repeat(2,1fr); }
  .vc-stat-card .vc-sc:nth-child(3) { border-left: 0; }
}
@media (max-width: 720px) {
  .vc-split, .vc-split--wide-right { grid-template-columns: 1fr; gap: 36px; }
  .vc-grid-2, .vc-grid-3, .vc-grid-4 { grid-template-columns: 1fr; }
  .vc-areas { grid-template-columns: 1fr; }
  .vc-c-3, .vc-c-6 { grid-column: span 1; } .vc-r-2 { grid-row: span 1; }
  .vc-stats { grid-template-columns: 1fr 1fr; }
  .vc-section { padding: 70px 0; }
  .vc-stat-card { grid-template-columns: 1fr 1fr; }
  .vc-straddle { margin-top: -110px; }
  .vc-flex.vc-wrap { row-gap: 16px; }
  .vc-logo-row { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Card con velo verde espandibile
   Titolo sempre leggibile su un velo verde parziale in fondo alla
   foto; in hover il velo si espande e mostra la descrizione (e il
   link, dove c'è). Usata da "Griglia manufatti" e "Produzioni".
   ========================================================= */
.vc-tile-veil { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); transition: box-shadow var(--t); cursor: pointer; }
.vc-tile-veil.is-open { box-shadow: var(--shadow); }
.vc-tile-veil > .vc-ph { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.vc-tile-veil.is-open > .vc-ph { transform: scale(1.05); }
/* :hover solo con un vero mouse: sul tocco resta "appiccicato" dopo il
   tap (niente mouseleave a spegnerlo), per questo lì comanda solo la
   classe .is-open aggiunta dal click in assets/js/vibrocementi.js. */
@media (hover: hover) and (pointer: fine) {
  .vc-tile-veil:hover { box-shadow: var(--shadow); }
  .vc-tile-veil:hover > .vc-ph { transform: scale(1.05); }
}
/* scrim permanente sulla foto, per scurirla leggermente e garantire un fondo
   leggibile sotto il velo qualunque sia la luminosità della foto reale */
.vc-tile-veil::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.28), rgba(0,0,0,0) 55%);
  pointer-events: none;
}
.vc-tile-veil__band {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: rgba(255,255,255,.92); padding: 16px 20px;
  border-top: 2px solid var(--green); transition: background .3s ease;
}
.vc-tile-veil__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vc-tile-veil__head h3 { font-size: 17px; color: var(--ink); }
.vc-tile-veil__plus { font-family: var(--font-head); font-size: 22px; line-height: 1; color: var(--ink); flex: none; display: inline-block; transition: transform .3s ease; }
.vc-tile-veil.is-open .vc-tile-veil__plus { transform: rotate(45deg); }
.vc-tile-veil__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.vc-tile-veil__more > div { overflow: hidden; }
.vc-tile-veil__more p { padding-top: 10px; font-size: 14px; color: var(--ink); }
.vc-tile-veil__more .vc-link-arrow { color: var(--ink); border-color: var(--ink); margin-top: 8px; }
.vc-tile-veil.is-open .vc-tile-veil__more { grid-template-rows: 1fr; }
@media (hover: hover) and (pointer: fine) {
  .vc-tile-veil:hover .vc-tile-veil__plus { transform: rotate(45deg); }
  .vc-tile-veil:hover .vc-tile-veil__more { grid-template-rows: 1fr; }
}

/* =========================================================
   Carosello orizzontale (Progetti realizzati)
   La prima card è allineata al bordo sinistro del container, il resto
   scorre oltre il bordo destro dello schermo: niente vc-container
   sulla pista, solo un padding sinistro calcolato per allinearsi.
   ========================================================= */
.vc-carousel-head { gap: 40px; }
/* piccolo aggiustamento ottico: il testo del link va allineato al centro
   visivo dei pulsanti tondi, non al centro della sua riga di testo */
.vc-carousel-head .vc-link-arrow { transform: translateY(2px); }
.vc-carousel-head .vc-link-arrow:hover { transform: translateY(-1px); }
.vc-carousel-nav { display: flex; gap: 10px; }
.vc-carousel-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--grey-3);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--ink); cursor: pointer; transition: var(--t); flex: none;
}
.vc-carousel-nav button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.vc-carousel {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-left: max(calc((100vw - var(--maxw)) / 2 + var(--gutter)), var(--gutter));
  padding-right: var(--gutter);
  /* overflow-x: auto forza anche l'overflow-y a tagliare: senza questo
     padding, il sollevamento della card e l'ombra in hover restano tagliati
     dal bordo del contenitore scorrevole */
  padding-top: 20px; padding-bottom: 50px;
  margin-top: 20px;
  scrollbar-width: none;
}
.vc-carousel::-webkit-scrollbar { display: none; }
.vc-carousel > .vc-card,
.vc-carousel > a.vc-card {
  flex: 0 0 auto; width: min(420px, 78vw); scroll-snap-align: start;
}
@media (max-width: 1024px) {
  .vc-carousel { padding-left: 28px; padding-right: 28px; }
}

/* =========================================================
   Componenti: pagine interne (manufatto, catalogo, progetto)
   ========================================================= */

/* immagine in evidenza dentro un riquadro .vc-ph, come le altre immagini */
.vc-ph > .wp-block-post-featured-image { position: absolute; inset: 0; margin: 0; height: 100%; }
.vc-ph > .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* Griglie prodotto/progetti (vibrocementi/griglia-prodotti, prodotti-correlati,
   progetti-correlati): get_the_post_thumbnail() stampa un <img> nudo, senza
   il wrapper .wp-block-image che le regole sopra si aspettano, quindi restava
   scalato "a contenere" invece di riempire il riquadro. */
.vc-ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; }

.vc-breadcrumb { font-size: 12px; letter-spacing: .08em; color: var(--grey-1); text-transform: uppercase; margin-bottom: 26px; }
.vc-breadcrumb a:hover { color: var(--ink); }
.vc-breadcrumb .sep { margin: 0 8px; color: var(--grey-3); }

.vc-page-hero { padding: 70px 0 60px; border-bottom: 1px solid var(--grey-4); }

/* Lista categorie stile accordion (Prefabbricati → "Il nostro approccio") */
.vc-cat-list { border-top: 1px solid var(--grey-3); }
.vc-cat-row {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 24px; align-items: center;
  padding: 30px 0; border-bottom: 1px solid var(--grey-3); transition: var(--t);
}
.vc-cat-row:hover { padding-left: 12px; }
.vc-cat-no { font-size: 14px; color: var(--grey-2); font-weight: 600; }
.vc-cat-row h3 { font-size: clamp(22px, 2.4vw, 32px); }
.vc-cat-row p { color: var(--grey-1); font-size: 15px; margin-top: 6px; }
.vc-arrow-c { font-size: 22px; color: var(--grey-1); }

/* Catalogo: chip categoria */
.vc-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.vc-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border: 1px solid var(--grey-3); border-radius: 100px; font-size: 13px; color: var(--ink-2);
  transition: var(--t);
}
.vc-chip:hover, .vc-chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Catalogo: griglia prodotto */
.vc-product-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.vc-product {
  border: 1px solid var(--grey-4); border-radius: var(--radius); overflow: hidden;
  background: #fff; transition: var(--t); display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.vc-product:hover { border-color: transparent; transform: translateY(-6px); box-shadow: var(--shadow); }
.vc-product .vc-ph { aspect-ratio: 1/1; }
.vc-product .vc-p-body { padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 6px; }
.vc-product h3 { font-size: 17px; }
.vc-product h3 a:hover { text-decoration: underline; }

/* Scheda manufatto (PDP) */
.vc-pdp { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.vc-pdp-gallery { display: grid; grid-template-columns: 80px 1fr; gap: 16px; }
.vc-pdp-main .vc-ph { aspect-ratio: 4/4; border-radius: var(--radius); }
.vc-spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.vc-spec-table td { padding: 13px 0; border-bottom: 1px solid var(--grey-4); font-size: 14px; }
.vc-spec-table td:first-child { color: var(--grey-1); width: 45%; }
.vc-spec-table td:last-child { font-weight: 500; }

@media (max-width: 1024px) {
  .vc-product-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .vc-product-grid { grid-template-columns: 1fr; }
  .vc-pdp { grid-template-columns: 1fr; }
  .vc-pdp-gallery { grid-template-columns: 1fr; }
}

/* Timeline (Chi Siamo → Missione e percorso) */
.vc-timeline { border-left: 1px solid var(--grey-3); margin-left: 8px; }
.vc-tl-item { padding: 0 0 46px 36px; position: relative; }
.vc-tl-item::before {
  content: ""; position: absolute; left: -6px; top: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--ink);
}
.vc-tl-item:last-child { padding-bottom: 0; }
.vc-tl-year { font-family: var(--font-head); font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.vc-tl-item p { color: var(--grey-1); margin-top: 6px; max-width: 60ch; }

/* Galleria (Chi Siamo → banda immagine): stesso arrotondamento del resto
   del sito, foto ritagliate a riempire la cella invece di deformarsi. */
.vc-gallery.wp-block-gallery { gap: 20px; }
.vc-gallery .wp-block-image { border-radius: var(--radius); overflow: hidden; }
.vc-gallery .wp-block-image img { border-radius: 0; }

/* Il Gruppo (Chi Siamo): niente box/card, solo il logo di ogni azienda,
   non ritagliato (un logo va mostrato intero, non "coperto" come una foto). */
.vc-group-co { display: flex; flex-direction: column; }
.vc-group-logo { max-width: 160px; margin: 0 0 20px; }
.vc-group-logo img { width: 100%; height: auto; object-fit: contain; }
.vc-group-co h3 { font-size: 20px; margin-bottom: 8px; }
.vc-group-co p { color: var(--grey-1); font-size: 15px; }

/* =========================================================
   Adattamenti al DOM di WordPress
   ========================================================= */

/* il wrapper del template part non deve generare un box proprio */
.wp-block-template-part { display: contents; }

/* header fisso: scende sotto la barra di amministrazione */
body.admin-bar .vc-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .vc-header { top: 46px; } }

/* nell'editor l'header fisso coprirebbe il contenuto e non si potrebbe selezionare */
.editor-styles-wrapper .vc-header,
.editor-styles-wrapper body.home .vc-header {
  position: relative; top: 0; left: auto; right: auto;
}

/* core/navigation gestisce da solo hamburger e overlay sotto la soglia
   mobile: nessuna regola qui deve nascondere .wp-block-navigation__container,
   altrimenti sparisce anche il pulsante che apre il menu. */

/* =========================================================
   Animazioni d'ingresso
   Progressive enhancement: senza JS (o senza IntersectionObserver)
   html non ha la classe .vc-js e il contenuto resta sempre visibile.
   ========================================================= */
html.vc-js .vc-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s cubic-bezier(.2,.6,.2,1), transform 1.1s cubic-bezier(.2,.6,.2,1);
  transition-delay: .1s;
}
html.vc-js .vc-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  html.vc-js .vc-reveal {
    opacity: 1; transform: none; transition: none;
  }
}
