:root {
  --bg: #f3f5f8;
  --surface: rgba(255,255,255,.78);
  --surface-strong: #ffffff;
  --text: #0e1a2a;
  --muted: #5f6b7a;
  --line: rgba(14,26,42,.08);
  --brand: #0f5d9c;
  --brand-dark: #0b2f53;
  --soft: #eaf1f7;
  --radius: 24px;
  --shadow: 0 18px 60px rgba(15, 31, 52, .12);
  --shadow-soft: 0 10px 30px rgba(15, 31, 52, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15,93,156,.14), transparent 32%),
    linear-gradient(180deg, #f9fbfd 0%, #eef2f6 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { background: #eef3f8; padding: .2rem .4rem; border-radius: 8px; }

.container { width: min(1280px, calc(100% - 24px)); margin: 0 auto; }
.section { padding: 88px 0; }
.page-shell { overflow: hidden; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(248, 251, 253, .74);
  border-bottom: 1px solid rgba(255,255,255,.6);
}
.header-inner {
  min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand img { height: 42px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 10px; }
.site-nav a {
  padding: 12px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .96rem;
}
.site-nav a:hover { background: rgba(15,93,156,.08); color: var(--text); }
.site-nav .nav-cta { background: var(--brand-dark); color: #fff; }
.menu-toggle {
  display: none; width: 48px; height: 48px; border: 0; border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--text); }

.hero { padding: 58px 0 42px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 0; align-items: center; }
.eyebrow {
  margin: 0 0 14px; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--brand);
}
.hero-copy h1, .section-heading h2, .process-grid h2, .cta-box h2, .intro-grid h2, .narrow h2 {
  margin: 0; line-height: 1.02; letter-spacing: -.04em;
}
.hero-copy { max-width: 1080px; margin: 0 auto; text-align: center; }
.hero-copy h1 { font-size: clamp(2.5rem, 3.5vw, 5.3rem);  margin-inline: auto; text-align: center; }
.hero-copy .eyebrow { text-align: center; }
.hero-copy .lead { margin-left: auto; margin-right: auto; }
.lead {
  margin: 24px 0 0; max-width: 60ch; font-size: 1.08rem; line-height: 1.75; color: var(--muted);
}
.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-actions { justify-content: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 700; transition: .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-soft); }
.button-secondary { background: #fff; border: 1px solid var(--line); }
.hero-points {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 30px 0 0; padding: 0; list-style: none;
}
.hero-points li {
  padding: 14px 16px; border: 1px solid rgba(255,255,255,.6); border-radius: 18px; background: rgba(255,255,255,.62); box-shadow: var(--shadow-soft); color: var(--muted); font-weight: 600;
}
.hero-visual { margin: 34px auto 0; }
.hero-visual-inline {
  display: grid; grid-template-columns: 1.2fr .9fr .9fr; gap: 18px; align-items: stretch; max-width: 980px;
}
.hero-card {
  overflow: hidden; border-radius: 30px; background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.8);
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-main, .hero-card-secondary, .hero-card-tertiary { position: relative; min-height: 280px; }

.intro-strip { padding-top: 28px; }
.intro-grid {
  display: block;
  text-align: center;
}
.intro-grid article, .logo-cluster {
  background: var(--surface); border: 1px solid rgba(255,255,255,.65); border-radius: 28px; padding: 26px; box-shadow: var(--shadow-soft); backdrop-filter: blur(16px);
}
.intro-grid h2 { font-size: clamp(2rem, 3.4vw, 3.25rem);  margin-inline: auto; }
.intro-grid p { color: var(--muted); line-height: 1.8; }
.intro-grid article {  margin: 0 auto; }
.logo-cluster { display: flex; justify-content: center; gap: 24px; align-items: center;  margin: 0 auto; }
.logo-cluster div {
  min-height: 160px; display: flex; align-items: center; justify-content: center; padding: 18px; border-radius: 22px; background: rgba(255,255,255,.82); border: 1px solid var(--line);
}

.section-heading { margin-bottom: 34px; }
.section-heading h2, .process-grid h2, .cta-box h2, .narrow h2 { font-size: clamp(2rem, 4vw, 3.9rem);  }
.section-heading p, .process-grid p, .cta-box p, .narrow p { color: var(--muted); line-height: 1.8; max-width: 68ch; }
.cards-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.solution-card {
  display: flex; flex-direction: column; min-height: 100%; overflow: hidden; border-radius: 28px; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.78); box-shadow: var(--shadow-soft); transition: .24s ease;
}
.solution-card:hover, .project-card:hover { transform: translateY(-4px); }
.solution-card.featured { grid-column: span 2; }
.card-media { aspect-ratio: 1.35 / 1; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-copy { padding: 22px 24px 26px; }
.card-tag { margin: 0 0 8px; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; }
.card-copy h3, .project-card h3, .steps h3 { margin: 0; font-size: 1.45rem; letter-spacing: -.03em; }
.card-copy p:last-child { margin-bottom: 0; }

.section-dark {
  background: linear-gradient(180deg, rgba(8,29,49,.98), rgba(9,37,65,.95)); color: #fff;
}
.section-dark .eyebrow { color: #8fc6ff; }
.section-dark p { color: rgba(255,255,255,.76); }
.process-grid {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: start;
}
.steps {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.steps article {
  padding: 26px; border-radius: 24px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
}
.steps span {
  display: inline-flex; width: 42px; height: 42px; border-radius: 50%; align-items: center; justify-content: center; margin-bottom: 16px; background: rgba(255,255,255,.14); font-weight: 700;
}
.steps p { margin-bottom: 0; }

.section-soft { background: linear-gradient(180deg, rgba(234,241,247,.78), rgba(243,245,248,0)); }
.project-card {
  display: block; overflow: hidden; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.project-card img { aspect-ratio: 1.15 / 1; width: 100%; object-fit: cover; }
.project-card span, .project-card h3 { display: block; padding: 0 20px; }
.project-card span { margin-top: 18px; color: var(--brand); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.project-card h3 { margin: 10px 0 20px; }

.narrow { max-width: 820px; }
.legacy-wrap {
  padding: 22px; border-radius: 28px; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.75); box-shadow: var(--shadow-soft);
}
.legacy-wrap #divcorpo {
  background: #fff; border-radius: 20px; padding: 20px;
}
.legacy-wrap #divcorpo h3, .legacy-wrap #divcorpo h4 { color: var(--brand) !important; }
.legacy-wrap #divcorpo table { width: 100%; }
.legacy-wrap #divcorpo img { max-width: 100%; height: auto; border-radius: 16px; }

.cta-section { padding-top: 30px; }
.cta-box {
  display: flex; justify-content: space-between; gap: 32px; align-items: center; padding: 36px; border-radius: 30px; background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(232,240,248,.9)); border: 1px solid rgba(255,255,255,.85); box-shadow: var(--shadow);
}
.site-footer {
  padding: 30px 0 42px; background: linear-gradient(180deg, transparent, rgba(9,37,65,.96));
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: center;
}
.footer-inner a { color: rgba(255,255,255,.88); font-size: .95rem; }

@media (max-width: 1100px) {
  .hero-grid, .process-grid, .cta-box { grid-template-columns: 1fr; display: grid; }
  .intro-grid { display: block; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-visual-inline { grid-template-columns: 1fr; max-width: 760px; }
  .project-track { grid-auto-columns: calc((100% - 18px) / 2); }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; top: 78px; right: 20px; left: 20px; padding: 16px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: grid; }
  .hero { padding-top: 36px; }
  .hero-points, .steps, .logo-cluster, .cards-grid, .hero-visual-inline { grid-template-columns: 1fr; }
  .solution-card.featured { grid-column: span 1; }
  .hero-card-main, .hero-card-secondary, .hero-card-tertiary { min-height: 220px; }
  .intro-grid article, .logo-cluster, .legacy-wrap, .cta-box { padding: 24px; }
  .project-carousel-wrap { grid-template-columns: 1fr; }
  .project-nav { display: none; }
  .project-track { grid-auto-columns: 100%; }
}


.section-heading-simple { margin-bottom: 26px; }
.section-title-lg {
  font-size: clamp(2rem, 4.4vw, 4rem);
  letter-spacing: -.04em;
  text-transform: none;
  line-height: 1.05;
  margin-bottom: 0;
}
.section-title-light { color: #ffffff; }

.project-carousel-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.project-carousel {
  overflow: hidden;
  scroll-behavior: smooth;
}
.project-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  gap: 18px;
}
.project-nav {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--brand-dark);
  font-size: 1.5rem;
  cursor: pointer;
}
.project-nav:hover { transform: translateY(-2px); }
.project-card img { aspect-ratio: 1.18 / 0.9; }
.project-card span {
  margin-top: 22px;
  font-size: .9rem;
}
.project-card h3 {
  margin: 12px 0 24px;
  font-size: clamp(1.7rem, 2.3vw, 2.2rem);
  line-height: 1.08;
}

.content-section .solution-card.featured .card-media {
  aspect-ratio: 2 / 1;
  background: #fff; /* oppure #f5f7fa se vuoi più morbido */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.content-section .solution-card.featured .card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* === LEGACY SUBPAGES: HOME-LIKE TEMPLATE FIX === */
.legacy-page-main {
  padding-top: 8px;
}

.legacy-page-main .section {
  padding: 42px 0 88px;
}

.legacy-page-shell {
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.legacy-page-content {
  max-width: 980px;
  margin: 0 auto;
}

.legacy-page-content > br:first-child,
.legacy-page-content > p.lead:empty {
  display: none;
}

.legacy-page-content .container,
.legacy-page-content .container-fluid {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.legacy-page-content .row {
  margin-left: 0;
  margin-right: 0;
}

.legacy-page-content [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

.legacy-page-content h1 {
  margin: 0 0 14px;
  line-height: 1.02;
  letter-spacing: -.04em;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  color: #0272a7 !important;
  font-weight: 800;
}

.legacy-page-content h2,
.legacy-page-content h3 {
  letter-spacing: -.03em;
  color: var(--text);
}

.legacy-page-content h4,
.legacy-page-content p,
.legacy-page-content li {
  color: var(--text);
  line-height: 1.8;
}

.legacy-page-content p,
.legacy-page-content h4 {
  font-size: 1.06rem;
}

.legacy-page-content img {
  max-width: 100%;
  height: auto;
}

.legacy-page-content .img-responsive,
.legacy-page-content .center-block {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.legacy-page-content .btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: .2s ease;
  background: var(--brand-dark);
  color: #fff;
  box-shadow: var(--shadow-soft);
  border: 0;
}

.legacy-page-content .btn-lg a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 820px) {
  .legacy-page-main .section {
    padding: 24px 0 64px;
  }

  .legacy-page-content {
    max-width: 100%;
  }

  .legacy-page-content h1 {
    font-size: clamp(2rem, 9vw, 3.1rem);
  }

  .legacy-page-content h4,
  .legacy-page-content p,
  .legacy-page-content li {
    font-size: 1rem;
  }
}


/* === Clean subpages template === */
.subpage-main { padding: 16px 0 0; }
.subpage-hero { padding: 40px 0 88px; }
.subpage-header {
  max-width: 980px;
  margin: 0 auto 28px;
}
.subpage-header h1 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: -.04em;
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  color: var(--brand);
}
.subpage-lead {
  margin: 18px 0 0;
  max-width: 70ch;
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text);
  font-weight: 600;
}
.subpage-content {
  max-width: 980px;
  margin: 0 auto;
}
.subpage-content > *:first-child { margin-top: 0; }
.subpage-content h2,
.subpage-content h3 {
  margin: 34px 0 14px;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--brand);
}
.subpage-content p,
.subpage-content li {
  font-size: 1.06rem;
  line-height: 1.82;
  color: var(--text);
}
.subpage-content p { margin: 0 0 16px; }
.subpage-content ul,
.subpage-content ol { margin: 0 0 20px; padding-left: 1.2rem; }
.subpage-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 26px auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.subpage-content .container,
.subpage-content .container-fluid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.subpage-content .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 26px 0;
}
.subpage-content [class*="col-"] {
  width: auto;
  float: none;
  padding: 0;
}
.subpage-content .text-center { text-align: center; }
.subpage-content .btn-lg,
.subpage-content .btn-lg a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  background: var(--brand-dark);
  color: #fff !important;
  border: 0;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 820px) {
  .subpage-hero { padding: 26px 0 64px; }
  .subpage-header h1 { font-size: clamp(2rem, 9vw, 3.2rem); }
  .subpage-lead, .subpage-content p, .subpage-content li { font-size: 1rem; }
  .subpage-content .row { grid-template-columns: 1fr; gap: 18px; }
}

.article-carousel-wrap {
  max-width: 1280px;
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 18px;
  align-items: center;
}

.article-carousel {
  width: 100%;
  overflow: hidden;
}

.article-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
}

.article-card {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
}

.article-card .card-media {
  height: 640px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
}

.article-card .card-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.article-card .card-copy {
  padding: 20px 22px 24px;
}

.article-card .card-copy h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.article-card .card-copy p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--muted);
}

.article-nav {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--brand-dark);
  font-size: 1.5rem;
  cursor: pointer;
  flex: 0 0 auto;
}

.solution-card.grid1 { grid-column: span 1; }

@media (max-width: 820px) {
  .article-carousel-wrap {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .article-nav {
    display: none;
  }

  .article-card .card-media {
    height: 240px;
    padding: 14px;
  }

  .article-card .card-copy {
    padding: 18px;
  }
}
