/* =============================================================
   Soccorso Digitale — Hero (versione WordPress/Divi)
   -------------------------------------------------------------
   Dove inserirlo: Divi > Opzioni del tema > Generale > CSS
   personalizzato, oppure nello style.css del child theme.
   Va usato insieme a hero.html e hero.js.

   1. Variabili
   2. Hero: base e compatibilità Divi
   3. Hero: layout e testi
   4. Pulsanti
   5. Composizione: palco, notebook, dashboard, smartphone, card
   6. Animazioni
   7. Responsive
   8. Movimento ridotto
   Tutte le classi usano il prefisso "sd-" per non entrare in
   conflitto con gli stili di WordPress/Divi.
   ============================================================= */


/* 1. Variabili ------------------------------------------------ */

.sd-hero {
  --sd-blue: #102f5b;
  --sd-blue-deep: #0a1f3e;
  --sd-teal: #11998c;
  --sd-teal-dark: #0c7a70;   /* variante più scura per testi: contrasto AA */
  --sd-bg: #f2f6f9;
  --sd-coral: #ff6954;
  --sd-coral-dark: #c2412e;
  --sd-muted: #4a5d78;
  --sd-line: rgba(16, 47, 91, 0.1);
  --sd-focus: #102f5b;       /* anello di focus: contrasto ~12:1 sullo sfondo */
  --sd-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sd-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sd-shadow: 0 30px 60px -24px rgba(16, 47, 91, 0.4), 0 12px 24px -12px rgba(16, 47, 91, 0.18);
}


/* 2. Hero: base e compatibilità Divi -------------------------- */

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

.sd-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 96px) 0 clamp(56px, 8vw, 120px);
  font-family: var(--sd-font);
  font-size: 1rem;      /* Divi imposta 14px, peso 500 e line-height 1.7em sul body */
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  color: var(--sd-blue);
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(17, 153, 140, 0.1), transparent 70%),
    radial-gradient(50% 50% at 5% 95%, rgba(255, 105, 84, 0.07), transparent 70%),
    var(--sd-bg);
}

/* Griglia di punti, sfumata verso i bordi */
.sd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(16, 47, 91, 0.09) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 75% 45%, #000, transparent);
          mask-image: radial-gradient(60% 70% at 75% 45%, #000, transparent);
  pointer-events: none;
}

/* Azzeramento di margini e padding che Divi applica a p e h1 */
.sd-hero p,
.sd-hero h1 {
  margin: 0;
  padding: 0;
}

/* Divi aggiunge punti elenco, rientro e interlinea agli elenchi con
   selettori come ".et-l--post ul" ed ".entry-content ul": "ul[class]"
   ha una specificità maggiore e li neutralizza. */
.sd-hero ul[class] {
  margin: 0;
  padding: 0;
  line-height: inherit;
  list-style: none;
}

/* 3. Hero: layout e testi ------------------------------------- */

.sd-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.sd-hero__content {
  max-width: 600px;
}

.sd-hero .sd-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 2px rgba(16, 47, 91, 0.05);
  color: var(--sd-teal-dark);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sd-hero__eyebrow-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sd-coral);
}

.sd-hero__eyebrow-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--sd-coral);
  opacity: 0;
  animation: sd-pulse 3.6s ease-out 2s infinite;
}

.sd-hero .sd-hero__title {
  margin-top: 22px;
  color: var(--sd-blue);
  font-family: var(--sd-font);
  font-size: clamp(2.1rem, 1.3rem + 2.4vw, 3.05rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.sd-hero__title-accent {
  display: block;
  margin-top: 0.12em;
  color: var(--sd-teal-dark);
}

.sd-hero .sd-hero__text {
  max-width: 34em;
  margin-top: 22px;
  color: var(--sd-muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.65;
}

.sd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Punti di forza: tre colonne uguali, ognuna con testo su due righe */
.sd-hero ul.sd-hero__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--sd-line);
  color: var(--sd-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  list-style: none;
}

.sd-hero__points li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.sd-hero__point-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(17, 153, 140, 0.12);
  color: var(--sd-teal-dark);
}

.sd-hero__point-text strong {
  display: block;
  color: var(--sd-blue);
  font-weight: 600;
}


/* 4. Pulsanti -------------------------------------------------- */

.sd-hero .sd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--sd-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.45s var(--sd-ease),
    box-shadow 0.45s var(--sd-ease),
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.sd-hero .sd-btn:focus-visible {
  outline: 3px solid var(--sd-focus);
  outline-offset: 3px;
}

.sd-hero .sd-btn--primary {
  background: var(--sd-blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(16, 47, 91, 0.55);
}

.sd-hero .sd-btn--primary:hover {
  background: #173d72;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(16, 47, 91, 0.6);
}

.sd-btn__icon {
  transition: transform 0.45s var(--sd-ease);
}

.sd-btn--primary:hover .sd-btn__icon {
  transform: translateX(3px);
}

.sd-hero .sd-btn--ghost {
  border-color: rgba(16, 47, 91, 0.18);
  background: rgba(255, 255, 255, 0.6);
  color: var(--sd-blue);
}

.sd-hero .sd-btn--ghost:hover {
  border-color: var(--sd-teal-dark);
  background: #fff;
  color: var(--sd-teal-dark);
  transform: translateY(-2px);
}


/* 5. Composizione ---------------------------------------------- */

/* Tutta la composizione è in "em": scala con la larghezza della
   colonna grazie alle container query (cqw). */
.sd-hero__visual {
  position: relative;
  min-width: 0;
  container-type: inline-size;
}

.sd-hero .sd-hero__caption {
  margin-top: 18px;
  color: var(--sd-muted);
  font-size: 0.8125rem;
  text-align: center;
}

.sd-stage {
  --sd-px: 0;   /* spostamento orizzontale, impostato da script.js */
  --sd-py: 0;   /* spostamento verticale, impostato da script.js */
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 8.4;
  font-size: 12px;     /* valore di riserva per browser senza container query */
  font-size: 2.1cqw;
}

.sd-stage__glow {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(40px);
  animation: sd-glow 14s ease-in-out infinite;
}

.sd-stage__glow--teal {
  top: 4%;
  right: 2%;
  width: 56%;
  background: radial-gradient(circle, rgba(17, 153, 140, 0.32), transparent 70%);
}

.sd-stage__glow--coral {
  bottom: 2%;
  left: 6%;
  width: 36%;
  background: radial-gradient(circle, rgba(255, 105, 84, 0.24), transparent 70%);
  animation-delay: -7s;
}

.sd-stage__ring {
  position: absolute;
  top: 2%;
  left: 16%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px dashed rgba(16, 47, 91, 0.12);
  border-radius: 50%;
  animation: sd-spin 140s linear infinite;
}

/* Livelli: "translate" gestisce la profondità (JS),
   "transform" resta libero per l'animazione di ingresso. */
.sd-layer {
  position: absolute;
  translate:
    calc(var(--sd-px) * var(--sd-depth, 1) * 1px)
    calc(var(--sd-py) * var(--sd-depth, 1) * 1px);
}

.sd-layer--laptop {
  --sd-depth: 0.5;
  top: 7%;
  left: 0;
  z-index: 1;
  width: 84%;
}

.sd-layer--phone {
  --sd-depth: 1;
  right: 1%;
  bottom: 1%;
  z-index: 3;
  width: 25%;
}

.sd-layer--card-a {
  --sd-depth: 1.5;
  top: 0;
  right: 4%;
  z-index: 4;
}

.sd-layer--card-b {
  --sd-depth: 1.3;
  bottom: 9%;
  left: -1%;
  z-index: 4;
}

/* Notebook */
.sd-laptop {
  transition: transform 0.8s var(--sd-ease);
}

.sd-layer--laptop:hover .sd-laptop {
  transform: translateY(-0.35em);
}

.sd-laptop__screen {
  position: relative;
  padding: 0.6em 0.6em 0.75em;
  border-radius: 1.1em 1.1em 0.4em 0.4em;
  background: linear-gradient(160deg, #1d3e6c, var(--sd-blue-deep));
  box-shadow: var(--sd-shadow);
}

.sd-laptop__screen::before {
  content: "";
  position: absolute;
  top: 0.22em;
  left: 50%;
  width: 0.24em;
  height: 0.24em;
  border-radius: 50%;
  background: #3a5a88;
  transform: translateX(-50%);
}

.sd-laptop__base {
  position: relative;
  height: 1.1em;
  margin: 0 -6.5%;
  border-radius: 0 0 1.4em 1.4em / 0 0 0.9em 0.9em;
  background: linear-gradient(#e4eaf1, #b7c3d1);
  box-shadow: 0 1.6em 2.2em -1.2em rgba(16, 47, 91, 0.4);
}

.sd-laptop__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 42%;
  width: 16%;
  height: 0.35em;
  border-radius: 0 0 0.5em 0.5em;
  background: #a8b5c5;
}

/* Dashboard e-learning */
.sd-dash {
  display: grid;
  grid-template-columns: 19% minmax(0, 1fr);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.45em;
  background: #f5f8fb;
  color: var(--sd-blue);
  font-size: 0.62em;
  line-height: 1.25;
}

.sd-dash p,
.sd-dash ul {
  margin: 0;
  padding: 0;
}

.sd-dash i {
  display: block;
  flex-shrink: 0;
}

.sd-dash__side {
  display: flex;
  flex-direction: column;
  gap: 1.8em;
  padding: 1.5em 0.9em;
  background: var(--sd-blue);
  color: rgba(255, 255, 255, 0.72);
}

.sd-dash__brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding-left: 0.3em;
  color: #fff;
  font-weight: 700;
}

.sd-dash__brand i {
  width: 1.5em;
  height: 1.5em;
  border-radius: 0.45em;
  background: linear-gradient(135deg, var(--sd-teal), #3cc4b5);
}

.sd-dash__nav {
  display: grid;
  gap: 0.3em;
  list-style: none;
}

.sd-dash__nav li {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.6em 0.7em;
  border-radius: 0.5em;
  white-space: nowrap;
}

.sd-dash__nav i {
  width: 0.9em;
  height: 0.9em;
  border-radius: 0.25em;
  background: rgba(255, 255, 255, 0.3);
}

.sd-dash__nav .is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sd-dash__nav .is-active i {
  background: var(--sd-coral);
}

.sd-dash__main {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  min-width: 0;
  padding: 1.4em 1.6em;
}

.sd-dash__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1em;
}

.sd-dash__hello {
  font-size: 1.45em;
  font-weight: 700;
}

.sd-hero .sd-dash__sub {
  margin-top: 0.25em;
  color: #6b7c93;
}

.sd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.4em 0.85em;
  border-radius: 999px;
  background: rgba(255, 105, 84, 0.12);
  color: var(--sd-coral-dark);
  font-size: 0.9em;
  font-weight: 700;
  white-space: nowrap;
}

.sd-badge::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--sd-coral);
}

.sd-dash__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9em;
}

.sd-stat {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 0.9em 1em;
  border: 1px solid rgba(16, 47, 91, 0.07);
  border-radius: 0.7em;
  background: #fff;
}

.sd-stat__label {
  color: #6b7c93;
  font-size: 0.95em;
}

.sd-stat__value {
  font-size: 1.9em;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sd-stat__trend {
  color: var(--sd-teal-dark);
  font-size: 0.9em;
  font-weight: 600;
}

.sd-dash__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0.9em;
  flex: 1;
  min-height: 0;
}

.sd-panel {
  min-height: 0;
  overflow: hidden;
  padding: 1em 1.1em;
  border: 1px solid rgba(16, 47, 91, 0.07);
  border-radius: 0.7em;
  background: #fff;
}

.sd-hero .sd-panel__title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.9em;
  font-weight: 700;
}

.sd-panel__title span {
  color: var(--sd-teal-dark);
  font-weight: 600;
}

.sd-courses {
  display: grid;
  gap: 0.85em;
  list-style: none;
}

.sd-course {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4em 0.6em;
}

.sd-course__name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-course__pct {
  color: #6b7c93;
  font-variant-numeric: tabular-nums;
}

.sd-course__bar {
  grid-column: 1 / -1;
  height: 0.5em;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef4;
}

.sd-course__bar span {
  display: block;
  width: var(--sd-progress, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sd-teal), #3cc4b5);
  transform-origin: left center;
  animation: sd-grow-x 1.8s var(--sd-ease) 1.3s both;
}

.sd-course:nth-child(2) .sd-course__bar span {
  background: linear-gradient(90deg, var(--sd-coral), #ff9a85);
  animation-delay: 1.45s;
}

.sd-course:nth-child(3) .sd-course__bar span { animation-delay: 1.6s; }
.sd-course:nth-child(4) .sd-course__bar span { animation-delay: 1.75s; }
.sd-course:nth-child(5) .sd-course__bar span { animation-delay: 1.9s; }

.sd-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.55em;
  height: 6.5em;
  padding-bottom: 1px;
  border-bottom: 1px dashed rgba(16, 47, 91, 0.15);
}

.sd-chart span {
  flex: 1;
  height: var(--sd-h, 50%);
  border-radius: 0.3em 0.3em 0 0;
  background: rgba(17, 153, 140, 0.22);
  transform-origin: bottom center;
  animation: sd-grow-y 1.6s var(--sd-ease) 1.4s both;
}

.sd-chart span:nth-child(2) { animation-delay: 1.48s; }
.sd-chart span:nth-child(3) { animation-delay: 1.56s; }
.sd-chart span:nth-child(4) { animation-delay: 1.64s; }
.sd-chart span:nth-child(5) { animation-delay: 1.72s; }
.sd-chart span:nth-child(6) { animation-delay: 1.8s; }
.sd-chart span:nth-child(7) { animation-delay: 1.88s; }

.sd-chart .is-peak {
  background: linear-gradient(var(--sd-teal), #3cc4b5);
}

.sd-chart__days {
  display: flex;
  gap: 0.55em;
  margin-top: 0.45em;
  color: #6b7c93;
  font-size: 0.85em;
}

.sd-chart__days span {
  flex: 1;
  text-align: center;
}

.sd-next {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-top: 1em;
  padding: 0.75em 0.85em;
  border-radius: 0.6em;
  background: var(--sd-blue);
  color: #fff;
  font-weight: 600;
}

.sd-next i {
  width: 2em;
  height: 2em;
  border-radius: 0.5em;
  background: var(--sd-coral);
}

.sd-next small {
  display: block;
  font-size: 0.85em;
  font-weight: 400;
  opacity: 0.7;
}

/* Smartphone */
.sd-phone {
  aspect-ratio: 9 / 19;
  padding: 0.45em;
  border-radius: 2em;
  background: linear-gradient(145deg, #1f416f, var(--sd-blue-deep));
  box-shadow: var(--sd-shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.8s var(--sd-ease);
}

.sd-layer--phone:hover .sd-phone {
  transform: translateY(-0.4em) rotate(-0.6deg);
}

.sd-phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 1.6em;
  background: #fff;
  color: var(--sd-blue);
  font-size: 0.58em;
  line-height: 1.25;
}

/* Isola della fotocamera e barra home */
.sd-phone__screen::before,
.sd-phone__screen::after {
  content: "";
  position: absolute;
  left: 50%;
  z-index: 2;
  border-radius: 999px;
  background: var(--sd-blue-deep);
  transform: translateX(-50%);
}

.sd-phone__screen::before {
  top: 0.6em;
  width: 32%;
  height: 1.6em;
}

.sd-phone__screen::after {
  bottom: 0.6em;
  width: 36%;
  height: 0.35em;
  opacity: 0.85;
}

.sd-phone__screen p {
  margin: 0;
  padding: 0;
}

.sd-phone__screen i {
  display: block;
  flex-shrink: 0;
}

.sd-phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85em 1.7em 0.4em;
  font-size: 0.95em;
  font-weight: 700;
}

.sd-phone__icons {
  display: flex;
  align-items: flex-end;
  gap: 0.2em;
}

.sd-phone__icons i {
  width: 0.35em;
  border-radius: 0.1em;
  background: var(--sd-blue);
}

.sd-phone__icons i:nth-child(1) { height: 0.5em; }
.sd-phone__icons i:nth-child(2) { height: 0.75em; }
.sd-phone__icons i:nth-child(3) { width: 1.4em; height: 0.75em; border-radius: 0.2em; }

.sd-site {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.9em;
  padding: 0.6em 1.1em 1.8em;
}

.sd-site__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sd-site__logo {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
}

.sd-site__logo i {
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sd-teal), var(--sd-blue));
}

.sd-site__menu {
  display: grid;
  gap: 0.25em;
}

.sd-site__menu i {
  width: 1.3em;
  height: 0.15em;
  border-radius: 1em;
  background: var(--sd-blue);
}

.sd-site__demo {
  align-self: flex-start;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  background: rgba(255, 105, 84, 0.12);
  color: var(--sd-coral-dark);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sd-site__hero {
  position: relative;
  overflow: hidden;
  padding: 1.3em 1.1em;
  border-radius: 1em;
  background: linear-gradient(150deg, var(--sd-teal), var(--sd-blue));
  color: #fff;
}

.sd-site__hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -25%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.sd-site__kicker {
  font-size: 0.85em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.sd-hero .sd-site__title {
  margin: 0.5em 0 0.9em;
  font-size: 1.45em;
  font-weight: 800;
  line-height: 1.15;
}

.sd-site__cta {
  display: inline-block;
  padding: 0.6em 1em;
  border-radius: 999px;
  background: var(--sd-coral);
  color: var(--sd-blue-deep);
  font-size: 0.9em;
  font-weight: 700;
}

.sd-site__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6em;
}

.sd-site__tiles span {
  padding: 0.8em 0.3em;
  border-radius: 0.8em;
  background: var(--sd-bg);
  font-size: 0.85em;
  font-weight: 600;
  text-align: center;
}

.sd-site__tiles i {
  width: 2.2em;
  height: 2.2em;
  margin: 0 auto 0.45em;
  border-radius: 0.65em;
  background: rgba(17, 153, 140, 0.18);
}

.sd-site__tiles span:nth-child(2) i { background: rgba(255, 105, 84, 0.2); }
.sd-site__tiles span:nth-child(3) i { background: rgba(16, 47, 91, 0.14); }

.sd-site__news {
  display: grid;
  grid-template-columns: 3.4em minmax(0, 1fr);
  align-items: center;
  gap: 0.7em;
  padding: 0.7em;
  border: 1px solid var(--sd-line);
  border-radius: 0.8em;
}

.sd-site__news i {
  aspect-ratio: 1;
  border-radius: 0.5em;
  background: linear-gradient(135deg, var(--sd-coral), #ffb19f);
}

.sd-site__news strong {
  display: block;
  font-size: 0.9em;
}

.sd-site__news small {
  display: block;
  margin-top: 0.3em;
  color: #6b7c93;
  font-size: 0.8em;
}

/* Card fluttuanti */
.sd-chip {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.85em 1.2em 0.85em 0.85em;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 1em;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px -18px rgba(16, 47, 91, 0.45);
  color: var(--sd-blue);
  font-size: 0.95em;
  line-height: 1.25;
  white-space: nowrap;
}

.sd-chip__tag {
  align-self: flex-start;
  margin-left: 0.3em;
  padding: 0.3em 0.65em;
  border-radius: 999px;
  background: rgba(255, 105, 84, 0.12);
  color: var(--sd-coral-dark);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sd-chip__icon {
  display: grid;
  place-items: center;
  width: 2.6em;
  height: 2.6em;
  border-radius: 0.8em;
  background: rgba(17, 153, 140, 0.12);
  color: var(--sd-teal-dark);
}

.sd-chip__icon svg {
  width: 1.35em;
  height: 1.35em;
}

.sd-chip__icon--coral {
  background: rgba(255, 105, 84, 0.12);
  color: var(--sd-coral-dark);
}

.sd-chip__label {
  display: block;
  color: var(--sd-muted);
  font-size: 0.82em;
}

.sd-chip strong {
  display: block;
  font-size: 1.05em;
  font-weight: 700;
}


/* 6. Animazioni ------------------------------------------------ */

/* Ingresso a cascata della colonna testo */
.sd-in {
  animation: sd-fade-up 0.7s var(--sd-ease) var(--sd-delay, 0s) both;
}

.sd-in--1 { --sd-delay: 0s; }
.sd-in--2 { --sd-delay: 0.06s; }
.sd-in--3 { --sd-delay: 0.12s; }
.sd-in--4 { --sd-delay: 0.18s; }
.sd-in--5 { --sd-delay: 0.24s; }

/* Ingresso dei livelli della composizione */
.sd-layer {
  animation: sd-rise 1.6s var(--sd-ease) both;
}

.sd-layer--laptop { animation-delay: 0.2s; }
.sd-layer--phone  { animation-delay: 0.7s; }
.sd-layer--card-a { animation-delay: 1.1s; }
.sd-layer--card-b { animation-delay: 1.3s; }

/* Fluttuazione lenta */
.sd-float {
  animation: sd-float 9s ease-in-out infinite;
}

.sd-float--a {
  animation-duration: 10s;
  animation-delay: -3s;
}

.sd-float--b {
  animation-duration: 11s;
  animation-delay: -6s;
}

/* Pausa quando la Hero non è visibile (classe aggiunta da script.js) */
.sd-hero.is-paused *,
.sd-hero.is-paused *::before,
.sd-hero.is-paused *::after {
  animation-play-state: paused !important;
}

@keyframes sd-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes sd-rise {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes sd-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.6em); }
}

@keyframes sd-grow-x {
  from { transform: scaleX(0); }
}

@keyframes sd-grow-y {
  from { transform: scaleY(0); }
}

@keyframes sd-pulse {
  0%   { opacity: 0.55; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(2.8); }
}

@keyframes sd-glow {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.06); }
}

@keyframes sd-spin {
  to { transform: rotate(1turn); }
}


/* 7. Responsive ------------------------------------------------ */

/* Tablet (e fascia 1024–1199 px): una colonna, testo sopra e
   composizione semplificata sotto, senza card fluttuanti */
@media (max-width: 1199px) {
  .sd-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .sd-hero__content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
  }

  .sd-hero .sd-hero__text {
    margin-left: auto;
    margin-right: auto;
  }

  .sd-hero__actions {
    justify-content: center;
  }

  .sd-hero ul.sd-hero__points {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .sd-hero__points li {
    align-items: center;
  }

  .sd-hero__visual {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }

  .sd-stage {
    aspect-ratio: 10 / 7.6;
  }

  .sd-layer--laptop {
    top: 2%;
  }

  .sd-layer--card-a,
  .sd-layer--card-b {
    display: none;
  }
}

/* Smartphone: pulsanti a tutta larghezza, card nascoste */
@media (max-width: 599px) {
  .sd-hero__inner {
    gap: 44px;
    padding: 0 16px;
  }

  .sd-hero__actions {
    flex-direction: column;
  }

  .sd-hero .sd-btn {
    width: 100%;
  }

  /* Punti di forza in colonna: icona a sinistra, testo su una riga */
  .sd-hero ul.sd-hero__points {
    grid-template-columns: auto;
    justify-content: center;
    gap: 12px;
    text-align: left;
  }

  .sd-hero__points li {
    flex-direction: row;
    align-items: center;
  }

  .sd-hero__point-text strong {
    display: inline;
  }

  /* Composizione: solo lo schermo del notebook, alto quanto il contenuto */
  .sd-stage {
    aspect-ratio: auto;
  }

  .sd-layer--laptop {
    position: relative;
    top: auto;
    width: 100%;
  }

  .sd-layer--phone,
  .sd-laptop__base {
    display: none;
  }

  .sd-laptop__screen {
    border-radius: 1.1em;
  }

  /* Dashboard: una colonna, senza menu laterale né grafico.
     Tutti i testi usano almeno la dimensione di base (≥ 12px). */
  .sd-dash {
    grid-template-columns: minmax(0, 1fr);
    aspect-ratio: auto;
    font-size: clamp(12px, 3.5vw, 14px);
  }

  .sd-dash__side,
  .sd-panel--chart,
  .sd-course:nth-child(n + 4) {
    display: none;
  }

  .sd-dash__main {
    gap: 1em;
    padding: 1.1em;
  }

  .sd-dash__top {
    flex-wrap: wrap;
    gap: 0.6em;
  }

  .sd-dash__hello {
    font-size: 1.3em;
  }

  .sd-dash__stats {
    gap: 0.5em;
  }

  .sd-stat {
    padding: 0.7em 0.6em;
  }

  .sd-stat__label,
  .sd-stat__trend,
  .sd-badge {
    font-size: 1em;
  }

  .sd-stat__value {
    font-size: 1.6em;
  }

  .sd-dash__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* 8. Movimento ridotto ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .sd-hero *,
  .sd-hero *::before,
  .sd-hero *::after {
    animation: none !important;
    transition: none !important;
  }
}
