:root {
  --green: #1fa81a;
  --green-dark: #168013;
  --gray: #7f7f7f;
  --white: #ffffff;
  --footer: #212121;
  --text: #2b2b2b;
  --light: #f4f6f4;
  --radius: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Barra superiore */
.topbar {
  background: var(--gray);
  color: var(--white);
  font-size: 14px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: flex-end; gap: 20px; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo img { height: 52px; width: auto; }
.logo { flex-shrink: 0; margin-right: 40px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a, .nav .btn { white-space: nowrap; }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.nav a:hover, .nav a.active { color: var(--green); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 28px;
  color: var(--text);
  cursor: pointer;
}

/* Pulsanti */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--green); }

/* Slider */
.slider { position: relative; height: min(70vh, 620px); overflow: hidden; background: var(--footer); }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
}
.slide.active { opacity: 1; }
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(33,33,33,.82) 0%, rgba(33,33,33,.4) 55%, rgba(33,33,33,.1) 100%);
}
.slide-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  color: var(--white);
}
.slide-content h1, .slide-content h2 {
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.12;
  max-width: 640px;
  margin-bottom: 18px;
}
.slide-content p {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 560px;
  margin-bottom: 30px;
  opacity: .95;
}
.slider-dots {
  position: absolute;
  z-index: 3;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.slider-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: transparent;
  cursor: pointer;
}
.slider-dots button.active { background: var(--green); border-color: var(--green); }

/* Sezioni */
section { padding: 84px 0; }
.section-title { text-align: center; margin-bottom: 52px; }
.section-title h2 { font-size: clamp(26px, 3vw, 36px); color: var(--text); margin-bottom: 12px; }
.section-title p { color: var(--gray); max-width: 640px; margin: 0 auto; font-size: 17px; }
.eyebrow {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  margin-bottom: 10px;
}

/* Prodotti */
.products { background: var(--light); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.07);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 34px rgba(0,0,0,.11); }
.card img { width: 100%; height: 260px; object-fit: cover; background: #e6e6e6; }
.card-body { padding: 28px; }
.card-body h3 { font-size: 22px; margin-bottom: 10px; }
.card-body p { color: var(--gray); margin-bottom: 20px; }

/* Competenze */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.skill {
  border: 1px solid #e3e8e3;
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color .2s, transform .2s;
}
.skill:hover { border-color: var(--green); transform: translateY(-3px); }
.skill .num {
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}
.skill h3 { font-size: 19px; margin-bottom: 10px; color: var(--text); }
.skill p { color: var(--gray); font-size: 15px; }

/* Università */
.partners { background: var(--light); }
.logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  align-items: center;
}
.logo-placeholder {
  background: var(--white);
  border-radius: 10px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 14px;
  text-align: center;
  padding: 10px;
  border: 1px dashed #cfd6cf;
}

/* PMI innovativa */
.pmi {
  background: var(--green);
  color: var(--white);
  text-align: center;
}
.pmi h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 16px; }
.pmi p { max-width: 720px; margin: 0 auto 28px; font-size: 17px; opacity: .95; }

/* Footer */
.footer { background: var(--footer); color: #cfcfcf; padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { height: 56px; width: auto; margin-bottom: 16px; }
.legal-links a { display: inline; margin: 0 8px; }
.legal-links a:first-child { margin-left: 0; }
.footer h4 { color: var(--white); margin-bottom: 14px; font-size: 16px; }
.footer a { color: #cfcfcf; text-decoration: none; display: block; margin-bottom: 8px; }
.footer a:hover { color: var(--green); }
.footer-bottom {
  border-top: 1px solid #3a3a3a;
  padding-top: 22px;
  font-size: 13px;
  color: #9a9a9a;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Immagini e tag nelle schede prodotto */
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.tags li {
  background: var(--light);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e0e6e0;
}
.card-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.text-link { color: var(--green); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Immagini nelle schede competenze */
.skill img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 10px;
  margin-bottom: 20px;
  padding: 10px;
}
.capacita { background: var(--white); }
.assist-box {
  background: var(--light);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
}
.assist-box p { margin-bottom: 24px; color: var(--text); font-size: 17px; }

/* Pagine Tecnologia */
.tech-grid { display: grid; gap: 28px; }
.tech-card {
  background: var(--light);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.tech-card h2, .tech-card h3 { font-size: clamp(20px, 2.2vw, 26px); color: var(--text); margin: 8px 0 14px; }
.tech-card p { color: var(--text); margin-bottom: 14px; }
.tech-card .btn { margin-top: 10px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0 28px; background: var(--white); border-radius: 10px; overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 18px; font-size: 16px; }
.spec-table th { width: 40%; color: var(--text); }
.spec-table tr:nth-child(odd) { background: var(--light); }
.disclaimer { font-size: 14px; color: var(--gray); padding: 24px 0 40px; }

/* Popup richiesta di consenso (solo operatori) */
.gate {
  position: fixed;
  inset: 0;
  background: rgba(33,33,33,.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}
.gate.show { display: flex; }
.gate-box {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.gate-box h2 { font-size: clamp(22px, 3vw, 28px); color: var(--text); margin: 8px 0 16px; }
.gate-box p { margin-bottom: 14px; font-size: 15px; color: var(--text); }
.gate-box .gate-law { font-size: 13px; color: var(--gray); }
.gate-box .btn { width: 100%; text-align: center; margin-top: 8px; border: 0; cursor: pointer; font-size: 16px; }
body.locked { overflow: hidden; }

/* Pagina Dispositivi */
.device {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 70px;
}
.device img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0,0,0,.08);
  background: var(--white);
}
.device-text h2 { font-size: clamp(28px, 3.4vw, 40px); color: var(--text); margin: 8px 0 16px; }
.device-text p { margin-bottom: 14px; font-size: 17px; color: var(--text); }
.device-text .tags { margin-top: 10px; }
.device-text .spec-table { margin-top: 10px; }
.btn-outline-dark {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-outline-dark:hover { background: var(--green); color: var(--white); }
@media (max-width: 900px) {
  .device { grid-template-columns: 1fr; gap: 28px; padding: 30px 0 50px; }
}

.cert-img { background: #fff; border-radius: var(--radius); padding: 16px; object-fit: contain; height: auto; max-height: 520px; width: 100%; }

/* Responsive */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 18px;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    display: none;
  }
  .nav.open { display: flex; }
  .skills, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .slider { height: 75vh; }
  .slide::after { background: linear-gradient(0deg, rgba(33,33,33,.85) 0%, rgba(33,33,33,.35) 70%); }
  .slide-content { top: auto; bottom: 70px; transform: none; }
}
/* Menu: passa al menu a tendina prima che le voci vadano a capo */
@media (max-width: 1220px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 18px;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    display: none;
  }
  .nav.open { display: flex; }
  .logo { margin-right: 0; }
}

/* Pagine interne */
.page-hero { padding: 64px 0 40px; background: var(--light); }
.page-hero h1 { font-size: clamp(34px, 4.5vw, 52px); color: var(--text); margin-bottom: 18px; }
.lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--gray); max-width: 760px; }
.text-block { max-width: 820px; }
.text-block h2 { font-size: clamp(24px, 2.6vw, 30px); color: var(--text); margin: 8px 0 16px; }
.text-block p { margin-bottom: 16px; font-size: 17px; }
.check-list { list-style: none; margin: 0 0 18px; }
.check-list li {
  position: relative;
  padding: 6px 0 6px 30px;
}
section[id] { scroll-margin-top: 90px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
}
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
}
.value h3 { color: var(--green); font-size: 20px; margin-bottom: 10px; }
.value p { color: var(--gray); font-size: 15px; }
.doc-card {
  border: 1px solid #e3e8e3;
  border-radius: var(--radius);
  padding: 32px 28px;
}
.doc-card h3 { font-size: 21px; margin-bottom: 12px; color: var(--text); }
.doc-card p { color: var(--gray); margin-bottom: 22px; }
.logo-story {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.logo-story img { width: 100%; height: auto; }
.logo-story h2 { font-size: clamp(24px, 2.6vw, 30px); color: var(--text); margin: 8px 0 16px; }
.logo-story p { margin-bottom: 16px; color: var(--text); }
@media (max-width: 900px) {
  .values { grid-template-columns: 1fr; }
  .logo-story { grid-template-columns: 1fr; gap: 24px; }
  .logo-story img { max-width: 180px; }
}

/* Carosello loghi università */
.carousel {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 20px 24px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-track {
  display: flex;
  gap: 18px;
  width: max-content;
  margin: 0 auto;
}
.carousel-item {
  flex: 0 0 auto;
  width: 200px;
  height: 120px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.carousel-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@media (max-width: 560px) {
  .carousel-item { width: 160px; height: 110px; }
  .carousel-track { width: auto; margin: 0; }
}

@media (max-width: 560px) {
  .topbar .container { justify-content: center; flex-wrap: wrap; gap: 10px; }
  .container { padding: 0 16px; }
}

.subtitle { color: var(--grey, #7f7f7f); font-weight: 600; margin: -6px 0 12px; }

/* SynthONO – blocchi del sistema */
.card-number { display: inline-block; color: #1fa81a; font-weight: 800; font-size: 14px; letter-spacing: .12em; margin-bottom: 8px; }
.video-wrap { max-width: 960px; margin: 0 auto; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.12); background: #212121; }
.video-wrap { aspect-ratio: 16 / 9; }
.video-wrap video { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #212121; }
.sys-figure { max-width: 960px; margin: 0 auto; }
.sys-figure img, .sys-block img, .usage-card img, .brochure-panel img { width: 100%; height: auto; border-radius: 16px; background: #fff; }
.sys-block { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 72px; }
.sys-block.rev > img { order: 2; }
.sys-block h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 16px; }
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.usage-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.usage-card img { border-radius: 0; height: 260px; object-fit: cover; }
.usage-card > div { padding: 24px; }
.usage-card h3 { margin: 0 0 8px; }
.brochure-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.brochure-panel h2 { font-size: clamp(24px, 3vw, 32px); margin: 8px 0 16px; }
.notice-panel { background: #212121; color: #fff; border-radius: 20px; padding: 40px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: center; }
.notice-panel h2 { color: #fff; margin: 8px 0 0; font-size: clamp(22px, 3vw, 30px); }
.notice-panel .eyebrow { color: #1fa81a; }
.notice-panel p { margin: 0; color: #e6e6e6; }
@media (max-width: 900px) {
  .sys-block, .usage-grid, .brochure-panel, .notice-panel { grid-template-columns: 1fr; gap: 24px; }
  .sys-block { margin-bottom: 48px; }
  .sys-block.rev > img { order: 0; }
  .notice-panel { padding: 28px; }
}

/* Ethinforma – copertine newsletter */
.news-cover { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #f4f4f4; border-radius: 12px; margin: 0 0 18px; }
.doc-card .btn-outline { margin-top: 10px; margin-right: 8px; color: var(--green); border-color: var(--green); }
.doc-card .btn-outline:hover { background: var(--green); color: var(--white); }

/* Applicazioni cliniche – casi e immagini */
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 32px 0; }
.case-fig { margin: 0; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.case-fig img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #f4f4f4; }
.case-fig figcaption { padding: 18px 20px 22px; color: var(--gray, #7f7f7f); font-size: 15px; line-height: 1.6; }
.lettino-fig { margin: 0 auto 36px; max-width: 760px; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.lettino-fig img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .case-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Applicazioni cliniche – casi come card: testo a sinistra, immagine a destra */
.case-grid { grid-template-columns: 1fr; gap: 24px; margin: 28px 0; }
.case-fig { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 28px; padding: 24px; margin: 0; background: #fff; border: 1px solid #e6e6e6; border-radius: 20px; box-shadow: none; overflow: visible; }
.case-fig img { order: 2; width: 100%; height: 260px; aspect-ratio: auto; object-fit: contain; background: #fff; padding: 16px; border-radius: 16px; box-sizing: border-box; }
.case-fig figcaption { order: 1; padding: 0; font-size: 15px; line-height: 1.7; color: var(--gray, #7f7f7f); }
.lettino-fig { max-width: 100%; margin: 0 0 30px; padding: 20px; background: #fff; border: 1px solid #e6e6e6; border-radius: 20px; box-shadow: none; }
.lettino-fig img { display: block; width: 100%; height: 300px; object-fit: contain; border-radius: 12px; }
@media (max-width: 760px) {
  .case-fig { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .case-fig img, .lettino-fig img { height: 220px; }
}

/* Applicazioni cliniche – testo e immagine affiancati su desktop */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-bottom: 24px; }
.split-text > :first-child { margin-top: 0; }
.split-fig { margin: 0; padding: 20px; background: #fff; border: 1px solid #e6e6e6; border-radius: 20px; box-shadow: none; }
.split-fig img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: contain; border-radius: 12px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* Applicazioni cliniche – titolo sopra, testo a sinistra, immagine in alto a destra */
.split { grid-template-columns: 1fr 1fr; align-items: start; gap: 48px; margin-bottom: 24px; }
.split-fig { position: static; padding: 16px; }
.split-fig img { aspect-ratio: 4 / 3; height: auto; max-height: none; object-fit: contain; background: #fff; }

/* Applicazioni cliniche – divisore fotografico e card RMN/fratture più orizzontali */
.divider { padding: 40px 0 20px; }
.divider-fig { margin: 0; }
.divider-fig img { display: block; width: 100%; height: auto; border-radius: 24px; }
.case-fig { grid-template-columns: 1.2fr 1fr; }
.case-fig img { height: 200px; }


/* Mobile: colonna unica per testi e immagini (regole finali, hanno precedenza) */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr !important; gap: 24px !important; }
}
@media (max-width: 760px) {
  .case-fig { grid-template-columns: 1fr !important; gap: 18px; padding: 20px; }
  .case-fig img { height: 220px; }
  .case-grid { grid-template-columns: 1fr !important; }
}