/* ==========================================================================
   Val.Tra.Log. — site stylesheet
   Recreates the look of the old FactoryPress/WPBakery theme (PLAN.md Appendix C)
   without Bootstrap, jQuery or page-builder CSS.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/oswald-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/oswald-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/oswald-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/open-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/open-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/open-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/open-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/open-sans-latin-700-italic.woff2") format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  --yellow: #fbca00;
  --yellow-hover: #fbd500;
  --navy: #012f5d;
  --navy-bg: #09325b;
  --navy-overlay: rgba(9, 50, 91, .9);
  --navy-hover: rgba(9, 29, 49, .9);
  --banner-overlay: rgba(0, 23, 45, .85);
  --menu-bg: #1d1d1b;
  --footer-bg: #252525;
  --footer-text: #f4f4f4;
  --text: #333;
  --muted: #9e9e9e;
  --title: #272727;
  --h1: #1e1e1e;
  --h2: #1c4166;
  --h3: #222;
  --border: #f4f4f4;
  --partner-rule: #f7be68;
  --link: #337ab7;

  --font-title: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-body: "Open Sans", Arial, Helvetica, sans-serif;

  --container: 1170px;
  --gutter: 15px;
  --section: 80px;
  --ease-out: cubic-bezier(.215, .61, .355, 1); /* GSAP Power3.easeOut */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 60px; }
body {
  margin: 0;
  font: 400 16px/28px var(--font-body);
  color: var(--text);
  background: #fff;
}
img, svg, picture { max-width: 100%; }
img { height: auto; display: block; }
picture { display: block; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
p { margin: 0 0 15px; }
strong, b { font-weight: 700; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 15px; line-height: 1.2; }
h1 { font: 500 52px/1.1 var(--font-title); color: var(--h1); }
h2 { font: 500 30px/1.1 var(--font-title); color: var(--h2); }
h3, h4, h5, h6 { font-family: var(--font-body); font-weight: 600; color: var(--h3); }
h1 strong, h2 strong { font-weight: 700; }
blockquote {
  margin: 0 0 20px;
  padding: 10px 20px;
  border-left: 5px solid #eee;
  font-size: 16px;
}
blockquote p:last-child, blockquote ul:last-child { margin-bottom: 0; }
ul { margin: 0 0 15px; padding-left: 20px; }
.icon { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: -.125em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--yellow); color: var(--navy); padding: 8px 16px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.text-center { text-align: center; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section) 0; }
.section--first { padding-top: 50px; }
.spaced-top { margin-top: 40px; }

.grid-2, .grid-3 { display: grid; gap: 30px; align-items: center; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 50px; align-items: start; }
.grid-2--top, .grid-3--top { align-items: start; }

.prose > :last-child { margin-bottom: 0; }
.light { font-weight: 300; }

/* Separators (WPBakery vc_separator) */
.sep { border: 0; border-top: 1px solid var(--yellow); margin: 0 auto; }
.sep--40 { width: 40%; }
.sep--30 { width: 30%; }
.sep--left { margin: 20px 0 50px; }
.sep--spaced { margin: 40px auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; cursor: pointer;
  font: 700 16px/1 var(--font-body); text-transform: uppercase;
  padding: 14px 20px; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.btn:hover, .btn:focus-visible { text-decoration: none; }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover, .btn-yellow:focus-visible { background: var(--yellow-hover); color: #000; }
.btn-lg { font-size: 16px; padding: 18px 25px; }
.btn-outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 40; background: #fff; }
.header-top {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding-top: 26px; padding-bottom: 26px;
}
.logo { position: relative; flex: 0 0 auto; }
.logo img { width: 318px; }
.header-info { display: flex; gap: 60px; list-style: none; margin: 0; padding: 0; }
.header-info li { display: flex; align-items: center; gap: 14px; }
.header-info picture { flex: 0 0 41px; }
.header-info img { width: 41px; }
.header-info a { color: #555; display: flex; flex-direction: column; font-size: 16px; line-height: 28px; }
.header-info a:hover { color: var(--navy); text-decoration: none; }

.main-nav { background: var(--menu-bg); height: 50px; position: relative; z-index: 45; }
.main-nav .container { height: 100%; position: relative; }
.menu { display: flex; list-style: none; margin: 0; padding: 0; height: 100%; }
.menu li { position: relative; }
.menu li + li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 24px; margin-top: -12px;
  background: url("/assets/css-img/menu-border.png") center / 1px 24px no-repeat, rgba(255, 255, 255, .08);
}
.menu a {
  display: flex; align-items: center; height: 50px; padding: 0 23px;
  font: 700 16px/1 var(--font-title); letter-spacing: .04em; text-transform: uppercase;
  color: #fff; text-decoration: none; transition: color .2s, background-color .2s;
}
.menu a:hover, .menu a:focus-visible { color: var(--yellow); text-decoration: none; }
/* the old site used white on yellow (contrast 1.5:1); dark text keeps the look and is readable */
.menu a[aria-current="page"] { background: var(--yellow); color: var(--menu-bg); }
.nav-toggle { display: none; }

/* Sticky menu (JS adds .is-stuck after 100px of scroll; disabled ≤ 640px) */
.site-header.has-stuck-nav { padding-bottom: 50px; }
.main-nav.is-stuck { position: fixed; top: 0; left: 0; right: 0; animation: fadeInDown .5s both; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }

/* ---------- Home hero ----------
   Bug fix (PLAN.md 2.3a): background photo and truck share one stage with the
   photo's 2:1 ratio. The stage is sized to cover the frame and shifted so that the
   ROAD ANCHOR (a point of the road, in % of the photo) lands on the TARGET point of
   the frame. The truck is placed in % of the stage with its TYRE ANCHOR on the road
   anchor, so it can never leave the road, whatever the width. */
.hero {
  /* photo: valtralog-on-the-road.jpg 1600×800 — centre of the truck's lane, measured on the photo */
  --ax: .483;  --ay: .66;
  /* truck: valtralog-motrice-camion.png 804×704 — centre of the front axle on the ground */
  --cx: .385;  --cy: .59;  --truck-ratio: .8756; /* 704 / 804 */
  --tw: .45;               /* truck width as a fraction of the stage width */
  /* where the road anchor sits in the visible frame */
  --tx: .40;   --ty: .80;
  /* minimum stage size that still covers the frame after the shift */
  --kx: max((1 - var(--tx)) / (1 - var(--ax)), var(--tx) / var(--ax));
  --ky: max(2 * (1 - var(--ty)) / (1 - var(--ay)), 2 * var(--ty) / var(--ay));

  position: relative;
  height: clamp(420px, 42vw, 760px);
  overflow: hidden;
  container-type: size;
  /* shown only beyond the 2× upscale cap on very wide screens */
  background: linear-gradient(#1f3f6e 0%, #4d6a8e 45%, #6b7d3c 58%, #3a3b3c 70%, #2b2c2d 100%);
  color: #fff;
}
.hero__stage {
  --s: min(max(100cqw * var(--kx), 100cqh * var(--ky)), 3200px);
  position: absolute;
  width: var(--s);
  aspect-ratio: 2 / 1;
  left: calc(var(--tx) * 100cqw - var(--ax) * var(--s));
  top: calc(var(--ty) * 100cqh - var(--ay) * var(--s) / 2);
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__truck {
  position: absolute;
  width: calc(var(--tw) * 100%);
  left: calc((var(--ax) - var(--cx) * var(--tw)) * 100%);
  top: calc((var(--ay) - var(--cy) * var(--tw) * var(--truck-ratio) * 2) * 100%);
  animation: truckIn .57s linear .92s both;
}
.hero__text {
  position: absolute; z-index: 2;
  right: max(var(--gutter), calc((100cqw - var(--container)) / 2));
  top: 50%; transform: translateY(-50%);
  text-align: right;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.hero__title, .hero__subtitle { margin: 0; overflow: hidden; }
.hero__title span, .hero__subtitle span { display: inline-block; }
.hero__title { font: 700 clamp(30px, 3.6vw, 52px)/1.15 var(--font-title); margin-bottom: 10px; }
.hero__title span { animation: slideIn 1.5s var(--ease-out) .5s both; }
.hero__subtitle { font: 400 clamp(16px, 1.67vw, 24px)/1.5 var(--font-body); }
.hero__subtitle span { animation: slideIn 2.02s var(--ease-out) 1.1s both; }
.hero__subtitle b { font-weight: 700; }
/* Ultra-wide frames show only a thin horizontal strip of the photo: the truck (about
   79% of the photo height at --tw .45) is scaled down so it always fits entirely.
   Bound: --tw <= --ty / (0.5165 * --kx * frame aspect ratio). */
@media (min-width: 2400px) { .hero { --tw: .38; } }
@media (min-width: 2700px) { .hero { --tw: .34; } }
@media (min-width: 3100px) { .hero { --tw: .30; } }
@media (min-width: 3600px) { .hero { --tw: .26; } }
/* Beyond the 2× upscale cap (≈ 2760px) the photo no longer covers the frame: fade its
   right edge into a gradient sampled from the photo's right side (sky, trees, grass, road). */
@media (min-width: 2760px) {
  .hero { background: linear-gradient(#1c3561 0%, #2c4a74 26%, #2f3b2a 34%, #4f6428 52%, #7d9636 70%, #6c7f35 84%, #3b3d3f 90%, #2f3031 100%); }
  .hero__stage { mask-image: linear-gradient(to right, #000 calc(100% - 320px), transparent); }
}
@keyframes slideIn { from { transform: translateX(175%); } to { transform: none; } }
@keyframes truckIn { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: none; } }

/* ---------- Bands & sections ---------- */
.band-yellow { background: var(--yellow); padding: 52px 0; text-align: center; }
.band-yellow h1 { margin: 0; line-height: 1.12; }
.band-yellow h1 strong { font-weight: 700; }
.band-yellow--page { padding: 32px 0 40px; }
.band-yellow--page h1 { margin-bottom: 8px; }
.band-subtitle { font: 400 26px/1.3 var(--font-title); color: #000; margin: 0; }

.road-1, .road-2, .road-3 { background-repeat: no-repeat; }
.road-1 { background-image: url("/assets/css-img/road-1.png"); background-position: right bottom; }
.road-2 { background-image: url("/assets/css-img/road-2.png"); background-position: left bottom; }
.road-3 { background-image: url("/assets/css-img/road-3.png"); background-position: right bottom; }

/* Title with striped lines on both sides (".titolo-val") */
.striped-title {
  display: flex; align-items: center; gap: 35px;
  font: 500 30px/1.1 var(--font-title); color: var(--h2);
  text-align: center; margin: 0 0 40px;
}
.striped-title::before, .striped-title::after {
  content: ""; flex: 1 1 0; height: 22px;
  background: url("/assets/css-img/tit-bg.png") repeat-x center;
}
.striped-title span { flex: 0 1 auto; }
.page-home .striped-title span { font-size: 36px; font-weight: 400; color: var(--title); }

/* Home: 50 anni di storia */
.about { padding: 60px 0 65px; }
.about-grid { gap: 25px; }
.img-box img { box-shadow: 3px 3px 5px rgba(0, 0, 0, .25); }
.about-text { font-size: 16px; line-height: 30px; }
.about-text strong { font-weight: 700; color: var(--text); }


/* Home: feature boxes */
.features { position: relative; isolation: isolate; color: #fff; }
.features .bg, .band-photo .bg, .inner-banner .bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.features::before { content: ""; position: absolute; inset: 0; background: var(--navy-overlay); z-index: -1; }
.features .grid-3 { gap: 0; align-items: stretch; }
.feature {
  position: relative; overflow: hidden; text-align: center;
  padding: 100px 25px; min-height: 452px;
}
.feature::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--navy-hover); border-bottom: 3px solid var(--yellow);
  opacity: 0; transition: opacity .4s;
}
.feature > * { position: relative; z-index: 1; transition: transform .4s; }
.feature-icon {
  position: relative; width: 100px; height: 100px; margin: 0 auto 45px;
  display: grid; place-items: center; font-size: 46px;
}
.feature-icon .icon-circle-o-notch { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature h3 { font: 500 24px/1.1 var(--font-body); color: #fff; margin-bottom: 18px; }
.feature p { color: var(--yellow); font-weight: 300; font-size: 16px; line-height: 26px; margin: 0; }
.feature-link {
  position: absolute !important; left: 50%; bottom: 60px; transform: translate(-50%, 30px);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--yellow); color: var(--navy); padding: 0 55px; height: 46px;
  font: 700 14px/46px var(--font-body); text-transform: uppercase;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  opacity: 0; transition: opacity .4s, transform .4s;
}
.feature-link:hover, .feature-link:focus-visible { text-decoration: none; background: #fff; }
.feature:hover::after, .feature:focus-within::after { opacity: 1; }
.feature:hover > :not(.feature-link), .feature:focus-within > :not(.feature-link) { transform: translateY(-20px); }
.feature:hover .feature-link, .feature:focus-within .feature-link { opacity: 1; transform: translate(-50%, 0); }

/* Punti di forza */
.strengths-section { padding-bottom: 110px; }
.strengths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; text-align: center; }
.strength-icon { font-size: 70px; line-height: 1; color: #2a2a2a; margin-bottom: 30px; }

.strengths--yellow .strength-icon { color: var(--yellow); }
.strengths--yellow .sep { margin-top: 32px; }
.protagonisti { margin-top: 100px; }
.protagonisti h2 { color: var(--h2); }

/* Home: call to action */
.cta-navy { background: var(--navy-bg); padding: 78px 0; text-align: center; color: #fff; }
.cta-navy p { margin: 0; font: 500 36px/48px var(--font-body); }
.cta-navy strong { font-weight: 700; }

/* Partner logo grids */
.partners-section .striped-title { margin-bottom: 80px; }
.partners-grid {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1px;
}
.partners-grid li { flex: 0 1 224px; }
.partners-grid a { display: block; transition: opacity .2s; }
.partners-grid a:hover { opacity: .8; }
.partners-grid img { width: 224px; height: auto; margin: 0 auto; }
/* Desktop: real gaps between the logos (the original 1px gap made them touch). The row
   stays on one line and logos shrink a little when needed, so 4, 5 or 6 partners fit. */
@media (min-width: 992px) {
  .partners-grid { flex-wrap: nowrap; gap: 32px; }
  .partners-grid li { min-width: 0; }
  .partners-grid img { width: 100%; max-width: 224px; }
}
@media (min-width: 1200px) {
  .partners-grid { gap: 48px; }
}

/* Photo band with navy text (Chi siamo / Vantaggio) */
.band-photo { position: relative; isolation: isolate; padding: 120px 0; }
.band-photo::before { content: ""; position: absolute; inset: 0; background: rgba(9, 50, 91, .55); z-index: -1; }
.light-txt, .light-txt p, .light-txt li, .light-txt strong { color: #fff; }
.band-photo .grid-2 { gap: 50px; }
.band-photo blockquote { border-left-color: #fff; margin-top: 30px; }
.band-photo .btn { margin-top: 17px; }

/* Map (click to load) */
.map { background: #f7f7f7; padding: 5px; }
.map-placeholder {
  height: 450px; display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, #eef0f2 0 14px, #e6e9ec 14px 28px);
}
.map-card { background: #fff; padding: 30px 40px; max-width: 460px; box-shadow: 0 4px 18px rgba(0, 0, 0, .12); }
.map-card__icon { font-size: 40px; color: var(--yellow); line-height: 1; margin-bottom: 10px; }
.map-card .btn { margin: 5px 0 12px; }
.map-note { font-size: 12px; line-height: 18px; color: #595959; margin: 0; }
.map-note a { text-decoration: underline; }
.map iframe { display: block; width: 100%; height: 450px; border: 0; }

/* ---------- Inner pages ---------- */
.inner-banner { position: relative; isolation: isolate; padding: 125px 0; text-align: center; }
.inner-banner::before { content: ""; position: absolute; inset: 0; background: var(--banner-overlay); z-index: -1; }
.inner-banner h2 {
  margin: 0; color: #ccd3da;
  font: 700 60px/60px var(--font-title); text-transform: uppercase;
}

/* Vantaggio: photo grid + counters */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin-top: 40px; }
.photo-grid img { width: 100%; }
.counters { padding: 40px 0 0; }
.counters-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); }
.counter { display: flex; justify-content: space-between; gap: 10px; padding: 30px 20px 35px; border-right: 1px solid var(--border); }
.counter:last-child { border-right: 0; }
.counter-number { display: block; font: 700 30px/28px var(--font-body); color: var(--navy); margin-bottom: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter-text p { color: var(--muted); font-weight: 500; font-size: 16px; line-height: 28px; margin: 0; }
.counter-icon { font-size: 52px; color: var(--yellow); line-height: 1; padding-top: 8px; }

/* Ubicazione */
.tent-map { margin: 0; }
.lightbox-trigger { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tent-map__hint {
  position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); color: #fff;
  display: grid; place-items: center; font-size: 28px;
}
.mini { font-size: 12px; line-height: 20px; margin-top: 8px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 150px); gap: 1px; }
.gallery img { width: 150px; height: 150px; object-fit: cover; }

/* Lightbox (<dialog>) */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox figure { margin: 0; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 82vh; width: auto; margin: 0 auto; }
.lightbox figcaption { color: #fff; text-align: center; font-size: 14px; padding-top: 8px; }
.lightbox button { position: fixed; background: none; border: 0; color: #fff; font-size: 30px; cursor: pointer; padding: 12px; }
.lightbox__close { top: 10px; right: 10px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox[data-single] .lightbox__prev, .lightbox[data-single] .lightbox__next { display: none; }

/* I mezzi */
.mezzi { padding-bottom: 60px; }
.mezzi-heading { display: flex; align-items: center; justify-content: center; gap: 30px; margin-bottom: 50px; }
.mezzi-heading__icon { font-size: 48px; color: var(--yellow); line-height: 1; }
.mezzi-heading h1 { margin: 0; }

/* Partners page */
.partner { display: grid; grid-template-columns: 1fr 3fr; gap: 30px; padding: 50px 0; border-bottom: 1px solid var(--partner-rule); }
.partner:first-child { padding-top: 0; }
.partner:last-child { border-bottom: 0; padding-bottom: 30px; }
.partner__logo { text-align: center; }
.partner__logo img { margin: 0 auto 10px; width: auto; max-width: 224px; }

/* Contatti */
.contatti { padding-bottom: 150px; }
.contatti h1 { margin-bottom: 10px; }
.contatti-claim { font-size: 30px; margin-bottom: 50px; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; align-items: center; gap: 30px; min-height: 96px; }
.contact-list__icon { flex: 0 0 80px; text-align: center; font-size: 70px; line-height: 1; color: var(--yellow); }
.contact-list a { color: var(--text); }

.contact-form { max-width: 420px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 16px; line-height: 28px; color: var(--text); margin-bottom: 2px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; font: 400 15px/1.4 var(--font-body); color: var(--text);
  border: 1px solid #aaa; border-radius: 2px; padding: 7px 9px; background: #fff;
}
.field textarea { resize: vertical; min-height: 280px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--yellow); outline-offset: 0; border-color: var(--yellow); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.field-error { display: block; color: #c0392b; font-size: 13px; line-height: 18px; margin-top: 4px; }
.field--check { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.field--check label { margin: 0; }
.field--check input { width: 16px; height: 16px; accent-color: var(--yellow); }
.field--hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-note { margin-bottom: 16px; }
.btn-submit { color: var(--menu-bg); font-size: 16px; padding: 9px 25px; box-shadow: 1px 1px 0 rgba(0, 0, 0, .2); }
.btn-submit:hover { color: var(--navy); }
.btn-submit[disabled] { opacity: .6; cursor: progress; }
.form-status { padding: 10px 14px; border: 2px solid; font-size: 14px; line-height: 22px; }
.form-status[data-state="ok"] { border-color: #46b450; color: #2e7d32; }
.form-status[data-state="error"] { border-color: #dc3232; color: #c0392b; }

/* Policies */
.policy { max-width: 1170px; }

/* 404 */
.not-found { padding: 100px 0 140px; }
.not-found .btn { margin: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 23px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.site-footer p { margin: 0; font-size: 12px; line-height: 18px; }
.site-footer a { color: var(--yellow); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(251, 202, 0, .5); }
.site-footer a:hover { text-decoration-color: currentColor; }
.footlinks { text-transform: uppercase; font-size: 10px !important; line-height: 16px !important; text-align: right; white-space: nowrap; }
.site-footer .link-button { font: inherit; text-transform: inherit; color: var(--yellow); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(251, 202, 0, .5); }
.site-footer .link-button:hover { text-decoration-color: currentColor; }

/* ---------- Policy pages ---------- */
.policy h2 { font-size: 26px; margin: 40px 0 14px; }
.policy h3 { font-size: 17px; margin: 26px 0 8px; }
.policy ul { padding-left: 22px; margin: 0 0 16px; }
.policy li { margin-bottom: 6px; }
.policy .policy-updated { color: var(--muted); font-size: 14px; }
.policy .table-wrap { overflow-x: auto; margin: 0 0 20px; }
.policy table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 21px; }
.policy caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid #e3e3e3; }
.policy th { background: #f7f7f7; font-weight: 600; }
.policy code { font-size: 13px; background: #f4f4f4; padding: 1px 5px; border-radius: 3px; }

/* ---------- Cookie banner (vanilla-cookieconsent, loaded by consent.js) ---------- */
/* Brand colours; both main buttons share one style so they have equal weight (Garante). */
#cc-main {
  --cc-font-family: var(--font-body);
  --cc-modal-border-radius: 4px;
  --cc-btn-border-radius: 2px;
  --cc-primary-color: #222;
  --cc-secondary-color: #4d4d4d;
  --cc-link-color: #0a4f8f;
  --cc-btn-primary-bg: var(--yellow);
  --cc-btn-primary-color: var(--navy);
  --cc-btn-primary-border-color: var(--yellow);
  --cc-btn-primary-hover-bg: var(--yellow-hover);
  --cc-btn-primary-hover-color: #000;
  --cc-btn-primary-hover-border-color: var(--yellow-hover);
  --cc-btn-secondary-bg: #fff;
  --cc-btn-secondary-color: var(--navy);
  --cc-btn-secondary-border-color: var(--navy);
  --cc-btn-secondary-hover-bg: var(--navy);
  --cc-btn-secondary-hover-color: #fff;
  --cc-btn-secondary-hover-border-color: var(--navy);
  --cc-toggle-on-bg: var(--navy);
  --cc-toggle-readonly-bg: #c9c9c9;
}
#cc-main .cm__btn, #cc-main .pm__btn { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
#cc-main .cm__title, #cc-main .pm__title { font-family: var(--font-title); font-weight: 500; letter-spacing: .01em; }
#cc-main .pm__badge { margin-left: 8px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
  .header-info { gap: 30px; }
  .menu a { padding: 0 14px; font-size: 15px; }
  .inner-banner h2 { font-size: 48px; line-height: 52px; }
}

@media (max-width: 1024px) {
  /* mobile menu: yellow toggle + drop-down */
  .nav-toggle {
    display: grid; place-items: center; width: 50px; height: 50px; border: 0; cursor: pointer;
    background: var(--yellow); color: #fff; font-size: 22px; padding: 0;
  }
  .menu {
    position: absolute; left: var(--gutter); right: var(--gutter); top: 50px;
    flex-direction: column; height: auto; background: var(--menu-bg);
    max-height: 0; overflow: hidden; transition: max-height .4s ease;
  }
  .main-nav.is-open .menu { max-height: 70vh; overflow-y: auto; }
  .menu li + li::before { display: none; }
  .menu li { border-top: 1px solid rgba(255, 255, 255, .08); }
  .menu a { height: 46px; padding: 0 20px; }
  .header-top { flex-direction: column; gap: 20px; }
  .header-info { gap: 40px; }
}

@media (max-width: 991px) {
  :root { --section: 60px; }
  h1 { font-size: 42px; }
  .grid-2, .grid-3, .strengths, .photo-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { gap: 30px; }
  .features .grid-3 { gap: 0; }
  .feature { min-height: 0; padding: 70px 25px 110px; }
  .feature-link { opacity: 1; transform: translate(-50%, 0); bottom: 35px; }
  .counters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counter:nth-child(2) { border-right: 0; }
  .counter:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .partner { grid-template-columns: minmax(0, 1fr); }
  .band-photo { padding: 80px 0; }
  .cta-navy p { font-size: 28px; line-height: 40px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery img { width: 100%; height: auto; aspect-ratio: 1; }
}

/* Hero, narrow/portrait: text above the truck, truck centred on the road */
@media (max-width: 778px) {
  .hero { --tx: .5; --ty: .86; height: clamp(460px, 118vw, 620px); }
  .hero__text {
    left: var(--gutter); right: var(--gutter); top: 22px; transform: none; text-align: center;
  }
  .hero__title { font-size: clamp(28px, 7.4vw, 44px); margin-bottom: 4px; }
  .hero__subtitle { font-size: clamp(15px, 3.9vw, 20px); }
}

@media (max-width: 767px) {
  h1 { font-size: 36px; }
  h2, .striped-title { font-size: 28px; }
  .striped-title { gap: 16px; }
  .inner-banner { padding: 70px 0; }
  .inner-banner h2 { font-size: 34px; line-height: 38px; }
  .band-yellow { padding: 36px 0; }
  .header-info { flex-direction: column; gap: 10px; align-items: flex-start; }
  .header-info picture { flex-basis: 30px; }
  .header-info img { width: 30px; }
  .header-info a { font-size: 15px; line-height: 22px; }
  .counters-grid { grid-template-columns: minmax(0, 1fr); }
  .counter, .counter:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--border); }
  .counter:last-child { border-bottom: 0; }
  .footer-inner { flex-direction: column; gap: 12px; }
  .footlinks { text-align: left; }
  .contatti { padding-bottom: 80px; }
  .contact-form { max-width: none; }
  .map-placeholder, .map iframe { height: 380px; }
  .map-card { margin: 0 var(--gutter); padding: 24px; }
  .cta-navy { padding: 56px 0; }
  .cta-navy p { font-size: 24px; line-height: 34px; }
  .mezzi-heading { gap: 16px; }
  .mezzi-heading__icon { font-size: 36px; }
}

@media (max-width: 640px) {
  .main-nav.is-stuck { position: relative; animation: none; box-shadow: none; }
  .site-header.has-stuck-nav { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
