.nido-tech-slider {
  --nido-tech-accent: #6AA842;
  --nido-tech-gap: 24px;
  --nido-tech-per-view: 3.6;
  --nido-tech-shell-width: min(
    calc(100vw - (var(--nido-gutter, clamp(22px, 4vw, 64px)) * 2)),
    var(--nido-shell, 1440px)
  );
  padding: 64px 0;
  background: #f3f5f5;
  overflow: hidden;
}

.nido-tech-slider__inner {
  width: var(--nido-tech-shell-width);
  max-width: none;
  margin-inline: auto;
}

.nido-tech-slider__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr) auto;
  gap: clamp(40px, 6vw, 110px);
  align-items: end;
  margin-bottom: clamp(52px, 5vw, 80px);
}

.nido-tech-slider__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #151819;
}

.nido-tech-slider__eyebrow::before {
  content: '';
  width: 34px;
  height: 2px;
  background: var(--nido-tech-accent);
  flex: 0 0 auto;
}

.nido-tech-slider__title {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: clamp(38px, 4.1vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 300;
  color: #151819;
}

.nido-tech-slider__intro {
  max-width: 48ch;
  padding-bottom: 4px;
  font-family: Montserrat, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: #6a7072;
}

.nido-tech-slider__head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 4px;
}

.nido-tech-slider__all-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 52px;
  padding: 13px 26px;
  border: 1px solid #6AA842;
  border-radius: 999px;
  background: #6AA842;
  color: #ffffff;
  font-family: Montserrat, sans-serif;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nido-tech-slider__all-link:hover,
.nido-tech-slider__all-link:focus-visible {
  border-color: #5B9138;
  background: #5B9138;
  color: #ffffff;
  transform: translateY(-1px);
}

.nido-tech-slider__nav {
  display: flex;
  gap: 10px;
}

/* Evita il flash di frecce inutili prima del controllo JS dell'overflow. */
.nido-tech-slider__nav[hidden] {
  display: none !important;
}

.nido-tech-slider__arrow {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(21, 24, 25, 0.14);
  background: rgba(255,255,255,0.68);
  color: #151819;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.nido-tech-slider__arrow:hover,
.nido-tech-slider__arrow:focus-visible {
  background: #151819;
  color: #fff;
  border-color: #151819;
  transform: translateY(-1px);
}

.nido-tech-slider__arrow:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

.nido-tech-slider__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  cursor: grab;
}

.nido-tech-slider__viewport::-webkit-scrollbar {
  display: none;
}

.nido-tech-slider__viewport.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

.nido-tech-slider__track {
  display: flex;
  gap: var(--nido-tech-gap);
  width: max-content;
  min-width: 100%;
}

.nido-tech-card {
  flex: 0 0 calc((var(--nido-tech-shell-width) - (var(--nido-tech-per-view) - 1) * var(--nido-tech-gap)) / var(--nido-tech-per-view));
  width: calc((var(--nido-tech-shell-width) - (var(--nido-tech-per-view) - 1) * var(--nido-tech-gap)) / var(--nido-tech-per-view));
  max-width: 430px;
  min-width: 260px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(23, 31, 32, 0.035);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.nido-tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(23, 31, 32, 0.07);
}

.nido-tech-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e9ecec;
}

.nido-tech-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}

.nido-tech-card:hover .nido-tech-card__media img {
  transform: scale(1.025);
}

.nido-tech-card__body {
  min-height: 250px;
  padding: 28px 28px 26px;
  display: flex;
  flex-direction: column;
}

.nido-tech-card__index {
  margin-bottom: 20px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--nido-tech-accent);
}

.nido-tech-card__title {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  color: #151819;
}

.nido-tech-card__text {
  margin: 14px 0 28px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  line-height: 1.72;
  color: #6a7072;
}

.nido-tech-card__link {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(21,24,25,0.08);
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #151819;
  text-decoration: none;
}

.nido-tech-card__link-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(21,24,25,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #151819;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nido-tech-card__link:hover .nido-tech-card__link-icon,
.nido-tech-card__link:focus-visible .nido-tech-card__link-icon {
  background: var(--nido-tech-accent);
  border-color: var(--nido-tech-accent);
  color: #fff;
}

.nido-tech-slider__progress {
  margin-top: 44px;
  height: 1px;
  background: rgba(21, 24, 25, 0.12);
  overflow: hidden;
}

.nido-tech-slider__progress-bar {
  display: block;
  width: 10%;
  height: 100%;
  background: var(--nido-tech-accent);
  transform-origin: left center;
  transition: width 120ms linear;
}

@media (max-width: 1024px) {
  .nido-tech-slider__head {
    grid-template-columns: 1fr 1fr;
    gap: 38px 48px;
  }

  .nido-tech-slider__head-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

}

@media (max-width: 767px) {
  .nido-tech-slider__head {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-bottom: 42px;
  }

  .nido-tech-slider__intro {
    max-width: none;
    font-size: 17px;
    line-height: 1.72;
  }

  .nido-tech-slider__head-actions {
    grid-column: auto;
    margin-top: 4px;
  }

  .nido-tech-slider__all-link {
    white-space: normal;
  }

  .nido-tech-slider__nav {
    flex: 0 0 auto;
  }

  .nido-tech-slider__arrow {
    width: 42px;
    height: 42px;
  }

  .nido-tech-card {
    min-width: 245px;
  }

  .nido-tech-card__body {
    min-height: 230px;
    padding: 24px 22px 22px;
  }

  .nido-tech-card__title {
    font-size: 17px;
  }

  .nido-tech-slider__progress {
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nido-tech-slider__viewport {
    scroll-behavior: auto;
  }

  .nido-tech-card,
  .nido-tech-card__media img,
  .nido-tech-slider__arrow,
  .nido-tech-card__link-icon {
    transition: none;
  }
}

/* =========================================================
   CTA GENERALE - coordinata con le CTA principali del sito
   Specificita alta per neutralizzare eventuali stili Elementor salvati.
   ========================================================= */
.elementor-widget-nido-technologies-slider .nido-tech-slider__head-actions .nido-tech-slider__all-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 52px !important;
  padding: 13px 26px !important;
  gap: 18px !important;
  border: 1px solid #6AA842 !important;
  border-bottom: 1px solid #6AA842 !important;
  border-radius: 999px !important;
  background: #6AA842 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 30px rgba(106, 168, 66, 0.16) !important;
  font-family: Montserrat, Arial, sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease !important;
}

.elementor-widget-nido-technologies-slider .nido-tech-slider__head-actions .nido-tech-slider__all-link::before,
.elementor-widget-nido-technologies-slider .nido-tech-slider__head-actions .nido-tech-slider__all-link::after {
  content: none !important;
  display: none !important;
}

.elementor-widget-nido-technologies-slider .nido-tech-slider__head-actions .nido-tech-slider__all-link:hover,
.elementor-widget-nido-technologies-slider .nido-tech-slider__head-actions .nido-tech-slider__all-link:focus-visible {
  border-color: #5B9138 !important;
  background: #5B9138 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  text-decoration: none !important;
}

.elementor-widget-nido-technologies-slider .nido-tech-slider__head-actions .nido-tech-slider__all-link svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

@media (max-width: 767px) {
  .elementor-widget-nido-technologies-slider .nido-tech-slider__head-actions .nido-tech-slider__all-link {
    min-height: 50px !important;
    padding-inline: 22px !important;
    white-space: normal !important;
  }
}
