:root {
  --primary: #1598d1;
  --primary-light: #76d0ef;
  --primary-soft: #eaf8fd;
  --primary-dark: #0875aa;
  --footer: #075f8d;
  --text: #17242b;
  --muted: #5d6c74;
  --white: #ffffff;
  --page: #f7fbfd;
  --border: #dcecf3;
  --shadow: 0 14px 38px rgba(16, 86, 119, 0.13);
  --container: 1320px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.6;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(8,117,170,.08);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: var(--container);
  overflow: visible;
  min-height: 92px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 160px;
}

.brand-logo {
  width: auto;
  max-width: 289px;
  max-height: 122px;
  object-fit: contain;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  min-height: 92px;
}

.main-nav > a,
.main-nav > .nav-dropdown > .nav-dropdown-toggle,
.main-nav > .nav-static {
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.main-nav > a:hover,
.main-nav > a.active,
.main-nav > .nav-dropdown > .nav-dropdown-toggle:hover,
.main-nav > .nav-dropdown.is-open > .nav-dropdown-toggle {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-dropdown-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.nav-dropdown-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 9px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.nav-dropdown.is-open > .nav-dropdown-toggle::after {
  transform: rotate(45deg);
  margin-top: -4px;
}

.nav-submenu {
  display: none;
  position: absolute;
  z-index: 1100;
  top: 100%;
  left: 0;
  min-width: 230px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 28px rgba(0,0,0,.10);
}

.nav-dropdown.is-open > .nav-submenu {
  display: block;
}

.nav-submenu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-submenu a:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-static {
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.main-nav > a:hover,
.main-nav > a.active,
.main-nav > .nav-dropdown > summary:hover,
.main-nav > .nav-dropdown[open] > summary {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-dropdown > .nav-dropdown-toggle {
  list-style: none;
  cursor: pointer;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 9px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease, margin-top .2s ease;
}

.nav-dropdown[open] > summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

.nav-submenu {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  min-width: 230px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 28px rgba(0,0,0,.10);
}

.nav-submenu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-submenu a:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-static {
  cursor: default;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 42px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--primary-dark);
}

/* HERO / SLIDER */
.hero {
  width: 100%;
  background: var(--white);
}

.slider {
  position: relative;
  width: 100%;
  min-height: 560px;
  height: clamp(560px, 70vh, 760px);
  overflow: hidden;
  background: #dcecf3;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .65s ease;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,42,61,.12), rgba(5,42,61,.07) 50%, rgba(5,42,61,.22));
}

.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  max-width: var(--container);
  width: calc(100% - 56px);
  margin: 0 auto;
  padding-top: clamp(28px, 4vw, 56px);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.hero-card {
  width: min(620px, 52vw);
  max-width: 100%;
  padding: clamp(28px, 3.2vw, 46px);
  background: rgba(255,255,255,.96);
  border-radius: 6px 6px 58px 6px;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
}

.hero-card h1,
.hero-card h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.hero-card p:last-child {
  margin: 0;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--muted);
}

.slider-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--primary-dark);
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.slider-arrow:hover {
  background: var(--primary);
  color: var(--white);
}

.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }

.slider-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

.dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}

.dot.is-active {
  background: var(--primary);
  border-color: var(--primary);
}

/* 6 SEZIONI */
.content-sections {
  padding: clamp(56px, 7vw, 92px) 28px clamp(76px, 8vw, 120px);
}

.info-section {
  scroll-margin-top: 104px;
  max-width: 1120px;
  margin: 0 auto clamp(70px, 8vw, 100px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(42px, 6vw, 88px);
  align-items: center;
}

.info-section:last-child {
  margin-bottom: 0;
}

.info-section.reverse .info-text {
  order: 2;
}

.info-section.reverse .info-image {
  order: 1;
}

.section-number {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .16em;
}

.info-text {
  min-width: 0;
}

.info-text h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 3vw, 50px);
  line-height: 1.12;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.info-text .lead {
  margin: 0 0 26px;
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--primary-dark);
}

.info-text p:not(.section-number):not(.lead) {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.info-image {
  min-width: 0;
}

.info-image img {
  width: 100%;
  aspect-ratio: 1.12 / 1;
  object-fit: cover;
  border-radius: 4px 4px 48px 4px;
  box-shadow: var(--shadow);
}

.info-section.reverse .info-image img {
  border-radius: 4px 4px 4px 48px;
}

/* FOOTER */
.site-footer {
  background: var(--footer);
  color: var(--white);
  padding: 20px 28px 16px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr) minmax(160px, 1fr);
  gap: clamp(34px, 5vw, 70px);
  align-items: start;
}

.footer-logo {
  max-width: 150px;
  max-height: 70px;
  margin-bottom: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-brand h2,
.footer-links h3,
.footer-social h3 {
  margin-top: 0;
}

.footer-brand h2 {
  margin-bottom: 4px;
}

.footer-brand p {
  margin: 4px 0;
  color: rgba(255,255,255,.88);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a,
.footer-brand a {
  color: rgba(255,255,255,.9);
  overflow-wrap: anywhere;
}

.footer-links a:hover,
.footer-brand a:hover {
  text-decoration: underline;
}

.social-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-row a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  font-weight: 800;
}

.social-row a:hover {
  background: var(--white);
  color: var(--footer);
}

.footer-bottom {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.22);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
}

.footer-bottom p {
  margin: 0;
}

/* TABLET LANDSCAPE / SMALL LAPTOP */
@media (max-width: 1180px) {
  html {
    scroll-padding-top: 94px;
  }

  .info-section {
    scroll-margin-top: 94px;
  }

  .header-inner {
    min-height: 82px;
  }

  .main-nav {
    min-height: 82px;
  }

  .main-nav > a,
  .main-nav > .nav-dropdown > .nav-dropdown-toggle,
  .main-nav > .nav-static {
    padding: 0 13px;
    font-size: 14px;
  }

  .brand-logo {
    max-width: 255px;
  }
}

/* TABLET */
@media (max-width: 980px) {
  html {
    scroll-padding-top: 88px;
  }

  .info-section {
    scroll-margin-top: 88px;
  }

  .header-inner {
    min-height: 76px;
    padding: 0 20px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    max-width: 241px;
    max-height: 99px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-height: 0;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    padding: 10px 18px 22px;
    background: var(--white);
    display: none;
    flex-direction: column;
    border-top: 1px solid var(--border);
    box-shadow: 0 15px 30px rgba(0,0,0,.08);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav > a,
  .main-nav > .nav-dropdown > .nav-dropdown-toggle,
  .main-nav > .nav-static {
    min-height: 50px;
    padding: 0 15px;
    border-radius: 10px;
    font-size: 15px;
  }

  .nav-dropdown {
    display: block;
    width: 100%;
  }

  .nav-dropdown > .nav-dropdown-toggle {
    width: 100%;
  }

  .nav-submenu {
    display: none;
    position: static;
    min-width: 0;
    margin: 0 8px 8px;
    padding: 4px 0 4px 12px;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    box-shadow: none;
  }

  .nav-dropdown.is-open > .nav-submenu {
    display: block;
  }

  .nav-submenu a {
    min-height: 44px;
    padding: 0 13px;
    white-space: normal;
  }

  .slider {
    min-height: 600px;
    height: 68vh;
  }

  .slide-overlay {
    width: calc(100% - 40px);
    padding-top: 24px;
    padding-bottom: 0;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .hero-card {
    width: min(620px, 88%);
  }

  .info-section,
  .info-section.reverse {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .info-section .info-text,
  .info-section.reverse .info-text {
    order: 1;
  }

  .info-section .info-image,
  .info-section.reverse .info-image {
    order: 2;
  }

  .info-image img,
  .info-section.reverse .info-image img {
    aspect-ratio: 16 / 10;
    border-radius: 4px 4px 34px 4px;
  }

  .footer-main {
    grid-template-columns: 1.5fr 1fr;
  }

  .footer-social {
    grid-column: 1 / -1;
  }
}

/* SMARTPHONE */
@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand-logo {
    max-width: 218px;
  }

  .slider {
    min-height: 560px;
    height: 72svh;
    max-height: 680px;
  }

  .slide-overlay {
    width: calc(100% - 28px);
    padding-top: 18px;
    padding-bottom: 0;
  }

  .hero-card {
    width: min(520px, 88%);
    padding: 24px 22px 28px;
    border-radius: 4px 4px 32px 4px;
  }

  .hero-card h1,
  .hero-card h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .hero-card p:last-child {
    font-size: 16px;
  }

  .slider-arrow {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .slider-arrow.prev { left: 10px; }
  .slider-arrow.next { right: 10px; }

  .slider-dots {
    bottom: 18px;
  }

  .content-sections {
    padding-left: 18px;
    padding-right: 18px;
  }

  .info-section {
    margin-bottom: 64px;
  }

  .info-text h2 {
    font-size: clamp(30px, 8vw, 40px);
  }

  .info-text .lead {
    font-size: 18px;
  }

  .info-text p:not(.section-number):not(.lead) {
    font-size: 16px;
  }

  .info-image img,
  .info-section.reverse .info-image img {
    aspect-ratio: 4 / 3;
    border-radius: 4px 4px 28px 4px;
  }

  .site-footer {
    padding: 18px 18px 14px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-social {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    margin-top: 12px;
    gap: 4px;
  }
}

/* SCHERMI VERTICALI: mostra la parte sinistra delle immagini */
@media (orientation: portrait) {
  .slide > img {
    object-position: left center;
  }
}

/* SMARTPHONE PICCOLI */
@media (max-width: 390px) {
  .slider {
    min-height: 520px;
  }

  .hero-card {
    padding: 22px 18px 24px;
  }

  .slider-arrow {
    top: 44%;
  }

  .content-sections {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Accessibilità */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .slide {
    transition: none;
  }
}


/* PAGINA DI SCELTA LINGUA */
.language-page {
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 18px 10px;
  background: #f3fbfd;
}

.language-shell {
  width: min(390px, calc(100vw - 20px));
  text-align: center;
}

.language-logo-link {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-bottom: 14px;
}

.language-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.language-card {
  width: 100%;
  margin: 0 auto;
  padding: 24px 18px 24px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--border);
  border-radius: 4px 4px 34px 4px;
  box-shadow: var(--shadow);
  text-align: left;
}

.language-select-label {
  display: block;
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.language-options {
  display: grid;
  gap: 10px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
}

.language-option img {
  width: 86px;
  height: 38px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 2px;
  flex: 0 0 auto;
}

.language-option span {
  letter-spacing: .03em;
}

.language-option:hover,
.language-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(21,152,209,.35);
  color: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(8,117,170,.12);
}

.language-note {
  margin-top: 14px !important;
  margin-bottom: 0 !important;
  font-size: 14px !important;
  color: var(--muted) !important;
}

@media (min-width: 641px) {
  .language-page {
    padding: 28px 18px;
  }

  .language-logo-link {
    margin-bottom: 18px;
  }

  .language-logo {
    width: 100%;
  }

  .language-card {
    width: 100%;
    padding: 28px 28px 26px;
  }
}
