/* Metodo di Studio - home.
   Copiato dai blocchi HTML della landing WordPress (wp.il-cubo.it) realizzata
   dal designer: per restare allineati conviene ricopiarlo, non riscriverlo. */

/* SFONDO PRINCIPALE ORIGINALE */

.mds-page {
  position: relative;
  isolation: isolate;

  background:
    radial-gradient(
      ellipse 68% 24% at 108% 22%,
      #ffcd93a8,
      transparent 94%
    ),
    radial-gradient(
      ellipse 52% 24% at -11% 53%,
      #ffc38774,
      transparent 98%
    ),
    radial-gradient(
      ellipse 55% 20% at 100% 81%,
      #ffe1b6b3,
      transparent 98%
    ),
    linear-gradient(
      165deg,
      #fffaf6 0%,
      #fff2e5 40%,
      #fff9f2 72%,
      #fff1df 100%
    ) !important;
}

/* RIMUOVE GLI SFONDI DELLE SINGOLE SEZIONI */

.mds-page #mds-section-one {
  background: transparent !important;
}

.mds-page #mds-research {
  background: transparent !important;
}

/* DISATTIVA LO SFONDO AGGIUNTIVO DEL BLOCCO 2 */

.mds-page #mds-research::before {
  display: none !important;
}

/* MANTIENE I BLOCCHI SENZA INTERRUZIONI */

.mds-page {
  gap: 0 !important;
  row-gap: 0 !important;
}

/* ===== BLOCCO ===== */

/* ==========================================
   BASE
========================================== */

#mds-section-one {
  --orange: #ff7f00;
  --orange-dark: #d56300;
  --ink: #211c18;
  --muted: #6b5d54;
  --font: 'DM Sans', system-ui, sans-serif;
  --head: 'Baloo 2', system-ui, sans-serif;

  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;

  position: relative;
  isolation: isolate;

  background: transparent !important;
  color: var(--ink);
  font-family: var(--font);
}

#mds-section-one *,
#mds-section-one *::before,
#mds-section-one *::after {
  box-sizing: border-box;
}

/* ==========================================
   HEADER
========================================== */

#mds-section-one .identity-header {
  position: relative;
  z-index: 9;

  width: min(1240px, calc(100% - 52px));
  min-height: 95px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  background: transparent !important;
}

#mds-section-one .logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;

  color: #34271d !important;
  text-decoration: none !important;
}

#mds-section-one .logo-mark-image {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: contain;
}

#mds-section-one .logo-name {
  font-family: var(--head);
  font-size: 25px;
  font-weight: 700;
  line-height: .89;
  letter-spacing: -.035em;

  color: #34271d !important;
  text-transform: none !important;
}

#mds-section-one .logo-name small {
  display: block;

  font-family: var(--head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.015em;

  color: #34271d !important;
}

/* ==========================================
   MENU DESKTOP
========================================== */

#mds-section-one .header-section-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;

  gap: clamp(14px, 2vw, 28px);
  white-space: nowrap;
}

#mds-section-one .header-section-nav a {
  position: relative;
  padding: 10px 2px;

  color: #514239 !important;

  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;

  text-decoration: none !important;
  text-transform: none !important;

  transition: color .2s ease;
}

#mds-section-one .header-section-nav a::after {
  content: "";

  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;

  height: 2px;
  border-radius: 2px;

  background: var(--orange);

  transform: scaleX(0);
  transform-origin: left;

  transition: transform .2s ease;
}

#mds-section-one .header-section-nav a:hover {
  color: #b95700 !important;
}

#mds-section-one .header-section-nav a:hover::after {
  transform: scaleX(1);
}

/* ==========================================
   MENU MOBILE
========================================== */

#mds-section-one .header-mobile-menu {
  display: none;
  position: relative;
  margin-left: auto;
}

#mds-section-one .header-mobile-menu summary {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 10px 13px;

  background: rgba(255,250,245,.95);
  border: 1px solid rgba(152,93,37,.2);
  border-radius: 999px;

  color: #38271c;

  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;

  box-shadow: 0 5px 15px rgba(115,65,23,.07);

  cursor: pointer;
  list-style: none;
}

#mds-section-one .header-mobile-menu summary::-webkit-details-marker {
  display: none;
}

#mds-section-one .header-mobile-menu summary svg {
  width: 17px;
  height: 17px;
}

#mds-section-one .header-mobile-menu[open] summary {
  background: #fff0df;
  border-color: #f5b46e;
}

#mds-section-one .header-mobile-links {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 30;

  width: min(270px, calc(100vw - 28px));
  padding: 10px;

  display: flex;
  flex-direction: column;
  gap: 3px;

  border: 1px solid #f0d4b7;
  border-radius: 20px;

  background: #fffaf5;

  box-shadow: 0 18px 45px rgba(83,53,29,.15);
}

#mds-section-one .header-mobile-links a {
  padding: 11px 13px;

  color: #45372e !important;

  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;

  border-radius: 11px;

  text-decoration: none !important;
  text-transform: none !important;
}

#mds-section-one .header-mobile-links a:hover {
  background: #ffecd8;
}

/* ==========================================
   HERO DESKTOP
========================================== */

#mds-section-one .hero-inverted {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  width: 100%;
  margin: 0;

  padding: 37px 20px 105px;

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;

  background: transparent !important;
}

#mds-section-one .hero-content {
  position: relative;
  z-index: 2;

  width: min(1440px, 100%);

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================
   FOTO ATMOSFERICA
========================================== */

#mds-section-one .hero-atmosphere {
  position: absolute;
  z-index: -2;
  inset: 0;

  background: transparent;

  overflow: hidden;
  pointer-events: none;
}

#mds-section-one .hero-atmosphere img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: 50% 47%;

  filter:
    grayscale(.1)
    saturate(.42)
    contrast(.88)
    brightness(1.04)
    blur(1.6px);

  opacity: .22;

  transform: scale(1.05);

  animation: mds-photo-shift 22s ease-in-out infinite alternate;
}

#mds-section-one .hero-atmosphere::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      ellipse 54% 62% at 50% 41%,
      rgba(255,249,241,.82) 0%,
      rgba(255,249,241,.84) 44%,
      rgba(255,249,241,.74) 76%,
      rgba(255,246,234,.92) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255,247,238,.94),
      transparent 36%,
      rgba(255,244,232,.96) 100%
    );

  pointer-events: none;
}

@keyframes mds-photo-shift {
  from {
    transform: scale(1.04) translateY(0);
  }

  to {
    transform: scale(1.12) translateY(-1.4%);
  }
}

/* ==========================================
   LIBRO DECORATIVO
========================================== */

#mds-section-one .hero-watermark {
  position: absolute;
  z-index: -1;
  inset: 0;

  display: grid;
  place-items: center;

  pointer-events: none;

  opacity: .13;
  mix-blend-mode: multiply;
}

#mds-section-one .hero-watermark svg {
  width: min(48vw, 560px);
  height: auto;

  transform: translateY(2%) rotate(-6deg);
}

#mds-section-one .hero-watermark text,
#mds-section-one .hero-watermark path,
#mds-section-one .hero-watermark circle {
  stroke: #c8751e;
  fill: none;
}

#mds-section-one .hero-watermark .wm-fill {
  fill: #e4933a;
  stroke: none;
  opacity: .16;
}

#mds-section-one .hero-watermark .wm-text {
  font-family: var(--head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .16em;

  fill: #c8751e;
  stroke: none;

  opacity: .75;
}

/* ==========================================
   PULSANTE ARANCIONE
========================================== */

#mds-section-one .start-cta {
  position: relative;
  isolation: isolate;
  z-index: 3;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 19px;

  min-width: min(450px, 100%);
  min-height: 88px;

  padding: 12px 22px 12px 13px;

  background: var(--orange);

  border: 1px solid #e36c00;
  border-radius: 100px;

  color: #1d1712 !important;

  font-family: var(--head);
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;

  text-decoration: none !important;
  text-transform: none !important;

  box-shadow:
    0 11px 0 #d46a09,
    0 28px 47px rgba(236,106,2,.25);

  animation: mds-start-breath 2.5s ease-in-out infinite;

  transition:
    background .25s ease,
    transform .25s ease;

  will-change: transform;
}

#mds-section-one .start-cta::before {
  content: "";

  position: absolute;
  z-index: -1;

  inset: -11px;

  border: 2px solid rgba(255,127,0,.36);
  border-radius: inherit;

  pointer-events: none;

  animation: mds-cta-halo 2.5s ease-in-out infinite;
}

#mds-section-one .start-cta:hover {
  background: #ff9829;
  transform: translateY(-4px);
}

#mds-section-one .start-cta:focus-visible {
  outline: 3px solid #18243e;
  outline-offset: 9px;
}

#mds-section-one .start-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #221d19;
  color: #ffffff;

  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

#mds-section-one .start-icon svg {
  width: 26px;
  height: 26px;
  margin-left: 4px;

  fill: currentColor;

  animation: mds-play-nudge 2.5s ease-in-out infinite;
}

#mds-section-one .start-label {
  white-space: nowrap;
}

/* ==========================================
   ANIMAZIONI PULSANTE
========================================== */

@keyframes mds-start-breath {
  0%, 100% {
    box-shadow:
      0 11px 0 #d46a09,
      0 28px 47px rgba(236,106,2,.25);
    scale: 1;
  }

  50% {
    box-shadow:
      0 11px 0 #d46a09,
      0 33px 55px rgba(236,106,2,.34);
    scale: 1.028;
  }
}

@keyframes mds-cta-halo {
  0% {
    transform: scale(.98);
    opacity: .55;
  }

  60%, 100% {
    transform: scale(1.065);
    opacity: 0;
  }
}

@keyframes mds-play-nudge {
  0%, 70%, 100% {
    transform: translateX(0);
  }

  80% {
    transform: translateX(3px);
  }

  90% {
    transform: translateX(0);
  }
}

/* ==========================================
   TITOLO E SCHEDE DESKTOP
========================================== */

#mds-section-one .title-stage {
  position: relative;

  display: grid;

  width: min(1290px, calc(100vw - 44px));

  grid-template-columns:
    minmax(0, 210px)
    minmax(0, 1fr)
    minmax(0, 210px);

  align-items: center;

  gap: clamp(12px, 2.3vw, 34px);

  margin: 85px auto 0;

  overflow: visible;
}

#mds-section-one .title-stage h1 {
  grid-column: 2;
  grid-row: 1;

  width: 100%;
  max-width: 100%;
  margin: 0;

  color: #211b18 !important;

  font-family: var(--head) !important;
  font-size: clamp(56px, 5.4vw, 78px) !important;
  font-weight: 700 !important;
  line-height: .99 !important;
  letter-spacing: -.065em !important;

  text-align: center;
  text-transform: uppercase !important;
}

#mds-section-one .title-stage h1 em {
  display: block;

  font-style: normal;
  color: var(--orange);

  white-space: nowrap;
  text-transform: uppercase !important;
}

/* ==========================================
   STUDENTE E GENITORE
========================================== */

#mds-section-one .audience-callout {
  position: relative;
  isolation: isolate;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;

  gap: 10px;

  min-width: 0;
  width: 100%;
  max-width: 210px;
  min-height: 132px;

  padding: 18px 14px 18px 19px;

  border: none;
  border-left: 4px solid var(--orange);
  border-radius: 8px 23px 23px 8px;

  background: linear-gradient(
    105deg,
    rgba(255,233,211,.78),
    rgba(255,249,242,.24)
  );

  box-shadow: 0 14px 32px rgba(145,83,22,.07);

  text-align: left;
}

#mds-section-one .audience-callout.student {
  grid-column: 1;
  grid-row: 1;
}

#mds-section-one .audience-callout.parent {
  grid-column: 3;
  grid-row: 1;

  align-items: flex-end;
  text-align: right;

  border-left: none;
  border-right: 4px solid var(--orange);

  border-radius: 23px 8px 8px 23px;

  padding: 18px 19px 18px 14px;

  background: linear-gradient(
    255deg,
    rgba(255,233,211,.78),
    rgba(255,249,242,.24)
  );
}

#mds-section-one .audience-label {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: .055em;

  color: #9c4b08;
}

#mds-section-one .audience-copy {
  font-family: var(--font);
  font-size: clamp(17px, 1.35vw, 19px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;

  color: #241d19;
}

/* ==========================================
   FRECCE CURVE DESKTOP ORIGINALI
========================================== */

#mds-section-one .audience-arrow {
  display: block;

  position: absolute;
  z-index: 4;

  top: -115px;
  left: calc(100% - 30px);
  right: auto;

  width: 195px;
  height: 112px;

  overflow: visible;
  color: #ef7a12;

  filter: drop-shadow(0 4px 3px rgba(230,138,54,.15));

  pointer-events: none;

  animation: mds-original-arrow-right 2.8s ease-in-out infinite;
}

#mds-section-one .audience-callout.parent .audience-arrow {
  left: auto;
  right: calc(100% - 30px);

  transform: scaleX(-1);

  animation: mds-original-arrow-left 2.8s ease-in-out infinite .35s;
}

@keyframes mds-original-arrow-right {
  0%, 100% {
    translate: 0 0;
    opacity: .85;
  }

  50% {
    translate: 9px -8px;
    opacity: 1;
  }
}

@keyframes mds-original-arrow-left {
  0%, 100% {
    translate: 0 0;
    opacity: .85;
  }

  50% {
    translate: -9px -8px;
    opacity: 1;
  }
}

/* ==========================================
   DESCRIZIONE
========================================== */

#mds-section-one .hero-subtitle {
  position: relative;
  z-index: 2;

  max-width: 735px;
  margin: 28px auto 0;

  color: #655346;

  font-family: var(--font);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 500;
  line-height: 1.6;

  text-align: center;
  text-wrap: balance;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1050px) {

  #mds-section-one .title-stage {
    grid-template-columns:
      minmax(0, 164px)
      minmax(0, 1fr)
      minmax(0, 164px);

    gap: 12px;
  }

  #mds-section-one .title-stage h1 {
    font-size: clamp(48px, 6vw, 68px) !important;
  }

  #mds-section-one .audience-callout {
    max-width: 164px;
    min-height: 120px;
    padding: 14px 11px;
  }

  #mds-section-one .audience-callout.parent {
    padding: 14px 11px;
  }

  #mds-section-one .audience-copy {
    font-size: 16px;
  }

  #mds-section-one .audience-arrow {
    top: -98px;
    width: 105px;
    height: 93px;
  }

  #mds-section-one .header-section-nav {
    gap: 15px;
  }

  #mds-section-one .header-section-nav a {
    font-size: 14px;
  }
}

@media (max-width: 800px) {

  #mds-section-one .header-section-nav {
    display: none;
  }

  #mds-section-one .header-mobile-menu {
    display: block;
  }

  #mds-section-one .identity-header {
    min-height: 80px;
  }

  #mds-section-one .hero-inverted {
    padding: 42px 22px 98px;
  }

  #mds-section-one .start-cta {
    min-width: 0;
    width: min(420px, 100%);
    min-height: 77px;

    padding: 10px 17px 10px 10px;
    gap: 10px;

    font-size: 20px;
  }

  #mds-section-one .start-icon {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  #mds-section-one .start-icon svg {
    width: 23px;
    height: 23px;
  }

  #mds-section-one .title-stage {
    width: min(100%, 660px);

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);

    grid-template-areas:
      "student parent"
      "title title";

    column-gap: 15px;
    row-gap: 20px;

    margin-top: 58px;
  }

  #mds-section-one .audience-callout.student {
    grid-area: student;
    grid-column: 1;
    grid-row: 1;
  }

  #mds-section-one .audience-callout.parent {
    grid-area: parent;
    grid-column: 2;
    grid-row: 1;
  }

  #mds-section-one .audience-callout,
  #mds-section-one .audience-callout.parent {
    width: 100%;
    max-width: none;
    min-height: 108px;
    padding: 14px 13px;
  }

  #mds-section-one .title-stage h1 {
    grid-area: title;
    grid-column: 1 / -1;
    grid-row: 2;

    font-size: clamp(46px, 7.4vw, 60px) !important;
  }

  #mds-section-one .audience-arrow {
    top: -79px;
    left: calc(100% - 58px);
    width: 82px;
    height: 77px;
  }

  #mds-section-one .audience-callout.parent .audience-arrow {
    left: auto;
    right: calc(100% - 58px);
  }

  #mds-section-one .hero-subtitle {
    max-width: 650px;
    margin-top: 23px;
    font-size: 17px;
  }
}

/* TABLET: frecce compatte che nascono sopra i box Studente/Genitore
   e curvano verso il pulsante. SVG e animazioni originali conservati. */
@media (min-width: 601px) and (max-width: 1050px) {
  #mds-section-one .audience-arrow {
    width: 92px;
    height: 88px;
    top: -91px;
    left: 14px;
    right: auto;
  }
  #mds-section-one .audience-callout.parent .audience-arrow {
    left: auto;
    right: 14px;
  }
}

/* ==========================================
   VERSIONE SMARTPHONE
========================================== */

@media (max-width: 600px) {

  /* HEADER COMPATTO */

  #mds-section-one .identity-header {
    width: calc(100% - 30px);
    min-height: 61px;
    gap: 10px;
  }

  #mds-section-one .logo {
    gap: 7px;
  }

  #mds-section-one .logo-mark-image {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  #mds-section-one .logo-name {
    font-size: 18px;
  }

  #mds-section-one .logo-name small {
    font-size: 12px;
  }

  #mds-section-one .header-mobile-menu summary {
    padding: 9px 11px;
    gap: 7px;
    font-size: 12px;
  }

  #mds-section-one .header-mobile-menu summary svg {
    width: 15px;
    height: 15px;
  }

  /* HERO */

  #mds-section-one .hero-inverted {
    padding: 18px 13px 62px;
  }

  /* PULSANTE PICCOLO E CENTRATO */

  #mds-section-one .start-cta {
    width: 235px;
    max-width: calc(100% - 24px);
    min-width: 0;
    min-height: 48px;

    padding: 7px 13px 7px 8px;
    gap: 9px;

    font-size: 13px;
    border-radius: 999px;

    box-shadow:
      0 5px 0 #d46a09,
      0 12px 23px rgba(236,106,2,.17);
  }

  #mds-section-one .start-cta::before {
    inset: -5px;
    border-width: 1px;
  }

  #mds-section-one .start-icon {
    width: 33px;
    height: 33px;
    flex-basis: 33px;
  }

  #mds-section-one .start-icon svg {
    width: 16px;
    height: 16px;
    margin-left: 2px;
  }

  #mds-section-one .start-label {
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
  }

  /* DUE SCHEDE SOPRA IL TITOLO */

  #mds-section-one .title-stage {
    width: 100%;

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);

    grid-template-areas:
      "student parent"
      "title title";

    column-gap: 10px;
    row-gap: 16px;

    /* Spazio per le frecce rivolte al pulsante */
    margin: 47px auto 0;

    overflow: visible;
  }

  #mds-section-one .audience-callout.student {
    grid-area: student;
    grid-column: 1;
    grid-row: 1;
  }

  #mds-section-one .audience-callout.parent {
    grid-area: parent;
    grid-column: 2;
    grid-row: 1;
  }

  /* SCHEDE RIDOTTE */

  #mds-section-one .audience-callout,
  #mds-section-one .audience-callout.parent {
    position: relative;

    width: 100%;
    max-width: none;
    min-height: 79px;

    padding: 10px 9px;

    gap: 5px;

    justify-content: center;

    border-radius: 12px;
  }

  #mds-section-one .audience-callout.student {
    border-left-width: 3px;
  }

  #mds-section-one .audience-callout.parent {
    border-right-width: 3px;
    align-items: flex-end;
    text-align: right;
  }

  #mds-section-one .audience-label {
    font-size: 9.5px;
    letter-spacing: .02em;
    line-height: 1.1;
  }

  #mds-section-one .audience-copy {
    font-size: 12px;
    line-height: 1.24;
    letter-spacing: -.015em;
  }

  /* ======================================
     FRECCE VERTICALI VERSO IL BOTTONE
  ====================================== */

  /* Nascondiamo le frecce curve desktop */

  #mds-section-one .audience-arrow,
  #mds-section-one .audience-callout.parent .audience-arrow {
    display: none !important;
  }

  /* Due frecce che partono sopra le schede
     e puntano al pulsante arancione */

  #mds-section-one .audience-callout::before {
    content: "↑";

    position: absolute;
    z-index: 5;

    left: 50%;
    top: -35px;

    display: block;

    transform: translateX(-50%);

    color: #ef7a12;

    font-family: var(--font);
    font-size: 30px;
    font-weight: 500;
    line-height: 1;

    opacity: .9;

    pointer-events: none;

    animation:
      mds-mobile-arrow-up 2.4s ease-in-out infinite;
  }

  #mds-section-one .audience-callout.parent::before {
    animation-delay: .35s;
  }

  /* TITOLO SOTTO LE DUE SCHEDE */

  #mds-section-one .title-stage h1 {
    grid-area: title;
    grid-column: 1 / -1;
    grid-row: 2;

    width: 100%;
    margin: 0;

    font-size: clamp(28px, 7.5vw, 39px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.05em !important;

    text-align: center;
  }

  #mds-section-one .title-stage h1 em {
    display: block;
    white-space: nowrap;
  }

  /* DESCRIZIONE */

  #mds-section-one .hero-subtitle {
    max-width: 440px;
    margin: 15px auto 0;

    font-size: 13px;
    line-height: 1.45;

    color: #655346;
  }

  /* SFONDO */

  #mds-section-one .hero-atmosphere img {
    opacity: .15;
    object-position: 52% 48%;
  }

  #mds-section-one .hero-watermark svg {
    width: min(76vw, 290px);
    transform: rotate(-6deg);
  }
}

/* ==========================================
   ANIMAZIONE FRECCE VERSO ALTO
========================================== */

@keyframes mds-mobile-arrow-up {
  0%, 100% {
    transform: translate(-50%, 3px);
    opacity: .55;
  }

  50% {
    transform: translate(-50%, -4px);
    opacity: 1;
  }
}

/* ==========================================
   SMARTPHONE PICCOLI
========================================== */

@media (max-width: 375px) {

  #mds-section-one .hero-inverted {
    padding-left: 11px;
    padding-right: 11px;
  }

  #mds-section-one .start-cta {
    width: 220px;
    min-height: 46px;
  }

  #mds-section-one .start-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }

  #mds-section-one .start-label {
    font-size: 12px;
  }

  #mds-section-one .title-stage {
    column-gap: 7px;
    row-gap: 14px;
    margin-top: 43px;
  }

  #mds-section-one .audience-callout,
  #mds-section-one .audience-callout.parent {
    min-height: 76px;
    padding: 9px 7px;
  }

  #mds-section-one .audience-label {
    font-size: 9px;
  }

  #mds-section-one .audience-copy {
    font-size: 11px;
  }

  #mds-section-one .audience-callout::before {
    top: -32px;
    font-size: 27px;
  }

  #mds-section-one .title-stage h1 {
    font-size: clamp(25px, 7.3vw, 29px) !important;
  }

  #mds-section-one .hero-subtitle {
    font-size: 12.5px;
    line-height: 1.42;
  }
}

/* ==========================================
   ACCESSIBILITÀ
========================================== */

@media (prefers-reduced-motion: reduce) {

  #mds-section-one .start-cta,
  #mds-section-one .start-cta::before,
  #mds-section-one .start-icon svg,
  #mds-section-one .audience-arrow,
  #mds-section-one .audience-callout::before,
  #mds-section-one .hero-atmosphere img {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================
   MOBILE FULLSCREEN: LIBRO GRANDE, BOX E FRECCE CURVE
   Le modifiche sotto i 600px non toccano tablet/desktop.
========================================== */
@media (max-width: 600px) {
  #mds-section-one {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
  }

  #mds-section-one .identity-header {
    flex: 0 0 auto;
    min-height: 64px;
  }

  #mds-section-one .hero-inverted {
    flex: 1 0 auto;
    min-height: 0;
    width: 100%;
    justify-content: center;
    padding: clamp(18px, 3svh, 34px) 14px clamp(22px, 5svh, 48px);
  }

  #mds-section-one .hero-content {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
  }

  /* Il libro resta decorativo dietro ai contenuti e copre
     gran parte del centro dello schermo, senza allargarne il layout. */
  #mds-section-one .hero-watermark {
    inset: 0;
    display: grid;
    place-items: center;
    opacity: .15;
    pointer-events: none;
  }

  #mds-section-one .hero-watermark svg {
    display: block;
    width: clamp(390px, 112vw, 650px);
    max-width: none;
    max-height: none;
    height: auto;
    transform: translateY(4%) rotate(-6deg);
  }

  /* Schede affiancate: tornano visibili su smartphone */
  #mds-section-one .title-stage {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "student parent" "title title";
    column-gap: clamp(8px, 3vw, 15px);
    row-gap: clamp(15px, 2.3svh, 24px);
    margin: clamp(78px, 11svh, 104px) auto 0;
    overflow: visible;
  }

  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent {
    display: flex !important;
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 88px;
    padding: 11px 10px;
    gap: 6px;
  }

  #mds-section-one .audience-callout.student {
    grid-area: student;
    grid-column: 1;
    grid-row: 1;
  }

  #mds-section-one .audience-callout.parent {
    grid-area: parent;
    grid-column: 2;
    grid-row: 1;
  }

  #mds-section-one .audience-label { font-size: 10px; }
  #mds-section-one .audience-copy { font-size: clamp(11px, 3vw, 13px); line-height: 1.22; }

  /* Nessuna freccia verticale generata via ::before */
  #mds-section-one .audience-callout::before,
  #mds-section-one .audience-callout.parent::before {
    content: none !important;
    display: none !important;
  }

  /* Le frecce SVG originali vengono ridimensionate e orientate
     verso l'esterno: quella dello studente a sinistra,
     quella del genitore a destra. */
  #mds-section-one .audience-callout .audience-arrow {
    display: block !important;
    position: absolute;
    top: -72px;
    width: 64px;
    height: 68px;
    left: 4px;
    right: auto;
    transform: scaleX(-1);
    transform-origin: center;
    animation: mds-mobile-curved-arrow 2.8s ease-in-out infinite;
    pointer-events: none;
  }

  #mds-section-one .audience-callout.parent .audience-arrow {
    left: auto;
    right: 4px;
    transform: none;
    animation-delay: .3s;
  }

  #mds-section-one .title-stage h1 {
    grid-area: title;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0;
    font-size: clamp(26px, 7.2vw, 39px) !important;
    line-height: 1.04 !important;
  }

  #mds-section-one .title-stage h1 em { white-space: nowrap; }

  #mds-section-one .hero-subtitle {
    max-width: 430px;
    margin: clamp(14px, 2.5svh, 24px) auto 0;
    padding: 0 4px;
    font-size: clamp(12.5px, 3.5vw, 15px);
    line-height: 1.48;
    text-wrap: pretty;
  }
}

@keyframes mds-mobile-curved-arrow {
  0%, 100% { translate: 0 0; opacity: .78; }
  50% { translate: 0 -5px; opacity: 1; }
}

/* Schermi bassi: si conserva tutta la sezione senza ritagliarla */
@media (max-width: 600px) and (max-height: 700px) {
  #mds-section-one .identity-header { min-height: 58px; }
  #mds-section-one .hero-inverted { padding-top: 12px; padding-bottom: 18px; }
  #mds-section-one .title-stage { margin-top: 65px; row-gap: 12px; }
  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent { min-height: 76px; padding: 8px 9px; }
  #mds-section-one .audience-callout .audience-arrow { top: -60px; height: 56px; width: 54px; }
  #mds-section-one .hero-subtitle { margin-top: 12px; line-height: 1.4; }
}

/* Telefoni particolarmente stretti */
@media (max-width: 350px) {
  #mds-section-one .hero-inverted { padding-left: 11px; padding-right: 11px; }
  #mds-section-one .title-stage { column-gap: 7px; }
  #mds-section-one .audience-copy { font-size: 11px; }
  #mds-section-one .title-stage h1 { font-size: 25px !important; }
  #mds-section-one .hero-subtitle { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  #mds-section-one .audience-callout .audience-arrow { animation: none !important; }
}

/* =========================================================
   SMARTPHONE: BOX STUDENTE / GENITORE SOPRA IL PULSANTE
   Interviene solo sulla disposizione mobile; desktop/tablet invariati.
========================================================= */
@media (max-width: 600px) {
  #mds-section-one .hero-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(8px, 3vw, 15px);
    row-gap: 0;
    justify-items: center;
    align-content: center;
  }

  /* I figli di title-stage partecipano alla griglia mobile:
     così i box possono stare sopra al CTA senza duplicare l'HTML. */
  #mds-section-one .title-stage {
    display: contents;
  }

  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent {
    grid-row: 1;
    align-self: stretch;
    margin: 0 0 clamp(55px, 8svh, 77px);
    min-height: 79px;
  }
  #mds-section-one .audience-callout.student { grid-column: 1; }
  #mds-section-one .audience-callout.parent { grid-column: 2; }

  #mds-section-one .start-cta {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0 0 clamp(27px, 4svh, 41px);
  }

  #mds-section-one .title-stage h1 {
    grid-row: 3;
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0;
  }

  #mds-section-one .hero-subtitle {
    grid-row: 4;
    grid-column: 1 / -1;
    justify-self: center;
  }

  /* Frecce curve fra i box e il CTA, dirette verso il centro. */
  #mds-section-one .audience-callout.student .audience-arrow {
    top: auto;
    bottom: -59px;
    left: auto;
    right: 3px;
    width: 58px;
    height: 54px;
    transform: scaleY(-1);
  }
  #mds-section-one .audience-callout.parent .audience-arrow {
    top: auto;
    bottom: -59px;
    left: 3px;
    right: auto;
    width: 58px;
    height: 54px;
    transform: scale(-1, -1);
  }
}
@media (max-width: 600px) and (max-height: 700px) {
  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent {
    margin-bottom: 48px;
  }
  #mds-section-one .audience-callout.student .audience-arrow,
  #mds-section-one .audience-callout.parent .audience-arrow {
    bottom: -46px;
    height: 43px;
    width: 48px;
  }
  #mds-section-one .start-cta { margin-bottom: 23px; }
}

/* =========================================================
   CORREZIONE MOBILE: ELIMINAZIONE SPAZIO SUPERIORE E DOPPIA FRECCIA
   Solo smartphone: desktop e tablet non vengono modificati.
========================================================= */
@media (max-width: 600px) {
  /* Il contenuto inizia subito sotto la testata, senza centratura
     verticale che crea il grande spazio vuoto nello screenshot. */
  #mds-section-one .hero-inverted {
    justify-content: flex-start;
    padding-top: 8px;
  }

  #mds-section-one .hero-content {
    align-content: start;
    justify-content: start;
  }

  /* Frecce SVG visibili, simmetriche e davanti allo sfondo. */
  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent {
    overflow: visible;
  }

  #mds-section-one .audience-callout.student .audience-arrow,
  #mds-section-one .audience-callout.parent .audience-arrow {
    display: block !important;
    visibility: visible !important;
    opacity: 1;
    z-index: 12;
    position: absolute;
    top: auto;
    bottom: -59px;
    width: 58px;
    height: 54px;
    overflow: visible;
    color: #ef7a12;
    animation: mds-mobile-curved-arrow 2.8s ease-in-out infinite;
  }

  #mds-section-one .audience-callout.student .audience-arrow {
    left: auto;
    right: 3px;
    transform: scaleY(-1);
  }

  #mds-section-one .audience-callout.parent .audience-arrow {
    left: 3px;
    right: auto;
    transform: scale(-1, -1);
    animation-delay: .3s;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  #mds-section-one .hero-inverted { padding-top: 6px; }
  #mds-section-one .audience-callout.student .audience-arrow,
  #mds-section-one .audience-callout.parent .audience-arrow {
    bottom: -46px;
    width: 48px;
    height: 43px;
  }
}

/* ==========================================================
   SMARTPHONE: COMPOSIZIONE VERTICALE COME NEL RIFERIMENTO
   Studente (sinistra) -> CTA -> Genitore (destra) -> Titolo.
   Nessun intervento sulle dimensioni tablet o desktop.
========================================================== */
@media (max-width: 600px) {
  #mds-section-one .identity-header {
    min-height: 72px;
  }

  #mds-section-one .hero-inverted {
    justify-content: flex-start;
    padding: 12px 12px 28px;
  }

  #mds-section-one .hero-content {
    display: grid;
    width: 100%;
    max-width: 520px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    row-gap: 0;
    justify-items: center;
    align-content: start;
  }

  /* Si mantengono i figli della griglia originale senza duplicarli. */
  #mds-section-one .title-stage { display: contents; }

  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent {
    display: flex !important;
    position: relative;
    grid-column: 1 !important;
    width: min(178px, 55vw);
    max-width: none;
    min-height: 90px;
    padding: 12px 11px;
    margin: 0;
    align-self: auto;
    overflow: visible;
  }

  #mds-section-one .audience-callout.student {
    grid-row: 1 !important;
    justify-self: start;
    margin-left: clamp(26px, 12vw, 60px);
  }

  #mds-section-one .audience-callout.parent {
    grid-row: 3 !important;
    justify-self: end;
    margin-right: clamp(26px, 12vw, 60px);
    margin-top: 29px;
  }

  #mds-section-one .audience-label { font-size: 11px; }
  #mds-section-one .audience-copy { font-size: clamp(11px, 3.1vw, 13px); line-height: 1.2; }

  #mds-section-one .start-cta {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: center;
    margin: 22px 0 0;
    width: min(260px, calc(100% - 40px));
    min-height: 53px;
    font-size: 15px;
  }
  #mds-section-one .start-label { font-size: clamp(12px, 3.7vw, 15px); }

  #mds-section-one .title-stage h1 {
    grid-column: 1 !important;
    grid-row: 4 !important;
    justify-self: center;
    margin: 35px 0 0;
    font-size: clamp(27px, 7.15vw, 37px) !important;
  }
  #mds-section-one .hero-subtitle {
    grid-column: 1 !important;
    grid-row: 5 !important;
    margin: 17px auto 0;
    max-width: 380px;
    font-size: clamp(12.5px, 3.4vw, 14.5px);
    line-height: 1.48;
  }

  /* Frecce SVG desktop nascoste solo su telefono. */
  #mds-section-one .audience-callout .audience-arrow,
  #mds-section-one .audience-callout.parent .audience-arrow {
    display: none !important;
  }
  /* Non usare le frecce verticali generate da pseudo-elementi. */
  #mds-section-one .audience-callout::before,
  #mds-section-one .audience-callout.parent::before {
    content: none !important;
    display: none !important;
  }

  #mds-section-one .mobile-flow-arrow {
    display: block;
    position: absolute;
    z-index: 15;
    width: 67px;
    height: 66px;
    overflow: visible;
    color: #ef7a12;
    pointer-events: none;
    animation: mds-mobile-curved-arrow 2.8s ease-in-out infinite;
  }
  #mds-section-one .student .mobile-flow-arrow {
    top: 47px;
    left: calc(100% + 8px);
  }
  #mds-section-one .parent .mobile-flow-arrow {
    bottom: 42px;
    right: calc(100% + 6px);
    animation-delay: .3s;
  }

  /* Il libro continua a riempire il centro senza interferire coi testi. */
  #mds-section-one .hero-watermark svg {
    width: clamp(390px, 112vw, 650px);
    max-width: none;
  }
}

@media (max-width: 600px) and (max-height: 680px) {
  #mds-section-one .hero-inverted { padding-top: 8px; padding-bottom: 18px; }
  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent { min-height: 80px; }
  #mds-section-one .start-cta { margin-top: 17px; }
  #mds-section-one .audience-callout.parent { margin-top: 24px; }
  #mds-section-one .title-stage h1 { margin-top: 28px; }
  #mds-section-one .hero-subtitle { margin-top: 13px; }
}

@media (max-width: 350px) {
  #mds-section-one .audience-callout.student { margin-left: 20px; }
  #mds-section-one .audience-callout.parent { margin-right: 20px; }
  #mds-section-one .mobile-flow-arrow { width: 51px; height: 57px; }
  #mds-section-one .student .mobile-flow-arrow { left: calc(100% + 2px); }
  #mds-section-one .parent .mobile-flow-arrow { right: calc(100% + 2px); }
}

@media (min-width: 601px) {
  #mds-section-one .mobile-flow-arrow { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #mds-section-one .mobile-flow-arrow { animation: none !important; }
}

/* ===========================================================
   RIFINITURA SMARTPHONE: due frecce piccole, pulsante compatto,
   watermark sotto il titolo e la descrizione. Solo <= 600px.
=========================================================== */
@media (max-width: 600px) {
  /* Nasconde definitivamente eventuali frecce extra dalle
     vecchie regole; restano solo i due SVG mobile-flow-arrow. */
  #mds-section-one .audience-callout .audience-arrow,
  #mds-section-one .audience-callout::before,
  #mds-section-one .audience-callout::after {
    display: none !important;
    content: none !important;
  }

  #mds-section-one .mobile-flow-arrow {
    display: block !important;
    width: 57px;
    height: 57px;
    transform: none;
    animation: none; /* punte sempre nella posizione corretta */
  }

  /* Studente: curva originale desktop ribaltata verticalmente,
     ridimensionata e staccata dal pulsante. */
  #mds-section-one .audience-callout.student .mobile-flow-arrow {
    left: calc(100% - 4px);
    right: auto;
    top: 48%;
    bottom: auto;
  }

  /* Genitore: stessa curva originale specchiata orizzontalmente,
     con punta verso il pulsante e senza sovrapporsi al bordo. */
  #mds-section-one .audience-callout.parent .mobile-flow-arrow {
    left: auto;
    right: calc(100% - 4px);
    top: calc(50% - 78px);
    bottom: auto;
  }

  #mds-section-one .start-cta {
    width: min(226px, calc(100% - 56px));
    min-width: 0;
    min-height: 55px;
    padding: 8px 10px 8px 8px;
    gap: 7px;
    font-size: 16px;
  }
  #mds-section-one .start-label {
    font-size: clamp(14px, 4.1vw, 16px);
    letter-spacing: -.025em;
  }
  #mds-section-one .start-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
  }
  /* La freccia-play del pulsante spinge verso la scritta. */
  #mds-section-one .start-icon svg {
    animation: mds-play-to-text 1.6s ease-in-out infinite;
  }

  /* Libro più contenuto, allineato visivamente con titolo e testo. */
  #mds-section-one .hero-watermark {
    place-items: center;
    transform: translateY(19%);
  }
  #mds-section-one .hero-watermark svg {
    width: min(86vw, 365px);
    max-width: none;
    height: auto;
    transform: rotate(-6deg);
  }
}

@keyframes mds-play-to-text {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(2px); }
}

@media (max-width: 350px) {
  #mds-section-one .start-cta { width: min(215px, calc(100% - 44px)); }
  #mds-section-one .start-label { font-size: 13.5px; }
  #mds-section-one .mobile-flow-arrow { width: 45px; height: 49px; }
  #mds-section-one .audience-callout.parent .mobile-flow-arrow {
    top: calc(50% - 69px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #mds-section-one .start-icon svg { animation: none !important; }
}

/* MODIFICA FINALE: nasconde tutte le frecce SOLO su smartphone. */
@media (max-width: 600px) {
  #mds-section-one .audience-callout .audience-arrow,
  #mds-section-one .audience-callout .mobile-flow-arrow,
  #mds-section-one .audience-callout::before,
  #mds-section-one .audience-callout::after {
    display: none !important;
    content: none !important;
    animation: none !important;
  }
}

/* CORREZIONE MOBILE: nessun residuo delle frecce tra box e bottone.
   I bordi arancioni originali dei box restano visibili. */
@media (max-width: 600px) {
  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent {
    border-left-width: 4px;
    border-right-width: 4px;
  }
  #mds-section-one .audience-callout.student { border-right: none; }
  #mds-section-one .audience-callout.parent { border-left: none; }
  #mds-section-one .audience-callout .audience-arrow,
  #mds-section-one .audience-callout .mobile-flow-arrow {
    display: none !important;
  }
  #mds-section-one .audience-callout::before,
  #mds-section-one .audience-callout::after {
    content: none !important;
    display: none !important;
  }
}

/* =============================================================
   REVISIONE MOBILE DEFINITIVA — 18 NOVEMBRE 2026
   Rimuove i residui grafici delle frecce e aumenta la leggibilità.
   Nessun effetto su tablet e desktop.
============================================================= */
@media only screen and (max-width: 600px) {
  /* Non devono esistere tratti di frecce fra box e pulsante.
     Nasconde anche eventuali SVG non riconosciuti dalle vecchie regole. */
  #mds-section-one .audience-callout svg,
  #mds-section-one .audience-callout svg *,
  #mds-section-one .audience-callout .audience-arrow,
  #mds-section-one .audience-callout .mobile-flow-arrow,
  #mds-section-one .audience-callout::before,
  #mds-section-one .audience-callout::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    content: none !important;
    animation: none !important;
  }

  /* Testi di dimensione normale per la lettura su smartphone. */
  #mds-section-one .audience-callout.student,
  #mds-section-one .audience-callout.parent {
    width: min(250px, 74vw);
    min-height: 100px;
    padding: 15px 15px;
    gap: 7px;
  }
  #mds-section-one .audience-label {
    font-size: 13px !important;
    line-height: 1.2;
  }
  #mds-section-one .audience-copy {
    font-size: 16px !important;
    line-height: 1.32 !important;
    letter-spacing: -.015em;
  }
  #mds-section-one .start-cta {
    width: min(310px, calc(100% - 24px));
    min-height: 61px;
    padding: 9px 15px 9px 10px;
    gap: 10px;
  }
  #mds-section-one .start-label {
    font-size: 16px !important;
    line-height: 1.15;
    white-space: nowrap;
  }
  #mds-section-one .title-stage h1 {
    font-size: clamp(30px, 8vw, 38px) !important;
    line-height: 1.05 !important;
  }
  #mds-section-one .hero-subtitle {
    font-size: 16px !important;
    line-height: 1.55 !important;
    max-width: 470px;
    padding: 0 3px;
  }
}
@media only screen and (max-width: 360px) {
  #mds-section-one .audience-copy { font-size: 15px !important; }
  #mds-section-one .start-label { font-size: 15px !important; }
  #mds-section-one .hero-subtitle { font-size: 15px !important; }
  #mds-section-one .title-stage h1 { font-size: 29px !important; }
}

/* =============================================================
   MOBILE — CTA COMPATTA CON TESTO PIÙ EVIDENTE
   Intervento limitato agli smartphone, senza alterare desktop/tablet.
============================================================= */
@media only screen and (max-width: 600px) {
  #mds-section-one .start-cta {
    width: max-content !important;
    max-width: calc(100% - 16px) !important;
    min-width: 0 !important;
    min-height: 56px;
    padding: 8px 13px 8px 9px !important;
    gap: 8px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-self: center !important;
  }
  #mds-section-one .start-icon {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
  }
  #mds-section-one .start-label {
    font-size: clamp(17px, 4.75vw, 20px) !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    letter-spacing: -.025em;
  }
}
@media only screen and (max-width: 360px) {
  #mds-section-one .start-label {
    font-size: 17px !important;
  }
}

/* ===== BLOCCO ===== */

#mds-research {
  --orange: #ff7f00;
  --font: 'DM Sans', system-ui, sans-serif;
  --head: 'Baloo 2', system-ui, sans-serif;
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 64px), 1240px);
  margin: 0 auto;
  padding: 2cm 0 0;
  box-sizing: border-box;
  font-family: var(--font);
  color: #241c18;
  background: transparent !important;
}

#mds-research *,
#mds-research *::before,
#mds-research *::after {
  box-sizing: border-box;
}

#mds-research::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 50%;
  width: 100vw;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 68% 40% at 108% 15%, #ffcd93a8, transparent 94%),
    radial-gradient(ellipse 52% 45% at -11% 65%, #ffc38774, transparent 98%),
    linear-gradient(165deg, #fffaf6 0%, #fff2e5 40%, #fff9f2 72%, #fff1df 100%);
  pointer-events: none;
}

/* FRASE DI COLLEGAMENTO */

#mds-research .mds-discovery {
  position: absolute;
  z-index: 4;
  top: calc(-2cm + 17px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}

#mds-research .mds-discovery-caption {
  margin: 0;
  color: #97510f;
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.45;
  font-weight: 750;
}

#mds-research .mds-discovery-motion {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  color: var(--orange);
}

#mds-research .mds-discovery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .15;
  animation: mdsDiscoveryPulse 2.8s ease-in-out infinite;
}

#mds-research .mds-discovery-dot:nth-child(2) {
  animation-delay: .32s;
}

#mds-research .mds-discovery-dot:nth-child(3) {
  width: 5px;
  height: 5px;
  animation-delay: .64s;
}

#mds-research .mds-discovery-dot:nth-child(4) {
  width: 5px;
  height: 5px;
  animation-delay: .96s;
}

#mds-research .mds-discovery-chevron {
  width: 15px;
  height: 10px;
  margin-top: 1px;
  opacity: .65;
  animation: mdsDiscoveryChevron 2.8s ease-in-out infinite 1.26s;
}

@keyframes mdsDiscoveryPulse {
  0%, 17%, 68%, 100% {
    opacity: .12;
    transform: scale(.8);
  }
  29%, 43% {
    opacity: .9;
    transform: scale(1.15);
  }
}

@keyframes mdsDiscoveryChevron {
  0%, 15%, 70%, 100% {
    opacity: .24;
    transform: translateY(-2px);
  }
  25%, 45% {
    opacity: .85;
    transform: translateY(2px);
  }
}

/* HEADER */

#mds-research .mds-research-header {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(18px, 4vw, 54px);
  align-items: center;
  margin-bottom: 28px;
}

#mds-research .mds-research-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 0;
}

#mds-research h2 {
  margin: 0;
  font: 700 clamp(42px, 5vw, 68px)/1.02 var(--head);
  letter-spacing: -.065em;
  color: #241c18;
  text-transform: none !important;
}

#mds-research h2 span {
  display: block;
  color: var(--orange);
}

#mds-research .mds-research-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  text-align: left;
}

#mds-research .mds-research-copy p {
  margin: 0;
  max-width: 610px;
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.52;
  color: #685547;
}

#mds-research .mds-research-copy strong {
  color: #2d241d;
}

#mds-research .mds-research-copy p a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#mds-research .mds-hover-hint {
  margin-top: 15px;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  color: #806b59;
}

/* BOTTONE */

#mds-research .mds-test-prompt {
  display: flex;
  justify-content: flex-start;
  margin: 16px 0 0;
}

#mds-research .mds-test-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 55px;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--orange);
  color: #261b14 !important;
  text-decoration: none !important;
  font: 800 clamp(17px, 1.6vw, 20px)/1 var(--head);
  text-transform: none !important;
  box-shadow: 0 10px 25px rgba(211,103,4,.18);
  transition: transform .22s, box-shadow .22s, background .22s;
}

#mds-research .mds-test-cta:hover {
  background: #ff9528;
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(211,103,4,.23);
}

#mds-research .mds-test-cta svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* SCHEDE SCIENTIFICHE DESKTOP */

#mds-research .mds-people-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 16px;
  align-items: start;
  margin-top: 6px;
}

#mds-research .mds-person {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 8px 0;
  min-height: 218px;
}

#mds-research .mds-person-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--orange);
}

#mds-research .mds-person-figure {
  width: 94px;
  height: 108px;
  display: grid;
  place-items: center;
  transition: transform .24s ease, filter .24s ease;
}

#mds-research .mds-person-figure svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

#mds-research .mds-person:hover .mds-person-figure,
#mds-research .mds-person:focus-within .mds-person-figure,
#mds-research .mds-person.is-open .mds-person-figure {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 12px 16px rgba(255,127,0,.15));
}

#mds-research .mds-person-topic {
  order: 1;
  display: block;
  margin-top: 16px;
  font: 700 clamp(16px,1.45vw,19px)/1.18 var(--head);
  letter-spacing: -.025em;
  color: #241c18;
  max-width: 220px;
  text-wrap: balance;
}

#mds-research .mds-person-name {
  order: 2;
  display: block;
  margin-top: 8px;
  font: 400 clamp(14px,1.15vw,16px)/1.42 var(--font);
  color: #ad6024;
  max-width: 220px;
}

/* APPROFONDIMENTI */

#mds-research .mds-tooltip {
  position: absolute;
  left: 50%;
  bottom: 118px;
  transform: translate(-50%,14px);
  width: min(308px,calc(100vw - 38px));
  padding: 16px 18px;
  border-radius: 22px;
  background: #fffaf5;
  border: 1px solid #efcfad;
  box-shadow: 0 18px 34px rgba(98,61,24,.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 10;
  text-align: left;
  color: #221c18;
}

#mds-research .mds-person:hover .mds-tooltip,
#mds-research .mds-person:focus-within .mds-tooltip,
#mds-research .mds-person.is-open .mds-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%,0);
}

#mds-research .mds-tooltip strong {
  display: block;
  margin: 0 0 8px;
  font: 700 18px/1.08 var(--head);
  letter-spacing: -.03em;
}

#mds-research .mds-tooltip p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #685749;
}

#mds-research .mds-tooltip-authors {
  display: block;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #edd8c5;
  font-size: 12px;
  line-height: 1.45;
  color: #755d4c;
}

#mds-research .mds-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%) rotate(45deg);
  width: 18px;
  height: 18px;
  background: #fffaf5;
  border-right: 1px solid #efcfad;
  border-bottom: 1px solid #efcfad;
}

#mds-research .mds-carousel-controls {
  display: none;
}

/* TABLET */

@media (max-width: 1080px) {
  #mds-research .mds-research-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #mds-research .mds-research-copy {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  #mds-research .mds-research-copy p {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  #mds-research .mds-people-grid {
    grid-template-columns: repeat(6,minmax(0,1fr));
    row-gap: 18px;
  }

  #mds-research .mds-person {
    grid-column: span 2;
  }

  #mds-research .mds-person:nth-child(4) {
    grid-column: 2 / span 2;
  }

  #mds-research .mds-person:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

/* VERSIONE SMARTPHONE */

@media (max-width: 700px) {

  #mds-research {
    width: calc(100% - 28px);
    padding: 68px 0 28px;
  }

  #mds-research .mds-discovery {
    top: -28px;
    gap: 7px;
  }

  #mds-research .mds-discovery-caption {
    font-size: clamp(15px,4vw,17px);
    line-height: 1.35;
    max-width: 95%;
  }

  #mds-research .mds-discovery-motion {
    gap: 4px;
  }

  #mds-research .mds-discovery-dot {
    width: 5px;
    height: 5px;
  }

  #mds-research .mds-discovery-chevron {
    width: 14px;
    height: 9px;
  }

  #mds-research .mds-research-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 23px;
  }

  #mds-research .mds-research-heading {
    width: 100%;
  }

  #mds-research h2 {
    font-size: clamp(35px,9vw,45px);
    line-height: 1.03;
    letter-spacing: -.045em;
    text-align: center;
  }

  #mds-research .mds-research-copy {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  #mds-research .mds-research-copy p {
    font-size: 16px;
    line-height: 1.58;
    text-align: center;
  }

  #mds-research .mds-hover-hint {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
  }

  #mds-research .mds-test-prompt {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
  }

  #mds-research .mds-test-cta {
    width: auto;
    max-width: 100%;
    min-height: 51px;
    padding: 12px 22px;
    gap: 9px;
    font-size: 19px;
  }

  #mds-research .mds-test-cta svg {
    width: 19px;
    height: 19px;
  }

  /* CAROSELLO iPHONE */

  #mds-research .mds-people-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-top: 0;
    padding: 4px 2px 12px;
    overflow-x: auto !important;
    overflow-y: hidden;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  #mds-research .mds-people-grid::-webkit-scrollbar {
    display: none;
  }

  #mds-research .mds-people-grid > .mds-person {
    flex: 0 0 76% !important;
    width: 76% !important;
    min-width: 0;
    min-height: 218px;
    grid-column: auto !important;
    padding: 17px 13px;
    border: 1px solid #f2d7b9;
    border-radius: 20px;
    background: rgba(255,253,249,.85);
    box-shadow: 0 5px 15px rgba(98,61,24,.035);
  }

  #mds-research .mds-person-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 78px;
  }

  #mds-research .mds-person-figure {
    width: 70px;
    height: 78px;
  }

  #mds-research .mds-person-topic {
    font-size: 19px;
    line-height: 1.2;
    margin-top: 13px;
    max-width: 100%;
  }

  #mds-research .mds-person-name {
    font-size: 15px;
    line-height: 1.4;
    margin-top: 8px;
    max-width: 100%;
  }

  /* APPROFONDIMENTI MOBILE */

  #mds-research .mds-tooltip {
    order: 2;
    position: static;
    display: none;
    width: 100%;
    max-width: none;
    margin-top: 12px;
    padding: 14px;
    border-radius: 13px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transform: none !important;
    transition: none;
  }

  #mds-research .mds-person:hover .mds-tooltip,
  #mds-research .mds-person:focus-within .mds-tooltip {
    display: none;
  }

  #mds-research .mds-person.is-open .mds-tooltip,
  #mds-research .mds-person.is-open:hover .mds-tooltip,
  #mds-research .mds-person.is-open:focus-within .mds-tooltip {
    display: block;
    pointer-events: auto;
  }

  #mds-research .mds-tooltip::after {
    display: none;
  }

  #mds-research .mds-tooltip strong {
    font-size: 17px;
    line-height: 1.2;
  }

  #mds-research .mds-tooltip p {
    font-size: 15px;
    line-height: 1.5;
  }

  #mds-research .mds-tooltip-authors {
    font-size: 13px;
    line-height: 1.45;
  }

  /* NAVIGAZIONE CAROSELLO */

  #mds-research .mds-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
    margin: 12px 0 0;
  }

  #mds-research .mds-carousel-arrow {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border: 1px solid #efc89c;
    border-radius: 50%;
    background: #fffaf5;
    color: #b85c00;
    font-family: var(--font);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 10px rgba(120,70,30,.06);
  }

  #mds-research .mds-carousel-arrow:disabled {
    opacity: .35;
  }

  #mds-research .mds-carousel-count {
    min-width: 50px;
    text-align: center;
    color: #8a5b35;
    font-size: 15px;
    font-weight: 700;
  }

  #mds-research::before {
    background:
      radial-gradient(
        ellipse 100% 45% at 110% 25%,
        rgba(255,195,135,.30),
        transparent 95%
      ),
      linear-gradient(
        165deg,
        #fffaf6 0%,
        #fff2e5 55%,
        #fff9f2 100%
      );
  }
}

@media (max-width: 380px) {
  #mds-research {
    width: calc(100% - 22px);
  }

  #mds-research h2 {
    font-size: 34px;
  }

  #mds-research .mds-research-copy p {
    font-size: 16px;
  }

  #mds-research .mds-people-grid > .mds-person {
    flex-basis: 83% !important;
    width: 83% !important;
  }

  #mds-research .mds-test-cta {
    font-size: 18px;
    padding: 12px 18px;
  }
}

/* ACCESSIBILITÀ */

@media (prefers-reduced-motion: reduce) {
  #mds-research *,
  #mds-research *::before,
  #mds-research *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ===== BLOCCO ===== */

/* ==========================================
   BLOCCO 3 - STILI ISOLATI
========================================== */

#mds-flow-block {
  --mds-orange: #ff7f00;
  --mds-ink: #211c18;
  --mds-font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mds-head: 'Baloo 2', system-ui, sans-serif;

  position: relative;
  width: 100%;
  margin: 0;
  padding: 1cm 0 0;
  background: transparent;
  color: var(--mds-ink);
  font-family: var(--mds-font);
  box-sizing: border-box;
}

#mds-flow-block *,
#mds-flow-block *::before,
#mds-flow-block *::after {
  box-sizing: border-box;
}

/* ==========================================
   PULSANTE GUARDA I PERCORSI
========================================== */

#mds-flow-block .mds-course-bridge {
  position: relative;
  z-index: 8;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 30px auto -8px;

  display: flex;
  justify-content: center;
}

#mds-flow-block .mds-course-bridge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 17px;

  padding: 16px 25px 15px 29px;

  background: #fffaf5;
  color: #ad4e00 !important;

  border: 2px solid #f18a34;
  border-radius: 999px;

  box-shadow: 0 14px 38px rgba(128, 73, 29, .13);

  font: 700 clamp(18px, 1.7vw, 23px)/1.1 var(--mds-head);

  text-decoration: none !important;
  text-transform: none !important;

  transition:
    background-color .25s ease,
    transform .25s ease,
    box-shadow .25s ease;
}

#mds-flow-block .mds-course-bridge-link svg {
  width: 22px;
  height: 22px;
  flex: none;
  transition: transform .25s ease;
}

#mds-flow-block .mds-course-bridge-link:hover,
#mds-flow-block .mds-course-bridge-link:focus-visible {
  background: #fff0dc;
  color: #ad4e00 !important;
  transform: translateY(-4px);
  box-shadow: 0 18px 43px rgba(128, 73, 29, .18);
}

#mds-flow-block .mds-course-bridge-link:hover svg {
  transform: translateY(4px);
}

#mds-flow-block .mds-course-bridge-link:focus-visible {
  outline: 3px solid #2863b9;
  outline-offset: 4px;
}

/* ==========================================
   SEZIONE TESTUALE DESKTOP
========================================== */

#mds-flow-block .mds-flow {
  width: min(calc(100% - 64px), 1240px);
  max-width: 1240px;

  margin: 0 auto;

  padding: clamp(45px, 5vw, 72px) 0 20px;
}

#mds-flow-block .mds-flow-statement {
  display: grid;

  grid-template-columns:
    minmax(0, 1.07fr)
    minmax(0, 1fr);

  gap: clamp(26px, 4.1vw, 60px);
  align-items: center;
}

/* TITOLO */

#mds-flow-block .mds-flow-statement h2 {
  margin: 0;

  font-family: var(--mds-head);
  font-weight: 700;

  font-size: clamp(45px, 4.15vw, 62px);
  line-height: 1.035;
  letter-spacing: -.065em;

  text-align: center;
  color: #211c18;

  text-transform: none !important;
}

#mds-flow-block .mds-flow-first-line,
#mds-flow-block .mds-flow-second-line {
  display: block;
  white-space: nowrap;
}

#mds-flow-block .mds-flow-second-line i {
  font-style: normal;
  color: var(--mds-orange);
}

/* TESTO DESCRITTIVO */

#mds-flow-block .mds-flow-statement p {
  justify-self: center;

  max-width: 530px;
  margin: 0;

  font-family: var(--mds-font);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.44;

  color: #655346;
}

#mds-flow-block .mds-flow-statement p strong {
  font-weight: 700;
  color: #30241e;
}

/* ==========================================
   LINEA DECORATIVA INFERIORE
========================================== */

#mds-flow-block .mds-flow-line {
  height: 2px;
  width: 100%;

  margin: clamp(32px, 3.4vw, 48px) auto 0;

  background: linear-gradient(
    90deg,
    transparent,
    #ff9e43a3,
    transparent
  );

  transform: rotate(-1deg);
  opacity: .55;
}

/* ==========================================
   TABLET - INVARIATO
========================================== */

@media (max-width: 1000px) {

  #mds-flow-block .mds-flow {
    width: calc(100% - 48px);
  }

  #mds-flow-block .mds-flow-statement {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  #mds-flow-block .mds-flow-statement p {
    justify-self: center;
    max-width: 730px;
    text-align: center;
  }

}

/* ==========================================
   VERSIONE SMARTPHONE RESPONSIVE
   FINO A 700 PIXEL
========================================== */

@media (max-width: 700px) {

  /* CONTENITORE GENERALE */

  #mds-flow-block {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
  }

  /* PULSANTE BEN VISIBILE */

  #mds-flow-block .mds-course-bridge {
    width: fit-content;
    max-width: calc(100% - 32px);
    margin: 22px auto 0;

    display: flex;
    justify-content: center;
  }

  #mds-flow-block .mds-course-bridge-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 11px;

    min-height: 52px;
    max-width: 100%;
    padding: 12px 22px;

    font-family: var(--mds-head);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.15;

    border: 2px solid #f18a34;
    border-radius: 999px;

    text-align: center;
    white-space: nowrap;

    box-shadow: 0 7px 20px rgba(128,73,29,.12);
  }

  #mds-flow-block .mds-course-bridge-link svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
  }

  /* SEZIONE TESTUALE */

  #mds-flow-block .mds-flow {
    width: calc(100% - 36px);
    max-width: 600px;

    margin: 0 auto;
    padding: 32px 0 20px;
  }

  #mds-flow-block .mds-flow-statement {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 19px;
    width: 100%;
  }

  /* TITOLO RESPONSIVE */

  #mds-flow-block .mds-flow-statement h2 {
    width: 100%;
    max-width: 100%;

    margin: 0;

    font-family: var(--mds-head);
    font-size: clamp(30px, 8.2vw, 43px);
    font-weight: 700;

    line-height: 1.08;
    letter-spacing: -.045em;

    text-align: center;
    text-wrap: balance;
  }

  #mds-flow-block .mds-flow-first-line,
  #mds-flow-block .mds-flow-second-line {
    display: block;
    white-space: normal;
    overflow-wrap: normal;
  }

  #mds-flow-block .mds-flow-second-line i {
    font-style: normal;
    color: var(--mds-orange);
  }

  /* TESTO DESCRITTIVO MOBILE */

  #mds-flow-block .mds-flow-statement p {
    width: 100%;
    max-width: 520px;

    margin: 0;

    font-family: var(--mds-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;

    letter-spacing: 0;

    text-align: center;
    text-wrap: pretty;

    color: #4e4036;
  }

  #mds-flow-block .mds-flow-statement p strong {
    font-weight: 700;
    color: #30241e;
  }

  /* LINEA DECORATIVA */

  #mds-flow-block .mds-flow-line {
    height: 1px;
    width: 100%;

    margin: 26px auto 0;

    opacity: .45;
    transform: none;
  }

}

/* ==========================================
   SMARTPHONE PICCOLI
   FINO A 380 PIXEL
========================================== */

@media (max-width: 380px) {

  #mds-flow-block .mds-course-bridge {
    max-width: calc(100% - 28px);
    margin-top: 18px;
  }

  #mds-flow-block .mds-course-bridge-link {
    padding: 11px 18px;
    gap: 9px;
    min-height: 49px;
    font-size: 18px;
  }

  #mds-flow-block .mds-course-bridge-link svg {
    width: 18px;
    height: 18px;
  }

  #mds-flow-block .mds-flow {
    width: calc(100% - 30px);
    padding-top: 28px;
  }

  #mds-flow-block .mds-flow-statement {
    gap: 17px;
  }

  #mds-flow-block .mds-flow-statement h2 {
    font-size: clamp(29px, 8.1vw, 32px);
    line-height: 1.1;
    letter-spacing: -.045em;
  }

  #mds-flow-block .mds-flow-statement p {
    font-size: 16px;
    line-height: 1.58;
  }

  #mds-flow-block .mds-flow-line {
    margin-top: 23px;
  }

}

/* ==========================================
   SMARTPHONE MOLTO STRETTI
   FINO A 320 PIXEL
========================================== */

@media (max-width: 320px) {

  #mds-flow-block .mds-flow-statement h2 {
    font-size: 27px;
    letter-spacing: -.04em;
  }

  #mds-flow-block .mds-course-bridge-link {
    font-size: 17px;
    padding: 10px 15px;
  }

  #mds-flow-block .mds-flow {
    width: calc(100% - 24px);
  }

}

/* ==========================================
   ACCESSIBILITÀ
========================================== */

@media (prefers-reduced-motion: reduce) {

  #mds-flow-block .mds-course-bridge-link,
  #mds-flow-block .mds-course-bridge-link svg {
    transition: none !important;
  }

}

/* ==========================================
   PULSANTE A CAVALLO TRA BLOCCO 3 E BLOCCO 4
   Stessa dimensione su desktop, tablet e mobile
========================================== */
#mds-flow-block {
  z-index: 2;
  overflow: visible;
}

#mds-flow-block .mds-course-bridge {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 20;
  margin: 0;
  transform: translate(-50%, 50%);
  width: max-content;
  max-width: calc(100% - 32px);
}

/* ===== BLOCCO ===== */

/* ==========================================
   CONTENITORE CORSI
========================================== */

#mds-courses {
  --orange:#ff7f00;
  --head:'Baloo 2',system-ui,sans-serif;
  --font:'DM Sans',system-ui,sans-serif;

  position:relative;
  isolation:isolate;
  width:100%;
  margin:0;
  padding:clamp(58px,7vw,105px) 0 30px;
  font-family:var(--font);
  color:#211c18;
  background:transparent;
}

#mds-courses *,
#mds-courses *::before,
#mds-courses *::after {
  box-sizing:border-box;
}

/* ==========================================
   SFONDO ORIGINALE
========================================== */

#mds-courses::before {
  content:"";
  position:absolute;
  z-index:-1;

  width:min(93vw,1340px);
  height:100%;
  top:0;
  left:50%;

  transform:translateX(-50%) rotate(1deg);

  background:
    radial-gradient(
      ellipse at 50% 22%,
      #fff0d7,
      #fff7ed 72%
    );

  border-radius:
    39% 36% 32% 34% /
    13% 12% 12% 12%;

  pointer-events:none;
}

#mds-courses .mds-courses-wrap {
  width:min(calc(100% - 64px),1240px);
  max-width:1240px;
  margin:0 auto;
}

/* ==========================================
   INTESTAZIONE DESKTOP
========================================== */

#mds-courses .mds-courses-heading {
  text-align:center;
}

#mds-courses .mds-courses-heading h2 {
  margin:13px 0 14px;

  font-family:var(--head);
  font-weight:700;
  font-size:clamp(62px,7.6vw,112px);
  line-height:.93;
  letter-spacing:-.065em;

  color:#211c18;
  text-transform:none !important;
}

#mds-courses .mds-courses-heading h2 em {
  color:var(--orange);
  font-style:normal;
}

#mds-courses .mds-courses-subtitle {
  margin:clamp(14px,2vw,22px) auto 0;
  max-width:700px;

  font-size:clamp(15px,1.46vw,18px);
  font-weight:400;
  line-height:1.45;

  color:#59493d;
}

/* ==========================================
   INVITO AL TEST
========================================== */

#mds-courses .mds-offer-test {
  margin:13px auto 0;

  display:flex;
  justify-content:center;
  align-items:baseline;
  flex-wrap:wrap;

  column-gap:11px;
  row-gap:4px;

  color:#55463b;
  font-size:clamp(15px,1.32vw,17px);
  line-height:1.45;

  text-align:center;
}

#mds-courses .mds-offer-test span {
  font-weight:400;
}

#mds-courses .mds-offer-test a {
  color:#ce5f00;
  font-weight:850;

  text-decoration:underline;
  text-decoration-thickness:1.5px;
  text-underline-offset:4px;

  transition:color .2s,transform .2s;
}

#mds-courses .mds-offer-test a:hover {
  color:#a84c00;
  transform:translateY(-1px);
}

/* ==========================================
   MODALITÀ DI SVOLGIMENTO
========================================== */

#mds-courses .mds-course-mode {
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;

  max-width:100%;
  margin:15px auto 22px;
  padding:14px 26px;

  border-radius:999px;

  background:#241f1c;
  color:#fff;

  font-size:15px;
  line-height:1.3;

  box-shadow:0 13px 30px rgba(47,32,25,.13);
}

#mds-courses .mds-course-mode strong {
  font-size:clamp(14px,1.4vw,17px);
  line-height:1.45;
  font-weight:800;
  color:#fff;
}

/* ==========================================
   TRE SCHEDE - DESKTOP
========================================== */

#mds-courses .mds-course-cards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:17px;
  align-items:stretch;
}

#mds-courses .mds-course-card {
  position:relative;

  display:flex;
  flex-direction:column;
  min-width:0;

  padding:21px 24px 20px;

  background:#fffdfa;
  border:1px solid #e9d7c6;
  border-radius:30px;

  box-shadow:0 18px 46px rgba(72,48,27,.085);

  transition:
    transform .28s ease,
    box-shadow .28s ease,
    border-color .28s ease;
}

#mds-courses .mds-course-card:hover {
  transform:translateY(-7px);
  border-color:#f6b77a;
  box-shadow:0 26px 48px rgba(72,48,27,.13);
}

/* ==========================================
   ETICHETTE SUPERIORI
========================================== */

#mds-courses .mds-course-topline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;

  min-height:29px;
  margin-bottom:7px;

  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;

  color:#986436;
  text-transform:uppercase;
}

/* ==========================================
   TITOLI DEI CORSI
========================================== */

#mds-courses .mds-course-card h3 {
  margin:0;

  font:700 clamp(26px,2.5vw,34px)/1.04 var(--head);
  letter-spacing:-.06em;

  color:#241c18;
  white-space:nowrap;
  text-transform:none !important;
}

/* ==========================================
   ORE
========================================== */

#mds-courses .mds-course-length {
  display:flex;
  align-items:baseline;
  gap:7px;

  margin:0;
  padding:8px 0 10px;

  border-top:1px solid #f0e5da;
  border-bottom:1px solid #f0e5da;

  color:#6c5c50;
  font-size:15px;
  font-weight:700;
}

#mds-courses .mds-course-length strong {
  color:#2c221c;
  font:700 34px/1 var(--head);
  letter-spacing:-.06em;
}

/* ==========================================
   PREZZI
========================================== */

#mds-courses .mds-price-stack {
  display:flex;
  flex-direction:column;
  gap:0;

  min-height:0;
  margin:13px 0 0;
}

#mds-courses .mds-price-stack del {
  color:#988778;

  font-size:19px;
  line-height:1.32;
  font-weight:800;

  text-decoration-thickness:1.6px;
}

#mds-courses .mds-price-stack > strong {
  font:700 clamp(38px,4vw,56px)/1 var(--head);
  letter-spacing:-.065em;
  color:#231d19;

  white-space:nowrap;
}

#mds-courses .mds-price-stack > span {
  margin-top:5px;
  font-size:13px;
  font-weight:800;
  color:#946127;
}

/* ==========================================
   FRASE GUIDA
========================================== */

#mds-courses .mds-course-focus {
  margin:13px 0 4px;

  font-size:16px;
  line-height:1.24;
  font-weight:800;
  letter-spacing:-.012em;

  color:#382a20;
}

/* ==========================================
   ELENCO OBIETTIVI
========================================== */

#mds-courses .mds-course-card ul {
  list-style:none;

  display:grid;
  gap:10px;
  flex:0 0 auto;

  padding:0;
  margin:11px 0 17px;
}

#mds-courses .mds-course-card li {
  display:flex;
  gap:8px;

  font-size:14px;
  line-height:1.4;
  font-weight:600;

  color:#5e5147;
}

#mds-courses .mds-course-card li::before {
  content:"✓";
  color:#ee7500;
  font-weight:900;
  flex:none;
}

/* ==========================================
   PULSANTE ACQUISTO
========================================== */

#mds-courses .mds-course-buy {
  display:block;
  width:100%;

  margin-top:auto;
  padding:13px 16px;

  text-align:center;
  text-decoration:none !important;

  border-radius:999px;

  background:#ff7f00;
  color:#241711 !important;

  font:700 17px/1.2 var(--head);
  text-transform:none !important;

  transition:
    transform .2s,
    background .2s,
    box-shadow .2s;
}

#mds-courses .mds-course-buy:hover {
  background:#ff9a2c;
  color:#241711 !important;
  transform:translateY(-2px);
  box-shadow:0 10px 26px rgba(255,127,0,.19);
}

/* ==========================================
   SCHEDA RINFORZATO - PIÙ SCELTO
========================================== */

#mds-courses .mds-course-card.most-chosen {
  background:linear-gradient(
    150deg,
    #ffbb70 0%,
    #ffcf9b 46%,
    #ffe6c7 100%
  );

  border:2px solid #e98d2b;

  box-shadow:0 20px 48px rgba(164,83,23,.20);
}

#mds-courses .mds-course-card.most-chosen:hover {
  border-color:#d97716;
  box-shadow:0 28px 52px rgba(164,83,23,.26);
}

#mds-courses .most-chosen .mds-course-topline {
  color:#6c3b18;
}

#mds-courses .mds-choice-label {
  color:#fff;
  background:#38251a;

  border:1px solid #38251a;
  border-radius:999px;

  padding:7px 12px;

  font-size:11px;
  font-weight:800;
  letter-spacing:0;

  text-transform:none;

  box-shadow:0 4px 12px rgba(49,32,23,.13);
}

#mds-courses .most-chosen .mds-course-focus,
#mds-courses .most-chosen .mds-course-length,
#mds-courses .most-chosen li {
  color:#463124;
}

#mds-courses .most-chosen .mds-course-length {
  border-color:rgba(132,71,31,.28);
}

#mds-courses .most-chosen .mds-course-length strong,
#mds-courses .most-chosen .mds-price-stack > strong {
  color:#251c16;
}

#mds-courses .most-chosen .mds-price-stack del {
  color:#74523d;
}

#mds-courses .most-chosen .mds-price-stack > span {
  color:#70401a;
}

#mds-courses .most-chosen li::before {
  color:#994300;
}

#mds-courses .most-chosen .mds-course-buy {
  background:#34241b;
  color:#fff !important;
}

#mds-courses .most-chosen .mds-course-buy:hover {
  background:#4a3021;
  color:#fff !important;
}

/* ==========================================
   NOTA FISCALE
========================================== */

#mds-courses .mds-course-tax {
  margin:23px auto 0;
  max-width:700px;

  color:#6a5c50;

  font-size:13px;
  line-height:1.6;
  text-align:center;
}

/* ==========================================
   CONTROLLI CAROSELLO
   NASCOSTI SU DESKTOP
========================================== */

#mds-courses .mds-course-carousel-controls {
  display:none;
}

/* ==========================================
   TABLET
========================================== */

@media(max-width:1070px) {

  #mds-courses .mds-course-cards {
    gap:12px;
  }

  #mds-courses .mds-course-card {
    padding:20px 19px 19px;
  }

  #mds-courses .mds-course-card h3 {
    font-size:clamp(24px,2.7vw,30px);
  }

  #mds-courses .mds-price-stack > strong {
    font-size:clamp(36px,4vw,48px);
  }

}

/* ==========================================
   TABLET VERTICALE
========================================== */

@media(max-width:830px) {

  #mds-courses .mds-courses-wrap {
    width:calc(100% - 32px);
  }

  #mds-courses .mds-course-cards {
    grid-template-columns:1fr;
    max-width:580px;
    margin:auto;
  }

  #mds-courses .mds-course-card {
    padding:22px 23px 20px;
  }

  #mds-courses .mds-courses-subtitle {
    margin-top:18px;
  }

}

/* ==========================================
   SMARTPHONE - FINO A 700 PX
========================================== */

@media(max-width:700px) {

  /* SEZIONE PIÙ COMPATTA */

  #mds-courses {
    padding:26px 0 22px;
  }

  #mds-courses::before {
    width:100%;
    border-radius:25px;
    transform:translateX(-50%);
  }

  #mds-courses .mds-courses-wrap {
    width:calc(100% - 28px);
    max-width:600px;
  }

  /* TITOLO RIDOTTO */

  #mds-courses .mds-courses-heading h2 {
    margin:0 0 9px;
    font-size:clamp(37px,9vw,49px);
    line-height:.94;
    letter-spacing:-.045em;
  }

  #mds-courses .mds-courses-subtitle {
    max-width:350px;
    margin:9px auto 0;

    font-size:13px;
    line-height:1.4;
    font-weight:400;
  }

  /* INVITO AL TEST */

  #mds-courses .mds-offer-test {
    margin:10px auto 0;
    gap:3px 8px;

    font-size:12px;
    line-height:1.4;
  }

  #mds-courses .mds-offer-test a {
    font-weight:800;
  }

  /* MODALITÀ ONLINE */

  #mds-courses .mds-course-mode {
    margin:12px auto 17px;
    padding:9px 15px;

    border-radius:999px;
    box-shadow:0 5px 14px rgba(47,32,25,.10);
  }

  #mds-courses .mds-course-mode strong {
    font-size:11.5px;
    line-height:1.3;
  }

  /* ======================================
     CAROSELLO ORIZZONTALE DEI TRE CORSI
  ====================================== */

  #mds-courses .mds-course-cards {
    display:flex;
    flex-wrap:nowrap;
    align-items:stretch;

    width:100%;
    max-width:none;

    gap:10px;
    margin:0;

    padding:4px 1px 14px;

    overflow-x:auto;
    overflow-y:hidden;

    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    scroll-padding-inline:0;
    /* Spazio laterale per centrare anche la prima e l’ultima scheda */
    padding-left:7%;
    padding-right:7%;

    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;

    scrollbar-width:none;
  }

  #mds-courses .mds-course-cards::-webkit-scrollbar {
    display:none;
  }

  /* SCHEDA SINGOLA */

  #mds-courses .mds-course-card {
    flex:0 0 86%;
    width:86%;
    min-width:0;

    min-height:0;

    padding:15px 15px 16px;

    border-radius:21px;

    scroll-snap-align:center;

    box-shadow:0 8px 20px rgba(72,48,27,.075);

    transition:none;
  }

  #mds-courses .mds-course-card:hover {
    transform:none;
  }

  /* ETICHETTA */

  #mds-courses .mds-course-topline {
    min-height:21px;
    margin-bottom:5px;

    font-size:9px;
    letter-spacing:.09em;
  }

  #mds-courses .mds-choice-label {
    padding:5px 9px;
    font-size:9px;
  }

  /* TITOLO CORSO */

  #mds-courses .mds-course-card h3 {
    font-size:25px;
    line-height:1.05;
    letter-spacing:-.04em;
    white-space:normal;
  }

  /* ORE */

  #mds-courses .mds-course-length {
    gap:6px;
    margin:0;
    padding:7px 0 8px;

    font-size:12px;
    line-height:1.2;
  }

  #mds-courses .mds-course-length strong {
    font-size:26px;
  }

  /* PREZZI */

  #mds-courses .mds-price-stack {
    margin-top:9px;
  }

  #mds-courses .mds-price-stack del {
    font-size:14px;
    line-height:1.2;
  }

  #mds-courses .mds-price-stack > strong {
    font-size:39px;
    line-height:1;
  }

  #mds-courses .mds-price-stack > span {
    margin-top:2px;
    font-size:10px;
  }

  /* FRASE GUIDA */

  #mds-courses .mds-course-focus {
    margin:10px 0 3px;

    font-size:13px;
    line-height:1.25;
  }

  /* ELENCO PUNTI */

  #mds-courses .mds-course-card ul {
    gap:6px;
    margin:8px 0 13px;
  }

  #mds-courses .mds-course-card li {
    gap:7px;

    font-size:11.5px;
    line-height:1.35;
  }

  /* ACQUISTA */

  #mds-courses .mds-course-buy {
    padding:10px 13px;

    font-size:15px;
    line-height:1.1;

    border-radius:999px;
  }

  /* ======================================
     FRECCE CAROSELLO
  ====================================== */

  #mds-courses .mds-course-carousel-controls {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:15px;

    margin-top:5px;
  }

  #mds-courses .mds-course-carousel-arrow {
    display:grid;
    place-items:center;

    width:39px;
    height:39px;

    padding:0;

    border:1px solid #ebbd8d;
    border-radius:50%;

    background:#fffaf5;
    color:#a84c00;

    font-family:var(--font);
    font-size:23px;
    line-height:1;

    box-shadow:0 4px 12px rgba(100,60,26,.07);

    cursor:pointer;
  }

  #mds-courses .mds-course-carousel-arrow:disabled {
    opacity:.35;
    cursor:default;
  }

  #mds-courses .mds-course-carousel-count {
    min-width:40px;

    font-size:12px;
    font-weight:800;

    text-align:center;
    color:#87552f;
  }

  /* NOTA FISCALE */

  #mds-courses .mds-course-tax {
    margin:15px auto 0;

    font-size:10px;
    line-height:1.4;
  }

}

/* ==========================================
   TABLET - CAROSELLO ORIZZONTALE
   DA 701 A 1070 PX
========================================== */

@media (min-width:701px) and (max-width:1070px) {
  #mds-courses .mds-course-cards {
    display:flex;
    flex-wrap:nowrap;
    align-items:stretch;
    grid-template-columns:none;
    width:100%;
    max-width:none;
    gap:16px;
    margin:0;
    padding:6px max(2px, calc((100% - min(78%, 570px)) / 2)) 20px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    scroll-padding-inline:0;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  #mds-courses .mds-course-cards::-webkit-scrollbar { display:none; }
  #mds-courses .mds-course-card {
    flex:0 0 min(78%, 570px);
    width:min(78%, 570px);
    min-width:0;
    scroll-snap-align:center;
  }
  #mds-courses .mds-course-carousel-controls {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:15px;
    margin-top:8px;
  }
  #mds-courses .mds-course-carousel-arrow {
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    padding:0;
    border:1px solid #ebbd8d;
    border-radius:50%;
    background:#fffaf5;
    color:#a84c00;
    font-family:var(--font);
    font-size:24px;
    line-height:1;
    box-shadow:0 4px 12px rgba(100,60,26,.07);
    cursor:pointer;
  }
  #mds-courses .mds-course-carousel-arrow:disabled {
    opacity:.35;
    cursor:default;
  }
  #mds-courses .mds-course-carousel-count {
    min-width:40px;
    font-size:13px;
    font-weight:800;
    text-align:center;
    color:#87552f;
  }
}

/* ==========================================
   SMARTPHONE PICCOLI - FINO A 380 PX
========================================== */

@media(max-width:380px) {

  #mds-courses .mds-courses-wrap {
    width:calc(100% - 22px);
  }

  #mds-courses .mds-courses-heading h2 {
    font-size:35px;
  }

  #mds-courses .mds-courses-subtitle {
    font-size:12.5px;
  }

  #mds-courses .mds-course-cards {
    padding-left:5.5%;
    padding-right:5.5%;
  }

  #mds-courses .mds-course-card {
    flex-basis:89%;
    width:89%;
    padding:13px;
  }

  #mds-courses .mds-course-card h3 {
    font-size:23px;
  }

  #mds-courses .mds-price-stack > strong {
    font-size:36px;
  }

  #mds-courses .mds-course-card li {
    font-size:11px;
  }

}

/* ==========================================
   ACCESSIBILITÀ
========================================== */

@media(prefers-reduced-motion:reduce) {

  #mds-courses .mds-course-card,
  #mds-courses .mds-course-buy,
  #mds-courses .mds-offer-test a {
    transition:none !important;
  }

  #mds-courses .mds-course-cards {
    scroll-behavior:auto;
  }

}

/* ==========================================
   SMARTPHONE - LEGGIBILITA E ADATTAMENTO
   Solo fino a 700px; desktop/tablet invariati
========================================== */
@media (max-width:700px) {
  #mds-courses {
    max-width:100%;
    overflow-x:clip;
    padding:60px 0 28px;
  }
  #mds-courses .mds-courses-wrap {
    width:calc(100% - 28px);
    max-width:600px;
    min-width:0;
  }
  #mds-courses .mds-courses-heading h2 {
    font-size:clamp(40px,10.5vw,54px);
    line-height:.98;
    letter-spacing:-.045em;
    overflow-wrap:normal;
  }
  #mds-courses .mds-courses-subtitle {
    max-width:420px;
    margin-top:15px;
    font-size:16px;
    line-height:1.6;
  }
  #mds-courses .mds-offer-test {
    max-width:420px;
    margin-top:15px;
    column-gap:7px;
    row-gap:5px;
    font-size:16px;
    line-height:1.6;
  }
  #mds-courses .mds-course-mode {
    margin:18px auto 22px;
    padding:12px 18px;
    max-width:100%;
    border-radius:22px;
  }
  #mds-courses .mds-course-mode strong {
    font-size:15px;
    line-height:1.45;
    text-align:center;
  }
  #mds-courses .mds-course-cards {
    gap:12px;
    padding-top:7px;
    padding-bottom:20px;
    padding-left:7%;
    padding-right:7%;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x pan-y;
  }
  #mds-courses .mds-course-card {
    flex:0 0 86%;
    width:86%;
    padding:20px 19px 22px;
    border-radius:24px;
  }
  #mds-courses .mds-course-topline {
    min-height:25px;
    margin-bottom:9px;
    font-size:12px;
    letter-spacing:.055em;
    flex-wrap:wrap;
  }
  #mds-courses .mds-choice-label {
    padding:6px 10px;
    font-size:12px;
  }
  #mds-courses .mds-course-card h3 {
    font-size:clamp(27px,7.5vw,34px);
    line-height:1.08;
    white-space:normal;
  }
  #mds-courses .mds-course-length {
    gap:8px;
    padding:10px 0 12px;
    font-size:16px;
    line-height:1.35;
  }
  #mds-courses .mds-course-length strong {
    font-size:35px;
  }
  #mds-courses .mds-price-stack {
    margin-top:15px;
  }
  #mds-courses .mds-price-stack del {
    font-size:18px;
  }
  #mds-courses .mds-price-stack > strong {
    font-size:clamp(42px,12vw,53px);
    white-space:nowrap;
  }
  #mds-courses .mds-price-stack > span {
    margin-top:5px;
    font-size:14px;
  }
  #mds-courses .mds-course-focus {
    margin:17px 0 6px;
    font-size:18px;
    line-height:1.35;
  }
  #mds-courses .mds-course-card ul {
    gap:12px;
    margin:12px 0 22px;
  }
  #mds-courses .mds-course-card li {
    gap:9px;
    font-size:16px;
    line-height:1.48;
  }
  #mds-courses .mds-course-buy {
    min-height:49px;
    padding:13px 17px;
    font-size:19px;
    line-height:1.2;
  }
  #mds-courses .mds-course-carousel-controls {
    gap:18px;
    margin-top:10px;
  }
  #mds-courses .mds-course-carousel-arrow {
    width:46px;
    height:46px;
    font-size:27px;
    touch-action:manipulation;
  }
  #mds-courses .mds-course-carousel-count {
    min-width:50px;
    font-size:16px;
  }
  #mds-courses .mds-course-tax {
    margin:19px auto 0;
    font-size:13px;
    line-height:1.5;
  }
}

@media (max-width:380px) {
  #mds-courses .mds-courses-wrap { width:calc(100% - 22px); }
  #mds-courses .mds-course-cards { padding-left:5.5%; padding-right:5.5%; }
  #mds-courses .mds-course-card {
    flex-basis:89%;
    width:89%;
    padding:18px 15px 20px;
  }
  #mds-courses .mds-course-card h3 { font-size:27px; }
  #mds-courses .mds-course-card li { font-size:16px; }
  #mds-courses .mds-price-stack > strong { font-size:43px; }
}

/* ===== BLOCCO ===== */

/* ==========================================
   CONTENITORE
========================================== */

#mds-presenza {
  --arancio: #ff7f00;
  --nero: #211c18;
  --font: "DM Sans", Arial, sans-serif;
  --titoli: "Baloo 2", cursive;

  width: 100%;
  padding: 24px 0 10px;
  margin: 0;

  background: transparent !important;
  color: var(--nero);
  font-family: var(--font);
}

#mds-presenza *,
#mds-presenza *::before,
#mds-presenza *::after {
  box-sizing: border-box;
}

#mds-presenza .container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

/* ==========================================
   BOX BIANCO
========================================== */

#mds-presenza .scheda {
  padding: clamp(22px, 2.9vw, 33px);
  background: #ffffff !important;
  border: 1px solid #eedfd0;
  border-radius: 38px;
  box-shadow: 0 28px 60px rgba(61,40,27,.075);
}

/* ==========================================
   INTRODUZIONE
========================================== */

#mds-presenza .introduzione {
  display: grid;
  grid-template-columns:
    minmax(0, 1.16fr)
    minmax(270px, .84fr);

  align-items: center;
  gap: 25px;
  margin-bottom: 19px;
}

/* ==========================================
   TITOLO
========================================== */

#mds-presenza h2.mds-titolo-presenza {
  margin: 0 0 11px !important;
  padding: 0 !important;

  color: #211c18 !important;

  font-family: var(--titoli) !important;
  font-size: clamp(33px, 4.4vw, 59px) !important;
  font-weight: 700 !important;

  line-height: 1.06 !important;
  letter-spacing: -.055em !important;

  text-transform: none !important;
  font-variant: normal !important;
  font-variant-caps: normal !important;
}

/* ==========================================
   DESCRIZIONE
========================================== */

#mds-presenza .descrizione {
  margin: 0;
  color: #211c18 !important;
  font: 400 17px/1.55 var(--font);
}

#mds-presenza .descrizione strong {
  color: #211c18 !important;
  font-weight: 700;
}

/* ==========================================
   FOTOGRAFIA
========================================== */

#mds-presenza .fotografia {
  position: relative;
  width: 100%;
  height: 220px;
  margin: 0;
  overflow: hidden;

  background: #f3e9dd;
  border-radius: 32px;

  box-shadow: 0 14px 28px rgba(59,48,37,.08);
  transform: rotate(1deg);
}

#mds-presenza .fotografia img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 43%;
}

#mds-presenza .fotografia figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;

  margin: 0;
  padding: 9px 13px;

  border-radius: 999px;
  background: #ffffff !important;
  color: #000000 !important;

  font: 800 12px/1.3 var(--font);
  text-align: center;
}

/* ==========================================
   MODULO
========================================== */

#mds-presenza .modulo {
  display: block;
  width: 100%;
  margin: 0;
}

#mds-presenza .campi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 13px 17px;
}

#mds-presenza .campo {
  display: flex;
  flex-direction: column;
  gap: 5px;

  min-width: 0;
  margin: 0;

  color: #453f3b;
  font: 800 14px/1.4 var(--font);
}

#mds-presenza .campo-intero {
  grid-column: 1 / -1;
}

#mds-presenza .obbligatorio {
  color: #cf6600;
}

/* ==========================================
   CAMPI DI TESTO
========================================== */

#mds-presenza .campo input,
#mds-presenza .campo textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 49px;

  margin: 0;
  padding: 11px 15px;

  border: 1px solid #d9e1ec;
  border-radius: 15px;

  background: #ffffff !important;
  color: #222329;

  outline: none;
  box-shadow: none;

  font: 500 16px/1.35 var(--font);
}

#mds-presenza .campo textarea {
  min-height: 88px;
  resize: vertical;
}

#mds-presenza .campo input:focus,
#mds-presenza .campo textarea:focus {
  border-color: #ff9f3d;
  box-shadow: 0 0 0 4px rgba(255,127,0,.12);
}

#mds-presenza .campo input::placeholder,
#mds-presenza .campo textarea::placeholder {
  color: #85878b;
  opacity: 1;
}

/* ==========================================
   CHECKBOX PRIVACY E MARKETING
========================================== */

#mds-presenza .consenso {
  position: relative !important;
  display: block !important;

  width: 100% !important;
  min-width: 0 !important;

  margin: 12px 0 0 !important;
  padding: 0 0 0 31px !important;

  text-align: left !important;
  clear: both;
}

#mds-presenza .consenso input[type="checkbox"] {
  position: absolute !important;

  top: 2px !important;
  left: 0 !important;

  display: block !important;

  width: 19px !important;
  height: 19px !important;

  min-width: 19px !important;
  min-height: 19px !important;

  margin: 0 !important;
  padding: 0 !important;

  appearance: auto !important;
  accent-color: #ff7f00;

  cursor: pointer;
}

#mds-presenza .consenso label {
  position: static !important;
  display: block !important;

  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;

  color: #68594e !important;
  font: 400 13px/1.5 var(--font) !important;

  text-align: left !important;
  white-space: normal !important;

  word-break: normal !important;
  overflow-wrap: break-word !important;
  writing-mode: horizontal-tb !important;

  cursor: pointer;
}

#mds-presenza .consenso a {
  color: #a94f00 !important;
  text-decoration: underline;
  font-weight: 700;
}

#mds-presenza .facoltativo {
  color: #875b41;
}

/* ==========================================
   PULSANTE INVIO
========================================== */

#mds-presenza .invio {
  margin-top: 16px;
}

#mds-presenza .invio button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 55px;
  padding: 12px 26px;

  border: 0;
  border-radius: 999px;

  background: #ff7f00 !important;
  color: #211b18 !important;

  font: 700 18px/1.1 var(--titoli);
  text-transform: none !important;

  box-shadow:
    0 6px 0 #ca6504,
    0 12px 27px rgba(255,127,0,.18);

  cursor: pointer;

  transition:
    transform .2s,
    background .2s;
}

#mds-presenza .invio button:hover {
  background: #ff9b33 !important;
  transform: translateY(-2px);
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 830px) {

  #mds-presenza .introduzione {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  #mds-presenza .fotografia {
    max-width: 550px;
    height: 210px;
  }

}

/* ==========================================
   VERSIONE RESPONSIVE SMARTPHONE
   FINO A 650 PIXEL
========================================== */

@media (max-width: 650px) {

  /* SEZIONE */

  #mds-presenza {
    width: 100%;
    max-width: 100%;
    padding: 20px 0 20px;
  }

  #mds-presenza .container {
    width: calc(100% - 28px);
    max-width: 600px;
    margin: 0 auto;
  }

  /* BOX PRINCIPALE */

  #mds-presenza .scheda {
    width: 100%;
    padding: 23px 19px 25px;
    border-radius: 25px;

    box-shadow:
      0 13px 32px rgba(61,40,27,.07);
  }

  /* INTRODUZIONE */

  #mds-presenza .introduzione {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 20px;
    margin-bottom: 25px;
  }

  /* TITOLO RESPONSIVE */

  #mds-presenza h2.mds-titolo-presenza {
    width: 100%;
    margin: 0 0 12px !important;

    font-family: var(--titoli) !important;
    font-size: clamp(33px, 8.5vw, 43px) !important;
    font-weight: 700 !important;

    line-height: 1.08 !important;
    letter-spacing: -.045em !important;

    text-align: left;
    text-wrap: balance;

    color: #211c18 !important;
  }

  /* DESCRIZIONE MOBILE */

  #mds-presenza .descrizione {
    width: 100%;
    max-width: 100%;
    margin: 0;

    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;

    text-align: left;
    color: #211c18 !important;
  }

  #mds-presenza .descrizione strong {
    font-weight: 700;
    color: #211c18 !important;
  }

  /* FOTOGRAFIA RESPONSIVE */

  #mds-presenza .fotografia {
    width: 100%;
    max-width: none;

    height: auto;
    aspect-ratio: 16 / 9;

    margin: 0;
    overflow: hidden;
    border-radius: 20px;
    transform: none;

    box-shadow:
      0 8px 22px rgba(59,48,37,.09);
  }

  #mds-presenza .fotografia img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 43%;
  }

  #mds-presenza .fotografia figcaption {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 9px;

    padding: 9px 12px;

    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;

    text-align: center;
    border-radius: 999px;

    background: #ffffff !important;
    color: #000000 !important;
  }

  /* MODULO A UNA COLONNA */

  #mds-presenza .modulo {
    width: 100%;
    margin: 0;
  }

  #mds-presenza .campi {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
    width: 100%;
  }

  #mds-presenza .campo-intero {
    grid-column: 1 / -1;
  }

  /* ETICHETTE DEI CAMPI */

  #mds-presenza .campo {
    width: 100%;
    min-width: 0;
    gap: 7px;

    font-family: var(--font);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;

    color: #453f3b;
  }

  /* INPUT OTTIMIZZATI PER IPHONE */

  #mds-presenza .campo input,
  #mds-presenza .campo textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 52px;

    margin: 0;
    padding: 13px 15px;

    border: 1px solid #d9e1ec;
    border-radius: 14px;

    background: #ffffff !important;
    color: #222329;

    font-family: var(--font);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;

    -webkit-appearance: none;
    appearance: none;
  }

  #mds-presenza .campo textarea {
    min-height: 115px;
    padding-top: 14px;
    resize: vertical;
  }

  #mds-presenza .campo input::placeholder,
  #mds-presenza .campo textarea::placeholder {
    font-size: 16px;
    line-height: 1.4;
    color: #85878b;
    opacity: 1;
  }

  /* CONSENSI PRIVACY */

  #mds-presenza .consenso {
    position: relative !important;
    width: 100% !important;
    margin: 20px 0 0 !important;
    padding: 0 0 0 35px !important;
    text-align: left !important;
  }

  #mds-presenza .consenso input[type="checkbox"] {
    position: absolute !important;
    top: 3px !important;
    left: 0 !important;

    display: block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;

    margin: 0 !important;
    padding: 0 !important;

    accent-color: #ff7f00;

    -webkit-appearance: checkbox !important;
    appearance: auto !important;
  }

  #mds-presenza .consenso label {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    font-family: var(--font) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;

    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;

    color: #68594e !important;
  }

  #mds-presenza .consenso a {
    font-size: inherit;
    font-weight: 700;
  }

  /* ==========================================
     PULSANTE COMPATTO E CENTRATO
     SOLO SMARTPHONE
  ========================================== */

  #mds-presenza .invio {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin-top: 25px;
  }

  #mds-presenza .invio button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 56px;

    padding: 13px 28px;

    border: 0;
    border-radius: 999px;

    background: #ff7f00 !important;
    color: #211b18 !important;

    font-family: var(--titoli);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;

    text-align: center;
    white-space: nowrap;
    text-transform: none !important;

    box-shadow:
      0 5px 0 #ca6504,
      0 12px 25px rgba(255,127,0,.18);

    cursor: pointer;
  }

}

/* ==========================================
   IPHONE PICCOLI
   FINO A 380 PIXEL
========================================== */

@media (max-width: 380px) {

  #mds-presenza .container {
    width: calc(100% - 22px);
  }

  #mds-presenza .scheda {
    padding: 20px 16px 23px;
    border-radius: 22px;
  }

  #mds-presenza h2.mds-titolo-presenza {
    font-size: clamp(31px, 8.3vw, 36px) !important;
    line-height: 1.08 !important;
  }

  #mds-presenza .descrizione {
    font-size: 16px;
    line-height: 1.56;
  }

  #mds-presenza .fotografia {
    aspect-ratio: 4 / 3;
    border-radius: 17px;
  }

  #mds-presenza .fotografia figcaption {
    font-size: 11px;
    padding: 8px 9px;
  }

  #mds-presenza .campo {
    font-size: 15px;
  }

  #mds-presenza .campo input,
  #mds-presenza .campo textarea {
    font-size: 16px;
    min-height: 50px;
    padding: 12px 13px;
  }

  #mds-presenza .consenso label {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  #mds-presenza .invio button {
    width: auto;
    min-height: 54px;
    font-size: 18px;
    padding: 12px 25px;
  }

}

/* ==========================================
   ACCESSIBILITÀ
========================================== */

@media (prefers-reduced-motion: reduce) {

  #mds-presenza .invio button {
    transition: none !important;
  }

}

/* ===== BLOCCO ===== */

/* ==========================================
   CONTENITORE
========================================== */

#mds-faq {
  --mds-orange: #ff7f00;
  --mds-head: "Baloo 2", system-ui, sans-serif;
  --mds-font: "DM Sans", system-ui, sans-serif;

  position: relative;
  isolation: isolate;

  width: min(calc(100% - 64px), 1240px);
  max-width: 1240px;

  margin: 0 auto;

  padding:
    clamp(76px, 6.2vw, 90px)
    0
    clamp(28px, 3.2vw, 44px);

  font-family: var(--mds-font);
  color: #29221e;

  background: transparent !important;

  box-sizing: border-box;
}

#mds-faq *,
#mds-faq *::before,
#mds-faq *::after {
  box-sizing: border-box;
}

/* ==========================================
   SFUMATURE ORIGINALI
========================================== */

#mds-faq::before {
  content: "";

  position: absolute;
  z-index: -1;

  inset: 0 0 -4%;

  background:
    radial-gradient(
      ellipse 35% 35% at 90% 15%,
      rgba(255,180,95,.16),
      transparent
    ),
    radial-gradient(
      ellipse 45% 35% at 6% 80%,
      rgba(255,207,152,.21),
      transparent
    );

  pointer-events: none;
}

/* ==========================================
   CONTENUTO
========================================== */

#mds-faq .mds-faq-inner {
  width: min(950px, 100%);
  max-width: 950px;
  margin: 0 auto;
}

/* ==========================================
   TITOLO SU UNA RIGA
========================================== */

#mds-faq .mds-faq-heading {
  width: 100%;
  max-width: 100%;

  margin: 0 auto 32px;

  text-align: center;
}

#mds-faq .mds-faq-heading h2 {
  display: block;
  width: 100%;

  margin: 0 0 13px !important;
  padding: 0 !important;

  font-family: var(--mds-head) !important;
  font-weight: 700 !important;

  font-size: clamp(26px, 5.2vw, 70px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.055em !important;

  color: #29221e !important;

  text-align: center !important;
  text-transform: uppercase !important;

  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#mds-faq .mds-faq-heading h2 em {
  display: inline !important;

  font-style: normal !important;

  color: var(--mds-orange) !important;

  text-transform: uppercase !important;
  white-space: nowrap !important;
}

/* ==========================================
   ELENCO DOMANDE
========================================== */

#mds-faq .mds-faq-accordion {
  display: grid;
  gap: 10px;
}

/* ==========================================
   SINGOLO RIQUADRO
========================================== */

#mds-faq .mds-faq-accordion details {
  display: block;

  border: 1px solid rgba(216,178,143,.43);
  border-radius: 24px;

  background: rgba(255,253,249,.78);

  box-shadow: 0 6px 22px rgba(98,66,39,.035);

  overflow: hidden;

  transition:
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

/* ==========================================
   RIQUADRO APERTO
========================================== */

#mds-faq .mds-faq-accordion details[open] {
  background: rgba(255,255,255,.96);

  border-color: rgba(255,150,54,.5);

  box-shadow: 0 16px 33px rgba(97,61,27,.08);
}

/* ==========================================
   DOMANDA
========================================== */

#mds-faq .mds-faq-accordion summary {
  list-style: none;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;

  padding: 22px clamp(19px,3vw,29px);

  cursor: pointer;

  font-family: var(--mds-head);
  font-weight: 700;

  font-size: clamp(18px,2vw,22px);
  line-height: 1.18;

  letter-spacing: -.015em;

  color: #29221e;

  text-align: left;
  text-transform: none !important;
}

#mds-faq .mds-faq-accordion summary::-webkit-details-marker {
  display: none;
}

#mds-faq .mds-faq-accordion summary::marker {
  content: "";
}

/* ==========================================
   ICONA +
========================================== */

#mds-faq .mds-faq-accordion summary::after {
  content: "+";

  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;
  flex: 0 0 36px;

  border-radius: 50%;

  background: #ffeedb;
  color: #b95c06;

  font: 700 29px/1 var(--mds-head);

  transition:
    transform .25s ease,
    background .25s ease;
}

/* ==========================================
   ICONA - QUANDO APERTO
========================================== */

#mds-faq .mds-faq-accordion details[open] summary::after {
  content: "−";

  background: #ff7f00;
  color: #251b14;

  transform: rotate(180deg);
}

/* ==========================================
   HOVER E TASTIERA
========================================== */

#mds-faq .mds-faq-accordion summary:hover {
  color: #a65308;
}

#mds-faq .mds-faq-accordion summary:focus-visible {
  outline: 3px solid #2863b9;
  outline-offset: -3px;

  border-radius: 22px;
}

/* ==========================================
   RISPOSTE
========================================== */

#mds-faq .mds-faq-answer {
  padding: 0 clamp(19px,3vw,29px) 22px;

  max-width: 810px;

  font-family: var(--mds-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;

  color: #68594c;
}

#mds-faq .mds-faq-answer p {
  margin: 0;
}

#mds-faq .mds-faq-answer strong {
  font-weight: 700;
}

/* ==========================================
   LINK NELLE RISPOSTE
========================================== */

#mds-faq .mds-faq-answer a {
  color: #aa5100;

  text-decoration: underline;
  text-decoration-thickness: 1.2px;
  text-underline-offset: 4px;

  font-weight: 800;

  transition: color .2s ease;
}

#mds-faq .mds-faq-answer a:hover {
  color: #e87305;
  text-decoration-thickness: 2px;
}

/* ==========================================
   CONTATTO FINALE
========================================== */

#mds-faq .mds-faq-after {
  margin: 23px 0 0;

  color: #79665a;

  font-family: var(--mds-font);
  font-size: 14px;
  line-height: 1.6;

  text-align: center;
}

#mds-faq .mds-faq-after a {
  color: #99510c;

  font-weight: 800;

  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 900px) {

  #mds-faq {
    width: calc(100% - 48px);
  }

  #mds-faq .mds-faq-heading h2 {
    font-size: clamp(30px, 5.3vw, 53px) !important;
  }

}

/* ==========================================
   SMARTPHONE RESPONSIVE - FINO A 620 PX
   Desktop e tablet invariati
========================================== */
@media (max-width: 620px) {
  #mds-faq {
    width: calc(100% - 32px);
    max-width: 100%;
    padding: 34px 0 26px;
  }

  #mds-faq .mds-faq-inner { width: 100%; min-width: 0; }
  #mds-faq .mds-faq-heading { margin: 0 auto 23px; }

  #mds-faq .mds-faq-heading h2 {
    font-size: clamp(30px, 8.8vw, 42px) !important;
    line-height: 1.12 !important;
    letter-spacing: -.045em !important;
    text-transform: none !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    text-wrap: balance;
  }

  #mds-faq .mds-faq-heading h2 em {
    display: inline !important;
    white-space: normal !important;
    text-transform: none !important;
  }

  #mds-faq .mds-faq-accordion { gap: 11px; }

  #mds-faq .mds-faq-accordion details {
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(98,66,39,.04);
  }

  #mds-faq .mds-faq-accordion summary {
    gap: 13px;
    padding: 16px 16px;
    min-height: 60px;
    font-size: 18px;
    line-height: 1.28;
    letter-spacing: -.012em;
    overflow-wrap: anywhere;
    -webkit-tap-highlight-color: transparent;
  }

  #mds-faq .mds-faq-accordion summary::after {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 26px;
  }

  #mds-faq .mds-faq-answer {
    max-width: 100%;
    padding: 0 16px 18px;
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: break-word;
  }

  #mds-faq .mds-faq-after {
    margin-top: 23px;
    padding: 0 3px;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
}

/* SMARTPHONE STRETTI */
@media (max-width: 380px) {
  #mds-faq { width: calc(100% - 24px); padding-top: 28px; }
  #mds-faq .mds-faq-heading h2 {
    font-size: clamp(28px, 8.5vw, 33px) !important;
  }
  #mds-faq .mds-faq-accordion summary {
    padding: 15px 13px;
    font-size: 17px;
  }
  #mds-faq .mds-faq-accordion summary::after {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 24px;
  }
  #mds-faq .mds-faq-answer { padding: 0 13px 16px; font-size: 16px; }
  #mds-faq .mds-faq-after { font-size: 15px; }
}

/* ==========================================
   ACCESSIBILITÀ
========================================== */

@media (prefers-reduced-motion: reduce) {

  #mds-faq .mds-faq-accordion details,
  #mds-faq .mds-faq-accordion summary::after,
  #mds-faq .mds-faq-answer a {
    transition: none !important;
  }

}

/* ===== BLOCCO ===== */

/* ==========================================
   CONTENITORE PRINCIPALE
========================================== */

#mds-final-cta {
  --mds-orange: #ff7f00;
  --mds-head: "Baloo 2", system-ui, sans-serif;
  --mds-font: "DM Sans", system-ui, sans-serif;
  --mds-duration: 5.2s;

  position: relative;
  isolation: isolate;

  width: min(calc(100% - 64px), 1240px);
  max-width: 1240px;

  margin: 0 auto;

  padding:
    clamp(18px, 2.2vw, 30px)
    0
    clamp(32px, 3.3vw, 46px);

  font-family: var(--mds-font);
  color: #241b17;

  background: transparent !important;

  box-sizing: border-box;
}

#mds-final-cta *,
#mds-final-cta *::before,
#mds-final-cta *::after {
  box-sizing: border-box;
}

/* ==========================================
   RIQUADRO ORIGINALE DESKTOP
========================================== */

#mds-final-cta .mds-end-inner {
  position: relative;

  width: min(990px, 100%);
  margin: 0 auto;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(190px, .65fr)
    auto;

  align-items: center;

  column-gap: clamp(10px, 1.7vw, 22px);

  padding:
    clamp(37px, 4.8vw, 63px)
    clamp(24px, 4vw, 55px);

  border-radius: 58px 110px 65px 90px;

  background:
    radial-gradient(
      ellipse 48% 80% at 103% -20%,
      rgba(255,127,0,.23),
      transparent 95%
    ),
    linear-gradient(
      145deg,
      #ffefd9 0%,
      #ffe3c5 55%,
      #ffeddd 100%
    );

  border: 1px solid #f4cda7;

  box-shadow: 0 22px 53px rgba(156,78,24,.1);
}

/* ==========================================
   TITOLO DESKTOP
========================================== */

#mds-final-cta .mds-end-content {
  position: relative;
  z-index: 2;
  min-width: 0;
}

#mds-final-cta .mds-end-content h2 {
  margin: 0 !important;
  padding: 0 !important;

  font-family: var(--mds-head) !important;

  font-size: clamp(29px, 3.65vw, 52px) !important;
  font-weight: 700 !important;

  line-height: 1.04 !important;
  letter-spacing: -.065em !important;

  color: #241b17 !important;

  text-align: left !important;
  text-transform: uppercase !important;
}

#mds-final-cta .mds-title-line {
  display: block !important;

  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#mds-final-cta .mds-title-line-orange {
  color: #e87500 !important;
}

/* ==========================================
   IMPRONTE
========================================== */

#mds-final-cta .mds-end-trail {
  position: relative;
  z-index: 1;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 2px;

  width: 100%;
  min-width: 0;
  height: 70px;

  margin: 0;
  padding: 0;

  pointer-events: none;
}

#mds-final-cta .mds-trail-step {
  display: block;
  flex: 0 1 auto;

  width: clamp(20px, 2.15vw, 29px);
  height: clamp(20px, 2.15vw, 29px);

  min-width: 0;

  color: #eb7900;
  opacity: 0;

  transform-origin: center;

  animation:
    mdsFinalFootstep
    var(--mds-duration)
    ease-in-out infinite;

  animation-delay: calc(var(--passo) * .22s);
}

#mds-final-cta .mds-trail-step svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* ==========================================
   ANIMAZIONE DELLE IMPRONTE
========================================== */

@keyframes mdsFinalFootstep {

  0% {
    opacity: 0;
    transform:
      translateY(var(--offset-y))
      rotate(var(--rotazione))
      scale(.65);
  }

  9% {
    opacity: .82;
    transform:
      translateY(var(--offset-y))
      rotate(var(--rotazione))
      scale(1);
  }

  18% {
    opacity: .66;
    transform:
      translateY(var(--offset-y))
      rotate(var(--rotazione))
      scale(1);
  }

  28% {
    opacity: 0;
    transform:
      translateY(var(--offset-y))
      rotate(var(--rotazione))
      scale(.85);
  }

  100% {
    opacity: 0;
    transform:
      translateY(var(--offset-y))
      rotate(var(--rotazione))
      scale(.85);
  }

}

#mds-final-cta .mds-trail-step:nth-child(odd) {
  --offset-y: 12px;
  --rotazione: -12deg;
}

#mds-final-cta .mds-trail-step:nth-child(even) {
  --offset-y: -12px;
  --rotazione: 12deg;
}

/* ==========================================
   PULSANTE PRINCIPALE
========================================== */

#mds-final-cta .mds-end-link {
  position: relative;
  z-index: 3;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  justify-self: end;

  flex-shrink: 0;

  min-height: 62px;
  padding: 13px 25px;

  border: 0;
  border-radius: 40px;

  background: #ff7f00 !important;
  color: #211910 !important;

  font: 700 18px/1.2 var(--mds-head);

  letter-spacing: -.02em;
  text-transform: none !important;

  white-space: nowrap;
  text-decoration: none !important;

  box-shadow:
    0 10px 0 #d26506,
    0 26px 38px rgba(238,125,27,.24);

  transform-origin: center;

  animation:
    mdsFinalButtonVibration
    var(--mds-duration)
    ease-in-out infinite;
}

#mds-final-cta .mds-end-link:hover {
  background: #ff9528 !important;
  color: #211910 !important;

  animation-play-state: paused;

  transform: translateY(-3px);
}

#mds-final-cta .mds-end-link:focus-visible {
  outline: 3px solid #2863b9;
  outline-offset: 4px;
}

/* ==========================================
   VIBRAZIONE DEL PULSANTE
========================================== */

@keyframes mdsFinalButtonVibration {

  0%, 54%, 73%, 100% {
    transform: translateX(0) rotate(0);

    box-shadow:
      0 10px 0 #d26506,
      0 26px 38px rgba(238,125,27,.24);
  }

  57% {
    transform: translateX(-3px) rotate(-2deg);
  }

  60% {
    transform: translateX(3px) rotate(2deg);

    box-shadow:
      0 10px 0 #d26506,
      0 26px 48px rgba(238,125,27,.48),
      0 0 0 8px rgba(255,127,0,.14);
  }

  63% {
    transform: translateX(-3px) rotate(-1.5deg);
  }

  66% {
    transform: translateX(3px) rotate(1.5deg);
  }

  69% {
    transform: translateX(-1px) rotate(-.5deg);
  }

  71% {
    transform: translateX(1px) rotate(.5deg);
  }

}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 860px) {

  #mds-final-cta .mds-end-inner {
    grid-template-columns: 1fr;

    justify-items: center;

    row-gap: 20px;
  }

  #mds-final-cta .mds-end-content h2 {
    font-size: clamp(38px, 6vw, 57px) !important;
    text-align: center !important;
  }

  #mds-final-cta .mds-end-trail {
    width: min(365px, 88%);
    height: 58px;

    margin: 0 auto;
  }

  #mds-final-cta .mds-trail-step {
    width: 28px;
    height: 28px;
  }

  #mds-final-cta .mds-end-link {
    justify-self: center;
  }

}

/* ==========================================
   VERSIONE MOBILE OTTIMIZZATA
========================================== */

/* TABLET: passi e pulsante affiancati, box proporzionato */
@media (min-width: 601px) and (max-width: 860px) {
  #mds-final-cta .mds-end-inner {
    width: min(760px, 100%);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
    column-gap: clamp(12px, 2.5vw, 24px);
    row-gap: 22px;
    padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 38px);
    border-radius: 38px;
  }
  #mds-final-cta .mds-end-content {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }
  #mds-final-cta .mds-end-trail {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    height: 54px;
    margin: 0;
    gap: 2px;
  }
  #mds-final-cta .mds-trail-step {
    width: clamp(17px, 2.5vw, 23px);
    height: clamp(17px, 2.5vw, 23px);
  }
  #mds-final-cta .mds-end-link {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    min-height: 54px;
    padding: 11px 19px;
    font-size: 16px;
  }
}

@media (max-width: 600px) {

  /* CONTENITORE */

  #mds-final-cta {
    width: calc(100% - 24px);

    padding-top: 13px;
    padding-bottom: 25px;
  }

  /* BOX PIÙ BASSO E COMPATTO */

  #mds-final-cta .mds-end-inner {
    display: grid;

    grid-template-columns:
      minmax(0, 1fr)
      auto;

    align-items: center;
    justify-items: stretch;

    column-gap: 10px;
    row-gap: 14px;

    width: 100%;

    padding: 23px 17px 25px;

    border-radius: 28px;

    box-shadow:
      0 9px 25px rgba(156,78,24,.075);
  }

  /* ======================================
     TITOLO SU DUE RIGHE
  ====================================== */

  #mds-final-cta .mds-end-content {
    grid-column: 1 / -1;
    grid-row: 1;

    width: 100%;
  }

  #mds-final-cta .mds-end-content h2 {
    font-size: clamp(25px, 6.9vw, 36px) !important;

    line-height: 1.02 !important;
    letter-spacing: -.045em !important;

    text-align: center !important;
  }

  #mds-final-cta .mds-title-line {
    display: block !important;
    white-space: nowrap !important;
  }

  /* ======================================
     IMPRONTE A FIANCO DEL PULSANTE
  ====================================== */

  #mds-final-cta .mds-end-trail {
    grid-column: 1;
    grid-row: 2;

    display: flex;

    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-width: 0;

    height: 37px;

    margin: 0;

    gap: 1px;
  }

  #mds-final-cta .mds-trail-step {
    width: clamp(12px, 3.4vw, 18px);
    height: clamp(12px, 3.4vw, 18px);

    flex: 0 1 auto;
  }

  /* Sul telefono mostriamo sei impronte:
     il percorso resta chiaro ma compatto */

  #mds-final-cta .mds-trail-step:nth-child(n+7) {
    display: none;
  }

  #mds-final-cta .mds-trail-step:nth-child(odd) {
    --offset-y: 6px;
  }

  #mds-final-cta .mds-trail-step:nth-child(even) {
    --offset-y: -6px;
  }

  /* Sincronizzazione mobile: la vibrazione parte quando
     la sesta (ultima visibile) impronta raggiunge il pulsante. */
  #mds-final-cta .mds-end-link {
    animation-name: mdsFinalButtonVibrationMobile;
  }

  @keyframes mdsFinalButtonVibrationMobile {
    0%, 29%, 48%, 100% {
      transform: translateX(0) rotate(0);
      box-shadow:
        0 10px 0 #d26506,
        0 26px 38px rgba(238,125,27,.24);
    }
    32% { transform: translateX(-3px) rotate(-2deg); }
    35% {
      transform: translateX(3px) rotate(2deg);
      box-shadow:
        0 10px 0 #d26506,
        0 26px 48px rgba(238,125,27,.48),
        0 0 0 8px rgba(255,127,0,.14);
    }
    38% { transform: translateX(-3px) rotate(-1.5deg); }
    41% { transform: translateX(3px) rotate(1.5deg); }
    44% { transform: translateX(-1px) rotate(-.5deg); }
    46% { transform: translateX(1px) rotate(.5deg); }
  }

  /* ======================================
     PULSANTE A DESTRA
  ====================================== */

  #mds-final-cta .mds-end-link {
    grid-column: 2;
    grid-row: 2;

    justify-self: end;

    min-height: 43px;

    padding: 9px 13px;

    border-radius: 999px;

    font-size: 13px;
    line-height: 1.1;

    white-space: nowrap;

    box-shadow:
      0 5px 0 #d26506,
      0 12px 22px rgba(238,125,27,.18);
  }

}

/* ==========================================
   SMARTPHONE PICCOLI
========================================== */

@media (max-width: 380px) {

  #mds-final-cta {
    width: calc(100% - 18px);
  }

  #mds-final-cta .mds-end-inner {
    padding: 20px 12px 23px;

    column-gap: 7px;
    row-gap: 12px;

    border-radius: 23px;
  }

  #mds-final-cta .mds-end-content h2 {
    font-size: clamp(23px, 6.6vw, 26px) !important;
  }

  #mds-final-cta .mds-end-trail {
    height: 32px;
  }

  #mds-final-cta .mds-trail-step {
    width: 12px;
    height: 12px;
  }

  #mds-final-cta .mds-end-link {
    min-height: 40px;

    padding: 8px 11px;

    font-size: 12px;
  }

}

/* ==========================================
   ACCESSIBILITÀ
========================================== */

@media (prefers-reduced-motion: reduce) {

  #mds-final-cta .mds-trail-step {
    animation: none !important;

    opacity: .55 !important;
    transform: none !important;
  }

  #mds-final-cta .mds-end-link {
    animation: none !important;
  }

}

/* ===== BLOCCO ===== */

.mds-footer-final {
  width: 100%;
  max-width: 100%;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  background: linear-gradient(
  180deg,
  #FFFAF6 0%,
  #FFF1DF 100%
) !important;
  color: #211c18;
  font-family: "DM Sans", sans-serif;
  border-top: none;
}

.mds-footer-final *,
.mds-footer-final *::before,
.mds-footer-final *::after {
  box-sizing: border-box;
}

.mds-footer-final .footer-container {
  width: min(1240px, 92%);
  margin: 0 auto;
  padding: 54px 0 26px;
}

.mds-footer-final .footer-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 50px;
  align-items: start;
}

/* PC: tre colonne distribuite uniformemente; Navigazione al centro. */
@media (min-width: 901px) {
  .mds-footer-final .footer-main > .footer-navigation-col,
  .mds-footer-final .footer-main > .footer-contacts-col {
    justify-self: center;
    width: max-content;
    max-width: 100%;
  }
}

/* LOGO E NOME */

.mds-footer-final .footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 14px;
}

.mds-footer-final .footer-logo-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: block;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  transform: none;
  box-shadow: none;

}

.mds-footer-final .footer-brand-name {
  font-family: "Baloo 2", sans-serif !important;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.035em;
  color: #211c18 !important;
  white-space: nowrap;
}

.mds-footer-final .footer-brand-name span {
  color: #211c18 !important;
}

/* TESTI */

.mds-footer-final .footer-project {
  margin: 0 0 12px;
  color: #a95008;
  font-family: "DM Sans", sans-serif !important;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.5;
}

.mds-footer-final .footer-description {
  max-width: 420px;
  margin: 0;
  color: #6b5d54;
  font-family: "DM Sans", sans-serif !important;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.7;
}

/* TITOLI */

.mds-footer-final .footer-title {
  font-family: "Baloo 2", sans-serif !important;
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: #211c18;
}

/* NAVIGAZIONE */

.mds-footer-final .footer-links {
  display: grid;
  gap: 10px;
}

.mds-footer-final .footer-links a {
  color: #6b5d54 !important;
  text-decoration: none !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.5;
  transition: color .2s ease;
}

.mds-footer-final .footer-links a:hover {
  color: #ff7f00 !important;
}

/* CONTATTI */

.mds-footer-final .footer-contact {
  display: grid;
  gap: 10px;
  color: #6b5d54;
  font-family: "DM Sans", sans-serif !important;
  font-size: .95rem;
  line-height: 1.5;
}

.mds-footer-final .footer-contact span {
  color: #6b5d54;
}

.mds-footer-final .footer-contact a {
  color: #6b5d54 !important;
  text-decoration: none !important;
  font-family: "DM Sans", sans-serif !important;
}

.mds-footer-final .footer-contact a:hover {
  color: #ff7f00 !important;
}

/* SOCIAL */

.mds-footer-final .footer-social-title {
  margin: 22px 0 10px;
  font-family: "Baloo 2", sans-serif !important;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  color: #211c18;
}

.mds-footer-final .footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mds-footer-final .footer-socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  color: #ff7f00 !important;
  border: 1px solid rgba(255,127,0,.20);
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(85,48,22,.06);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    color .2s ease,
    background .2s ease;
}

.mds-footer-final .footer-socials a:hover {
  transform: translateY(-3px);
  background: #ff7f00;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(255,127,0,.20);
}

.mds-footer-final .footer-socials svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  display: block;
}

/* PARTE INFERIORE */

.mds-footer-final .footer-bottom {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(180,98,32,.16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #978174;
  font-family: "DM Sans", sans-serif !important;
  font-size: .85rem;
  line-height: 1.5;
}

.mds-footer-final .footer-bottom-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.mds-footer-final .footer-bottom-links a {
  color: #978174 !important;
  text-decoration: none !important;
  font-family: "DM Sans", sans-serif !important;
  transition: color .2s ease;
}

.mds-footer-final .footer-bottom-links a:hover {
  color: #ff7f00 !important;
}

/* TABLET */

@media (max-width: 900px) {
  .mds-footer-final .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 38px;
  }

  .mds-footer-final .footer-brand-col {
    grid-column: 1 / -1;
  }
}

/* SMARTPHONE */

@media (max-width: 640px) {
  .mds-footer-final .footer-container {
    padding: 44px 0 24px;
  }

  .mds-footer-final .footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .mds-footer-final .footer-brand-col {
    grid-column: auto;
  }

  .mds-footer-final .footer-logo-mark {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
  }

  .mds-footer-final .footer-brand {
    gap: 10px;
  }

  .mds-footer-final .footer-brand-name {
    font-size: 1.55rem;
    white-space: normal;
  }

  .mds-footer-final .footer-project {
    font-size: .84rem;
  }

  .mds-footer-final .footer-description {
    font-size: .92rem;
    line-height: 1.7;
  }

  .mds-footer-final .footer-title {
    font-size: 1.15rem;
  }

  .mds-footer-final .footer-social-title {
    font-size: 1.05rem;
  }

  .mds-footer-final .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mds-footer-final .footer-socials a,
  .mds-footer-final .footer-links a,
  .mds-footer-final .footer-contact a,
  .mds-footer-final .footer-bottom-links a {
    transition: none;
  }
}
