/* ==========================================================================
   S.A.V.E. Studi — foglio di stile unico
   Struttura: 1. Variabili  2. Base  3. Layout  4. Header/Nav  5. Sezioni
              6. Componenti (tab, slider, carousel, form, lightbox)  7. Footer
              8. Utility e responsive
   Breakpoint: 576 / 768 / 992 / 1200 px (mobile-first dove possibile)
   ========================================================================== */

/* 1. Variabili ------------------------------------------------------------ */
:root {
  --blue: #148cb3;          /* colore primario */
  --blue-dark: #127ea1;
  --blue-alt: #428cae;      /* pulsante rivista, frecce slider, social footer */
  --blue-light: #6ad1f3;
  --blue-pale: #a8e4f8;
  --bg-light: #e9f8fd;      /* fascia "Attività" */
  --bg-video: #eff7fb;
  --bg-input: #f2f2f2;
  --text: #666;
  --heading: #1a1a1a;
  --nav-dark: #293033;
  --footer-dark: #333;
  --white: #fff;

  --header-h: 120px;
  --side: clamp(25px, 4.2vw, 60px);
  --container: 1320px;

  --fs-body: 1rem;          /* 14px */
  --fs-text: 1.125rem;      /* 15.75px desktop */
  --fs-h2: 1.875rem;        /* 26.25px mobile */
  --fs-h3: 1.5rem;
  --fs-h4: 1.5rem;          /* 21px */
  --fs-hero: 2.25rem;
}

/* 2. Base ----------------------------------------------------------------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-italic.woff2") format("woff2");
}

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

html {
  font-size: 87.5%; /* 14px, rispetta le preferenze utente */
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { margin: 0; line-height: 1.1; font-weight: 400; }
p { margin: 0 0 .5rem; }
ul { margin: 0; padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
b, strong { font-weight: 700; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 16px; background: var(--blue); color: var(--white); font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* 3. Layout --------------------------------------------------------------- */
.wrap {
  width: min(var(--container), 100% - 2 * var(--side));
  margin-inline: auto;
}
.section { position: relative; }
.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--heading);
  text-align: center;
}
.section-title::after { /* filetto blu sotto i titoli */
  content: "";
  display: block;
  width: 100px;
  height: 2px;
  margin: 20px auto 0;
  background: var(--blue);
}
.lead { font-size: var(--fs-text); text-align: center; }

/* 4. Header e navigazione ------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  box-shadow: 5px 5px 20px 3px rgba(0, 0, 0, .1);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { display: block; width: 200px; flex: none; margin-top: 2px; }
.logo img { width: 200px; height: 64px; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
  display: block;
  padding: 10px 0;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text);
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.main-nav a:hover { border-bottom-color: var(--blue); color: var(--text); }
.main-nav a.is-active { color: var(--blue); }

.lang { display: flex; gap: 10px; margin-left: 45px; flex: none; }
.lang a { display: block; width: 24px; height: 24px; }
.lang svg { width: 24px; height: 24px; }

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--blue);
  cursor: pointer;
  flex: none;
}
.menu-toggle svg { width: 24px; height: 24px; fill: currentColor; }

/* Pannello mobile (off-canvas) */
.mobile-nav { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.mobile-nav.is-open { visibility: visible; }
.mobile-nav__overlay {
  position: absolute; inset: 0;
  background: rgba(20, 140, 179, .7);
  opacity: 0; transition: opacity .3s;
}
.mobile-nav__panel {
  position: absolute; inset: 0 auto 0 0;
  width: 250px;
  padding: 70px 0 30px;
  background: rgba(41, 48, 51, .95);
  transform: translateX(-100%);
  transition: transform .3s;
  overflow-y: auto;
}
.mobile-nav.is-open .mobile-nav__overlay { opacity: 1; }
.mobile-nav.is-open .mobile-nav__panel { transform: none; }
.mobile-nav__close {
  position: absolute; top: 22px; right: 20px;
  width: 24px; height: 24px; padding: 2px;
  border: 0; background: none; color: var(--white); cursor: pointer;
}
.mobile-nav__close svg { width: 20px; height: 20px; fill: currentColor; }
.mobile-nav li { text-align: center; }
.mobile-nav a {
  display: block; padding: 6px 0;
  font-size: 1.25rem; line-height: 1.2; color: var(--white);
}
.mobile-nav a:hover { color: var(--blue-light); }

main { display: block; }

/* 5. Sezioni -------------------------------------------------------------- */

/* Hero ---------------------------------------------------------------------*/
.hero {
  padding-top: calc(var(--header-h) + 1px);
  background: #b9dfee url("../img/hero-bg.jpg") center / cover no-repeat;
  background-image: image-set(url("../img/hero-bg.webp") type("image/webp"), url("../img/hero-bg.jpg") type("image/jpeg"));
  overflow: hidden;
}
.hero__inner { position: relative; display: grid; }
.hero__title {
  grid-area: 1 / 1;
  align-self: start;
  position: relative;
  z-index: 1;
  font-size: var(--fs-hero);
  font-weight: 600;
  line-height: 1.1;
  color: var(--heading);
}
.hero__word-wrap { display: inline-block; margin-left: .55em; perspective: 600px; }
.hero__word { display: inline-block; color: var(--blue); transform-origin: 50% 50%; }
.hero__media { grid-area: 1 / 1; position: relative; }
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .4s;
}
.hero__img.is-active { opacity: 1; }
.hero__img:first-child { position: relative; } /* dà l'altezza al contenitore */

@media (prefers-reduced-motion: no-preference) {
  .hero__img.is-active { animation: heroIn 1s ease both; }
  .hero__word.is-flipping { animation: flipInX 1s ease both; }
}
@keyframes heroIn { from { opacity: 0; transform: translateX(-200px); } to { opacity: 1; transform: none; } }
@keyframes flipInX {
  0% { transform: rotateX(90deg); opacity: 0; }
  40% { transform: rotateX(-20deg); }
  60% { transform: rotateX(10deg); opacity: 1; }
  80% { transform: rotateX(-5deg); }
  100% { transform: none; }
}

/* Chi siamo ----------------------------------------------------------------*/
.about { padding: 61px 0 45px; }
.about .lead { max-width: 1160px; margin: 48px auto 0; }
.about__cols { display: grid; gap: 30px; max-width: 1160px; margin: 30px auto 0; }
.about__text { font-size: var(--fs-text); }
.about__text p { margin: 0; }
.about__text p + p { margin-top: 25px; }
.about__widget { min-width: 0; }

/* Attività (fascia azzurra che contiene anche Clinico, CSR, Qualità) -------*/
.band { background: var(--bg-light); }
.activities { padding: 45px 0 0; }
.activities .lead { max-width: 1050px; margin: 30px auto 0; padding-bottom: 43px; }

.tabs { padding-bottom: 29px; }
.tabs__list { display: flex; flex-wrap: wrap; background: var(--white); }
.tabs__tab {
  flex: 1 1 auto;
  margin: 0;
  padding: 10px 15px;
  border: 0;
  border-top: 6px solid var(--blue-pale);
  background: rgba(185, 222, 239, .42);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  color: #808080;
  cursor: pointer;
  transition: color .2s;
}
.tabs__tab:hover { color: var(--blue); }
.tabs__tab[aria-selected="true"] { background: var(--white); color: var(--blue); border-top-color: var(--blue); }
.tabs__panel { background: var(--white); padding: 30px 20px; }
.js .tabs__panel:not(.is-active) { display: none; }
.tabs__panel img { width: 300px; height: 238px; object-fit: contain; margin: 0 auto; }
.tabs__panel h3 { margin-top: 30px; font-size: var(--fs-h3); line-height: 1.2; font-weight: 700; color: var(--text); }
.tabs__panel h3 span { color: var(--blue-alt); }
.tabs__panel .text { font-size: var(--fs-text); }
.tabs__panel p { margin: 20px 0 0; }
.bullets { margin-top: 20px; }
.bullets li { position: relative; padding-left: 22px; margin-bottom: 15px; }
.bullets li:last-child { margin-bottom: 0; }
.bullets li::before {
  content: "■";
  position: absolute; left: 0; top: 0;
  color: var(--blue);
  font-size: .8em;
  line-height: 2em;
}

/* Card bianche ----------------------------------------------------------------*/
.card { background: var(--white); }
.journal { border-top: 6px solid var(--blue); margin: 30px 0 31px; padding: 33px 28px 30px; }
.journal__grid { display: grid; gap: 21px; }
.journal__img { width: 415px; max-width: 100%; margin: 0 auto; }
.journal h3 { font-size: 2.2143rem; font-weight: 700; line-height: 1.2; color: var(--text); }
.journal h3 span { color: var(--blue); }
.journal__sub { margin-top: 9px; font-size: 1.25rem; line-height: 1.2; color: var(--text); }
.journal__line { height: 1px; max-width: 532px; margin-top: 13px; background: var(--blue-light); }
.journal .text { font-size: var(--fs-text); margin-top: 16px; }
.journal .text p { margin: 0 0 9px; }

.btn {
  display: inline-block;
  padding: 10px 30px;
  border: 0;
  background: var(--blue);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s;
}
.btn:hover { background: var(--blue-dark); color: var(--white); }
.btn--alt { background: var(--blue-alt); }
.btn--alt:hover { background: #2f7193; }
.journal .btn { margin-top: 11px; }

.quality h3 { font-size: var(--fs-h4); font-weight: 700; font-style: italic; line-height: 1.2; color: var(--text); }

.quality { margin: 0; padding: 45px 30px 30px; }
.quality__grid { display: grid; gap: 30px; justify-items: center; }
.quality__img { width: 111px; height: 160px; }
.quality p { margin: 11px 0 0; font-size: var(--fs-text); }
.quality .btn { margin-top: 16px; }
.band__end { height: 61px; }

/* Team ------------------------------------------------------------------------*/
.team { padding: 45px 0 0; }
.team .lead { max-width: 1140px; margin: 30px auto 45px; }

.slider { position: relative; }
.slider__track {
  --per-view: 1;
  --gap: 30px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track > * { scroll-snap-align: start; }

.person { position: relative; padding-top: 17px; text-align: center; }
.person__photo {
  width: 250px; height: 250px; margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  transition: transform .5s;
}
.person:hover .person__photo { transform: scale(1.05); }
.person__links { position: absolute; top: 122px; left: 15px; right: 15px; display: flex; justify-content: space-between; pointer-events: none; }
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  pointer-events: auto;
  transition: background-color .2s, color .2s;
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
a.icon-btn:hover { background: var(--blue); color: var(--white); }
span.icon-btn { pointer-events: none; } /* icona senza link disponibile */
.person h3 { margin-top: 16px; font-size: var(--fs-h4); font-weight: 700; line-height: 1.2; color: var(--text); }
.person p { margin: 20px 0 0; font-size: .875rem; font-style: italic; line-height: 1.6; }

.slider__nav {
  position: absolute; top: 150px; z-index: 2;
  width: 40px; height: 40px; padding: 8px;
  border: 0; background: none;
  color: var(--blue-alt);
  cursor: pointer;
}
.slider__nav svg { width: 24px; height: 24px; fill: currentColor; }
.slider__nav:hover { color: #1f4a5a; }
.slider__nav:disabled { opacity: .3; cursor: default; }
.slider__nav--prev { left: 0; }
.slider__nav--next { right: 0; }
.slider__nav--next svg { transform: scaleX(-1); }

/* Video -----------------------------------------------------------------------*/
.videos { background: var(--bg-video); padding: 45px 0 40px; }
.videos .lead { margin-top: 30px; }
.carousel { position: relative; max-width: 540px; margin: 30px auto 0; }
.carousel__slide { display: none; }
.carousel__slide.is-active { display: block; }
.carousel__open {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  overflow: hidden;
}
.carousel__open video {
  width: 100%; height: 173px;
  object-fit: contain;
  transition: transform .3s;
}
.carousel__open:hover video { transform: scale(1.1); }
.carousel__caption {
  margin: 15px 0 0;
  min-height: 62px;
  font-size: .928571rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
  color: var(--blue);
  text-align: center;
}
.carousel__nav {
  position: absolute; top: 66px;
  width: 40px; height: 40px; padding: 8px;
  border: 0; background: none;
  color: var(--blue); opacity: .7;
  cursor: pointer;
}
.carousel__nav:hover { opacity: 1; }
.carousel__nav svg { width: 24px; height: 24px; fill: currentColor; }
.carousel__nav--prev { left: 10px; }
.carousel__nav--next { right: 10px; }
.carousel__nav--next svg { transform: scaleX(-1); }
.carousel__dots { display: flex; justify-content: center; gap: 6px; margin-top: 17px; }
.carousel__dot {
  width: 10px; height: 10px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--blue-light);
  cursor: pointer;
}
.carousel__dot[aria-current="true"] { background: var(--blue); }

/* Lightbox video (elemento <dialog>) */
.lightbox {
  width: min(800px, 100% - 40px);
  max-width: none;
  padding: 0;
  border: 0;
  background: #000;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.lightbox__frame { position: relative; aspect-ratio: 16 / 9; }
.lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__close {
  position: absolute; top: -34px; right: 0;
  width: 28px; height: 28px; padding: 6px;
  border: 0; background: none; color: var(--white); cursor: pointer;
}
.lightbox__close svg { width: 16px; height: 16px; fill: currentColor; }

/* Contatti --------------------------------------------------------------------*/
.contacts { padding: 45px 0 41px; overflow: hidden; }
.contacts .wrap { position: relative; z-index: 1; }
.contacts address {
  max-width: 670px;
  margin: 30px auto 0;
  font-size: var(--fs-text);
  font-style: normal;
  line-height: 2;
  text-align: center;
}
.contacts__shape { display: none; position: absolute; top: 67px; width: 611px; height: 230px; }
.contacts__shape--left { left: 0; }
.contacts__shape--right { right: 0; transform: scale(-1, -1); }

.map { height: 500px; background: #eee; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Lavora con noi -------------------------------------------------------------*/
.careers {
  padding: 60px 0 84px;
  background:
    linear-gradient(rgba(168, 228, 248, .65), rgba(168, 228, 248, .65)),
    url("../img/lavora-bg.jpg") center / cover no-repeat;
  background-image:
    linear-gradient(rgba(168, 228, 248, .65), rgba(168, 228, 248, .65)),
    image-set(url("../img/lavora-bg.webp") type("image/webp"), url("../img/lavora-bg.jpg") type("image/jpeg"));
}
.careers .section-title { color: #000; }
.careers__box { max-width: 660px; margin: 31px auto 0; padding: 20px 15px; background: var(--white); }

.form { display: grid; grid-template-columns: 1fr; gap: 15px; padding: 15px; }
.form__field { display: flex; flex-direction: column; }
.form label, .form__legend { margin-bottom: 5px; font-size: .857rem; font-style: italic; font-weight: 500; line-height: 1.6; color: var(--blue); }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: var(--bg-input);
  color: var(--text);
  line-height: 1.6;
  border-radius: 0;
}
.form textarea { height: 65px; min-height: 65px; resize: vertical; }
.form ::placeholder { color: #a6a6a6; opacity: 1; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue-light); outline-offset: 0; }
.form__consent { display: flex; gap: 8px; align-items: flex-start; font-size: .857rem; line-height: 1.5; }
.form__consent input { margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.form .form__consent label { margin: 0; font-size: .857rem; font-style: normal; font-weight: 400; line-height: 1.5; color: var(--text); }
.form__consent a { font-weight: 600; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { text-align: center; }
.form .btn { text-transform: none; letter-spacing: normal; margin-top: 1px; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form__msg { display: none; padding: 10px 15px; color: var(--white); text-align: center; }
.form__msg.is-visible { display: block; }
.form__msg--ok { background: #62c584; }
.form__msg--err { background: #f95d51; }

/* 7. Footer ------------------------------------------------------------------*/
.site-footer { background: url("../img/footer-bg.webp") center / cover no-repeat; padding: 45px 0 60px; }
.footer__grid { display: grid; gap: 30px; }
.footer__logo { width: 220px; height: auto; }
.social { display: flex; gap: 20px; margin-top: 30px; }
.social a {
  display: flex; align-items: center; justify-content: center;
  width: 37px; height: 37px; border-radius: 50%;
  background: var(--blue-alt); color: var(--white);
  transition: background-color .2s;
}
.social a:hover { background: var(--blue); color: var(--white); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.footer__title { font-size: var(--fs-h4); line-height: 1.2; color: var(--text); }
.footer__links { margin-top: 15px; }
.footer__links a { display: inline-block; font-size: 1rem; line-height: 2.6; }
.footer__links a::before { content: "❯"; display: inline-block; margin-right: 5px; font-size: 1.2em; line-height: 1; }
.footer__contacts p { margin: 15px 0 0; line-height: 1.4; }
.footer__contacts p:first-of-type { margin-top: 30px; }
.footer__contacts b { margin-right: 4px; }

.credits { background: var(--footer-dark); color: var(--white); padding: 49px 0; text-align: center; font-size: .875rem; line-height: 1.6; }
.credits p { margin: 0; }
.credits a { font-weight: 700; color: var(--blue); }
.credits a:hover { color: var(--blue-light); }
.credits .credits__legal { margin-bottom: 8px; }
.credits .credits__legal a { font-weight: 400; color: #ccc; }
.credits .credits__legal a:hover { color: var(--white); }

/* Pagine legali (privacy) */
.legal-header .wrap { justify-content: space-between; }
.legal-back { font-size: 1rem; letter-spacing: 1px; color: var(--text); }
.legal-back:hover { color: var(--blue); }
.legal { padding: calc(var(--header-h) + 60px) 0 80px; }
.legal .wrap { max-width: 900px; }
.legal h1 { font-size: var(--fs-h2); font-weight: 700; color: var(--heading); text-align: center; }
.legal h1::after { content: ""; display: block; width: 100px; height: 2px; margin: 20px auto 0; background: var(--blue); }
.legal .updated { margin: 20px 0 40px; text-align: center; font-size: .875rem; font-style: italic; }
.legal h2 { margin: 40px 0 12px; font-size: var(--fs-h4); font-weight: 700; line-height: 1.3; color: var(--text); }
.legal p, .legal li { font-size: var(--fs-text); }
.legal ul { margin: 0 0 .5rem; padding-left: 0; }
.legal li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.legal li::before { content: "■"; position: absolute; left: 0; color: var(--blue); font-size: .8em; line-height: 2em; }
.legal .pdf-note { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--blue-pale); font-size: .875rem; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.to-top.is-visible { opacity: .85; visibility: visible; }
.to-top:hover { opacity: 1; color: var(--white); }
.to-top svg { width: 34px; height: 34px; fill: currentColor; }

/* 8. Responsive ---------------------------------------------------------------*/
@media (max-width: 991.98px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .lang { margin-left: 12px; }
}

@media (min-width: 576px) {
  .slider__track { --per-view: 2; }
  .carousel__open video { height: 193px; }
  .carousel__nav { top: 76px; }
}

@media (min-width: 768px) {
  :root { --fs-h2: 2.5rem; --fs-hero: 3rem; --fs-h3: 2rem; }
  .about__cols { grid-template-columns: 1fr 1fr; }
  .about .lead { margin-top: 48px; }
  .tabs__tab { padding: 15px; }
  .tabs__panel { display: grid; grid-template-columns: 328px 1fr; column-gap: 22px; padding: 45px 30px 44px; min-height: 438px; }
  .js .tabs__panel:not(.is-active) { display: none; }
  .tabs__panel img { width: 328px; height: 260px; margin: 0; }
  .tabs__panel h3 { margin-top: 0; }
  .bullets { margin-top: 23px; }
  .journal { padding: 29px 30px 25px; }
  .journal__grid { grid-template-columns: minmax(0, 525px) minmax(0, 652px); column-gap: 30px; align-items: start; }
  .journal__img { margin: 0 0 0 auto; }
  .journal__body { padding-top: 16px; }
  .quality { padding: 30px; }
  .quality__grid { grid-template-columns: 111px minmax(0, 691px); column-gap: 80px; justify-content: center; justify-items: start; align-items: start; }
  .quality__text { padding-top: 9px; }
  .contacts__shape { display: block; }
  .form { grid-template-columns: 1fr 1fr; }
  .form__field--full, .form__consent, .form__actions, .form__msg { grid-column: 1 / -1; }
  .form label { font-size: 1rem; font-style: normal; font-weight: 700; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .hero__inner { grid-template-columns: 1fr 1fr; min-height: 553px; }
  .hero__title { grid-area: 1 / 1; align-self: center; margin-top: -45px; }
  .hero__media { grid-area: 1 / 2; align-self: start; margin-top: 60px; }
}

@media (max-width: 767.98px) {
  .hero__inner { padding: 29px 0 30px; }
  .hero__media { grid-area: 1 / 1; }
  .hero__title { grid-area: 2 / 1; margin-top: 10px; }
  .hero__word-wrap { margin-left: .25em; }
  .contacts address { padding: 0 25px; line-height: 2; font-size: 1rem; }
  .about__text, .lead, .tabs__panel .text, .journal .text, .quality p { font-size: 1rem; }
  .tabs__tab { flex: 0 0 33.333%; min-width: 0; }
  .tabs__tab:nth-child(-n+2) { flex-basis: 50%; }
  .tabs__panel img { height: 200px; }
  .about .lead { margin-top: 32px; }
  .hero__media { height: 216px; }
  .hero__img, .hero__img:first-child { position: absolute; height: 216px; }
  .journal__sub { font-size: 1.25rem; }
  .quality__text { text-align: left; }
  .footer__grid { gap: 40px; }
  .person__links { left: calc(50% - 140px); right: calc(50% - 140px); top: 125px; }
  .slider__nav { top: 157px; }
}

@media (min-width: 992px) {
  :root { --fs-text: 1.125rem; --fs-h3: 2.25rem; }
  .about { padding: 83px 0 75px; }
  .activities { padding-top: 60px; }
  .team { padding-top: 60px; }
  .team .lead { margin: 39px auto 39px; }
  .journal { margin-bottom: 61px; }
  .carousel__caption { min-height: 42px; }
  .videos { padding: 60px 0 32px; }
  .contacts { padding: 60px 0 41px; }
  .slider__track { --per-view: 3; }
  .slider { padding-bottom: 110px; }
  .slider__nav { top: auto; bottom: 40px; }
  .slider__nav--prev { left: calc(50% - 130px); }
  .slider__nav--next { right: calc(50% - 130px); }
  .person__links { left: 0; right: 0; }
  .hero { background-attachment: fixed; }
  .careers { background-attachment: fixed; }
  .hero__inner { grid-template-columns: 1fr 547px; }
  .hero__img:first-child { width: 547px; height: 433px; }
}

@media (min-width: 1200px) {
  :root { --fs-h2: 3rem; --fs-hero: 4.5rem; }
  .slider__track { --per-view: 4; }
  .hero__inner { grid-template-columns: 1fr 547px; }
  .hero__title { margin-top: -64px; }
  .hero__word-wrap { margin-left: .6em; }
}

/* Su dispositivi touch lo sfondo fisso non è supportato bene */
@media (hover: none) {
  .hero, .careers { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header, .mobile-nav, .to-top, .map, .careers, .lightbox, .slider__nav, .carousel__nav, .carousel__dots { display: none !important; }
  .hero { padding-top: 0; }
  .js .tabs__panel:not(.is-active) { display: block; }
}
@media (max-width: 575.98px) {
  .legal-back { display: none; }
  .legal-header .lang { margin-left: auto; }
}
