/* =========================================================================
   CaltaTech Engineering — design system
   Colori e geometrie campionati dal mockup home_caltatech.pdf (1440px)
   ========================================================================= */

:root {
  /* Brand */
  --blue:        #006BF9;  /* accento: logo, link, "connessione" */
  --blue-600:    #0150C8;  /* fascia sezione, forma dietro hero, filetti */
  --blue-800:    #013D97;  /* pill scure della marquee */
  --navy:        #002B6F;  /* bottoni, footer */
  --navy-900:    #001B48;  /* badge AAT, estremo scala tensioni */
  --tint:        #E9F2FF;  /* fondi chiari, bordi card, righe tabella */

  /* Testo */
  --ink:         #000000;
  --body:        #171717;
  --muted:       #3F4A5A;

  /* Scala tensioni (da 20 kV a 380 kV) */
  --v-20:  #1857C6;
  --v-36:  #174EB0;
  --v-132: #1246A3;
  --v-150: #0E4097;
  --v-220: #002B75;
  --v-380: #001B48;

  /* Tipografia — Exo (font di brand) */
  --font:  'Exo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-c:'Exo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Layout */
  --header-h: 120px;
  --shadow-btn: 0 10px 24px rgba(0, 43, 111, .28);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* ---------- Contenitore ----------
   content-box + max-width 1280 + padding 24: su viewport 1440 il contenuto
   parte esattamente a x=80px come nel mockup. */
.container {
  box-sizing: content-box;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Elementi tipografici ricorrenti ---------- */
.eyebrow {
  font-family: var(--font-c);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
}

.section-title {
  font-size: clamp(26px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -.005em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.arrow-link {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.arrow-link::after {
  content: "";
  width: 7px; height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.arrow-link:hover::after { transform: rotate(45deg) translate(2px, -2px); }

/* ---------- Bottone ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-c);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  padding: 18px 24px;   /* Exo è più larga di quanto stimato: mantiene i ~310px del mockup */
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 43, 111, .34);
}
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--blue-600);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}
/* menu e selettore lingua allineati insieme al bordo destro */
.nav { order: 1; margin-left: auto; }

.logo img { width: 280px; height: auto; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 52px;
}
.nav__list a {
  font-family: var(--font-c);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease;
}
.nav__list a:hover,
.nav__list a[aria-current="page"] { border-bottom-color: var(--blue); }

/* Selettore di lingua */
.lang-switch {
  order: 2;                 /* ultimo elemento della riga: in alto a destra */
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 40px;
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .07em;
}
.lang-switch a {
  padding: 6px 9px;
  color: var(--blue);
  border: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.lang-switch a:hover { border-color: var(--blue); }
.lang-switch a[aria-current="true"] {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
.lang-switch span { color: #C9DAF3; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  background: none;
  border: 1px solid var(--tint);
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 12px;
  width: 20px; height: 2px;
  background: var(--blue);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span { top: 22px; }
.nav-toggle span::before { content: ""; left: 0; top: -7px; }
.nav-toggle span::after  { content: ""; left: 0; top:  7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  padding-top: 65px;
  padding-bottom: 92px;
  overflow: hidden;
}

.hero__text { max-width: 560px; }
.hero__text .eyebrow { display: block; margin-bottom: 18px; }

.hero__title {
  font-size: clamp(38px, 4.05vw, 58px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 28px;
}
.hero__title em { font-style: normal; color: var(--blue); }

.hero__lead {
  font-size: 17px;
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 34px;
}

/* Media: pillola con cappello semicircolare a sinistra, esce dal bordo destro.
   Dietro, la stessa forma in blu sfalsata di 40px in basso a sinistra. */
.hero__media {
  position: absolute;
  top: 65px;
  left: 48.9%;
  right: 0;              /* .hero è full-bleed: coincide col bordo destro della viewport */
  height: 410px;
}
.hero__media::before {
  content: "";
  position: absolute;
  /* Sporge a sinistra e in basso per creare il contorno, ma il bordo destro
     resta allineato a quello della foto: così la fascia blu arriva fino in
     fondo all'immagine invece di interrompersi prima. */
  left: -39px;
  right: 0;
  top: 38px;
  bottom: -38px;
  background: var(--blue-600);
  border-radius: 999px 0 0 999px;
}
.hero__media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 999px 0 0 999px;
}

/* =========================================================================
   Fascia numeri
   ========================================================================= */
.stats { background: var(--tint); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: 42px;
}
.stats__item {
  text-align: center;
  padding-inline: 16px;
}
.stats__item + .stats__item { border-left: 1px solid var(--blue-600); }
.stats__value {
  display: block;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 10px;
}
.stats__label {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue-600);
}

/* =========================================================================
   Tre linee di attività
   ========================================================================= */
.lines { padding-block: 86px 96px; }
.lines .section-head { margin-bottom: 42px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  display: block;              /* le card della home sono <a>: senza questo resterebbero inline */
  border: 1px solid var(--tint);
  background: #fff;
  padding: 26px 26px 32px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 30px rgba(1, 80, 200, .10);
  transform: translateY(-3px);
}
.card__eyebrow {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 22px;
}
.card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.card__text { font-size: 15.5px; line-height: 1.6; }

/* =========================================================================
   Sezione blu — infrastrutture
   ========================================================================= */
.infra {
  background: var(--blue-600);
  color: #fff;
  padding-block: 76px 96px;
}
.infra .section-title { color: #fff; }
.infra .arrow-link { color: #fff; }
.infra .section-head { margin-bottom: 44px; }

.infra__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 60px;
}
.infra__col { border-top: 1px solid #fff; padding-top: 22px; }
.infra__col h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.infra__col p {
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
  margin-bottom: 18px;
}
.infra__meta {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

/* Scala tensioni */
.voltages {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 52px;
}
.voltage { padding: 20px 18px 18px; }
.voltage__value {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.voltage__label {
  font-family: var(--font-c);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
}
.voltage--20  { background: var(--v-20); }
.voltage--36  { background: var(--v-36); }
.voltage--132 { background: var(--v-132); }
.voltage--150 { background: var(--v-150); }
.voltage--220 { background: var(--v-220); }
.voltage--380 { background: var(--v-380); }

/* Tabella progetti */
.ptable-wrap { background: #fff; padding: 0 26px; }

.ptable {
  width: 100%;
  border-collapse: collapse;
  color: var(--body);
}
.ptable caption {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--navy);
  text-align: left;
  padding: 20px 0;
}
.ptable th {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--navy);
  text-align: left;
  padding: 16px 12px;
  white-space: nowrap;
}
.ptable thead tr { background: var(--tint); }
.ptable thead th:first-child { padding-left: 0; }
.ptable td {
  font-size: 15.5px;
  padding: 14px 12px;
  border-top: 1px solid var(--tint);
  vertical-align: middle;
}
.ptable tbody tr:first-child td { border-top: 0; }
.ptable td:first-child { padding-left: 0; }
.ptable tbody tr { transition: background .18s ease; }
.ptable tbody tr:hover { background: #FAFCFF; }

.badge {
  display: inline-block;
  min-width: 128px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  padding: 13px 14px;
  white-space: nowrap;
}
.badge--aat   { background: var(--navy-900); }
.badge--at    { background: #123E8F; }
.badge--mt    { background: var(--v-20); }
.badge--plant { background: #fff; color: var(--blue); border: 1px solid var(--blue); }

/* =========================================================================
   Chi siamo
   ========================================================================= */
.about {
  position: relative;
  padding-block: 84px 96px;
  overflow: hidden;
}
.about__text { max-width: 620px; }
.about .section-title { margin-bottom: 26px; }
.about__text p { font-size: 16.5px; line-height: 1.6; margin-bottom: 20px; }

.about__rule {
  border: 0;
  border-top: 1px solid var(--tint);
  margin: 34px 0 22px;
}

.certs { display: flex; gap: 48px; flex-wrap: wrap; align-items: flex-start; }
.certs__badge {
  display: block;
  height: 86px;
  width: auto;
  margin-top: 16px;
}
.certs__name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.certs__desc {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
}

.about__media {
  position: absolute;
  top: 148px;
  left: 57%;
  right: 0;
  height: 312px;
}
.about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px 0 0 999px;
}

/* =========================================================================
   Marquee discipline
   ========================================================================= */
.disciplines {
  padding-block: 40px 56px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: marquee 46s linear infinite;
}
.disciplines:hover .marquee { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0 34px;
  border-radius: 999px;
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--light { background: var(--tint);      color: var(--blue-800); }
.pill--dark  { background: var(--blue-800);  color: #fff; }

/* =========================================================================
   CTA
   ========================================================================= */
.cta {
  background: var(--tint);
  padding-block: 80px 88px;
}
.cta h2 {
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}
.cta p {
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 34px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding-block: 64px 44px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr auto;
  gap: 32px;
}

/* Social */
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.footer__social a:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-2px);
}
.footer__social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  display: block;
}
.footer__label {
  display: block;
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  margin-bottom: 8px;
}
.footer__value { font-size: 16.5px; color: #fff; }
.footer__value a { border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.footer__value a:hover { border-bottom-color: rgba(255, 255, 255, .7); }

.footer__rule {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .28);
  margin: 46px 0 22px;
}
.footer__legal {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 15px;
  color: rgba(255, 255, 255, .82);
}

/* =========================================================================
   Pagine interne
   ========================================================================= */
.page-hero {
  background: var(--tint);
  padding-block: 68px 72px;
}
.page-hero .eyebrow { display: block; margin-bottom: 16px; }
.page-hero h1 {
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
  max-width: 900px;
}
.page-hero p {
  font-size: 17.5px;
  line-height: 1.55;
  max-width: 680px;
  margin-top: 22px;
}

.section { padding-block: 80px; }
.section--tint { background: var(--tint); }
.section--navy { background: var(--blue-600); color: #fff; }
.section--navy .section-title { color: #fff; }
.section > .container > .section-title { margin-bottom: 36px; }

.prose p { font-size: 16.5px; line-height: 1.65; margin-bottom: 18px; max-width: 760px; }

/* Pagine di testo legale */
.legal { max-width: 760px; }
.legal h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin: 44px 0 14px;
}
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.65; }
.legal p { margin-bottom: 16px; }
.legal ul { margin: 0 0 16px; }
.legal li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.legal li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 6px;
  background: var(--blue);
}
.legal a { color: var(--blue); border-bottom: 1px solid currentColor; }
.legal__updated {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}
.legal__todo {
  display: block;
  background: #FFF4D6;
  border-left: 3px solid #E0A800;
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.6;
}

/* link nella riga legale del footer */
.footer__legal a { border-bottom: 1px solid rgba(255, 255, 255, .45); }
.footer__legal a:hover { border-bottom-color: #fff; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

/* offset per l'header sticky quando si arriva da un'ancora (#sviluppo, #progettazione…) */
.service-block { scroll-margin-top: calc(var(--header-h) + 24px); }
.service-block + .service-block { margin-top: 56px; }
.service-block__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.service-block__kicker {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 10px;
}

.checklist li {
  position: relative;
  padding-left: 30px;
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  background: var(--blue);
}
.section--navy .checklist li::before { background: #fff; }
.section--navy .checklist li { color: rgba(255, 255, 255, .92); }

.list-title {
  font-family: var(--font-c);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tint);
}
.section--navy .list-title { color: #fff; border-bottom-color: rgba(255, 255, 255, .45); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Contatti */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-item { margin-bottom: 32px; }
.contact-item__label {
  display: block;
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}
.contact-item__value { font-size: 18px; color: var(--ink); }

.form { display: grid; gap: 20px; }
.field label {
  display: block;
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--body);
  background: #fff;
  border: 1px solid #C9DAF3;
  padding: 14px 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 107, 249, .14);
  outline: none;
}
.field textarea { min-height: 150px; resize: vertical; }
.form__note { font-size: 14.5px; color: var(--muted); }

/* =========================================================================
   FAQ (details/summary: nessun JS, contenuto sempre nel DOM e quindi
   leggibile da crawler e modelli linguistici anche se chiuso)
   ========================================================================= */
.faq { max-width: 860px; }
.faq__item {
  border-bottom: 1px solid var(--tint);
}
.faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  transition: color .18s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--blue); }
.faq__item summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  margin-top: 7px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
  transition: transform .22s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg); }
.faq__item p {
  margin: 0 0 24px;
  padding-right: 34px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
}
.faq__item p a { color: var(--blue); border-bottom: 1px solid currentColor; }

/* =========================================================================
   Card servizi (hub) e navigazione laterale fra servizi
   ========================================================================= */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  display: block;
  border: 1px solid var(--tint);
  padding: 26px 26px 30px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.service-card:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 30px rgba(1, 80, 200, .10);
  transform: translateY(-3px);
}
.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.service-card p { font-size: 15.5px; line-height: 1.6; margin-bottom: 18px; }
.service-card span {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
}

.related { border-top: 1px solid var(--tint); padding-top: 34px; }
.related__title {
  font-family: var(--font-c);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 18px;
}
.related__list { display: flex; flex-wrap: wrap; gap: 10px; }
.related__list a {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--tint);
  font-size: 15px;
  color: var(--navy);
  transition: border-color .2s ease, color .2s ease;
}
.related__list a:hover { border-color: var(--blue); color: var(--blue); }

/* Briciole di pane */
.crumbs {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 18px;
}
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.page-hero .crumbs { color: #4A5568; }

/* =========================================================================
   Animazione di ingresso
   ========================================================================= */
/* Lo stato nascosto si applica solo se JS è attivo: senza JS il contenuto
   resta visibile invece di sparire. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1180px) {
  .hero__media { left: 52%; height: 360px; }
  .infra__cols { grid-template-columns: repeat(2, 1fr); gap: 32px 28px; }
  .voltages { grid-template-columns: repeat(3, 1fr); }
  .about__media { left: 60%; height: 280px; }
}

@media (max-width: 960px) {
  :root { --header-h: 88px; }

  /* la riga header deve stare in 375px: lingua e hamburger non si comprimono,
     il logo si adatta allo spazio che resta */
  .site-header__inner { gap: 12px; }
  .logo     { flex: 0 1 auto; min-width: 0; }
  .logo img { width: 180px; }

  .nav-toggle { display: block; }
  /* su mobile: logo a sinistra, poi lingua e hamburger a destra */
  .lang-switch { order: 1; margin-left: auto; margin-right: 0; flex: none; }
  .nav-toggle  { order: 2; flex: none; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--blue-600);
    padding: 8px 24px 28px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav__list a { display: block; padding: 14px 0; font-size: 17px; }

  /* Hero: impilato */
  .hero { padding-top: 44px; padding-bottom: 0; }
  .hero__text { max-width: none; }
  .hero__media {
    position: relative;
    top: auto; left: auto; right: auto;
    height: 300px;
    /* 40 = 16px di respiro dal bordo + 24px occupati dal contorno blu */
    margin: 52px 0 56px 40px;
  }
  .hero__media::before {
    left: -24px;
    right: 0;
    top: 24px;
    bottom: -24px;
  }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 0; padding-block: 36px; }
  .stats__item:nth-child(odd)  { border-left: 0; }
  .stats__item:nth-child(even) { border-left: 1px solid var(--blue-600); }

  .card-grid { grid-template-columns: 1fr; }
  .lines { padding-block: 64px 72px; }

  .infra { padding-block: 60px 72px; }
  .infra__cols { grid-template-columns: 1fr; gap: 30px; }
  .voltages { grid-template-columns: repeat(2, 1fr); }

  .about { padding-block: 64px 72px; }
  .about__text { max-width: none; }
  .about__media {
    position: relative;
    top: auto; left: auto; right: auto;
    height: 260px;
    /* stacco dal bordo sinistro, come per la foto dell'hero */
    margin: 40px 0 0 16px;
  }

  .service-cards { grid-template-columns: 1fr; }
  /* bersagli tattili ad almeno 44px */
  .related__list a { padding: 14px 20px; }
  .faq__item summary { font-size: 17px; gap: 16px; }
  .faq__item p { padding-right: 0; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .value-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding-block: 60px; }
}

/* Tabella progetti → schede su mobile */
@media (max-width: 760px) {
  .ptable-wrap { padding: 0 18px 8px; }
  .ptable caption { padding: 18px 0 8px; }
  .ptable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ptable tbody tr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 14px;
    padding: 18px 0;
    border-top: 1px solid var(--tint);
  }
  .ptable tbody tr:first-child { border-top: 0; }
  .ptable td { border: 0; padding: 0; }
  .ptable td:first-child {
    grid-column: 1 / -1;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
  }
  .ptable td[data-l]::before {
    content: attr(data-l);
    display: block;
    font-family: var(--font-c);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .ptable td:nth-child(2) { grid-column: 1 / -1; margin-bottom: 10px; }
  .badge { min-width: 0; padding: 10px 16px; }
}

@media (max-width: 560px) {
  .voltages { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr; }
  .stats__item { border-left: 0 !important; }
  .certs { gap: 26px; }
  .btn { width: 100%; text-align: center; }
}

/* Sotto i 420px il logo non ha larghezza fissa: essendo l'unico elemento
   comprimibile della riga header, si adatta da solo allo spazio residuo.
   Questo blocco sta dopo quello a 560px perché ne è un affinamento. */
@media (max-width: 420px) {
  .lang-switch { font-size: 13px; }
  .lang-switch a { padding: 6px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
