/* ==========================================================================
   ENERGIA SOLARE — Pagine città / provincia (immersive)
   Scope: #ct-page · prefisso ct- · mobile-first · breakpoints 640/960/1280
   Stesso sistema delle pagine prodotto (navy + arancio, Outfit / DM Sans).
   Regola del tema: OGNI selettore di classe è prefissato con #ct-page
   (flatsome.css carica dopo e perde contro 1,1,0).
   Tutto il contenuto è leggibile senza JS: gli stati "nascosti" esistono
   solo con #ct-page.ct-js.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
#ct-page {
  --ct-navy: #0A1628;
  --ct-navy-2: #10203a;
  --ct-navy-3: #172a48;
  --ct-orange: #F0853A;
  --ct-orange-hover: #e0752a;
  --ct-orange-soft: rgba(240, 133, 58, .14);
  --ct-green: #3DBA6A;
  --ct-bg: #f8f9fa;
  --ct-surface: #ffffff;
  --ct-line: rgba(10, 22, 40, .12);
  --ct-text: #1a1a1a;
  --ct-text-muted: #5f6b7a;
  --ct-text-inv: #eef2f7;
  --ct-text-inv-muted: #9fb0c3;
  --ct-danger: #d64545;
  --ct-radius: 12px;
  --ct-radius-lg: 20px;
  --ct-shadow: 0 4px 24px rgba(10, 22, 40, .08);
  --ct-shadow-lg: 0 14px 48px rgba(10, 22, 40, .14);
  --ct-out: cubic-bezier(.23, 1, .32, 1);
  --ct-in-out: cubic-bezier(.77, 0, .175, 1);
  --ct-font-h: 'Outfit', sans-serif;
  --ct-font-b: 'DM Sans', sans-serif;
  --ct-container: 1200px;
  --ct-section-pad: clamp(80px, 11vw, 150px);
}

/* ---------- 2. RESET SCOPED ---------- */
#ct-page,
#ct-page *,
#ct-page *::before,
#ct-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#ct-page {
  font-family: var(--ct-font-b);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ct-text);
  background: var(--ct-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

#ct-page img,
#ct-page video,
#ct-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

#ct-page svg { display: block; }

#ct-page ul,
#ct-page ol { list-style: none; }

#ct-page a {
  color: inherit;
  text-decoration: none;
}

#ct-page p a,
#ct-page li a.ct-link {
  color: var(--ct-orange-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#ct-page button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

#ct-page a:focus-visible,
#ct-page button:focus-visible,
#ct-page input:focus-visible,
#ct-page select:focus-visible,
#ct-page textarea:focus-visible,
#ct-page summary:focus-visible {
  outline: 2px solid var(--ct-orange);
  outline-offset: 2px;
}

/* ---------- 3. LAYOUT & TIPOGRAFIA ---------- */
#ct-page .ct-container {
  width: 100%;
  max-width: var(--ct-container);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 640px) {
  #ct-page .ct-container { padding-left: 24px; padding-right: 24px; }
}

#ct-page h1,
#ct-page h2,
#ct-page h3,
#ct-page h4 {
  font-family: var(--ct-font-h);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ct-text);
}

#ct-page p { max-width: 65ch; }

#ct-page .ct-h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  max-width: 24ch;
}

#ct-page .ct-h2--inv { color: var(--ct-text-inv); }

#ct-page .ct-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ct-orange-hover);
}

#ct-page .ct-eyebrow--inv { color: var(--ct-orange); }

#ct-page .ct-eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(240, 133, 58, .2);
}

#ct-page .ct-lead {
  margin-top: 18px;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--ct-text-muted);
}

#ct-page .ct-lead--inv { color: var(--ct-text-inv-muted); }

#ct-page .ct-lead strong { color: var(--ct-text); }
#ct-page .ct-lead--inv strong { color: var(--ct-text-inv); }

#ct-page .ct-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#ct-hero,
#ct-lavori,
#ct-sole,
#ct-sapere,
#ct-servizi,
#ct-faq,
#ct-preventivo {
  scroll-margin-top: 90px;
}

/* ---------- 4. BOTTONI ---------- */
#ct-page .ct-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  border: 2px solid transparent;
  border-radius: 60px;
  padding: 14px 28px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition:
    transform 200ms var(--ct-out),
    box-shadow 200ms var(--ct-out),
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

#ct-page .ct-btn:active { transform: translateY(1px) scale(.99); }

#ct-page .ct-btn--primary {
  background: var(--ct-orange);
  border-color: var(--ct-orange);
  color: #1a1a1a;
}

#ct-page .ct-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .45);
  color: var(--ct-text-inv);
}

#ct-page .ct-btn--outline {
  background: transparent;
  border-color: rgba(10, 22, 40, .2);
  color: var(--ct-text);
}

@media (hover: hover) and (pointer: fine) {
  #ct-page .ct-btn--primary:hover {
    background: var(--ct-orange-hover);
    border-color: var(--ct-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(240, 133, 58, .35);
  }
  #ct-page .ct-btn--ghost:hover {
    background: var(--ct-surface);
    border-color: var(--ct-surface);
    color: var(--ct-navy);
    transform: translateY(-2px);
  }
  #ct-page .ct-btn--outline:hover {
    border-color: var(--ct-navy);
    background: var(--ct-navy);
    color: var(--ct-text-inv);
    transform: translateY(-2px);
  }
}

#ct-page .ct-btn--lg { padding: 17px 34px; font-size: 1.05rem; }
#ct-page .ct-btn--full { width: 100%; }

/* Barrido di luce sul CTA principale (lanciato dal JS) */
@property --ct-shine-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: -120%;
}

#ct-page .ct-btn--shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%);
  transform: translateX(var(--ct-shine-x));
  pointer-events: none;
}

#ct-page .ct-btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(26, 26, 26, .25);
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: ct-spin .7s linear infinite;
}

#ct-page .ct-btn.is-loading { opacity: .75; pointer-events: none; }
#ct-page .ct-btn.is-loading .ct-btn__spinner { display: inline-block; }

@keyframes ct-spin { to { transform: rotate(360deg); } }

/* ---------- 5. MOTION UTILITIES ---------- */
#ct-page .ct-reveal { display: block; overflow: hidden; padding-bottom: .06em; }
#ct-page .ct-reveal__inner { display: block; }

#ct-page.ct-js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ct-out), transform .7s var(--ct-out);
  transition-delay: var(--ct-reveal-delay, 0s);
}

#ct-page.ct-js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   6. HERO — foto reale + mappa della provincia disegnata
   ========================================================================== */
#ct-page .ct-hero {
  position: relative;
  min-height: min(94vh, 920px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ct-navy);
  color: var(--ct-text-inv);
  overflow: hidden;
  isolation: isolate;
}

@supports (min-height: 94dvh) {
  #ct-page .ct-hero { min-height: min(94dvh, 920px); }
}

#ct-page .ct-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

#ct-page .ct-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  transform-origin: 60% 50%;
}

/* Ken Burns lento (solo con JS e motion consentito) */
#ct-page.ct-js .ct-hero__photo {
  animation: ct-kenburns 22s var(--ct-out) both;
}

@keyframes ct-kenburns {
  from { transform: scale(1.14); }
  to { transform: scale(1.02); }
}

#ct-page .ct-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, .55) 0%, rgba(10, 22, 40, .35) 30%, rgba(10, 22, 40, .86) 72%, rgba(10, 22, 40, .98) 100%);
}

@media (min-width: 960px) {
  #ct-page .ct-hero__scrim {
    background:
      linear-gradient(90deg, rgba(10, 22, 40, .94) 0%, rgba(10, 22, 40, .78) 42%, rgba(10, 22, 40, .35) 75%, rgba(10, 22, 40, .55) 100%),
      linear-gradient(180deg, rgba(10, 22, 40, 0) 60%, rgba(10, 22, 40, .9) 100%);
  }
}

/* Griglia "da cartografo" sopra la foto */
#ct-page .ct-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
}

#ct-page .ct-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
  padding-top: 120px;
  padding-bottom: clamp(36px, 6vh, 64px);
}

@media (min-width: 960px) {
  #ct-page .ct-hero__inner {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 48px;
    align-items: center;
    padding-top: 150px;
  }
}

#ct-page .ct-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .85rem;
  color: var(--ct-text-inv-muted);
  margin-bottom: 18px;
}

#ct-page .ct-crumbs a { color: var(--ct-text-inv-muted); text-decoration: none; }
#ct-page .ct-crumbs a:hover { color: var(--ct-text-inv); }
#ct-page .ct-crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }

#ct-page .ct-hero__title {
  margin-top: 16px;
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  font-weight: 800;
  line-height: 1.04;
  color: var(--ct-text-inv);
  max-width: 17ch;
}

#ct-page .ct-hero__title em {
  font-style: normal;
  color: var(--ct-orange);
}

#ct-page .ct-hero__subtitle {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: var(--ct-text-inv-muted);
  max-width: 50ch;
}

#ct-page .ct-hero__subtitle strong { color: var(--ct-text-inv); }

#ct-page .ct-hero__cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 479.98px) {
  #ct-page .ct-hero__cta .ct-btn { width: 100%; }
}

#ct-page .ct-hero__badges {
  margin-top: clamp(28px, 4vh, 44px);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
}

#ct-page .ct-hero__badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ct-text-inv);
}

#ct-page .ct-hero__badges svg { color: var(--ct-orange); flex: none; }

/* --- Mappa hero (emblema) --- */
#ct-page .ct-hero__map {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  order: -1;
}

@media (max-width: 959.98px) {
  #ct-page .ct-hero__map {
    max-width: 300px;
    max-height: 34vh;
    display: flex;
    justify-content: center;
  }
  #ct-page .ct-hero__map svg { max-height: 34vh; width: auto; }
}

@media (min-width: 960px) {
  #ct-page .ct-hero__map { order: 0; }
}

#ct-page .ct-hero__map svg { width: 100%; height: auto; overflow: visible; }

#ct-page .ct-hmap__shape {
  fill: url(#ct-hmap-fill);
  stroke: var(--ct-orange);
  stroke-width: 2.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 18px rgba(240, 133, 58, .35));
}

#ct-page .ct-hmap__pin { fill: var(--ct-orange); }
#ct-page .ct-hmap__pin-core { fill: #fff; }

#ct-page .ct-hmap__ring {
  fill: none;
  stroke: var(--ct-orange);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

#ct-page.ct-js .ct-hmap__ring {
  animation: ct-ping 2.8s var(--ct-out) infinite;
  animation-delay: var(--d, 0s);
}

@keyframes ct-ping {
  0% { transform: scale(.4); opacity: .9; }
  70% { opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

#ct-page .ct-hmap__base {
  fill: #fff;
  stroke: var(--ct-navy);
  stroke-width: 2;
}

#ct-page .ct-hmap__label {
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: 30px;
  fill: var(--ct-text-inv);
  paint-order: stroke;
  stroke: rgba(10, 22, 40, .85);
  stroke-width: 8px;
  stroke-linejoin: round;
}

#ct-page .ct-hmap__label--base { fill: var(--ct-orange); }

#ct-page .ct-hero__mapcap {
  margin-top: 10px;
  text-align: center;
  font-size: .82rem;
  color: var(--ct-text-inv-muted);
}

@media (max-width: 959.98px) {
  #ct-page .ct-hero__mapcap { display: none; }
}

/* ==========================================================================
   7. PROOF STRIP (numeri nel HTML, animati solo nel browser)
   ========================================================================== */
#ct-page .ct-proof {
  background: var(--ct-surface);
  border-bottom: 1px solid var(--ct-line);
  padding: clamp(36px, 6vw, 64px) 0;
}

#ct-page .ct-proof__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 18px;
}

@media (min-width: 960px) {
  #ct-page .ct-proof__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

#ct-page .ct-proof__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 16px;
  border-left: 2px solid var(--ct-orange-soft);
}

#ct-page .ct-proof__num {
  font-family: var(--ct-font-h);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ct-navy);
  font-variant-numeric: tabular-nums;
}

#ct-page .ct-proof__num small {
  font-size: .5em;
  font-weight: 600;
  margin-left: 2px;
  color: var(--ct-text-muted);
}

#ct-page .ct-proof__label {
  font-size: .92rem;
  line-height: 1.45;
  color: var(--ct-text-muted);
}

#ct-page .ct-proof__label a { color: var(--ct-text-muted); text-decoration: underline; }

/* ==========================================================================
   8. RISPOSTA DIRETTA (blocco "answer-first" per lettori e assistenti AI)
   ========================================================================== */
#ct-page .ct-answer {
  padding: clamp(56px, 8vw, 96px) 0 0;
}

#ct-page .ct-answer__box {
  position: relative;
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--ct-shadow);
  display: grid;
  gap: 18px;
}

@media (min-width: 960px) {
  #ct-page .ct-answer__box { grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
}

#ct-page .ct-answer__box h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  max-width: 30ch;
}

#ct-page .ct-answer__box p { margin-top: 12px; color: var(--ct-text-muted); }
#ct-page .ct-answer__box p strong { color: var(--ct-text); }

#ct-page .ct-answer__facts {
  display: grid;
  gap: 10px;
  font-size: .95rem;
}

#ct-page .ct-answer__facts li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: var(--ct-radius);
  background: var(--ct-bg);
}

#ct-page .ct-answer__facts svg { flex: none; margin-top: 4px; color: var(--ct-green); }

#ct-page .ct-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--ct-text-muted);
}

/* ==========================================================================
   9. LAVORI REALI — mappa pinnata + card (scrollytelling)
   ========================================================================== */
#ct-page .ct-works {
  padding: var(--ct-section-pad) 0;
}

#ct-page .ct-works__head { max-width: 760px; }

#ct-page .ct-works__layout {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 960px) {
  #ct-page .ct-works__layout {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 56px;
    align-items: start;
  }
}

#ct-page .ct-works__mapwrap {
  position: relative;
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  padding: clamp(14px, 2.4vw, 26px);
  box-shadow: var(--ct-shadow);
}

@media (min-width: 960px) {
  #ct-page .ct-works__mapwrap {
    position: sticky;
    top: 100px;
  }
}

#ct-page .ct-works__mapwrap svg {
  width: 100%;
  height: auto;
  max-height: 64vh;
}

#ct-page .ct-map__neighbor {
  fill: #eef1f5;
  stroke: rgba(10, 22, 40, .16);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

#ct-page .ct-map__prov {
  fill: #fff7f1;
  stroke: var(--ct-orange);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

#ct-page .ct-map__nlabel {
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: 22px;
  fill: rgba(10, 22, 40, .35);
  letter-spacing: .08em;
  text-transform: uppercase;
}

#ct-page .ct-map__pin { cursor: pointer; }

#ct-page .ct-map__pin circle.ct-map__dot {
  fill: var(--ct-orange);
  stroke: #fff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .35s var(--ct-out), fill .25s ease;
}

#ct-page .ct-map__pin text {
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: 24px;
  fill: var(--ct-navy);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 7px;
  stroke-linejoin: round;
  opacity: .0;
  transition: opacity .25s ease;
  pointer-events: none;
}

#ct-page .ct-map__pin.is-active circle.ct-map__dot,
#ct-page .ct-map__pin:hover circle.ct-map__dot {
  transform: scale(1.6);
  fill: var(--ct-navy);
}

#ct-page .ct-map__pin.is-active text,
#ct-page .ct-map__pin:hover text,
#ct-page .ct-map__pin:focus text { opacity: 1; }

/* senza JS le etichette restano visibili */
#ct-page:not(.ct-js) .ct-map__pin text { opacity: 1; }

#ct-page .ct-map__base rect {
  fill: var(--ct-navy);
  stroke: #fff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

#ct-page .ct-map__base text {
  font-family: var(--ct-font-h);
  font-weight: 700;
  font-size: 22px;
  fill: var(--ct-navy);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 7px;
}

#ct-page .ct-map__route {
  fill: none;
  stroke: var(--ct-navy);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  vector-effect: non-scaling-stroke;
  opacity: .5;
}

#ct-page .ct-works__legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: .82rem;
  color: var(--ct-text-muted);
}

#ct-page .ct-works__legend span { display: inline-flex; align-items: center; gap: 6px; }
#ct-page .ct-works__legend i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ct-orange);
  display: inline-block;
}
#ct-page .ct-works__legend i.is-base { border-radius: 2px; background: var(--ct-navy); }

#ct-page .ct-works__list {
  display: grid;
  gap: 22px;
}

#ct-page .ct-job {
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  overflow: hidden;
  box-shadow: var(--ct-shadow);
  transition: border-color .3s ease, box-shadow .3s var(--ct-out), transform .3s var(--ct-out);
}

#ct-page .ct-job.is-active {
  border-color: rgba(240, 133, 58, .55);
  box-shadow: 0 18px 46px rgba(10, 22, 40, .14);
}

@media (min-width: 960px) {
  #ct-page .ct-job.is-active { transform: translateX(-6px); }
}

#ct-page .ct-job__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--ct-navy-2);
  overflow: hidden;
}

#ct-page .ct-job__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Prima / dopo (slider accessibile con input range) --- */
#ct-page .ct-ba { position: absolute; inset: 0; --pos: 50%; }

#ct-page .ct-ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#ct-page .ct-ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

#ct-page .ct-ba__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, .35);
}

#ct-page .ct-ba__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--ct-navy);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

#ct-page .ct-ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

#ct-page .ct-ba__tag {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  border-radius: 40px;
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(10, 22, 40, .72);
  color: #fff;
  pointer-events: none;
}

#ct-page .ct-ba__tag--before { left: 12px; }
#ct-page .ct-ba__tag--after { right: 12px; background: var(--ct-orange); color: #1a1a1a; }

#ct-page .ct-job__type {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 5px 12px;
  border-radius: 40px;
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: .78rem;
  background: rgba(255, 255, 255, .94);
  color: var(--ct-navy);
}

#ct-page .ct-job__body { padding: clamp(18px, 2.6vw, 26px); }

#ct-page .ct-job__place {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ct-orange-hover);
  letter-spacing: .02em;
}

#ct-page .ct-job__title {
  margin-top: 6px;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
}

#ct-page .ct-job__text {
  margin-top: 8px;
  color: var(--ct-text-muted);
  font-size: .98rem;
}

#ct-page .ct-job__specs {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#ct-page .ct-job__specs li {
  font-size: .82rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 40px;
  background: var(--ct-bg);
  border: 1px solid var(--ct-line);
  color: var(--ct-text);
}

#ct-page .ct-works__note {
  margin-top: 26px;
  font-size: .88rem;
  color: var(--ct-text-muted);
}

/* ==========================================================================
   10. IL SOLE — produzione PVGIS + sole live
   ========================================================================== */
#ct-page .ct-sun {
  position: relative;
  padding: var(--ct-section-pad) 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(240, 133, 58, .16), transparent 70%),
    var(--ct-navy);
  color: var(--ct-text-inv);
  overflow: hidden;
}

#ct-page .ct-sun__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}

@media (min-width: 960px) {
  #ct-page .ct-sun__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

/* --- Sole live (arco alba → tramonto) --- */
#ct-page .ct-live {
  margin-top: 30px;
  background: var(--ct-navy-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--ct-radius-lg);
  padding: 20px 22px 18px;
}

#ct-page .ct-live__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: .85rem;
  color: var(--ct-text-inv-muted);
}

#ct-page .ct-live__head strong {
  font-family: var(--ct-font-h);
  font-size: .95rem;
  color: var(--ct-text-inv);
}

#ct-page .ct-live__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ct-green);
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(61, 186, 106, .6);
  animation: ct-live 2s ease-out infinite;
}

@keyframes ct-live {
  0% { box-shadow: 0 0 0 0 rgba(61, 186, 106, .6); }
  100% { box-shadow: 0 0 0 10px rgba(61, 186, 106, 0); }
}

#ct-page .ct-live svg { width: 100%; height: auto; margin-top: 8px; }

#ct-page .ct-live__arc {
  fill: none;
  stroke: rgba(255, 255, 255, .18);
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

#ct-page .ct-live__arc-done {
  fill: none;
  stroke: var(--ct-orange);
  stroke-width: 3;
  stroke-linecap: round;
}

#ct-page .ct-live__horizon { stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }

#ct-page .ct-live__sun { fill: #FFC46B; filter: drop-shadow(0 0 10px rgba(255, 196, 107, .9)); }

#ct-page .ct-live__label {
  font-family: var(--ct-font-b);
  font-size: 12px;
  fill: var(--ct-text-inv-muted);
}

#ct-page .ct-live__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
  margin-top: 10px;
  text-align: center;
}

@media (min-width: 520px) {
  #ct-page .ct-live__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Il widget "sole adesso" esiste solo con JS (è calcolato nel browser) */
#ct-page:not(.ct-js) .ct-live { display: none; }

#ct-page .ct-live__stats b {
  display: block;
  font-family: var(--ct-font-h);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--ct-text-inv);
  font-variant-numeric: tabular-nums;
}

#ct-page .ct-live__stats span { font-size: .78rem; color: var(--ct-text-inv-muted); }

#ct-page .ct-live__note { margin-top: 10px; font-size: .75rem; color: var(--ct-text-inv-muted); }

/* --- Grafico mensile --- */
#ct-page .ct-chart {
  background: var(--ct-navy-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--ct-radius-lg);
  padding: clamp(20px, 3vw, 32px);
}

#ct-page .ct-chart__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

#ct-page .ct-chart__total {
  font-family: var(--ct-font-h);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ct-text-inv);
  font-variant-numeric: tabular-nums;
}

#ct-page .ct-chart__total small {
  font-size: .38em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ct-text-inv-muted);
  margin-left: 6px;
}

#ct-page .ct-chart__caption { margin-top: 6px; font-size: .9rem; color: var(--ct-text-inv-muted); }

#ct-page .ct-kw {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  flex: 1;
  max-width: 300px;
}

#ct-page .ct-kw label {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--ct-text-inv-muted);
}

#ct-page .ct-kw label output {
  font-family: var(--ct-font-h);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ct-orange);
}

#ct-page .ct-kw input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--ct-orange) var(--fill, 18%), rgba(255, 255, 255, .15) var(--fill, 18%));
  outline-offset: 6px;
}

#ct-page .ct-kw input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--ct-orange);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  cursor: grab;
}

#ct-page .ct-kw input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--ct-orange);
  cursor: grab;
}

#ct-page .ct-bars {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 10px);
  align-items: end;
  height: clamp(180px, 26vw, 260px);
}

#ct-page .ct-bar {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* la colonna è alta in % della "pista", non dell'intera barra con etichette */
#ct-page .ct-bar__track {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding-top: 20px;
}

#ct-page .ct-bar__col {
  position: relative;
  width: 100%;
  height: var(--h, 50%);
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #FFC46B 0%, var(--ct-orange) 45%, rgba(240, 133, 58, .35) 100%);
  transform-origin: bottom;
  transition: height .5s var(--ct-out);
}

#ct-page .ct-bar__col .ct-bar__val {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -4px);
}

#ct-page.ct-js .ct-bars:not(.is-in) .ct-bar__col { transform: scaleY(0); }

#ct-page.ct-js .ct-bars.is-in .ct-bar__col {
  transform: scaleY(1);
  transition: transform .9s var(--ct-out), height .5s var(--ct-out);
  transition-delay: calc(var(--i, 0) * 55ms), 0s;
}

#ct-page .ct-bar__val {
  font-size: .68rem;
  font-weight: 600;
  color: var(--ct-text-inv);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 639.98px) {
  #ct-page .ct-bar__val { display: none; }
}

@media (max-width: 479.98px) {
  #ct-page .ct-bar__m { font-size: .56rem; letter-spacing: 0; }
}

#ct-page .ct-bar__m abbr { text-decoration: none; border: 0; cursor: default; }

#ct-page .ct-bar__m {
  font-size: .72rem;
  color: var(--ct-text-inv-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

#ct-page .ct-chart__equiv {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#ct-page .ct-chart__equiv b {
  display: block;
  font-family: var(--ct-font-h);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--ct-text-inv);
  font-variant-numeric: tabular-nums;
}

#ct-page .ct-chart__equiv span { font-size: .82rem; color: var(--ct-text-inv-muted); }

#ct-page .ct-chart__src {
  margin-top: 16px;
  font-size: .76rem;
  color: var(--ct-text-inv-muted);
}

#ct-page .ct-chart__src a { color: var(--ct-text-inv-muted); }

#ct-page .ct-sun__cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   11. COSA SAPERE (fatti locali con fonte)
   ========================================================================== */
#ct-page .ct-know {
  padding: var(--ct-section-pad) 0;
  background: var(--ct-bg);
}

#ct-page .ct-know__grid {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 760px) {
  #ct-page .ct-know__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  #ct-page .ct-know__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

#ct-page .ct-fact {
  position: relative;
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  padding: clamp(22px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

#ct-page .ct-fact__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ct-orange-soft);
  color: var(--ct-orange-hover);
}

#ct-page .ct-fact h3 { font-size: 1.12rem; line-height: 1.3; }
#ct-page .ct-fact p { color: var(--ct-text-muted); font-size: .97rem; }
#ct-page .ct-fact p strong { color: var(--ct-text); }

#ct-page .ct-fact__src {
  margin-top: auto;
  padding-top: 6px;
  font-size: .78rem;
  color: var(--ct-text-muted);
}

#ct-page .ct-fact__src a { color: var(--ct-text-muted); text-decoration: underline; }

/* Card in evidenza (es. bando con scadenza) */
#ct-page .ct-fact--hot {
  background: var(--ct-navy);
  border-color: var(--ct-navy);
  color: var(--ct-text-inv);
}

@media (min-width: 760px) {
  #ct-page .ct-fact--hot { grid-column: span 2; }
}

#ct-page .ct-fact--hot h3 { color: var(--ct-text-inv); font-size: clamp(1.2rem, 2vw, 1.5rem); }
#ct-page .ct-fact--hot p { color: var(--ct-text-inv-muted); }
#ct-page .ct-fact--hot p strong { color: var(--ct-text-inv); }
#ct-page .ct-fact--hot .ct-fact__icon { background: rgba(240, 133, 58, .2); color: var(--ct-orange); }
#ct-page .ct-fact--hot .ct-fact__src,
#ct-page .ct-fact--hot .ct-fact__src a { color: var(--ct-text-inv-muted); }

#ct-page .ct-fact--hot::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 133, 58, .35), transparent 65%);
  pointer-events: none;
}

#ct-page .ct-countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 4px;
}

#ct-page .ct-countdown__num {
  font-family: var(--ct-font-h);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--ct-orange);
  font-variant-numeric: tabular-nums;
}

#ct-page .ct-countdown__lbl { font-size: .9rem; color: var(--ct-text-inv-muted); line-height: 1.3; }

#ct-page .ct-fact--hot .ct-btn { align-self: flex-start; margin-top: 8px; }

/* ==========================================================================
   12. SERVIZI IN PROVINCIA
   ========================================================================== */
#ct-page .ct-services {
  padding: var(--ct-section-pad) 0;
  background: var(--ct-surface);
}

#ct-page .ct-services__grid {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  #ct-page .ct-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  #ct-page .ct-services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

#ct-page .ct-svc {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px 24px;
  border-radius: var(--ct-radius-lg);
  background: var(--ct-bg);
  border: 1px solid var(--ct-line);
  overflow: hidden;
  transition: transform .35s var(--ct-out), box-shadow .35s var(--ct-out), border-color .3s ease;
}

#ct-page .ct-svc::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(240, 133, 58, .16), transparent 65%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  #ct-page .ct-svc:hover {
    transform: translateY(-4px);
    box-shadow: var(--ct-shadow-lg);
    border-color: rgba(240, 133, 58, .45);
  }
  #ct-page .ct-svc:hover::before { opacity: 1; }
}

#ct-page .ct-svc__num {
  font-family: var(--ct-font-h);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ct-orange-hover);
  letter-spacing: .1em;
}

#ct-page .ct-svc h3 { font-size: 1.2rem; }
#ct-page .ct-svc p { font-size: .95rem; color: var(--ct-text-muted); }

#ct-page .ct-svc__go {
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ct-navy);
}

#ct-page .ct-svc__go svg { transition: transform .3s var(--ct-out); }
#ct-page .ct-svc:hover .ct-svc__go svg { transform: translateX(4px); }

/* ==========================================================================
   13. PROCESSO (timeline con linea che si disegna)
   ========================================================================== */
#ct-page .ct-steps {
  padding: var(--ct-section-pad) 0;
  background: var(--ct-bg);
}

#ct-page .ct-steps__list {
  position: relative;
  margin-top: clamp(36px, 5vw, 60px);
  display: grid;
  gap: 26px;
  counter-reset: ct-step;
}

#ct-page .ct-steps__line {
  position: absolute;
  left: 23px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--ct-line);
  overflow: hidden;
}

#ct-page .ct-steps__line span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ct-orange);
  transform-origin: top;
  transform: scaleY(var(--p, 1));
}

#ct-page .ct-step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: start;
}

#ct-page .ct-step__n {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--ct-font-h);
  font-weight: 700;
  background: var(--ct-surface);
  border: 2px solid var(--ct-orange);
  color: var(--ct-navy);
}

#ct-page .ct-step h3 { font-size: 1.15rem; margin-top: 10px; }
#ct-page .ct-step p { margin-top: 6px; color: var(--ct-text-muted); font-size: .97rem; }

#ct-page .ct-step__time {
  display: inline-block;
  margin-top: 8px;
  font-size: .8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 40px;
  background: var(--ct-orange-soft);
  color: var(--ct-orange-hover);
}

@media (min-width: 960px) {
  #ct-page .ct-steps__list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
  /* dal centro del primo cerchio al centro dell'ultimo: 4 colonne + 4 gap */
  #ct-page .ct-steps__line { left: 24px; top: 23px; bottom: auto; width: calc(80% + 17.6px); height: 2px; }
  #ct-page .ct-steps__line span { transform-origin: left; transform: scaleX(var(--p, 1)); }
  #ct-page .ct-step { grid-template-columns: 1fr; gap: 6px; }
}

/* ==========================================================================
   14. RECENSIONI (solo valutazioni reali con fonte)
   ========================================================================== */
#ct-page .ct-trust {
  padding: clamp(48px, 7vw, 80px) 0;
  background: var(--ct-surface);
  border-top: 1px solid var(--ct-line);
  border-bottom: 1px solid var(--ct-line);
}

#ct-page .ct-trust__inner {
  display: grid;
  gap: 20px;
  align-items: center;
}

@media (min-width: 960px) {
  #ct-page .ct-trust__inner { grid-template-columns: auto 1fr auto; gap: 40px; }
}

#ct-page .ct-trust__score {
  font-family: var(--ct-font-h);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: 1;
  color: var(--ct-navy);
}

#ct-page .ct-trust__score small { font-size: .4em; color: var(--ct-text-muted); font-weight: 600; }

/* Stelle proporzionali al voto reale (es. 4,6 = 92%) */
#ct-page .ct-trust__stars {
  position: relative;
  display: inline-block;
  margin-top: 8px;
  line-height: 0;
}

#ct-page .ct-trust__stars-row { display: flex; gap: 3px; color: rgba(10, 22, 40, .14); }

#ct-page .ct-trust__stars-row--on {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct, 100%);
  overflow: hidden;
  color: #00b67a;
}

#ct-page .ct-trust__text p { color: var(--ct-text-muted); }
#ct-page .ct-trust__text strong { color: var(--ct-text); }

/* ==========================================================================
   15. FAQ (details/summary: funziona senza JS)
   ========================================================================== */
#ct-page .ct-faq {
  padding: var(--ct-section-pad) 0;
  background: var(--ct-bg);
}

#ct-page .ct-faq__inner { max-width: 860px; }

#ct-page .ct-faq__list {
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--ct-line);
}

#ct-page .ct-faq__item { border-bottom: 1px solid var(--ct-line); }

#ct-page .ct-faq__item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  padding: 22px 4px;
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: clamp(1.02rem, 1.5vw, 1.14rem);
  line-height: 1.4;
  color: var(--ct-text);
}

#ct-page .ct-faq__item summary::-webkit-details-marker { display: none; }

#ct-page .ct-faq__item summary svg {
  flex: none;
  color: var(--ct-orange-hover);
  transition: transform .35s var(--ct-out);
}

#ct-page .ct-faq__item[open] summary svg { transform: rotate(45deg); }

#ct-page .ct-faq__a { padding: 0 4px 24px; }
#ct-page .ct-faq__a p { color: var(--ct-text-muted); }
#ct-page .ct-faq__a p + p { margin-top: 10px; }
#ct-page .ct-faq__a strong { color: var(--ct-text); }

/* ==========================================================================
   16. CTA FINALE + FORM
   ========================================================================== */
#ct-page .ct-cta {
  position: relative;
  padding: var(--ct-section-pad) 0;
  background: var(--ct-navy);
  color: var(--ct-text-inv);
  overflow: hidden;
}

#ct-page .ct-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 20% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 20% 30%, #000 20%, transparent 70%);
  pointer-events: none;
}

#ct-page .ct-cta__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}

@media (min-width: 960px) {
  #ct-page .ct-cta__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

#ct-page .ct-cta__points { margin-top: 26px; display: grid; gap: 12px; }

#ct-page .ct-cta__points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ct-text-inv);
}

#ct-page .ct-cta__points svg { flex: none; margin-top: 4px; color: var(--ct-green); }

#ct-page .ct-nap {
  margin-top: 30px;
  padding: 20px 22px;
  border-radius: var(--ct-radius-lg);
  background: var(--ct-navy-2);
  border: 1px solid rgba(255, 255, 255, .08);
  font-style: normal;
  font-size: .95rem;
  color: var(--ct-text-inv-muted);
  display: grid;
  gap: 8px;
}

#ct-page .ct-nap strong { color: var(--ct-text-inv); font-family: var(--ct-font-h); }
#ct-page .ct-nap a { color: var(--ct-text-inv); text-decoration: underline; text-underline-offset: 2px; }

#ct-page .ct-form-card {
  background: var(--ct-surface);
  color: var(--ct-text);
  border-radius: var(--ct-radius-lg);
  padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--ct-shadow-lg);
}

#ct-page .ct-form-card h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
#ct-page .ct-form-card > p { margin-top: 6px; color: var(--ct-text-muted); font-size: .95rem; }

#ct-page .ct-form { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }

#ct-page .ct-form__row { display: grid; grid-template-columns: 1fr; gap: 16px; }

@media (min-width: 640px) {
  #ct-page .ct-form__row { grid-template-columns: 1fr 1fr; }
}

#ct-page .ct-form__field { display: flex; flex-direction: column; gap: 7px; }

#ct-page .ct-form__field label {
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ct-text);
}

#ct-page .ct-form__field input[type="text"],
#ct-page .ct-form__field input[type="tel"],
#ct-page .ct-form__field input[type="email"],
#ct-page .ct-form__field select,
#ct-page .ct-form__field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ct-text);
  background: var(--ct-bg);
  border: 1.5px solid rgba(10, 22, 40, .15);
  border-radius: var(--ct-radius);
  padding: 13px 16px;
  width: 100%;
  min-height: 50px;
  transition: border-color .2s ease, background .2s ease;
}

#ct-page .ct-form__field textarea { resize: vertical; min-height: 92px; }

#ct-page .ct-form__field input:focus,
#ct-page .ct-form__field select:focus,
#ct-page .ct-form__field textarea:focus {
  border-color: var(--ct-orange);
  background: var(--ct-surface);
}

#ct-page .ct-form__field.has-error input,
#ct-page .ct-form__field.has-error select { border-color: var(--ct-danger); }

#ct-page .ct-form__error { display: none; font-size: .85rem; color: var(--ct-danger); }
#ct-page .ct-form__field.has-error .ct-form__error { display: block; }

#ct-page .ct-form__chips { display: flex; flex-wrap: wrap; gap: 8px; }

#ct-page .ct-chip input { position: absolute; opacity: 0; pointer-events: none; }

#ct-page .ct-chip span {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 40px;
  border: 1.5px solid rgba(10, 22, 40, .15);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

#ct-page .ct-chip input:checked + span {
  background: var(--ct-navy);
  border-color: var(--ct-navy);
  color: #fff;
}

#ct-page .ct-chip input:focus-visible + span { outline: 2px solid var(--ct-orange); outline-offset: 2px; }

#ct-page .ct-form__field--check {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

#ct-page .ct-form__field--check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--ct-orange);
  flex: none;
}

#ct-page .ct-form__field--check label {
  font-family: var(--ct-font-b);
  font-weight: 400;
  font-size: .9rem;
  color: var(--ct-text-muted);
  flex: 1;
  min-width: 200px;
}

#ct-page .ct-form__field--check label a { color: var(--ct-orange-hover); text-decoration: underline; }
#ct-page .ct-form__field--check .ct-form__error { flex-basis: 100%; }

#ct-page .ct-form__msg {
  display: none;
  font-size: .95rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--ct-radius);
}

#ct-page .ct-form__msg.is-error {
  display: block;
  color: var(--ct-danger);
  background: rgba(214, 69, 69, .08);
  border: 1px solid rgba(214, 69, 69, .25);
}

#ct-page .ct-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

#ct-page .ct-direct {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#ct-page .ct-direct a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: var(--ct-radius);
  font-family: var(--ct-font-h);
  font-weight: 600;
  font-size: .95rem;
  border: 1.5px solid var(--ct-line);
  color: var(--ct-navy);
  transition: background .2s ease, border-color .2s ease;
}

#ct-page .ct-direct a.is-wa { color: #128C4A; }

@media (hover: hover) and (pointer: fine) {
  #ct-page .ct-direct a:hover { background: var(--ct-bg); border-color: rgba(10, 22, 40, .3); }
}

/* ==========================================================================
   17. ZONE: comuni serviti + altre province
   ========================================================================== */
#ct-page .ct-zones {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--ct-surface);
}

#ct-page .ct-zones__grid {
  display: grid;
  gap: 36px;
}

@media (min-width: 960px) {
  #ct-page .ct-zones__grid { grid-template-columns: 1.4fr 1fr; gap: 56px; }
}

#ct-page .ct-zones h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
#ct-page .ct-zones p { margin-top: 10px; color: var(--ct-text-muted); font-size: .97rem; }

#ct-page .ct-zones__comuni {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#ct-page .ct-zones__comuni li {
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: 40px;
  background: var(--ct-bg);
  border: 1px solid var(--ct-line);
}

#ct-page .ct-zones__comuni li.is-job {
  border-color: rgba(240, 133, 58, .5);
  background: #fff7f1;
  font-weight: 600;
}

#ct-page .ct-zones__other { margin-top: 18px; display: grid; gap: 10px; }

#ct-page .ct-zones__other a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-line);
  font-family: var(--ct-font-h);
  font-weight: 600;
  transition: border-color .2s ease, background .2s ease, transform .25s var(--ct-out);
}

#ct-page .ct-zones__other a span { font-family: var(--ct-font-b); font-weight: 400; font-size: .85rem; color: var(--ct-text-muted); }

@media (hover: hover) and (pointer: fine) {
  #ct-page .ct-zones__other a:hover { border-color: var(--ct-orange); background: #fff7f1; transform: translateX(4px); }
}

#ct-page .ct-sources {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--ct-line);
  font-size: .82rem;
  color: var(--ct-text-muted);
}

#ct-page .ct-sources h3 {
  font-family: var(--ct-font-h);
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ct-text-muted);
}

#ct-page .ct-sources ol { margin-top: 10px; display: grid; gap: 4px; list-style: decimal; padding-left: 18px; }
#ct-page .ct-sources a { color: var(--ct-text-muted); text-decoration: underline; word-break: break-word; }

/* ==========================================================================
   18. STICKY CTA MOBILE
   ========================================================================== */
#ct-page .ct-sticky {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(10, 22, 40, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
  transform: translateY(140%);
  transition: transform .45s var(--ct-out);
}

#ct-page .ct-sticky.is-visible { transform: none; }

#ct-page .ct-sticky .ct-btn { padding: 12px 14px; font-size: .95rem; }

@media (min-width: 960px) {
  #ct-page .ct-sticky { display: none; }
}

/* ==========================================================================
   20. HUB "DOVE OPERIAMO" (landing-zone.php)
   ========================================================================== */
#ct-page .ct-hub-hero { min-height: 0; padding-bottom: clamp(40px, 6vw, 72px); }

#ct-page .ct-hub-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding-top: 120px;
}

@media (min-width: 1024px) {
  #ct-page .ct-hub-hero__inner {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    gap: 40px;
    padding-top: 140px;
  }
}

#ct-page .ct-hub-map { position: relative; width: 100%; }
#ct-page .ct-hub-map svg { width: 100%; height: auto; overflow: visible; }

#ct-page .ct-hub-prov,
#ct-page .ct-hub-prov path {
  fill: rgba(255, 255, 255, .05);
  stroke: rgba(255, 255, 255, .22);
  stroke-width: .8;
  stroke-linejoin: round;
  transition: fill .25s ease, stroke .25s ease;
}

#ct-page path.ct-hub-prov.is-context {
  fill: rgba(255, 255, 255, .015);
  stroke: rgba(255, 255, 255, .08);
}

#ct-page .ct-hub-prov.is-active,
#ct-page .ct-hub-prov.is-active path {
  fill: rgba(240, 133, 58, .32);
  stroke: var(--ct-orange);
  stroke-width: 1.2;
}

#ct-page a.ct-hub-prov { cursor: pointer; outline: none; }

#ct-page a.ct-hub-prov:hover path,
#ct-page a.ct-hub-prov:focus-visible path {
  fill: var(--ct-orange);
  stroke: #fff;
}

/* entrata: le province si accendono in sequenza (solo con JS e motion) */
#ct-page.ct-js .ct-hub-prov { animation: ct-hub-in .7s var(--ct-out) both; animation-delay: calc(var(--i, 0) * 22ms + .3s); }

@keyframes ct-hub-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

#ct-page .ct-hub-badge { pointer-events: none; }
#ct-page .ct-hub-badge circle { fill: #fff; stroke: var(--ct-orange); stroke-width: 2; }
#ct-page .ct-hub-badge text { font-family: var(--ct-font-h); font-weight: 700; font-size: 13px; fill: var(--ct-navy); }

#ct-page.ct-js .ct-hub-badge { animation: ct-hub-pop .5s var(--ct-out) both; animation-delay: 1.4s; }

@keyframes ct-hub-pop {
  from { opacity: 0; }
  to { opacity: 1; }
}

#ct-page .ct-hub-map__cap {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--ct-text-inv-muted);
}

#ct-page .ct-hub-key { width: 14px; height: 10px; border-radius: 2px; background: rgba(240, 133, 58, .5); border: 1px solid var(--ct-orange); }

#ct-page .ct-hub-list { padding: var(--ct-section-pad) 0; background: var(--ct-bg); }
#ct-page .ct-hub-region + .ct-hub-region { margin-top: clamp(48px, 7vw, 80px); }

#ct-page .ct-hub-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

#ct-page .ct-hub-card {
  display: flex;
  flex-direction: column;
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  overflow: hidden;
  transition: transform .3s var(--ct-out), box-shadow .3s var(--ct-out), border-color .3s ease;
}

#ct-page .ct-hub-card__img {
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--ct-navy-2);
}

#ct-page .ct-hub-card__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
#ct-page .ct-hub-card__n { font-family: var(--ct-font-h); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--ct-orange-hover); }
#ct-page .ct-hub-card__n small { font-size: .55em; font-weight: 600; color: var(--ct-text-muted); }
#ct-page .ct-hub-card__name { font-family: var(--ct-font-h); font-weight: 700; font-size: 1.08rem; color: var(--ct-text); }
#ct-page .ct-hub-card__comuni { font-size: .86rem; color: var(--ct-text-muted); line-height: 1.45; }
#ct-page .ct-hub-card__go { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--ct-font-h); font-weight: 600; font-size: .9rem; color: var(--ct-navy); }
#ct-page .ct-hub-card.is-soon { opacity: .7; }

@media (hover: hover) and (pointer: fine) {
  #ct-page a.ct-hub-card:hover { transform: translateY(-4px); box-shadow: var(--ct-shadow-lg); border-color: rgba(240, 133, 58, .45); }
}

#ct-page .ct-hub-cta { padding: clamp(64px, 9vw, 110px) 0; }

#ct-page .ct-hub-cta__box { display: grid; gap: 24px; align-items: center; }

@media (min-width: 960px) {
  #ct-page .ct-hub-cta__box { grid-template-columns: 1.3fr auto; }
}

/* ==========================================================================
   19. REDUCED MOTION — il CSS dipinge lo stato finale
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  #ct-page *,
  #ct-page *::before,
  #ct-page *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  #ct-page.ct-js [data-reveal] { opacity: 1 !important; transform: none !important; }
  #ct-page.ct-js .ct-hero__photo { animation: none; transform: none; }
  #ct-page.ct-js .ct-hmap__ring { animation: none; opacity: 0; }
  #ct-page.ct-js .ct-bars .ct-bar__col { transform: none !important; }
  #ct-page .ct-live__dot { animation: none; }
  #ct-page.ct-js .ct-hub-prov,
  #ct-page.ct-js .ct-hub-badge { animation: none; }
}
