/* Garofalo Ristrutturazioni — anteprima statica (Netlify) */
:root {
  /* Design token globali (fedeltà all'originale) */
  --color-accent: #E65100;          /* bottoni e CTA */
  --color-accent-dark: #c44500;     /* hover */
  --color-light: #e8f1f2;           /* header, hero, riquadri */
  --color-title: #007090;           /* titoli dei riquadri */
  --card-light-40: rgba(232, 241, 242, .4);   /* riquadri chiari "soft" (primo giro) */
  --color-tile-bg: rgba(232, 241, 242, .84);  /* riquadri chiari Chi siamo/Servizi: da tab.png (≈ #e7eeec sulla texture) */
  --card-light: rgba(232, 241, 242, .9);      /* riquadri chiari pagine servizio (come screenshot) */
  --card-teal: rgba(0, 112, 144, .86);        /* riquadri blu */
  --pill-teal: #3f8ea6;                       /* pillole "Perché sceglierci" */
  --overlay-warm: #F4F0EE;                    /* overlay texture (colore globale Elementor 9042db2) */
  --overlay-white: #FFFFFF;
  --faq-line: var(--color-title);             /* separatori FAQ (domande.png) */
  --faq-line-light: #d6e4e8;

  /* Scala titoli: H2 di sezione +25% circa su desktop rispetto alla versione precedente */
  --fs-h2: clamp(1.85rem, 3.8vw, 2.9rem);
  --fs-display: clamp(2.1rem, 5vw, 3.6rem);   /* titoli delle sezioni con texture */

  --blue: var(--color-title);
  --blue-dark: #00546c;
  --blue-ink: #0d2c38;
  --orange: var(--color-accent);
  --orange-dark: #b23d00;
  --line: #e3ddd2;
  --ink: #1d2529;
  --muted: #56646b;
  --white: #fff;
  --radius: 14px;
  --radius-card: 24px;
  --container: 1180px;
  --shadow: 0 1px 2px rgba(13,44,56,.06), 0 8px 24px rgba(13,44,56,.06);
  --shadow-card: 0 8px 22px rgba(0,0,0,.18);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; color: var(--blue-ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.container--prose { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue-ink); color: #fff; padding: 10px 14px; z-index: 200; }
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 3px; }

/* Preview banner */
.preview-bar { background: var(--blue-ink); color: #cfe3ea; font-size: 13px; text-align: center; padding: 6px 16px; }

/* ------------------------------------------------------------------ Bottoni
   .btn--primary = bottone principale arancione #E65100.
   Testo 19px bold = "testo grande" WCAG: il bianco su #E65100 (3,8:1) rispetta l'AA. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 1.1875rem; line-height: 1.2; text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s; cursor: pointer; font-family: inherit; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-accent); color: #fff; box-shadow: 0 4px 12px rgba(230,81,0,.25); }
.btn--primary:hover { background: var(--color-accent-dark); }
.btn--ghost { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--ghost:hover { background: var(--blue); color: #fff; }
.btn--outline { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; font-weight: 600; font-size: 1.05rem; padding: 15px 48px; }
.btn--outline:hover { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------------ Header (sfondo #e8f1f2) */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-light); border-bottom: 1px solid rgba(0,112,144,.12); }
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.site-logo { flex-shrink: 0; }
@media (max-width: 359px) { .site-logo { flex-shrink: 1; min-width: 0; } }   /* compromesso a 320px: il logo si riduce (~118px) per non toccare il bordo */
.site-logo img { width: 134px; height: auto; }   /* +20% (era 112px) */
.site-nav { margin-left: auto; }
.site-nav > ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a { display: block; padding: 10px 11px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.has-sub { position: relative; }
.has-sub > ul { position: absolute; top: 100%; left: 0; min-width: 260px; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; }
.has-sub:hover > ul, .has-sub:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
.header-cta { padding: 10px 18px; font-size: 1.1875rem; white-space: nowrap; }
/* Pulsanti social nell'header */
.header-social { display: flex; gap: 0; }
/* icone minimal: nessuno sfondo/bordo, stesso colore del testo del menu; area cliccabile 40px */
.social-btn { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; color: var(--ink); background: none; border: 0; transition: color .2s, opacity .2s; }
.social-btn:hover { color: var(--blue); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--blue-ink); margin: 6px 0; transition: .2s; }

@media (max-width: 1180px) and (min-width: 961px) {
  .site-nav a { padding: 10px 8px; font-size: 14.5px; }
  .header-cta { padding: 9px 14px; }
}
@media (max-width: 960px) {
  .nav-toggle { display: block; order: 3; margin-left: 4px; }
  .header-social { margin-left: auto; }
  .header-cta { display: none; }
  .site-nav { position: fixed; top: var(--nav-top, 76px); left: 0; right: 0; bottom: 0; background: #fff; padding: 16px; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; margin: 0; }
  .site-nav.is-open { transform: none; visibility: visible; }
  .site-nav > ul { flex-direction: column; align-items: stretch; }
  .site-nav a { font-size: 18px; padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .has-sub > ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; min-width: 0; }
  .site-nav:not(.is-open) .has-sub > ul { visibility: hidden; } /* menu chiuso: sottomenu non raggiungibile con Tab (BUG-07) */
  .site-nav .btn { margin-top: 16px; width: 100%; color: #fff; border-bottom: 0; border-radius: 999px; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 961px) { .site-nav .nav-cta-mobile { display: none; } }

/* ------------------------------------------------------------------ Hero (sfondo #e8f1f2) */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); background: var(--color-light); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 14px; }
.hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__img img { width: 100%; border-radius: var(--radius); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.hero__facts strong { color: var(--blue-ink); font-size: 1.25rem; display: block; }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } .hero__img { order: -1; } }

/* ------------------------------------------------------------------ Sezioni */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding-top: clamp(32px, 4vw, 48px); }
.section--light { background: var(--color-light); }
.section__head { max-width: 760px; margin-bottom: 40px; }
.section__head p { color: var(--muted); font-size: 1.1rem; }
.section__head--center { max-width: 1040px; margin-inline: auto; text-align: center; }
.section__head--center p { max-width: 62ch; margin-inline: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split img { border-radius: var(--radius); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Sezioni con texture
   .feature + .feature--<texture>. Overlay come nel sito Elementor originale: ::before sotto i contenuti,
   colore e opacità per sezione (valori letti dai CSS post-*.css, regola "--overlay-opacity"). */
.feature { position: relative; isolation: isolate; background-color: #c9cfd1; background-size: cover; background-position: center; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--overlay-color, transparent); opacity: var(--overlay-opacity, 0); }
.feature--cemento  { background-image: url(../img/cemento.webp);  --overlay-color: var(--overlay-warm);  --overlay-opacity: .2; }   /* Home "I nostri servizi" */
.feature--effetto  { background-image: url(../img/effetto.webp);  --overlay-color: var(--overlay-warm);  --overlay-opacity: .2; background-color: #efe9df; }   /* Chi siamo "I nostri valori" */
.feature--cemento2 { background-image: url(../img/cemento2.webp); --overlay-color: var(--overlay-warm);  --overlay-opacity: .5; }   /* Ristrutturazioni e interni */
.feature--muro     { background-image: url(../img/muro.webp);     --overlay-color: var(--overlay-warm);  --overlay-opacity: .5; background-color: #eee; }   /* Esterni e facciate */
.feature--griglia  { background-image: url(../img/griglia.webp);  --overlay-color: var(--overlay-white); --overlay-opacity: .72; }  /* Impiantistica e comfort */
.feature--rete     { background-image: url(../img/rete.webp);     --overlay-color: var(--overlay-white); --overlay-opacity: .5; background-color: #eee; }   /* Progettazione */
.feature--mattonelle { background-image: url(../img/mattonelle.webp); --overlay-color: var(--overlay-white); --overlay-opacity: .35; background-color: #e6d3ad; }  /* I nostri lavori */
/* Sfondo fisso come nell'originale Elementor (background-attachment: fixed solo da 1025px in su).
   Fallback "scroll" su touch, sotto i 1025px e con prefers-reduced-motion. "I nostri lavori" nell'originale non era fisso. */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bg-fixed { background-attachment: fixed; }
}
/* Servizi: nell'originale la sezione non ha overlay; resta il velo bianco del primo giro (da confermare) */
.feature--granito  { background-image: url(../img/granito.webp);  --overlay-color: var(--overlay-white); --overlay-opacity: .3; }
.feature__title { font-size: var(--fs-display); line-height: 1.1; margin-bottom: .35em; }
.feature__title--teal { color: var(--color-title); text-shadow: 0 0 18px rgba(255,255,255,.95), 0 0 6px rgba(255,255,255,.9); }
.feature__title--white { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
/* Alone scuro morbido dietro i titoli bianchi sulle texture (Ristrutturazioni e interni):
   mantiene l'overlay originale Elementor e riporta il contrasto del testo bianco sopra 3:1 */
.feature { --halo: rgba(8, 22, 28, .62); }
.feature--cemento2 { --halo: rgba(8, 22, 28, .74); --halo-core: 72%; --halo-inset: -22% -12%; }   /* overlay originale più chiaro (0.5) */
.feature .feature__title--white { position: relative; display: table; margin-inline: auto; }   /* box aderente al testo */
.feature .feature__title--white::before {
  content: ""; position: absolute; z-index: -1; inset: var(--halo-inset, -18% -6%); pointer-events: none;
  background: radial-gradient(ellipse closest-side, var(--halo) 0%, var(--halo) var(--halo-core, 45%), rgba(8, 22, 28, 0) 100%);
  filter: blur(14px);
}
.feature .feature__title--white { text-shadow: 0 1px 3px rgba(0,0,0,.45), 0 2px 18px rgba(0,0,0,.4); }
/* Home "I nostri servizi": titolo bianco senza ombra né alone, senza sottotitolo (riquadri invariati) */
.feature--cemento .feature__title--white { text-shadow: none; }
.feature--cemento .feature__title--white::before { content: none; }
.feature__actions { text-align: center; margin: 40px 0 0; }

/* ------------------------------------------------------------------ Riquadri servizio (.tiles)
   Screenshot "i nostri servizi.png": riquadri verticali alternati chiaro/blu con il nome centrato. */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1040px; margin: 0 auto; list-style: none; padding: 0; }
.tile { aspect-ratio: 245 / 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 20px; border-radius: var(--radius-card); text-align: center; text-decoration: none; background: var(--card-light); color: var(--color-title); box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; }
.tile:nth-child(even) { background: var(--card-teal); color: #fff; }
.tile h3 { color: inherit; font-size: clamp(1.2rem, 1.6vw, 1.35rem); margin: 0; max-width: 12ch; }
.tile p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.tile:nth-child(even) p { color: #fff; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.tiles--soft .tile:nth-child(odd) { background: var(--color-tile-bg); }   /* opacità 40% solo sullo sfondo */
.tiles--desc .tile { aspect-ratio: auto; min-height: 300px; }
@media (max-width: 1024px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; } .tile { aspect-ratio: auto; min-height: 220px; } }
@media (max-width: 767px) { .tile { min-height: 160px; } .tiles--desc { grid-template-columns: 1fr; } .tiles--desc .tile { min-height: 0; padding: 32px 22px; } }

/* ------------------------------------------------------------------ Riquadri interventi (.icards)
   Pagine servizio: alternati chiaro/blu, icona grande in filigrana, titolo centrato. */
.icards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 1040px; margin: 0 auto; }
.icards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.icards--5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.icards--5 .icard { grid-column: span 2; }
.icards--5 .icard:nth-child(n+4) { grid-column: span 3; }
.icard { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: center; min-height: 290px; padding: 36px clamp(22px, 3vw, 40px); border-radius: var(--radius-card); background: var(--card-light); color: var(--ink); box-shadow: var(--shadow-card); }
.icard h3 { text-align: center; color: var(--color-title); font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin-bottom: .7em; }
.icard ul { margin: 0; padding-left: 1.1em; line-height: 1.65; font-size: 16px; }
.icard li { margin-bottom: .3em; }
.icard__icon { position: absolute; left: -4%; bottom: -6%; z-index: -1; width: 62%; max-width: 260px; height: auto; opacity: .14; pointer-events: none; }
.icard--teal { background: var(--card-teal); color: #fff; }
.icard--teal h3 { color: #fff; }
.icard--teal .icard__icon { filter: brightness(0) invert(1); opacity: .16; }
@media (max-width: 1024px) {
  .icards--3, .icards--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .icards--5 .icard, .icards--5 .icard:nth-child(n+4) { grid-column: auto; }
  .icards--5 .icard:last-child, .icards--3 .icard:last-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .icards, .icards--3, .icards--5 { grid-template-columns: 1fr; }
  .icard { min-height: 0; }
}

/* ------------------------------------------------------------------ "Come rinnoviamo il tuo appartamento"
   Screenshot come.png: sfondo blu, pillole con bordo bianco, numero e titolo centrati. */
.steps-section { background: var(--color-title); color: #fff; }
.steps-section .section__head p { color: #e6f3f6; }
.steps-section .feature__title { font-size: clamp(2rem, 4vw, 3.1rem); }
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 20px; max-width: 1160px; margin: 0 auto; padding: 0; list-style: none; }
.steps li { flex: 0 1 calc((100% - 40px) / 3); min-height: 102px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 32px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 60px; text-align: center; font-weight: 500; line-height: 1.3; }
.steps li:nth-child(n+4) { flex-basis: calc((100% - 40px) / 3 + 26px); }
.steps .num { display: block; font-size: 2rem; font-weight: 500; line-height: 1.1; margin-bottom: 4px; }
@media (max-width: 1024px) { .steps li, .steps li:nth-child(n+4) { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 767px) { .steps li, .steps li:nth-child(n+4) { flex-basis: 100%; min-height: 88px; } }

/* ------------------------------------------------------------------ "Perché scegliere" (screenshot perche.png) */
.why { background: #fff; }
.why__img img { max-width: min(100%, 440px); margin-inline: auto; border-radius: 0; }
.why__body { text-align: center; }
.why__body h2 { color: var(--color-title); font-size: clamp(1.15rem, 3.3vw, 2.5rem); }   /* ~ -14% rispetto all'H2 standard */
.why__body h2 span { display: block; white-space: nowrap; }                                 /* "Perché scegliere" / "Garofalo Ristrutturazioni?" */
@media (min-width: 861px) { .why .split { grid-template-columns: .85fr 1.15fr; } }
@media (max-width: 860px) { .why__body h2 { font-size: clamp(1.1rem, 5.9vw, 2.3rem); } }
.why-pills { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.why-pills li { background: var(--pill-teal); color: #fff; font-weight: 700; font-size: 1.1875rem; line-height: 1.3; padding: 11px 26px; border-radius: 999px; box-shadow: 0 5px 12px rgba(0,0,0,.2); }

/* ------------------------------------------------------------------ "I nostri valori" (Chi siamo) */
.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; list-style: none; margin: 0; padding: 0; }
.values li { padding: 32px 24px; text-align: center; background: var(--color-tile-bg); border-radius: var(--radius-card); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.values li > strong { display: block; color: var(--color-title); font-size: 1.3rem; line-height: 1.2; margin-bottom: 10px; }
.values span { color: var(--ink); font-size: 16px; }
@media (max-width: 1024px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .values { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Recensioni (carosello) */
.review { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.review__stars { color: #b07a00; letter-spacing: 2px; font-size: 18px; }
.review blockquote { margin: 10px 0 16px; color: var(--ink); font-size: 15.5px; }
.review figcaption { margin-top: auto; font-size: 14px; color: var(--muted); }
.review figcaption strong { color: var(--blue-ink); display: block; font-size: 15px; }
.rating-badge { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 700; margin-top: 8px; }
/* Home: sezione bianca, recensioni su azzurro chiaro */
.reviews-section { background: #fff; }
.reviews-section .review { background: var(--color-light); border-color: transparent; }
/* Niente scroll-behavior:smooth qui: con scroll-snap Chrome non registra più l'LCP della home (BUG-L01). Lo scorrimento
   morbido dei pulsanti e dell'autoplay lo chiede già site.js (behavior:'smooth'). */
.carousel__track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline-offset: 4px; }
.carousel__track .review { flex: 0 0 calc((100% - 36px) / 3); scroll-snap-align: start; }
.carousel__controls { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
/* Controlli delicati: niente bordi, neutro semitrasparente, area 44px, focus visibile globale */
.carousel__btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(13,44,56,.07); color: var(--blue-ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.carousel__btn:hover { background: rgba(13,44,56,.13); }
.carousel .ico-play, .carousel.is-paused .ico-pause { display: none; }
.carousel.is-paused .ico-play { display: block; }
@media (max-width: 1024px) { .carousel__track .review { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 767px) { .carousel__track .review { flex-basis: 88%; } }

/* ------------------------------------------------------------------ CTA (componente unico)
   Screenshot "Call to action.png": blu, logo ridotto bianco al 20%, testo centrato, bottone arancione. */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: var(--color-title); color: #fff; padding: clamp(56px, 7vw, 84px) 0; text-align: center; }
.cta-band::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 14%; width: min(78%, 1100px); aspect-ratio: 1200 / 288; transform: translateX(-50%); background: url(../img/logo-ridotto-bianco.webp) no-repeat center top / 100% auto; opacity: .2; pointer-events: none; }
.cta-band__inner { display: flex; flex-direction: column; align-items: center; }
.cta-band h2 .line { display: block; }   /* a capo controllato (Chi siamo) */
.cta-band h2:has(.line) { text-wrap: balance; }   /* solo titoli con a capo controllato (Chi siamo): evita parole orfane su mobile */
.cta-band h2 { color: #fff; max-width: 30ch; margin-bottom: .45em; }
.cta-band p { color: #fff; max-width: 46ch; font-size: 1.1rem; }
.cta-band .btn { margin-top: 10px; }
@media (max-width: 767px) { .cta-band::before { top: 10%; width: 96%; } }

/* ------------------------------------------------------------------ Aree */
/* Gerarchia come in dove.png: paesi principali in evidenza, secondari più piccoli e leggeri */
.areas-box { margin: 24px 0 0; padding: 24px 26px; background: var(--color-light); border-radius: var(--radius-card); text-align: center; }
.areas { list-style: none; padding: 0; margin: 0; }
.areas li { display: inline; }
.areas li:not(:last-child)::after { content: " • "; }
.areas--main { font-size: 1.15rem; font-weight: 700; line-height: 1.55; color: var(--ink); }
.areas--minor { margin-top: 14px; font-size: 1rem; font-weight: 400; line-height: 1.6; color: #3c474c; }
.areas--minor li:not(:last-child)::after { content: " · "; }

/* ------------------------------------------------------------------ Progetti (I nostri lavori) */
.project { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.project-section + .project-section:not(.feature) { padding-top: clamp(56px, 8vw, 104px); }
.project__meta { font-size: 14px; color: var(--orange-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.feature--mattonelle .project__text { background: rgba(255,255,255,.92); border-radius: var(--radius-card); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow-card); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; background: #e6f2f5; }
.gallery img:first-child { grid-column: span 2; aspect-ratio: 16/9; }
@media (max-width: 860px) { .project { grid-template-columns: 1fr; } }
.gallery__link { display: block; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.gallery__link:first-child { grid-column: span 2; }
.gallery__link img { transition: transform .35s ease; }
.gallery__link:hover img { transform: scale(1.03); }
.gallery .gallery__link:first-child img { aspect-ratio: 16/9; }
.gallery .gallery__link:not(:first-child) img { aspect-ratio: 4/3; }

/* ------------------------------------------------------------------ Lightbox (vanilla JS) */
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 56px 72px; background: rgba(8, 20, 26, .94); }
.lightbox[hidden] { display: none; }
.lightbox__fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox__img { max-width: min(100%, 1600px); max-height: calc(100vh - 160px); width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #0d2c38; }
.lightbox__cap { color: #dbe7eb; font-size: 15px; text-align: center; max-width: 70ch; }
.lightbox__count { position: absolute; top: 18px; left: 22px; margin: 0; color: #fff; font-weight: 700; font-size: 15px; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.lightbox__btn:hover { background: rgba(255,255,255,.24); }
.lightbox__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox__close { top: 10px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 767px) {
  .lightbox { padding: 64px 12px 84px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .lightbox__prev { left: calc(50% - 60px); } .lightbox__next { right: calc(50% - 60px); }
}

/* ------------------------------------------------------------------ Seguici sui social (I nostri lavori) */
.social-follow { padding: clamp(48px, 6vw, 72px) 0; text-align: center; background: var(--color-light); }   /* stacco da galleria (bianco) e CTA (blu) */
.social-follow h2 { color: var(--color-title); }
.social-follow p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.social-follow__links { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.social-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 6px; color: var(--ink); font-weight: 700; text-decoration: none; }
.social-chip svg { width: 24px; height: 24px; }
.social-chip:hover { color: var(--blue); }

/* ------------------------------------------------------------------ Articoli */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: #e6f2f5; }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }
.post-card__meta { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.post-card h3 { font-size: 1.2rem; }
.post-card h3 a { color: var(--blue-ink); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card h3 a:focus-visible { outline: none; }
.post-card:focus-within { outline: 3px solid var(--blue-ink); outline-offset: 3px; }
.post-card p { color: var(--muted); font-size: 15.5px; }
/* Segnaposto "Coming soon" */
.post-card--soon { pointer-events: none; }
.post-card--soon:hover { transform: none; box-shadow: none; }
.post-card__ph { aspect-ratio: 16 / 10; background: var(--color-title) url(../img/logo-ridotto-bianco.webp) no-repeat center / 62% auto; background-blend-mode: normal; opacity: .9; position: relative; }
.post-card__ph::after { content: ""; position: absolute; inset: 0; background: rgba(0,112,144,.8); }
.post-card .post-card__soon { font-size: 1.45rem; font-weight: 800; letter-spacing: .02em; color: var(--color-accent-dark); margin: 4px 0 6px; text-transform: uppercase; }
.post-card__more { margin-top: auto; align-self: flex-start; }
.btn--sm { padding: 9px 18px; }
.post-card:hover .post-card__more { background: var(--color-accent-dark); }
.badge { display: inline-block; background: #fff1e6; color: #8a3200; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--blue); }
.post-meta { color: var(--muted); margin: 0; }
.hero--article { padding-bottom: clamp(32px, 4vw, 48px); }
.hero--article h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.prose { font-size: 18px; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose ol { padding-left: 1.3em; }
.prose h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin-top: 1.4em; }
.prose__fig { margin: 32px 0; }
.prose__fig img { border-radius: var(--radius); width: 100%; max-height: 720px; object-fit: cover; }
.prose__table { overflow-x: auto; margin: 0 0 1.2em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 17px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--color-light); color: var(--color-title); }
.prose__img { border-radius: var(--radius); margin-bottom: 28px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.prose__img--intera { aspect-ratio: auto; height: auto; }   /* copertina: "copertina: intera" nel front matter, foto senza ritaglio */
@media (max-width: 1024px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .posts { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ FAQ (titolo e sottotitolo centrati) */
/* Sfondo per pagina, scelto in faq_section(bg=...) per staccarsi dalla sezione sopra:
   .faq = bianco (default), .faq--light = azzurro chiaro con il separatore chiaro rinforzato */
.faq { --faq-bg: var(--white); background: var(--faq-bg); }
.faq--light { --faq-bg: var(--color-light); --faq-line-light: rgba(0, 112, 144, .28); }
/* Due colonne indipendenti come in domande.png: allineate in alto, una colonna sotto i 768px */
.faq__list { max-width: 1220px; margin-inline: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 7vw, 110px); align-items: start; }
.faq__col { border-top: 1px solid var(--faq-line-light); }
.faq__item { border-bottom: 1px solid var(--faq-line); }
.faq__item summary { list-style: none; cursor: pointer; padding: 26px 52px 26px 0; position: relative; }
@media (max-width: 767px) { .faq__list { grid-template-columns: 1fr; } .faq__col + .faq__col { border-top: 0; } }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { margin: 0; font-size: 1.1rem; font-weight: 400; line-height: 1.55; letter-spacing: 0; color: var(--ink); }
.faq__item summary::after { content: ""; position: absolute; right: 4px; top: 28px; width: 26px; height: 26px; color: #555;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; transition: background-size .2s; }
.faq__item[open] summary::after { background-size: 100% 1.5px, 1.5px 0; }   /* "+" diventa "−" */
.faq__item p { color: var(--muted); padding-bottom: 20px; margin: 0; max-width: 72ch; }

/* ------------------------------------------------------------------ Contatti (screenshot contatti.png) */
.contact-page { padding-top: clamp(32px, 4vw, 48px); background: linear-gradient(180deg, var(--color-light) 0%, #fff 32%, #fff 45%, var(--color-light) 100%); }
.contact-page__title, .form__title { text-align: center; color: var(--color-title); }
.contact-page__title { font-size: clamp(1.8rem, 3vw, 2.2rem); }
.contact-channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; max-width: 920px; margin: 36px auto 0; padding: 0; list-style: none; text-align: center; }
.contact-channels a { display: flex; flex-direction: column; align-items: center; gap: 0; color: var(--color-title); text-decoration: none; font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.contact-channels a:hover span { text-decoration: underline; }
/* le icone SVG originali hanno molto margine interno nel viewBox */
.contact-channels img { width: 96px; height: 96px; margin: -14px 0 -10px; }
.contact-page__note { text-align: center; color: var(--muted); font-size: 15px; margin-top: 18px; }
.form__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: clamp(48px, 7vw, 88px) 0 24px; }
.form { position: relative; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 36px; }
.form .field { margin-bottom: 26px; }
.form input, .form textarea { width: 100%; padding: 12px 16px; border: 0; border-bottom: 1.5px solid #333; border-radius: 0; font: inherit; font-size: 16px; background: transparent; color: var(--ink); }
.form input::placeholder, .form textarea::placeholder { color: #5f6b70; }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--color-title); box-shadow: 0 2px 0 var(--color-title); }
.form textarea { resize: vertical; min-height: 120px; }
.form .hp { position: absolute; left: -9999px; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 10px; }
.form__check { display: flex; align-items: center; font-size: 15px; }
.form__check input { width: 20px; height: 20px; margin: 0 10px 0 0; accent-color: var(--color-title); }
.form small { color: var(--muted); display: block; margin-top: 14px; text-align: right; }
@media (max-width: 767px) {
  .contact-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .contact-channels a { font-size: 14px; }
  .form__title br { display: none; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .form__actions { flex-direction: column; align-items: stretch; }
  .form small { text-align: left; }
}

/* ------------------------------------------------------------------ Footer */
.site-footer { background: #0a222c; color: #b9cbd2; padding: 64px 0 28px; font-size: 15px; }
.site-footer__grid > div:first-child img { width: 150px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer__title { color: #fff; font-weight: 700; margin-bottom: 10px; }
.site-footer address { font-style: normal; }
.footer-link { display: flex; align-items: center; gap: 10px; padding: 3px 0; width: fit-content; }
.footer-link svg { flex: none; width: 18px; height: 18px; color: #b9cbd2; }
/* "Seguici": solo icone, affiancate, area cliccabile 44px allineata a sinistra con la colonna */
.footer-social { display: flex; gap: 8px; margin: 2px 0 0 -11px; }
.footer-social__link { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: background .2s; }
.footer-social__link:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.footer-social__link svg { width: 22px; height: 22px; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Barra contatto rapido (mobile) */
.callbar { display: none; }
@media (max-width: 640px) {
  .callbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .callbar a { padding: 13px 8px; text-align: center; font-weight: 700; font-size: 1.1875rem; text-decoration: none; }
  .callbar a:first-child { background: #fff; color: var(--blue); }
  .callbar a:last-child { background: var(--color-accent); color: #fff; }
  body { padding-bottom: 56px; }
  /* Pulsante preferenze cookie di iubenda sopra la barra (alta fino a ~87 px a 375 px), non sopra «Preventivo gratuito» (BUG-L05).
     Stesso selettore di iubenda + body: serve a superare il suo margin:16px !important. */
  body .iubenda-tp-btn:not(.iubenda-floatable-tb-btn)[data-tp-float]:not([data-tp-anchored]) { margin-bottom: 103px !important; }
}

/* ------------------------------------------------------------------ Animazioni di ingresso
   Stato iniziale nascosto SOLO con JS attivo (html.js): senza JS il contenuto è visibile.
   :where() tiene bassa la specificità, così gli hover dei riquadri continuano a funzionare.
   Solo opacity/transform: nessun layout shift. Hero: solo traslazione leggera (nessun ritardo sul LCP). */
.js :where([data-anim]) { opacity: 0; transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
.js :where([data-anim="up"]) { transform: translateY(20px); }
.js :where([data-anim="left"], [data-anim="fade-left"]) { transform: translateX(-24px); }
.js :where([data-anim="right"]) { transform: translateX(24px); }
.js :where([data-anim="hero"]) { opacity: 1; transform: translateX(-12px); transition-duration: .45s; }
.js :where([data-anim].is-in) { opacity: 1; transform: none; }
.posts__cell { display: flex; }
.posts__cell > .post-card { flex: 1; }
.icard { transition: box-shadow .25s ease; }
.icard:hover { box-shadow: 0 14px 30px rgba(0,0,0,.24); }   /* hover discreto */
@media (prefers-reduced-motion: reduce) { .js :where([data-anim]) { opacity: 1; transform: none; transition: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
