/*
 * Revisioni richieste da Selcom (settembre 2026).
 *
 * I fogli "fidelity" (home-desktop, home-widescreen, mobile-fidelity) danno
 * alle sezioni della home altezze fisse in pixel, copiate dal sorgente
 * Elementor. Dove il contenuto e' cambiato o deve poter crescere, qui le
 * altezze tornano automatiche. Caricato per ultimo: vince per ordine.
 */

/* ---------- 4. Linee di soluzioni: fine elenco evidente ---------- */

.home .carousel-section {
  height: auto;
}

.home .carousel-shell--solutions {
  height: auto;
}

.home .carousel-shell--solutions .carousel-controls {
  display: flex;
}

.carousel-controls--progress {
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.carousel-controls__arrows {
  display: flex;
  gap: 10px;
}

.carousel-control:disabled {
  cursor: default;
  opacity: 0.32;
}

.carousel-progress {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 18px;
  max-width: 460px;
  color: #1c1c1c;
  font-family: "NexaLight", Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
}

.carousel-progress__count {
  flex: 0 0 auto;
  min-width: 5.6em;
  color: #8a8f96;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.carousel-progress__count strong {
  color: var(--selcom-red, #b3100d);
  font-family: "Nexa Bold", Arial, sans-serif;
  font-weight: 700;
}

.carousel-progress__steps {
  display: grid;
  flex: 1 1 auto;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 6px;
}

.carousel-progress__step {
  position: relative;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.carousel-progress__step::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: #d9dbdf;
  content: "";
  transform: translateY(-50%);
  transition: background 0.3s ease, height 0.3s ease;
}

.carousel-progress__step.is-visible::before {
  height: 4px;
  background: var(--selcom-red, #b3100d);
}

.carousel-progress__step:focus-visible {
  outline: 2px solid var(--selcom-red, #b3100d);
  outline-offset: 2px;
}

@media (min-width: 1101px) {
  .home .carousel-shell--solutions .carousel-controls {
    width: auto;
    margin: 34px 0 0 230px;
    padding-right: 7%;
  }

  .home .carousel-section {
    padding-bottom: 20px;
  }
}

@media (min-width: 1441px) and (max-width: 1999px) {
  .home .carousel-shell--solutions .carousel-controls {
    margin-left: 249.98px;
  }
}

@media (max-width: 600px) {
  .home .carousel-shell--solutions {
    height: auto;
  }

  .home .carousel-shell--solutions .carousel-controls {
    width: 84%;
    margin: 18px auto 0;
    gap: 14px;
  }

  .carousel-progress {
    gap: 12px;
    font-size: 14px;
  }

  .carousel-progress__count {
    min-width: 3.4em;
  }

  .carousel-control {
    width: 40px;
    height: 40px;
  }
}

/* ---------- 5. Domini operativi: la sezione segue il widget ---------- */

.home .domains-section {
  height: auto;
}

/* ---------- 7. Il valore della scelta Selcom: ora quattro riquadri ---------- */

.values-track {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 1101px) {
  .home .values-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 601px) and (max-width: 1100px) {
  .values-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home .values-section {
    height: auto;
  }
}

@media (max-width: 600px) {
  /* L'altezza fissa della testata tagliava l'ultima riga del testo introduttivo. */
  .home .values-section {
    height: auto;
    padding-bottom: 40px;
  }

  .home .values-section__head {
    height: auto;
    margin-bottom: 28px;
  }
}

/* Titoli dei riquadri allineati in alto, non centrati sull'altezza del testo. */
@media (min-width: 1101px) {
  .home .values-section {
    height: auto;
  }

  .home .value-card {
    justify-content: flex-start;
    height: auto;
    min-height: 0;
    padding: 34px 24px 38px;
  }
}

/* ---------- 15. Company: i cinque riquadri sempre interi ---------- */

.home .company-section {
  height: auto;
  min-height: 0;
}

/* Il contenitore delle card aveva la stessa altezza fissa di UNA riga:
   quando le card vanno su due righe la seconda finiva fuori sezione. */
.home .company-section .selcom-company-hub,
.home .company-section .selcom-company-hub__cards {
  height: auto;
}

/* 3 + 2 centrati: griglia a sei colonne, ogni card ne occupa due. */
@media (min-width: 981px) and (max-width: 1400px) {
  .selcom-company-hub__cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .selcom-company-card {
    grid-column: span 2;
  }

  .selcom-company-card:nth-child(4):not(.is-expanded) {
    grid-column: 2 / span 2;
  }

  .selcom-company-card.is-expanded {
    grid-column: 1 / -1;
  }

  .home .company-section .selcom-company-card {
    height: auto;
    min-height: 400px;
  }

  /* Con una card aperta le altre quattro stanno su una riga sola. */
  .selcom-company-hub__cards:has(.is-expanded) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .selcom-company-hub__cards:has(.is-expanded) .selcom-company-card:not(.is-expanded) {
    grid-column: auto;
  }
}

/* Tablet: due colonne invece di una card larga quanto lo schermo. */
@media (min-width: 681px) and (max-width: 980px) {
  .selcom-company-hub__cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .selcom-company-card {
    grid-column: span 2;
  }

  .selcom-company-card:last-child:nth-child(odd):not(.is-expanded) {
    grid-column: 2 / span 2;
  }

  .selcom-company-card.is-expanded {
    grid-column: 1 / -1;
  }

  .selcom-company-card__content {
    text-align: center;
  }

  .selcom-company-card__title {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .home .company-section {
    height: auto;
  }

  .home .company-section .selcom-company-card {
    height: auto;
  }
}

/* ---------- 18. Contatori: il "+" dopo il numero ---------- */

.stat strong {
  white-space: nowrap;
}

.stat strong [data-count-to],
.abt-number__value [data-count-to] {
  font-variant-numeric: tabular-nums;
}

/* ".stat span" e' l'etichetta: il numero dentro <strong> non deve ereditarne lo stile. */
.stat strong span,
.home .stat strong span {
  display: inline;
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}
