/* Mantiene accessibili i sottomenu anche quando il ticker news è visibile. */
@media (hover: hover) and (min-width: 821px) {
  .site-nav {
    position: relative;
    z-index: 500;
  }

  .news-ticker {
    z-index: 1 !important;
  }

  .site-nav__item--has-submenu::after {
    content: "";
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 20px;
    pointer-events: none;
  }

  .site-nav__item--has-submenu:hover::after,
  .site-nav__item--has-submenu:focus-within::after,
  .site-nav__item--has-submenu.is-open::after {
    pointer-events: auto;
  }

  .site-nav__item--has-submenu {
    z-index: 510;
  }

  .site-nav__submenu {
    top: calc(100% + 8px);
    z-index: 600;
  }
}

/* La sezione accrediti è stata assorbita dal Programma delle attività. */
.race-info-page #segreteria,
.race-info-page .quick-links a[href="#segreteria"] {
  display: none !important;
}

/* Mantiene "Logistica a terra" su due righe nel collegamento rapido. */
@media (min-width: 981px) {
  .race-info-page .quick-links a[href="#logistica"] .quick-links__label {
    width: 88px;
    white-space: normal;
    line-height: 1.08;
  }
}

/* Invito al gruppo WhatsApp nelle sezioni informative. */
.wa-group-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(31, 143, 95, .18);
  border-radius: 18px;
  background: rgba(31, 143, 95, .08);
}

.wa-group-promo__copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.wa-group-promo__copy strong {
  color: var(--navy-940);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wa-group-promo__copy a {
  color: var(--navy-940);
  font-weight: 800;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.wa-group-promo__qr-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
}

.wa-group-promo__qr {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.wa-group-promo--compact {
  margin-top: 0;
}

.wa-group-promo--compact .wa-group-promo__qr {
  width: 72px;
  height: 72px;
}

/* Variante compatta nella colonna dei contatti della fascia aiuto. */
.wa-group-promo--help-actions {
  gap: 12px;
  margin-top: 2px;
  padding: 8px 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.wa-group-promo--help-actions .wa-group-promo__copy {
  gap: 8px;
}

.wa-group-promo--help-actions .wa-group-promo__copy a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: .95rem;
  line-height: 1.2;
}

.wa-group-promo--help-actions .inline-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}

.wa-group-promo--help-actions .wa-group-promo__note {
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.05;
}

.wa-group-promo--help-actions .wa-group-promo__qr-link {
  padding: 5px;
  border-radius: 10px;
}

.wa-group-promo--help-actions .wa-group-promo__qr {
  width: 76px;
  height: 76px;
}

/* Layout compatto della fascia "Serve aiuto?". */
.help-band--contacts {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
  align-items: center;
  gap: 40px;
  padding: 26px 42px 24px;
}

.help-band--contacts .help-band__brand {
  min-width: 0;
}

.help-band--contacts .help-band__brand h2 {
  max-width: none;
  margin: 0 0 16px;
}

/* Il QR del gruppo è già previsto nell'area contatti: nella fascia aiuto non va duplicato. */
.help-band--contacts .help-band__brand > .wa-group-promo {
  display: none;
}

.help-band--contacts .help-band__info-row {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.help-band--contacts .help-band__info-copy {
  max-width: 720px;
}

.help-band--contacts .help-band__info-copy p {
  margin: 0;
}

.help-band__event-logo--top {
  position: absolute;
  top: 20px;
  right: 32px;
  width: min(220px, 24vw);
  max-height: 58px;
  object-fit: contain;
}

.help-band--contacts .help-band__actions--contacts {
  display: grid;
  gap: 12px;
  padding-top: 66px;
}

.help-band--contacts .help-band__actions--contacts .button {
  width: 100%;
  justify-content: center;
}

@media (min-width: 981px) {
  .subpage-hero--race .subpage-hero__content > p:last-child {
    max-width: none;
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .help-band--contacts {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .help-band__event-logo--top {
    position: static;
    grid-row: 1;
    justify-self: end;
    width: 190px;
    margin-bottom: -52px;
  }

  .help-band--contacts .help-band__actions--contacts {
    padding-top: 0;
  }

  .wa-group-promo--help-actions {
    max-width: 350px;
  }
}

@media (max-width: 620px) {
  .wa-group-promo {
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .wa-group-promo__qr {
    width: 66px;
    height: 66px;
  }

  .wa-group-promo--compact .wa-group-promo__qr {
    width: 60px;
    height: 60px;
  }

  .wa-group-promo--help-actions {
    align-items: center;
    padding: 6px 0 0;
  }

  .wa-group-promo--help-actions .wa-group-promo__qr {
    width: 68px;
    height: 68px;
  }

  .help-band--contacts {
    padding: 24px 20px;
  }

  .help-band__event-logo--top {
    justify-self: start;
    width: 165px;
    margin: 0 0 4px;
  }

  .help-band--contacts .help-band__info-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
